Welcome

Conclusion

The method to power a microcontroller from one AA-battery outlined in this article seems to work just fine, and as long the uC keeps doing it's thing in respect to generating PWM-pulses and eventually adjusting the duty cycle in respect to the current voltage. It does have a couple of disadvantages, though: first of all, bootstrapping isn't always too easy, depending on the coil and switch used. Secondly, the microcontroller controls its own power supply, which in theory could mean it can blow itself up due to a software bug. Use a zener across the power supply lines if you think you're going to run that risk. Thirdly: Pressing the on-button in the circuit I designed means pulling a large current from the battery, so in theory keeping the button pressed for some time could drain the battery.

There are a few advantages to using this method, too: low part count, no hard-to-find parts, soft power-off, to name a few. The decision to use this circuit is dependant on the advantages outweighing the disadvantages. That, as always, is a choice specific to the particular project, though.

« Prev 4 

56 comments

ClusterBuster wrote at 21 Feb 2019, 13.22:

Also... 1) NCP1400 (and 14xx in general) would do the trick. 2) Same for some Torex step-ups and so on. These are essentially MOSFET-based boost converters, optimized for low startup voltage. If one wants to use "just FET", there're discrete FETs with threshold voltage of about 0.7V, those would do the trick as well. Most notably some Vishay FETs, some IR (some of IRLH series) and so on.

Timo wrote at 13 Apr 2018, 17.51:

Cheap solar lamps have a 4-pin boost converter that boosts one NiMH cell to whatever. It also has a built-in on/off control based on measuring the PV volatge.

JohnSmith IV wrote at 17 Oct 2016, 3.41:

Capn it is generally bad idea to push whole inductance kickback through GPIO pin. GPIO pins aren't meant to be able to cope with ALL energy you're going to use to power microcontroller and whatever else. This way you'll end up using GPIO port to supply all power circuit handles. Which is crappy idea generally. OTOH, mosfet is way more rugged device, any decent-sized mosfet with low Rds on wouldn't mind passing whole kickback from the coil. This could be quite noteworthy energy pulses and GPIO ports transistors are very small and fragile, at the end of day you could end up frying or degrading GPIO port. So it could somewhat work from logical point of view but could get microcontroller hurt when it comes down to physics. After all, GPIO ports have relatively weak, small and high Rds_on MOSFETs (being part of IC die implies that) which aren't exactly hard to fry by considerable energy pulese. In "real" mosfet whole die is dedicated to conduction, needless to say it warrants much better current handling capacity :P.

Capn wrote at 21 Oct 2013, 3.42:

Can the MOSFET be eliminated by running the coil/diode junction directly to a MCU pin? When the pin is set low, there'll be a conduction path to GND through the MCU...

Kuba wrote at 17 May 2013, 19.59:

Your major problem is that the inductor is charged and discharged with an AC current (the chopped waveform) that passes through the battery. The batteries are notoriously bad at such frequencies. You need an input capacitor on the left of your inductor, between the input pin and the ground. A small SMT tantalum will work - say 10-100uF, 6V. You also need to make the area of the two current loops small. Loop 1: inductor-input capacitor-switch. Loop 2: input capacitor-inductor-diode-output capacitor. Ideally, those loops should be under 1cm long. When you re-measure things, you may see that your efficiency is up by 5-10%. Make sure you measure the power, not just the current. You need a true wideband power meter to deal with such waveforms (a digital oscilloscope with a current probe and a voltage probe might do).

Christian wrote at 31 Oct 2010, 18.27:

Workaround: First, I coundn\'t get this circuit work. Then I tried to change the capacitor value. By that, I found out that the circuit worked by short-cutting the capacitor by the switch-button instead of short-cutting the transistor.

vndklpp wrote at 19 Aug 2010, 17.48:

