Close

Optimize Reading Sensors

A project log for Wireless Temperature & Humidity Card

A credit card size Wireless Temperature & Humidity Node power by CR2032 Coin Cell

Will WhangWill Whang 01/06/2018 at 14:400 Comments

Since every ADC needs time to sampling analog voltage, most digital sensor need some time after being request for the data somehow, normally a example for Arduino will be something like this:

float temperature = readTemperature();
float humidity = readHumidity();
long pressure....
...
senddata();

And normally the power consumption plot will like:

The peaks is RF transmitting and Sensor sampling data, notice that the high power consumption between these peaks, mostly these are consumption by Arduino, the problem is that most library interface to sensors using delay to wait for the data, by changing it to :

start_temperature_sampling();
start_presssure_sampling();
sleep();
float temperature = readTemperature();
float humidity = readHumidity();
long pressure....
...
senddata();

the power consumption can minimize a lot, power consumption will like this:

Or in real case:

Discussions