[I’m writing about this project at the same time I’m working on it. It’s not finished yet, so please forgive the errors I could make (and don’t hesitate to slap them on my face)]
Some time ago, I was looking for a temperature logger. After checking what was available on the market and the prices, I decided to make one myself.
- Battery powered
- No docking station
- Configurable period of acquisition
- Time stamped temperature
- At least 30 000 temperature acquisitions
Ideally, it would be USB key shaped. The presence of a battery and no docking station limit the temperature range to the battery maximum temperature specifications (-20°C -> 70°C).
As I didn’t find any easily available rechargeable battery that could fit into a USB stick enclosure, I decided to use a coin cell battery, CR2030 type. It’s 3V, 200mAh and should last enough to log the number of temperature measurements in the spec.
The temperature sensor would be a cheap serial one (they usually have a good precision). The memory, serial, cheap and big enough. Once plugged into an USB port, the logger would be seen as a USB key with two files. One with the temperature measurements and the other, user editable, with the configuration of the delay between every temperature acquisition. The acquisition will be started by a push on a microswitch.
To reduce the costs and size, the microcontroller should be able to manage the memory, the temperature sensor, the USB communication and have a real time clock.
- Temp sensor: Texas Instr. TMP102AIDRLT
- Microcontroller: PIC18F26J50
- Memory: Atmel, AT25DF081-SSHN-B
The temperature sensor is 0,5°C accurate and takes from 1.4V to 3.6V for power supply with a 10µA current (1µA in sleep mode).
The memory has needs a supply power form 1.65V to 1.95V, 12mA write current and 8µA deep sleep mode current.
For the PIC, it’s 2.15V minimum for an average current of a few mA when running and a few µA in sleep mode (or nA in deep sleep mode)
Then, we need a voltage regulator for the PIC and temperature sensor (3.3V, when in USB mode) and an other one for the memory (1.8V).
When not plugged in a USB port, the coin cell powers directly the PIC and sensor but the memory is powered by its own regulator.
The power supply voltage can drop as low as 2,15 V (PIC’s minimum). With a new coin cell and a 0,35V Schottky diode (to prevent the USB current flowing back to the battery) the logger will stop working once the battery reaches 2,5V. This 0,5V margin may appear small, but the battery’s standard discharge curve in the datasheet shows a fast drop in the remaining capacity, around 2,5V:
It’s even more obvious with a lower current draw:
After 2,5V, the remaining capacity can be as low as 10% of the initial capacity for high current discharge and even a lower percentage with a lower discharge current.
To be continued…
Part two is here