Let's Make Robots!

Running a MicroController off a SuperCap

Because I keep daydreaming about wiring up my house with dozens of sensors, I was wondering how hard it would be to power a micro controller (say picaxe) off a super capacitor.

A supercap is an electrolytic capacitor with an insanely large capacitance. Mine is half a Farad, 470000 uF. But is rated for only 5.5 V. That's the deal with these caps. Higher capacity at the expense of the maximum voltage they can endure. Or simply at an expense. This one costs about $4 at DigiKey.

I setup a Picaxe 28x1 on a breadboard with all the usual trimmings: pullup resistor for the reset pin, a serial connection voltage divider and the supercap as unregulated power supply. A voltmeter was attached to monitor the voltage of the supply. I also added a simple voltage divider consisting of a 1k resistor and a 5k thermistor. Because this is the intended application: to sense temperatures across the house and signal the readings along a serial line to the central data collection machine.

A simple program was devised that takes 10 ADC samples and then transmit an average over the serial line. Repeatedly without pauses. This program wastes little power. The picaxe consumed about 1.0 mA when I fed it 5V from a battery.

Then I timed two runs of that program while powered by a fully charged (5V) supercap.

without "brownout detection": 38 minutes
with "brownout detection": 33 minutes

That is more than sufficient for my needs. I think I am going to see what regular caps do..... ( uhhmm, never mind. From 5V to 2V in less than 5 seconds using a 1000 uF cap. Makes sense. That thing is 470 times smaller.)

PS without brownout detection, my picaxe crapped out at 1.175 V while still sending rubbish on the line. With detection, it stopped before rubbish could form. That was at 2.1 V. Lower supply voltage will greatly reduce your picaxe's power consumption. At 2V my supply current was about 40% of what it was at 5V. That's a reduction from 5 mW to .8 mW. My picaxe should run a lot longer, with a bit of voltage regulation done right.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I think I read somewhere that adding a pull down resistor on all NC IO pins also can reduce current consumption.

Did not notice a difference that was more pronounced than the natural fluctuations in over all power consumption.

Although it depends on your application, if you are doing something like reporting the room temperature which really only needs to be updated every 5 minutes or so then the Sleep command will put the processor into low power mode and use an internal watchdog timer to wake it up periodically.

There is also a doze command that works in a similar manner but keeps the timers running.

For Ultralow power consumption there is the hibernate command that makes the processor sleep until an interrupt or reset occurs.

If you add a small solar pannel and leave it near a window then I suspect it could run almost indefinitely.

Pullup resistors can probably go to at least 100K. The only disadvantage of high pullup resistor values is they are more prone to electrical noise.

You could add a transistor to your thermistor voltage divider to allow the processor to turn it off when not in use.





And so the quest for energy conservation begins. In the micro Ampere range.

Bringing back the internal clock from 8 MHz to 31 kHz reduces the power consumption of just my picaxe from 1000 uA (in the original experiment) to about 400 uA. Now all of a sudden the surrounding circuitry becomes very relevant. Some raw numbers from a battery powered (5 V) circuit:

Pull up resistor on the reset pin? Live dangerous and make it 22 kOhm (as opposed to the documented 4.7 kOhm). It is still stealing between 0 to 100 uA depending on the status of the mcu.

My thermistor voltage divider is a big slurper! The thermistor itself cannot be changed (until I do some more shopping,  or change the temperature in the room). Its maximum R is 5 kOhm. The resistor in series was upped to 47 kOhm. It now eats about 100 uA. Unless you power down the MCU. The ADC begins to sink a current through the resistance that is separating it from V+. Make sure it is the higher resistor. For my setup that means a difference between ca 350 uA (depending on temperature) and an exact 104 uA (fixed).

Unfortunately, it is not possible to set the Picaxe serial monitor to anything below 300 bps. So for the serial comms, I need to temporarily raise the internal frequency to 250 kHz. The total current draw of the circuit jumps from ca 520 uA to 800+ uA.

I need a serial terminal that can do 300/8 = 37.5 bits per second.... Perhaps a second picaxe ;-)

This just popped to my mind: Check out energy harvesting (http://en.wikipedia.org/wiki/Energy_harvesting) and sensors using it. I ran into those briefly at work couple of years back. Back then there was a lot of talk about Zigbee and/or Z-Wave enabled temperature sensors that harvested their power from vibration and/or ambient temperature changes. I'm not sure if there are any real product for sale and if there is, it could be a bit pricey.

I'm somewhat interested about this myself because I'm thinking about building a weather station that I might expand later to monitor temperature inside in different rooms.

Edit: I did some googling and found some interesting links. Here's couple:
Some Zigbee temperature sensor: http://www.printedelectronicsworld.com/articles/zigbee-wireless-temperature-sensor-energized-by-a-thermo-generator-00002347.asp
Energy harvesting modules: http://www.enocean.com/en/energy-harvesting/
Way too expensive sensor kit: http://www.kcftech.com/products/wirelesssensors.shtml
Best hit so far, Self-powered wireless sensors: http://www.enocean-alliance.org/en/sensors/


Thanks for documenting those links here. Will definately look at those, further down this road.

You can also reduce the operating frequency to khz levels to really get low power consumption....I've heard it done with the peek and poke commands(down to 32khz).  That may give you a bit more running time, though the serial output would be affected....spi would be an alternative for dataoutput though.

Picaxe basic has a command to do that: setfreq. It indeed goes as low as 31 kHz on a Picaxe28x1. I have yet to determine a suitable serial protocol for this. Running comms and power supply over the same two wires is a challenge. I might have to abandon the Picaxe all together.

I will run a new test with lowered frequency anyway. I am just that curious.

While you're poke-ing around in the PICAXE's settings, take a look at what peripherals you can turn off to further save power.
The PIC datasheets usually have a nice list near the end which contains the expected current consumption of various peripheral modules that can be disabled.

Please elaborate. What would a micro controller (and the Picaxe specifically) consider a peripheral? And how would I turn them off (oh well, I need to study more manuals and datasheets)?

The main challenge is going to be serial comms at a high enough signal voltage to make it accross my cheap network cables, while still feeding the nodes through the same conductors. Probably not at the same time, but alternating.