A mobile environmental logger using an 18M2


My wife and I have been retired 9 years and spend at least 2 months a year traveling, mostly by car or RV, 85 trips so far, two trans-continental. In addition to photos, we take a Q*Starz recording GPS and a Davis Instruments CarChip. We usually also take the Picaxe altimeter I made in 2008, which has proved reliable.

This project adds recording of temperature, humidity, and altitude. Also battery voltage, since our RV refrigerator runs on the house batteries.

It is housed in n oak box 8x5.5x4 in, and runs on vehicle 12V. The temperature and humidity probes plug in. It has three sensors:

1. A DS18B20 digital temperature IC on a probe, which can be obtained from Satistronics ready-made.

2. An external AM2301 humidity and temperature sensor, also from Satistronics.

3. An internal MPX-5100A analog pressure sensor MEMS, from Digi-Key,

There are 2 interior metal sub-assemblies, front and rear, inter-connected by a 15-pin ribbon cable. The front assembly contains:

1. A 12-position rotary switch for display selection, and a 16-segment voltage divider on a board.

2. A Ledtech UN(M)5624 4-digit 7-segment green LED display and a MC14489 driver/multiplexer on a second board.

3. A RogueRobotics uMMC Secure Digital (full-size) to serial interface and on-off switch.

The rear assembly contains:

1. A board containing a power regulator and 5-to-1 voltage divider to monitor the supply voltage.

2. A board containing the Picaxe 18M2 and a DS1302 clock-calendar with a CR2032 backup battery.

3. A board with the MPX-5100, its amplifier, and the AM2301 PWM to DS1302 interfacing circuit.

4. A 3-way momentary toggle switch for adjustments.

5. Connectors for programming, power, temperature probe and the AM2301.

The Picaxe program has an initial one-time initialization section and a main loop, plus sub-routines. The Picaxe runs at 16 MHz and the loop is asynchronous. It has three sections:

1. Data acquisition. Every loop: Switch position, pressure and time/date. Once per minute: Supply voltage, probe and humidity. The data is stored in the Picaxe un-labelled variable space in ASCII.

2. Adjustments for time and pressure offsets.

3. Display selection and interfacing.

4. Recording in spread-sheet-compatible format in pre-set year and month sub-directories, one file per day.

This project had great complexities both for the circuit and the software. The DS1302, the MC14489, the AM2301,the DS18B20 and the SD interface all have incompatible serial interfaces. The data items varied from 4, 8 and 16-bit. Data coding varied from binary, BCD and ASCII. Some were LSB-first and some MSB first. The DS1302 RAM used LSB first for the address, followed by MSB for the data byte.

Calculation of altitude from pressure requires segmented mathematics. The output of the AM2301 uses the DS1302 as a serial-to--serial speed changer. I could have done more but ran out of program space.

I don't think I would have got it right without my Tektronix Digital Storage Oscilloscope, a gift from my ever-loving wife.

I have made two accessories for this project. One is a battery backup in a small wood box with charging circuit. The second is a line-powered supply for the batteries. This also has a setting to output a DC voltage which is 1/10 of the AC line voltage. This is used to check campground power when connected to the Mobile Logger directly.

Print Page



  • Login to leave a comment.