Challenge: Can you figure out how this single part boost converter works?

If you think this is easy, then I think you are missing something. This is hard. You need to know your hardware intimately to figure this one out.

2017-03-22 15_08_38-Movies & TV

Free Less Is More Hacker tee-shirt to the first correct answer in the comments. More details and demo video below…



Build a software controlled boost converter using only one part (an inductor).  It must be able to generate at least 3.7 volts to drive a blue LED from a 2.7 volt source.


  • ATTINY85 (or any ATTINY or ATMEGA you want)
  • 3.7 volt blue LED (more than 3.2 volt forward voltage)
  • 100uH inductor (or any inductor you want)
  • Dead battery (less than 2.7 volt supply)
  • Wires


No parts have been modified. Breadboard and wires are used only for making connections between parts. No camera tricks. No sneaking in external power from magnetic,  capacitive, or RF sources-  all power for the LED is coming from the battery.

You should be able to buy new parts, program up the chip, connect everything together and it should work.

The one shown here easily makes >3.7 volts from a 2 volt source.

You can not stress the chip past the “Absolute Maximum Ratings” specified in the datasheet and can not permanently damage it to get it to work. (Added 3/25/17)


The first person to give an working solution in the comments gets a sporty tee shirt, but the real prize is my deep admiration.

2017-03-19 13_20_21-Women's WHITE Basic Tank Top Blank _ Zazzle


Like all hacks, this one depends on using things in ways they are not normally used and were not designed to be used. You have to really deeply know your hardware and be able to think out of the box.

UPDATE 3/24/17 – Misleading Blue Lights

Just because you see blue, doesn’t necessarily mean you made a boost converter. Due to chemistry and process variations, there are blue LEDs that can light with significantly less than 3.7 volts. Here is a blue LED that is part of an RGB that I got on Ali that is spec’ed for 2.8 volts, but mine starts conducting at only 2.2 volts and throws a pretty decent light at 2.6 volts….

2017-03-25 02_13_14-2017-03-25 02.06.46.jpg - Photo Gallery

If you want to be sure you made a boost converter, first try connecting your LED directly to the power supply and make sure it does not have enough voltage to light without your (potential) boost converter.

UPDATE 3/25/17 – The Silicon Ceiling

Several people have suggested something like this…

2017-03-26 14_14_07-ruby johny photobooth0014.JPG - Photo Gallery.png


Drive a general purpose IO pin (GPIO) low to pull current down though the inductor. Once a magnetic field has built up in the inductor, switch that pin to be an input rather than out. An input pin is high impedance, so the flywheel current from the inductor has no where to go and so builds up voltage until it reaches the on threshold of the LED which turns on.

2017-03-25 11.20.48

Possible single part boost circuit with a GPIO connected to low side of the inductor and high side of the LED

This is a clever use of tri-stating pins and a good solution in principal, but if you build it you will find that it has a limitation. Here is the output of that circuit with input voltages of 1.8V -2.4V…

Limited boost out

Output from GPIO pin driven boost

Purple is the input voltage
Yellow is the output voltage

Play-by-play breakdown…


  1. The GPIO pin is pulled low and the output voltage drops to 0.
  2. The slowly inductor spins up and the output voltage rises to the input voltage.
  3. The GPIO is switched to input mode and the output voltage shoots up as the inductor flywheels.
  4. The rising voltage seems to hit an invisible ceiling and dumps its current without rising any more.

Notice how the output voltage (CurB) is always limited to about 0.7V above the input voltage  (CurA)?  This is not what we would expect from an inductor – normally the higher the drive voltage, the higher the spin-up current, the higher the overshoot. So what is so neatly and consistently capping our output voltage?

Take a look at the schematic for a GPIO pin from the AVR datasheet…

2017-03-25 11_58_33-atmel-2586-avr-8-bit-microcontroller-attiny25-attiny45-attiny85_datasheet (4).pd

Overvoltage protection diode on GPIO pin

The diode circled in red is a protection diode. It protects the chip’s input circuits from high voltages (typically static discharge).

So, whenever the input voltage on a GPIO pin rises above the Vcc of the chip (plus a single diode forward voltage drop of about 0.7V), that protection diode will start conducting and prevent the output voltage from rising any higher. This is exactly what we see in the traces above.

Vout <= Vin + ~0.7 volts.

