Remote sensor transmitter/receiver

From HeepyWiki
Jump to: navigation, search


main.c sht15.c sht15.h

Use watchdog timer to go into full power down in between samples.

1. wake up
2. sample the temp/humidity sensor
3. turn on the transmitter
4. transmit the data
5. turn off the transmitter
6. setup the WDT
7. go to powerdown mode.

baseline (sleeping) 38 uA
        (i leave the sensor turned on since it goes into its own
        sleep mode in between samples and doesn't draw much)

reading sensor (transmitter off): 8 mA

transmitting: peak 32.7mA, but since in transmitting we try to
        achieve close to 50% duty cycle, it averages at 14.3mA

with an 8 second sleep between samples, that's

300ms at 8mA  .0024 amp*sec
160ms at 14.3mA  .002288 amp*sec
8.0s  at 38uA .000304 amp*sec

                .004992 amp*sec / 8.46 sec -->
                        .00059007 amp avg, or
                        590 uA

This is pretty terrible. More effort could go into lowering idle power, by switching sensor/radio power directly, but mostly by shortening read and transmit time. In this case it's not too bad since the battery is opportunistically charged by a solar panel via MCP73811T charger chip.