Excellent, but I think the circuit can be simplified! Has any one tried powering a PIC through a GPio pin. The PIC GPio pins have diodles which clamp it to Vdd and Vss. Why can\'t these diodes be used to create a voltage doubler ciruit. This can be done by connecting a inductor and capacitor in series to a GPio pin. When the GPio is switched the inductor will create an inductive pulse which will be doubled by the capacitor and clamping diodles. A capacitor connected to Vss and Vdd pin of PIC will store the pulse and power the PIC. using the clampig diodes from a GPio pin

hmm wrote at 22 Apr 2010, 16.22:

Regular SMPS boost converters bootstrap and power themselves. How do they do it? Can an ADC be used to regulate the output? What\'s the performance limitation compared to a dedicated boost converter? \"what about connecting directly the coil to the PWM pin?\" Did you ever try this? They\'re cheap enough to experiment with. Sounds like this: http://micah.navi.cx/2008/09/using-an-avr-as-an-rfid-tag/ \"When the coil starts to pick up power from the RFID reader, these two I/O pins are presented with a sine wave, a few volts in amplitude. Anywhere that sine wave exceeds the supply voltage, some energy is diverted from the coil to the chip’s supply rails, via the clamping diode. The end result is that the chip is powered, and the coil’s sine wave is truncated.\" Keep in mind: Maximum DC Current per I/O Pin 40.0 mA

Alastair DSilva wrote at 21 Dec 2009, 20.42:

Thanks for a great concept. I have written a library for the Arduino to do this with feedback - http://alastair.d-silva.org/arduino-based-switchmode-voltage-regulator I played last night with connecting the supply of the boost converter to a 3.3V supply, and the output to the +5V line of the Arduino. Interestingly, the Arduino (Atmega168) self started from the 3.3V supply, without requiring a button to bootstrap the device. This is quote cool, as it means you can run +5V projects from an 18650 battery. I have noticed in buck mode that the best I can get out of the regulator is around 3V under the input voltage. My guess is that the N channel MOSFET is not being switched on fully. I\\\\\\\'ll have a crack at using a P channel MOSFET in a couple of weeks, when parts arrive.

salec wrote at 13 Nov 2009, 15.47:

"Thirdly: Pressing the on-button in the circuit I designed means pulling a large current from the battery, so in theory keeping the button pressed for some time could drain the battery." Perhaps you could put a big enough capacitor (in parallel with a bleeder resistor to discharge it afterwards) in series with the button?

Pfosten wrote at 12 Jul 2009, 14.59:

@hoppy16: I tried that yesterday and it worked. Used a tiny2313 and a 800kHz PWM signal, fixed 50% duty cycle; 1.2V NiCD as source. The bad thing is that you need quite a large inductance (I used one coil of a 47mH line filter) to boot the circuit even with a small (4u7) capacitor.

andre wrote at 12 Jul 2009, 10.32:

neat, now you might find this handy. A flashing LED will generate enough voltage change even at 1.5V to "bootstrap" this circuit without requiring a switch, also another way is to use a yellow "flicker" LED from a candle lamp. note that the LED won't light up much -A

Dieter wrote at 9 Jul 2009, 21.37:

Same question as Ben... I'm not really all too sure about electronics (learning bit by bit), but just wondering... How do you control the voltage charged upon the capacitor? There's no measuring anywhere (or so it seems - am I wrong?)...

Ben wrote at 9 Jul 2009, 4.25:

Awesome idea! How can the uC measure the voltage on an analog pin? Doesn't the analog pin just measure voltages relative to a reference? And you don't have a reference that can be trusted, right?

Gabriel wrote at 8 Jul 2009, 19.48:

You could also get increased efficiency by using a schottky diode in place of your "regular" diode -- less voltage drop across them.

hobby16 wrote at 8 Jul 2009, 8.15:

Hi, what about connecting directly the coil to the PWM pin? You'll use 1) the internal mosfet and 2)the internal diode to VCC. I'll also connect a resistor between the switch and ground: the start up voltage is generated when you release the switch. Please, let me know. I have a circuit with a very low current LCD display so a 1 component boost converter should be great (if it workds).

Philippe wrote at 8 Jul 2009, 6.50:

Yay!!! Excellent! Can we see the source code?

casainho wrote at 8 Jul 2009, 5.50:

Great hacks!!! congratulations :-)

Julian Calaby wrote at 8 Jul 2009, 3.05:

You could have both a transistor and MOSFET to run the coil, with the uC first running the circuit with the transistor until the voltage gets high enough to run the MOSFET. This should solve the high gate voltage problem whilst maintaining the efficiency of the MOSFET solution.

Nuno wrote at 8 Jul 2009, 2.40:

I've done the other way around in the past (a buck, lowering 9V to 5V, handled by the micro-controller itself, auto start), but this button idea for the boost start up is quite intelligent. But have you captured the startup voltage on a scope? You may be surprised to find it above the 6V maximum limit of the AVR. A series resistor with the button (as someone above already suggested for another reason) can control that.

camerin wrote at 8 Jul 2009, 0.51:

a resistor would limit the current, however the idea of the boost converter is in the spikes. it uses the nature of each part preventing spikes to generate a higher voltage. ill have to dig through my notes but i am guessing a big part of the efficiency loss is due to the duty cycle not being set properly. this is an excellent idea though. prop to you.

Finger wrote at 7 Jul 2009, 23.56:

Hey, I like your project, just wondering if you have the source code for your tiny13 available?

cornelius wrote at 7 Jul 2009, 23.39:

I would add a gate resistor for the MOSFET. You may be able to improve your efficiency if you pull the gate on the MOSFET up to Vbatt instead of Vout for an extra 2 components (resistor and transistor).

Whacko wrote at 7 Jul 2009, 23.29:

I will use this. I had a similar idea to create a self controlled buck converter. 7805 is burning too much power for a solar application. Anyone done a buck converter yet?

hpux735 wrote at 7 Jul 2009, 22.00:

One minor point... In your description of how a boost converter works you say that a capacitor makes voltage from current flowing over it isn't true. The way this works is that the inductor wants to MAINTAIN the current that was flowing when the field collapses. It does this by creating a voltage that can be very high. When this voltage is induced, it charges the capacitor. When the field flux is gone so goes the voltage. The capacitor now wants to maintain the voltage. The diode keeps the capacitor from being discharged from the battery,inductor part of the circuit.

lerneaen_hydra wrote at 7 Jul 2009, 21.43:

That's a pretty neat "crude-but-effective" solution! One thing that stuck me was that you could connect a resistor in series with the pushbutton to limit the peak current when starting (and not overly saturate the inductor and discharge the battery). It would be easy to limit the current to the saturation current of the inductor for a worst-case cell voltage. Did you do any form of calculations to get good inductor / output capacitor values? (So that one cycle is enough to boost up to a minimum starting voltage, yet without having too much ripple)

Chris McMahon wrote at 10 May 2009, 7.31:

with two more parts you can make it self starting: http://i43.tinypic.com/11j243q.jpg when the circuit is first powered on, it behaves like the boost circuits used to drive LEDs, but as the capacitor charges it biases the transistor into cutoff. the diode allows the uC to control the transistor independently of the transformer secondary. A Schottky diode should be used, else the combined voltage drop would be about 1.2V, so it wouldn't work with rechargeable batteries. pence.128@gmail.com

andre wrote at 8 Apr 2009, 19.17:

one possibility is to use one of those TL431 regulators- provides a simple overvoltage shutdown for virtually no external parts. i did come up with a P/N channel voltage generator a while back which would (if the FETs were correctly selected) work down to 0.4V, also there's the possibility of using a flashing LED (they work down to 1.3V although the light emission is negligible)... -A

nyshae wrote at 1 Apr 2009, 0.09:

what is the conclusion after you do battery and circuit experiment

Gzaloprgm wrote at 1 Aug 2008, 17.56:

Very good article. I was wondering if it can be used to run an uc from a low voltage, high current solar cell. Cheers, Gonzalo

Joe wrote at 21 Jul 2008, 11.03:

Hey sprite, instead of using the A/D-converter with the voltage divider use the comparator in interrupt on toggle mode. With the comparator bit and the PWM register you should be able to adjust the duty cycle. Even with a little math it's hard to be much slower than the successive approximation A/D-converter on these chips. Nice project.

Driveby Comments wrote at 17 Jul 2008, 11.39:

A/D won't help as your input voltage still needs something to compare to... Hint need a reference source that is not from the power rail. You are not changing the output voltage. Why use an A/D and waste the conversion time? Much better off using a reference source + built-in comparator. Much faster response.

richard wrote at 29 Apr 2008, 15.01:

I was thinking of methods of powering small electronic projects from one cell. Then I saw that dealextreme.com have aa and aaa sized 3.7v lithium ion cells - and a charger to suit. There are CR2 sized ones too but I dont have any holders for them. Anyway, these are rechargeable and have 3 times the power density of nimh - who knows how many more times then alkaline, and the cells arent so expensive that your sad to see one go. I had played with nokia bl-5c knockoffs before, but with no easy way of holding and terminating them, and the rather poor capacity I gave up on those.

sysadmn wrote at 17 Jul 2007, 14.37:

Nice Hack! Here's a second vote for Zetex. If you're interested in diving deeper, look into the led flashlight crowd (www.candlepowerforums.com/vb); we've been running higher voltage leds from 1.2 volts since 2001 or so. Also, ATMEL has an article in their design magazine on using ATTINY as a pwm convertor for a bicycle light.

Jaem wrote at 6 Jul 2007, 4.05:

This is an awesome idea! I am definitely going to use it, although I use PICmicros (because the Samples-Fairy gives them to me free ;). You have some really innovative and generally cool ideas - keep up the good work!

rpc wrote at 3 Jul 2007, 12.23:

Excellent introduction. While 'we' lurkers talk about it, you built it! Keep up the good work!!!!

ksd wrote at 3 Jul 2007, 7.10:

Good read indeed. zyaoz@163.com

Carlton wrote at 2 Jul 2007, 16.37:

I agree with Lupin, lucky you didn't blow up your uC. You don't seem to be monitoring the voltage at all. A resistor divider tapped off the input line fed into a A/D could be used to increase/decrease the PWM duty cycle as needed. Using large resistors make the power loss practically neglible. This should also be used to provide a consistent voltage to the uC (or other devices) as the batteries are drained. Also, you should (if you haven't) think about implementing a soft start in the software, so that the voltage doesn't just jump up (it'll overshoot and could ring, potentially forever, but likely just for a long time due to capacitor ESR). Make the duty cycle slowly increase in software up to the desired value. As a previous poster mentioned, you should use a schottky in lieu of just any old diode, in order to increase efficiency. You could also try doing a synchronous converter, replacing the diode with another MOSFET, driven by another PWM of the uC, but then you need to worry about cross-conduction, and make sure that the low-side (synchronous) MOSFET doesn't turn on until the high-side (switching) MOSFET is surely off. All in all, nice little project. I just make these notes because I was planning on doing something similar, with the voltage monitoring and such.

icasty wrote at 2 Jul 2007, 16.19:

Good read indeed. Hackineer: no, Vcc is for powering only. You feed the Vcc line into one of the A/D-converter inputs.

SPrite_tm wrote at 2 Jul 2007, 9.47:

Lupin: I had a zener in parallel with the uCs power pins most of the time, to prevent such accidents. I'm not sure if the FET-idea works: first of all, it probably won't charge quickly enough to warrant a nice quick induction change in the coil and secondly, it'll act as a high-pass-filter whcih will fuck up the nice PWM-signal from the microcontroller. Hackineer: Basically, you set the A/D-converter to use its internal reference (iirc, it's 1.1V) and use a resistor dividing circuit to divide the 5V power supply into e.g. 0.5V. The change in the power supply will come back in the divided voltage, and you can measure that.

Hackineer wrote at 2 Jul 2007, 1.43:

Neat idea! How do you measure the voltage in order to adjust the PWM signal to maintain a constant 5V? I've never used an Atmel microcontroller; are you able to use the Vcc pin as an A/D input?

Joakim wrote at 1 Jul 2007, 21.45:

Very interesting read, and lots of good comments! Since I'm a novice, and can't do it myself, will you make a revised version of the circuit? Btw, your circuit is doing the same as this one (http://www.ladyada.net/make/mintyboost/parts.html), but without the integrated DC-DC chip?

Lupin wrote at 1 Jul 2007, 17.47:

I just read an even better idea on hackaday comments - just put a C between the gate FET and +Ub (while the C charges it is a short and turns on the FET).

Lupin wrote at 1 Jul 2007, 17.42:

I am surprised you didnt kill your little µC because you dont monitor the voltage, it's pretty easy to get very high voltages under very low load or no load conditions. Instead of an RC you could just put a resistor into the switch part - so you at least limit the current a little... the DC resistance of switching application coils is usually very low.

bobbo wrote at 1 Jul 2007, 16.33:

What does your PWM signal look like? Meaning: what's the frequency and duty cycle?

amdyer wrote at 1 Jul 2007, 14.45:

cute circuit. You might be able to do something like this: http://www.edn.com/contents/images/90758f1.pdf ot this http://www.elecdesign.com/Articles/Index.cfm?AD=1&ArticleID=8968 and tie the micro in to the switching control only after it's up an running.

Sprite_tm wrote at 1 Jul 2007, 14.03:

I've measured it for you: The current consumption of the mosfet variant is 2.2uA in idle mode, which probably is leakage from the various parts. This is using an ATTiny13, though, it could be that other types of microcontrollers have a larger or smaller leakage current when fed with not enough voltage to turn them on.

Pyrofer wrote at 1 Jul 2007, 12.14:

Is there any current leakage when the device is off? the 1 button on with soft poweroff is exactly what I want for a portable device im building. Having the uP power itself instead of a seperate boost converted ic would be perfect. i dont want it to drain the battery at all when off though

Sprite_tm wrote at 1 Jul 2007, 10.26:

Eugene: Thanks for the idea, I'll see if I can use these components to increase efficiency next time I build such a circuit. The a/d-feedback-loop was planned, but I kinda got bored with the project after proving it worked.

Eugene wrote at 1 Jul 2007, 9.59:

a further thought is to use a tiny 13 built in a/d converter to monitor the voltage and do true pwm on the switcher.

Eugene wrote at 1 Jul 2007, 9.45:

Nice work, simple and elegant! You might want to use a Schottky diode like a 1N5819. It as approx. 0.2V drop instead of the 0.7V drop of the 1N4001. The faster switching will also boost efficiency. The inductor is also important (DC resistance and value). Check Linear Technology website for appnotes. Capacitor ESR and value also affect efficiency.

Sprite_tm wrote at 1 Jul 2007, 8.39:

Goldscott: The transistor is a BC550, the diode is (iirc) a 1n4001, the capacitor is 22uF. The rest, I don't know because they were ripped from various old PCBs. Yuubi: Wouldn't work: you need a sharp edge in conductivity to make the thing work, the current through the coil should go from lots to zero very quickly for the bootstrap to happen. That won't happen with a RC-circuit.

wally wrote at 1 Jul 2007, 7.44:

Nice one :) Really cool. Welcome from hackaday.com.

cage wrote at 1 Jul 2007, 7.29:

Zetex has many very low saturation voltage transistors. http://www.zetex.com/3.0/3-3-2b.asp?rid=1

yuubi wrote at 1 Jul 2007, 3.49:

How about putting a parallel RC in series with the power-on switch? Then a single button press wouldn't drain more than a little bit of charge to start the oscillation

goldscott wrote at 1 Jul 2007, 3.08:

What were some of the values of the components you used?

Leave a comment:

Your name:

What does this picture say?
Sorry, this is a captcha

Your comment:


© 2006-2022 Sprite_tm - Contact