This means that the above booster circuit will not be able to practically boost more than about 0.7V above the input voltage. If all you need is a little boost (which is often the case in the real world), then this circuit is great and actually very handy, but since the condition  for the challenge was to boost 2.0V up to 3.7V, this circuit will not cut it.

I told you this was a hard problem!

UPDATE 3/25/17 – Winner, winner winner, we have a (2X) winner!!!!!!

We have two working solutions! How great is that?! I’m so impressed!

The RESET Solution

While the general purpose IO pins have high-side protection diodes, there is one not general purpose IO pin that does not have a high-side protection diode… the RESET pin.

Since the RESET pin is used to activate high voltage programming mode, it can’t have a high side protection diode. This is reflected in the datasheet…

2017-03-25 14_44_38-atmel-2586-avr-8-bit-microcontroller-attiny25-attiny45-attiny85_datasheet (4).pd

Normally the RESET pin is only used to reset the chip and for high voltage programming, but there is a fuse that can disable the reset function and let the RESET pin act as a (crappy) IO pin…

2017-03-25 15_08_53-atmel-2586-avr-8-bit-microcontroller-attiny25-attiny45-attiny85_datasheet (4).pd

This backwardsly says that if the RSTDISBL fuse is programmed, then the reset function and pull-up on the pin is disabled and the output driver is enabled, so we can use it for IO.

If we set this fuse and wire the low side of our inductor to the pin, we can now let the flywheel voltage rise without any pesky high side protection diode trying to hold us down. According to the datasheet, we can let that pin get as high as 13 volts without issue.

2017-03-25 15_15_35-Video - Google Photos.png

Take a look at what we can do with a huge inductor and no clamping diode to hold us back…

2017-03-25 15_48_22-2017-03-25 15.45.37.jpg - Photo Gallery

One part boost converter with a monster >500uH inductor

With this setup, we can generate more than 8 volts output from a 2 volt input (>6 volts of boost)…


Note that I had to scale down to 2V/div because the boost was going of the screen!

So is this useful? Probably not just for driving a blue LED (there are better ways for that), but if you ever need a voltage between Vcc and 13 volts and want a minimum part count, then this could come in handy.  This can similarly help if you are trying to measure a signal that can go more than ~0.5V above your Vcc.

The Rising Tide Solution

This is an even better hack than the solution above!

In this case, we are using the inductor to boost the Vcc of the whole chip, so the the IO pin is never higher than Vcc. This is glorious and should work up to the maximum Vcc of the chip which is 6V.

2017-03-25 16_33_03-ruby johny photobooth0013.JPG - Photo Gallery.png

Demo on David Grayson’s site here (watch it!)…

I think the sweetest aspect of this hack is that you could potentially create a 6 volt, 200mA booster with only an AVR chip thanks to the fact that the Vcc pin can handle more current than any individual GPIO!

