
Can you figure out how this single part boost converter works? - luu
https://wp.josh.com/2017/03/22/challenge-design-an-avr-controlled-boost-converter-using-only-one-part/
======
smoyer
Hacks like this are a lot of fun to play with on the bench but don't design a
circuit like this when you want something that "just works", has a reasonable
life-time and certainly don't put a hack like this into production.

That being said, Sir Clive Sinclair made a pretty remarkable little computer
(the ZX-81) but minimizing the parts count to the extreme. And there's a
colloquial term for the process of minimizing your component count.

One of my favorite authors in Electronic Design was Bob Pease (now deceased).
In a 1992 article [0] he recounts the process used by Earl "Madman" Muntz who
was an early television pioneer. I could ruin the story but I'm going to
insist you read the original instead. Enjoy!

[0] [http://www.electronicdesign.com/boards/whats-all-muntzing-
st...](http://www.electronicdesign.com/boards/whats-all-muntzing-stuff-anyhow)

EDIT: I also should have noted that this practice has led to me trying to
create the simplest possible software algorithm that solves my problem. A good
day is when the LOC count goes down (and not because I've packed more into a
single line).

~~~
SAI_Peregrinus
My favorite cute hack of a power supply is the ringing choke converter (self-
oscillating flyback). It doesn't require any controller ICs, just a couple of
transistors, resistors, caps, and a transformer. You get isolation, and the
circuit is quite simple. With an optoisolator and zener diode you can even get
regulated output!

The disadvantages are the poor efficiency, need for tuning, and need for a
transformer if you don't need the isolation. Also no programming involved, so
not really of as much interest to most of the HN community.

~~~
kens
If you buy a $2 phone charger, this circuit (the ringing choke converter) is
what you get. It's kind of amazing how cheaply these are made. It can look
just like an Apple charger on the outside, but the power quality (and safety)
is much, much worse.

~~~
SAI_Peregrinus
Yep, they're used in lots of cheap power supplies, not just phone chargers.

The poor power quality and safety aren't inherent problems of the ringing
choke design, those are just issues with cheap chargers. They tend to omit the
output filtering and do horrible things to creepage and clearance distances.

------
Animats
See the data sheet for the part.[1] Basically, you want to feed power into the
inductor briefly, then turn off power and somehow connect the inductor to the
LED. The trick is to find some way to get the microcontroller to connect two
of its own pins together, so you can use it as a switch on the output. This is
probably done by abusing one of the alternate uses of the six "B" pins. See
table 10-3. I'm thinking that port B, bit 5, DW mode might be abusable in this
way.

[1] [http://www.atmel.com/images/atmel-2586-avr-8-bit-
microcontro...](http://www.atmel.com/images/atmel-2586-avr-8-bit-
microcontroller-attiny25-attiny45-attiny85_datasheet.pdf)

~~~
qb45
This exact solution is described at the end of the post except that they call
it RESET pin rather than DW pin. And of course they short it directly to GND
by driving low, you can't just short two GPIOs together.

------
kazinator
Sofware? What?

[https://en.wikipedia.org/wiki/Joule_thief](https://en.wikipedia.org/wiki/Joule_thief)

~~~
buserror
I'm a big fan of joule thiefs. Small solar panel, a supercap and a joule thief
and you can trickle charge NiNM batteries for years+. That's how I keep my
hand-radios fully charged when not in use.

~~~
lightedman
Don't even need the supercap.

Resistor as the inductor, HW012 IC, hook up a solar cell, LED, and battery.
Boosts 1.2V to 3.6V.

[http://i.imgur.com/3y1PMoP.jpg](http://i.imgur.com/3y1PMoP.jpg)

------
blackguardx
I came up with a solution, but then read further that he gave the answer away.
Anyways, here it is: [http://imgur.com/a/dzRyZ](http://imgur.com/a/dzRyZ)

~~~
compumike
Hope you don't mind but I drew your circuit into a CircuitLab schematic and
added a simulation:

[https://www.circuitlab.com/editor/yxs8aks2yz95/](https://www.circuitlab.com/editor/yxs8aks2yz95/)

Specified a few missing values, but there you go -- the LED lights (see the
simulation current plot)! As long as the microcontroller doesn't reset from
every VCC dip...

~~~
Animats
That's kind of drastic. If you turn off the pin before the inductor fully
charges you might get away with it.

------
atemerev
This is none other than Josh Levine, the hacker programmer who invented all
modern electronic trading infrastructure (ISLAND / ITCH) and a personal hero
of mine.

He's now probably rich enough to just play with microcontrollers and have fun
all the time. Living the dream.

~~~
jzwinck
Here is the code that made him famous: [http://www.josh.com/notes/island-
ecn-10th-birthday/](http://www.josh.com/notes/island-ecn-10th-birthday/)

I enjoyed the part where it rounds an order quantity to a multiple of 100 by
using string operations. A comment there explains it's to avoid floating point
ops. Ah the good old days.

~~~
atemerev
OMGOMGOMG, FoxPro! I have some history of abusing FoxPro myself, but using it
as a real-time matching engine... beyond cool.

------
rebootthesystem
Single part? That circuit has THOUSANDS of components. And, on top of that it
needs software?

Nah, this can be done with a one transistor, one resistor and little
transformer one can easily DIY wind.

No software required.

[https://en.wikipedia.org/wiki/Joule_thief](https://en.wikipedia.org/wiki/Joule_thief)

~~~
creeble
Yeah, click bait title.

Last time I counted, an inductor and a uP comes out to _two_.

~~~
rebootthesystem
You missed my point. That microprocessor has thousands of transistors. And
then you need software.

------
tech6
Does anyone have recommendation on a simple self contained primer to
understand electronic circuits as shown in this article. Article is very
interesting but am hampered by lack on ability to understand the circuit
diagram.

~~~
flavio81
I don't know if this is the answer you expect, but Radio Shack made a
"200-in-1 electronic project lab" toy/kit that came with a book that has a
really really good explanation on all of analog electronics. And you can try
all the examples yourself. It is very fun.

An alternative is, read about the following:

1\. Ohm's law -- the relationship between voltage, current, and resistance.
And power.

2\. Learn how to sum resistors in parallel vs resistors in series.

3\. Learn about capacitors, how do they charge? (the RC constant). What
happens afterwards?

4\. Now learn about RC circuits (resistor+capacitor), which means you will
learn about filters: low pass, high pass, at the very least. Know how to
calculate the 'cutoff' frequency.

5\. Learn about how a transistor works. First, how it can be made to work as a
switch. Then, how it can be made to work as an amplifier.

6\. Learn about the inductor (the "L" in L,R,C). Learn the relationship
between inductors, capacitors and resistors.

7\. Since now you know about inductors, you can also see Oscillator circuits
using transistors.

ALTERNATIVELY

on step 5, instead of learning about transistors, learn about opamps. It is
easier to understand than transistors!

Then learn about how to implement oscillators with opamps, filters with
opamps.

Afterwards you may perhaps want to learn about digital circuits. If you
understand boolean algebra or bit logic functions (and, or, xor, not), then
this will be a piece of cake.

~~~
tech6
Thank you for the detailed steps. Based on your list I purchased "Teach
yourself electricity and electronics" which has content similar to the order
you have listed. Hopefully ramping up on the basics will enable understanding
of circuit diagrams

------
highd
I think this might be another solution, using the capacitance of the diode to
make a resonator and then driving near resonance. Here V(n001) is some pin
voltage and V(n002) is the voltage across the diode:
[http://imgur.com/a/xwZF4](http://imgur.com/a/xwZF4)

------
fallingfrog
Ohh ok, the single part is an integrated circuit. Isn't that cheating?

