Designing a simple and cheap temperature logger. Part 2

Today, we’ll see how much the logger costs and try to approximate a power budget.

First, I was really surprised of how many people were interested in this project. I guess I have to keep on working on it.

I also forgot in my specifications that the logger shouldn’t need any driver or software to operate. An important plus for the product.

I took the standard prices form Farnell.fr to have an idea of the cost of a few prototypes. It should be possible to find a cheaper place or to order some of the components directly from the manufacturer (like the microcontroller). Let’s say it’s just to have a rough idea:

USB Temp Logger Components Prices

The final price is without VAT and shipping. For the PCB, I took iTeadStudio with two temperature loggers per 5x5cm board.

Then, I checked the cost for 1000 quantity for each component and the direct-from-manufacturer prices when possible. Once again, without VAT and shipping:

USB Temp Logger Components Prices 1000 qty

As expected, it’s twice cheaper and it’s only for 1000 pieces and without bulk factory prices. Of course, it’s based on the prototype and a final product would also have a casing and some ESD/CEM protections, which adds cost. But so far, I find it cheap enough.

For the power consumption part. The only thing I can do for now is to take values from the datasheets and try to calculate/extrapolate a theoretical life on battery power.

USB Temp Logger Power Chart

The logger will be designed to be in sleep mode most of the time. The microcontroller has a “deep sleep” mode (500nA) and wakes up by setting an alarm in the real time clock module. The temperature sensor and memory also have sleep functionalities.

Depending if the pins used for the serial buses are open drain or not, there can be current flowing trough the pull-up resistors, which could increase the sleep current as could also the 1,8V regulator’s quiescent current. Adding the numbers up gives an expected sleep time of almost two years (15,5uA) with one CR2032 battery. Not bad.

The power calculation gets more speculative for the temperature acquisition. The biggest problem will be to provide the flash memory current during writes. It’s 12mA. The time needed to program one byte is 15us. There will probably be a minimum of twenty bytes to be written, which gives 300us to write one temperature point, plus 25us for the deep sleep exit time. The PIC needs 1,5ms to exit the deep sleep mode. One temperature acquisition is performed in 35ms max. Let’s base our calculation on a 100ms not-sleep time (3mA) and a 400us flash write time (14mA).

We will also suppose the battery’s voltage won’t drop too much while supplying 12mA@1.8V (1.8V plus the regulator’s drop out voltage).

To summarise (currents and times not to scale):

USB Temp Logger Current Graph

Say the temperature measurement period would be one minute (60 per hour), we need to calculate the average current per hour and divide the battery capacity (225mAh) by this result. I keep times in milliseconds, thus the 3600 000 number (milliseconds in one hour). We will use the average current during wake-on: (3mA*100ms+15mA*0.4ms)/(100ms+0.4ms) = 3.04 mA

I’m using this formula (this site has a calculator: http://oregonembedded.com/batterycalc.htm):

Battery Life Equation

(Where BATTmAh is the battery capacity, ONmA is the current consumed during wake-on time, ONms is the temperature measurement time, ONph is the number of measurements per hour and OFFmA is the current in sleep mode. The result, th, is the time the battery will be able to power the logger, in hours. Divide by 24 to have the numbre of days)

{225 / [ ( 3.04*100.4*60) + (0.0155* ( 3600000 – ( 100.4*60) ) )]/3600000}/24

≈{225/ [(18313+55707)/3600000]}/24

≈{225/0.0205}/24

≡456 days.

Hmm.. That’s a lot and I don’t think it’s true. First, we don’t take account of the battery’s voltage evolution vs. minimum voltage required to power the components (remember, 2.5V). Then, I’m sure drawing 15mA from the battery, even for a very short period of time, will affect a lot its life time.

Let’s try to be more realistic and use different numbers.

Half of the battery capacity: 110mAh

More current drawn during on-time: 6mA

That’s 180 days, a bit more realistic.

I think the only way to get a true estimation of battery life during temperature acquisition operation will be to measure the real current for the wake-on time, plus measure the battery’s voltage drop while drawing the 15mA for memory write. But that’s for the next episode…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s