2017-03-26 14_25_21-Atmel-8303-8-bit-AVR-Microcontroller-tinyAVR-ATtiny1634_Datasheet (1).pdf (SECUR


So cool!

I think this solution could even have some practical value. What if you had a bunch of low current outputs that you occasionally and briefly needed to drive at a boosted voltage? Rather than putting a booster on each output pin, you could selectively boost your Vcc and then drive high any of the desired output pins (anyone else thinking 5V LCD segment driver off 3V coin cell?).  Or what if you occasionally wanted to ADC a signal higher than the battery voltage, but need a super-high impedance  tap so a resistor divider was out of the question? Hmmmm…. I might actually use this trick some day!



One thing to keep in mind is that these chips sometimes glitch and/or reset in response to abrupt changes in Vcc voltage, and that response can vary from part to part. A decoupling cap can help smooth the changes, and a diode could help ride the boost longer. Maybe you could move the boost onto an IO pin and have the protection diode act as a switching diode by driving Vcc up though the IO pin?? Fun, fun, fun!


Q: This is so easy a child could do it. 
A: Are you sure? Try building it and I bet you will quickly see why it is hard.

Q: I got it! You just have to stick a transistor…
A: Kinda missing the point. No extra parts is the point.

Q: Just use a fricken’ $0.01 transistor you fricken’ cheapskate!
A: This is not the first time I have been asked this question.

Q: Where did you get the silky-smooth breath effect in the video?
A: Brightness curve courtesy of Lady Ada here.

Q: If you can get LEDs that light at 2.6 volts, then why not just use those rather than bothering to build a boost anyway?
A: You might want to use a different LED that has a higher voltage. For example, the low voltage LED shown above is $0.07, but there are higher voltage parts available for only $0.016. Also, while the LED shown a happens to light 2.6 volts, it is spec’ed for 3.2 volts so if I depend on that non-spec’ed voltage then I might be sad when the next batch comes and my circuit does not work anymore.

Q: One part software controller boost converter?!? This has like 15+ parts! (including the breadboard, wires, and table!) Ahhh!!!!! (Added 6/15/17)
A: Calm down. There is only one part in the boost converter – the inductor. The inductor does the boosting. The chip is what runs the software to control the software controlled boost converter, and the LED is the thing being boosted. The battery and wires and… ok, let me put this a different way…

If you bought a software controllable light switch at Walmart, would you expect the box to contain a computer (presumably a RaspberryPi for the HAD crowd) to run the software to control the light switch? A lamp? A coal fired power plant?

I’d also expect the HAD crowd to know better than anyone that every single circuit on earth already contains at least one AVR microcontroller- all flashed with the Arduino bootloader.

Q: Just use a 555 timer/relay/joule thief/LM3909/transformer/ICL7660/Thermistor/tunnel diode/nixie tube/Tesla coil? (Added 6/15/17)
A: I think you are missing the point.

First of all, none of those things would result in a software controlled boost converter. In the video, I was careful to show both a blink effect and an Apple breath effect to demonstrate that the converter was being controlled by software. A software controlled boost converter can do anything you want (not just blink) at any time you want (not always on whenever power is connected).

Second of all, it is clearly stated that this is not about finding a practical solution (see the article on a charge pump boost if you are actually making something).

This is about trying to not use the infinite number of obvious cookbook solutions. It is about thinking out of the box, innovating, being challenged, and having fun!


  1. bigjosh2

    Ok, still no answers even close so here is a little hint: If you could see which pin the inductor is connected to (and you really know your parts) then you would likely have an ah-ha moment!

  2. davidegrayson

    Hey, my boost converter is crappier than yours but it does succeed in lighting a blue LED. My video explaining it will be available here in about 15 minutes when it is done uploading:

    • bigjosh2

      This is not what I was looking for, but is *brilliant*! I love it! This is even a better hack than mine!

      I’ve tried doing something like this before when I wanted a “turbo” mode for an AVR so it could briefly run at a higher frequency than the battery could support- but just long enough to do a high resolution input capture. I kept having problems with the chip glitching at the moment that the Vcc increased. Is is possible that your chip is rebooting on every cycle? Still fair game for this application! :)

      Definitely wins a tee-shirt and huge hat tip!

      • davidegrayson

        Wow, thanks! No, the AVR is not resetting because I disabled brown-out detection and the I/O lines is not strong enough. The code pauses for 200 ms when it starts up, and then it PWMs its I/O with a frequency of about 100 kHz for about 140ms. If it were going to reset, I would expect it to reset on the first PWM cycle and then go back to waiting mode, so you would hardly see any light at all.

        • davidegrayson

          That’s fun that you have used this technique before. I’m not sure why your chip would have a glitch when VCC increases, seems more likely that it would have a glitch when VCC decreases.

      • davidegrayson

        Your hack is probably better than the one I made a video of above, because mine is only useful when the input voltage is between 2.3 V and 2.5 V. Below that, my AVR ATmega328P seems to stop running. Above that, the blue LED is on all the time (though it does get noticeably brighter when I run the boost). If I got an AVR that is capable of running at lower voltages and used the reset line trick, it would probably be a lot better.

        • davidegrayson

          I was able to reproduce the glitch you mentioned where the AVR resets because of a sudden rise in voltage. I did it by removing the blue LED and using a few more I/O lines to make the boost stronger. I characterized it a bit and put the details on my blog:

          Maybe you had a really big inductor; my boost cycle only lasts 2 us so I don’t think I could do a useful input capture during that time.

          Maybe you can make your boost last longer and prevent the glitch by adding a diode to clamp your voltage.

          • davidegrayson

            Thanks, but I just programmed the CKDIV8 fuse so it runs at 1 MHz by default and it does seem to be runnign at that speed.

  3. davidegrayson

    If there is one I/O line on the AVR that doesn’t have a diode to VCC, it’s probably the RESET line, because the AVRs generally support high-voltage programming where that line is driven to 12V. I’ll try using the reset line to control the inductor and see if I can get something better happening.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s