12 ms·
Can you figure out how this single part boost converter works?
- smoyer 9y agoHacks 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-stuff-anyhow http://www.electronicdesign.com/boards/whats-all-muntzing-st... 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 9y agoMy 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.
- blackguardx 9y agoThat was the first circuit I put together after cobbling together some old TV parts in 8th grade. The noise and dazzling purple glow of the high voltage arc from the flyback transformer were mesmerizing. The urge to understand how it worked led me to study EE in college.
- kens 9y agoIf 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 9y agoYep, 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.
- userbinator 9y agoAll the controller ICs do is put almost everything but the coil onto one silicon die. Otherwise they work similar to the discrete version.
- th0ma5 9y agoCame across in the amateur radio world the "Minimal Art Session" contests where people get points based on how many radio contacts with how few parts... http://www.qrpcc.de/contestergebnisse/mas/2016/index.html http://www.qrpcc.de/contestergebnisse/mas/2016/index.html
- js2 9y agoA good day is when the LOC count goes down (and not because I've packed more into a single line). You can't write that and not link to http://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt http://www.folklore.org/StoryView.py?story=Negative_2000_Lin...
- rhizome 9y agoGreat story, I hadn't read that one before. Madman Muntz is a hero[1] of a person, love that guy, also inventing the term "teevee" (later "TV") and manufacturing and selling the Muntz Jet automobile[2]. Oh, he also invented car stereos (and bars, but watch #1). His commercials were pretty amazing[3], too. 1. https://www.youtube.com/watch?v=69yXg9EkD-g https://www.youtube.com/watch?v=69yXg9EkD-g 2. https://www.hagerty.com/apps/valuationtools/1951-muntz-jet https://www.hagerty.com/apps/valuationtools/1951-muntz-jet 3. https://www.youtube.com/watch?v=FGi6VhnQkw0 https://www.youtube.com/watch?v=FGi6VhnQkw0
- qb45 9y ago> 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. Dunno, do you think a constant rate PWM SMPS isn't enough to power a trivial load like LED and justifies the cost of adding a dedicated chip? LED forward voltage is well below absolute maximum for the RESET pin, peak current is limited by pulse time, looks good enough to my (amateur) eye.
- dom0 9y agoRSTDISABLE means that no in-circuit programming is possible any more and for re-flashing a parallel HV programmer is required; it's quite annoying for tinkering.
- qb45 9y agoYes, but this was about long term reliability so programming is of lesser concern.
- smoyer 9y agoI didn't mean that you shouldn't use a boost converter - back in the RS-232 days the Maxim max232 chip saved a tremendous number of parts (otherwise you needed a +/-12VDC power supply to drive the signal wires. The idea of the IC's Vcc following the coil's transient is a bit scary and I wouldn't design that into a system.
- qb45 9y agoI thought about using RESET of course. The Vcc thing is indeed bizarre and I wouldn't be confident that running logic circuits on a fast dV/dt power supply is a good idea.
- amelius 9y agoIf the objective is to use the least number of parts, then there's a simple solution: brute force. You can of course automate this using a simple computer program and a simulator like SPICE. Slightly more intelligent solutions could use heuristic optimization techniques like genetic programming.
- deleted 9y ago[deleted]
- amelius 9y agoNot sure why this was downvoted. There's even a paper that explores this technique: [1]. [1] http://www.sciencedirect.com/science/article/pii/S187770581102056X http://www.sciencedirect.com/science/article/pii/S1877705811...
- phaedrus 9y agoI've had great success building digital logic with minimized part counts. When I've tried to do the same with analog circuits, I've had more mixed success. I realized that it's because digital logic is transitive (in the algebra sense) but analog is only quasitransitive. That is (assuming you're working in the realm of bits rather than abusing physical limits), in digital logic if circuit A is equivalent to circuit B and circuit B is equivalent to circuit C, you can replace A with C, and keep repeating this process until the circuit is minified. In analog electronics, you run into the sorites paradox.
- blackguardx 9y agoI 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
- deleted 9y ago[deleted]
- compumike 9y agoHope 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 9y agoThat's kind of drastic. If you turn off the pin before the inductor fully charges you might get away with it.
- atemerev 9y agoThis 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 9y agoHere 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 9y agoOMGOMGOMG, FoxPro! I have some history of abusing FoxPro myself, but using it as a real-time matching engine... beyond cool.
- highd 9y agoI 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
- tech6 9y agoDoes 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.
- compumike 9y agoI'm trying to write an online electronics book, so your comment hits home for me! I'd like it to be "self contained," but that still assumes a moderate dose of prerequisite math and physics topics. Furthermore, "simple" it is not. Could you take a quick look at the simulation I attached elsewhere in this discussion? Let me know if that simulation and the notes around it are helpful for your understanding.
- tech6 9y agoThank you for pointing to excellent resource like circuit labs.I was able to get a better understanding after running the simulation. Looking forward to your book
- brian-armstrong 9y agoYou might want to just learn the physics of these things. When you have any solid object, it's got a crystalline latice structure at the molecular level. Do you remember valence shell electrons from chemistry? They're the outermost shell. They are only tenuously connected to their atom and so it's easy to push them around, but the atom wants to be electrically neutral (#electrons = #protons) In a conductor, let's say copper, you can shove on one end of the crystal with an electric field and induce a movement on those valence shell electrons that propagates your shove across the lattice. You could measure how much energy each electron gets from its shove, we'll call this Voltage. The rate of electric field moving through a particular surface area is called Current. In a perfect conductor, the voltage of the wave moving across the surface doesn't drop off. We can think of wires as being pretty good conductors, and in diagrams they exist as platonic perfect conductors. Also note that the amount of current in one end of the wire has to equal the current out or you would be losing or gaining a net electric charge. So now you know the rules for a straight line in a diagram. The rest is learning how electric fields behave in other kinda of bulk materials. In the resistor, the voltage change across the entire resistor is proportional (linearly) to the flow of current through the resistor. In a capacitor, we place two wide metal plates across from each other by a small distance. This doesn't form a complete connector - charges can't cross - but initially current flows in to charge the plates, then dies off as the voltage difference between the two opposing plates equalizes with the voltage applied to the capacitor. So these devices hold a charged electric field, and they allow high frequency changes in voltage to pass through, but low frequency is blocked by the charge saturation. Inductors are similar to capacitors, but the energy is stored in a magnetic field. If you wind some wire into a coil, the magetic field from the wire acts as a sort of flywheel. These devices allow low frequencies to pass through. Diodes are made out of crystalline solids called semiconductors, where a pure ingot of silicon (an insulator) is doped with a donor like Boron or Arsenic. Depending on whether the donor has fewer or more valence electrons than silicon, we get either a p type or an n type material. If we put a p type next to an n type, there's a thin band near the junction where the opposite types "cancel out" and no charge can pass. But if we apply a small voltage across the ends of the diode, the cancel out region shrinks thinner and thinner until eventually charge does pass through. So these are sort of like a one-way valve for circuits, and you need about 0.7V in the forward direction to get them going.
- Animats 9y agoSee 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-microcontroller-attiny25-attiny45-attiny85_datasheet.pdf http://www.atmel.com/images/atmel-2586-avr-8-bit-microcontro...
- qb45 9y agoThis 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 9y agoSofware? What? https://en.wikipedia.org/wiki/Joule_thief https://en.wikipedia.org/wiki/Joule_thief
- vortico 9y agoThe limitation is that the GPIO pins have an overprotection diode, so you have you have to get around that somehow.
- makomk 9y agoI don't think that you necessarily do. The protection diode just dumps voltage into the Vcc line of the microcontroller, which if you're clever may not necessarily be an issue.
- comboy 9y agoThat was my first thought too, but he explains that in the last paragraph: > I am also obsessed with eliminating hardware with clever software wherever possible. Hardware is mater and is therefore you have to manufacture, move, and dispose of each and every hardware part used. None of these these problems apply to software
- buserror 9y agoI'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 9y agoDon'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
- rebootthesystem 9y agoSingle 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 9y agoYeah, click bait title. Last time I counted, an inductor and a uP comes out to two.
- lightedman 9y agoLED counts as a third part. Battery a fourth.
- rebootthesystem 9y agoYou missed my point. That microprocessor has thousands of transistors. And then you need software.
- fallingfrog 9y agoOhh ok, the single part is an integrated circuit. Isn't that cheating?