In this post, Gaurav from Circuitvalley is going to quickly describe , how to make really low power Wireless Temperature sensor for Outdoor Temperatur Monitoring.
—- In his own words —-
Though in this demonstration I am only having Temperature sensor but in theory you can have any type of sensor connected to processor and get in transmitted over RF.
As primary concern of this whole project is to have a low power Transmitter so lets look at expected power consumption.
As per our requirements we need to transmit Temperature Data at least once per minute.so we will setup a timer interrupt to genrate interrupt every minute take sample from Sensor Transmit it over RF and go back to sleep once again.Most of time whole system will be sleeping waiting for interrupt to arrive. so sleep current of all the devices we are using are really important. the big question is what datasheets says. First we are going to estimate then will measure real value in circuit.
How Low power is this?
1. Microcontroller: we are using really low power MSP430FR5739 Microcontroller from Texas Instruments. as per table give blow from datasheet of MSP430FR5739. we will need at least once clock source for our every minute timer interrupt. so we can not go blow LPM3,VLO , we will be using VLO as clock source for our timer. current consumption in LPM3,VLO is maximum 15uA in ambiant temperature of about 25C but as this product is going to be outdoor so temperature will swing a lot. As you higher in temperature current consumption go high . so you can expect current consumption of MCU anywere between ~5uA to ~60uA. this is really a rough estimate. as datasheet does not say anything about maximum current at temperature except 25C and 85C.
2. Wireless Transmitter. we are using NRF24L01+ from Nordic Semiconductor. As we will be transmitting only once per minute ,for only short while most of time transmitter will be in standby-I mode. we can also put into power down mode but , Standby-I mode is good enough for our purposes. As per datasheet power consumption in Standby-I is typically 26uA . but as this is typical value maximum value may be double or even tripple of this. for safe side we can consider it be around 60uA
3. Temperature Sensor. We are using DS18B20 Temperature sensor. Sensor also consume really little current when in standby. from 750nA to 1000nA max. but we need to take care of the pull up register which is connected to dataline.
4. Power Regulator . As we are having li-lion battery which will go from 3V to 4.1V we need a power regulator. Regulator need to have two properties first it need to have very low dropout in order to have Maximum use of battery voltage second as regulator will be always on we can not look at standby or sleep current any more we need to look at quiescent current very very low quiescent current is primary requirement . After a careful search i have found TPS70933 regulator from Texas instrument . It have very low quiescent current of about ~1uA typical and maximum <5uA Iin when no load is connected.
So as we are done with all of the components lets design Schematic
I have already made PCB design for an another project with same MCU so i am using that same board here also with some added PCB. The project this PCB is designed for will follow soon.
you can download PCB design From my account
Firmware. implementing low power system need few things to be taken care of . Although MSP430 MCU are designed to be easily manageable in low power modes.
we just to initialize 1. System Clock.2. one minute timeout timer with interrupt 3. GPIO for 1 Wire Temperatur Sensor.4. NRF24L01+ module.
you just need to execute one instruction and CPU will enter desired low power mode
_BIS_SR(LPM3_bits + GIE);
in the instruction above you need to say which low power mode you want to get into and if you want interrupts to be enabled or not.
when timer generate interrupt system will wake from interrupt , read Temperatur sensor and then go back to sleep.
Transmitter Current .
Please take a look at images blow , i have put a 100Ohm resistor in series with power supply and measuring input current before regulator , Input from my Lab Power supply is about 5.5V , so it will compensate for large drop with the Rsens Resistor.
|Power on Reset and one sample Transmit |
|One sample Transmit |
Average Current and Battery Life calculation
1. Sampling Starts with Sensor setup with last about 10mS with current of ~600uA.
2. Temperature Sensor samples for about 610ms with Current of ~1.2mA.
3. Processor process sample and loads into RF module it take about 180mS with current ~600uA
4. RF module start actual Transmission over RF with current of 22mA for only about 225uS.
Whole process of Sampling and Transmitting takes about 800mS. and if do calculation for Average Current. your result will be 1.0573mA for 800mS.
As System Sleeps with sleep current about 120uA. Sleep Current of MCU is significantly larger than expected. I have two Prototype once give me only about 25uA(MCU only) sleep current and another give me 98uA (MCU only) Sleep Current.
Because we transmit once every minute , system sleeps for 59.2 Seconds with 120uA and Active for only 800mS with 1.0573mA. Average Current of System will be 132.32 uA .
With 132.32uA Current 1200mAh Li-Ion Battery which i am using will last for 377.87 Days which is 6.29 Months.
As Battery are highly sensitive to Temperatur and it an outdoor unit. so Battery life will be highly affected.
Wake Up Timer , Clock source inaccuracy
we are using internal VLO to generate interrupt every 60 seconds but as Temperatur varies frequency output from VLO also changes and it change drastically.
From data sheet of MCU you can see , VLO frequency accuracy and precision is already Value range from 5Khz to 13Khz , even this get affected with 0.5% per degree C.
i absolutely need at least once sample per minute so i have chosen minimum value which is 5khz for all of my calculations. which mean even if VLO is running at its lowest value , i will be always getting at least one sample per minute.
Receiver Also implemented on same processor. As sample is received , Receiver send it over UART with Baud Rate of 115200 , and i use serial terminal program to view results