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.
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)
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.
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….
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…
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.
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…
Purple is the input voltage
Yellow is the output voltage
- The GPIO pin is pulled low and the output voltage drops to 0.
- The slowly inductor spins up and the output voltage rises to the input voltage.
- The GPIO is switched to input mode and the output voltage shoots up as the inductor flywheels.
- 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…
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…
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…
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.
Take a look at what we can do with a huge inductor and no clamping diode to hold us back…
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.
Demo on David Grayson’s site here…
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!
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: 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.