[sim-wg] Regarding Power consumption
Venkatesh S.
svenkat at cedt.iisc.ernet.in
Sat Feb 3 03:23:17 PST 2007
Hello :
As per the direction of Phil, I looked around the HPL implementation of the I/O maps for Atmega Microcontroller. There is a file which has the implementation of the pin's functionality (set and clear). Instead of getting the pin status at a particular interval of time, I thought of having some modifications in the file itself. The Pin configuration file (HPLAtm128GeneralIOPinP.nc in the sim directory) has commands which sets or clears that pin by calling the macros.
Power estimation can be done in such a way that the Pin configuration file maintains the track of total time spent in clear/set states and at the same time update the Power-Estimator-Engine. The power estimator engine based on the port and pin numbers, computes the energy spent over the time. The port-pin have to be specified to the power-estimator and also the amount of current that is drawn by the pin for each set/clear.
For example, if a Led is considered, then pin A0, A1, A2 are mapped to led0, led1 and led2. But getting this information to the Power-Estimator-Engine is where i have got stuck. To just test this around, i had a header file, which specifies the ports that are used and their current consumption, accordingly the Power-Estimator-Engine computes the energy spent.
The Energy computation is from the basic principles E = V x I x t. For example if i consider Led, I = 2.2 mA on a mica2 mote, and V = 3v, t is the time spent in the On state of Led (in other words, pin being active low). I took a normal blink application, which On's and Off's the led0 for every 1 second. From the boot time, for 10 secs, the pin is held active low for 5 times, which means, E = (3 * 2.2 * 1) * 5 = 33 mA (approximately). When i looked at the implementation of the Tinyos-1.x power Tossim, it used to do the same way. My feel is instead of keeping the the Voltage constant(as done in Tinyos-1.x), it has to vary over the time. To do that, we need to have a voltage-discharge curve over the time.
I need some guidance for implementing the CPU profiling part.
--
Regards,
Venkatesh S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/sim-wg/attachments/20070203/427b8d46/attachment.html
More information about the Sim-wg
mailing list