The factory image for hamilton-7C/3C.
This code will work out the box on the hamilton-7C (with PIR) and hamilton-3C.
It senses every SAMPLE_INTERVAL microseconds, encrypts the sensor data under the symmetric key flashed into the device with pflash, and sends it.
The power consumption of a 7C with this firmware has been measured at
INTERVAL | POWER CONSUMPTION | IDEAL BATTERY LIFE |
---|---|---|
10 s | 37 uA | 4.6 years |
20 s | 21 uA | 8.2 years |
30 s | 17 uA | 10.0 years |
NEVER | 9 uA | 19.0 years |
The ideal battery life is assuming a 1500mAh battery with no self-discharge. In real life, results will vary. The power consumption is given as the current term, multiply by the system voltage to get the power. We have found that the whole system current only varies slightly with voltage, so it is more useful to record the current than the power. (In other words at 2.2v instead of 3.3v the idle current will still be 9uA but the "power" will drop by 33%).
These results are taken in an unoccupied room. The hamilton-7C consumes on average 75uA if the PIR sensor is continuously triggered while the firmware is configured for a 30 second reporting interval. This would equate to about 2.3 years.
These average power figures are very accurate for a 25C environment.
The power consumption profile looks like the following figure. Due to our measurement technique, the Y axis is only an approximation of the instantaneous power consumption. The average power figures above are far more accurate.
There is a period of approximately 22ms in the beginning where the device senses air temperature and humidity.
Then there is a long period of about 500ms where it senses radiant temperature (the power consumption in this period is about 250uA). Then it senses illumination, accelerometer and magnetometer, as well as aggregating PIR events and button events. It then encrypts all this data and transmits it. This second part looks as follows:
If the PIR sensor is triggering, there will be periodic events that look as follows:
These are basically the chip waking up and recording the timestamp of the PIR event for later aggregation.
This is version 2.0 of Hamilton-3C QFW.
- Changes from <2.0 include adding support for all sensors