logoalt Hacker News

Things you can do with diodes

407 pointsby zdw11/03/2025112 commentsview on HN

Comments

dietrichepp11/04/2025

Conspicuously absent are some of the analog circuit applications. Here are three of my favorites:

1. Frequency mixer, used for heterodyning, important in radio, so I hear. https://en.wikipedia.org/wiki/Frequency_mixer

2. Log converter, where the output voltage is proportional to the logarithm of the input voltage. https://electronics.stackexchange.com/questions/374440/log-c...

3. Diode ring, which provides variable gain, used in analog compressors like the Neve 33609 (I have a clone of the 33609, and I’m very fond of it)

Think about this: if you have a nonlinear device like a diode, then the dynamic resistance changes depending on the operating point. If you modulate the operating point, you’re modulating the dynamic resistance.

show 18 replies
compumike11/04/2025

You can simulate a bunch of these (and edit too) in your browser in CircuitLab:

Diode half-wave rectifier https://www.circuitlab.com/editor/4da864/

Diode full-wave (bridge) rectifier https://www.circuitlab.com/editor/f6ex5x/

Diode turn-off time https://www.circuitlab.com/editor/fwr26m/

LED with resistor biasing https://www.circuitlab.com/editor/z79rqm/

Zener diode voltage reference https://www.circuitlab.com/editor/7f3ndq/

Charge Pump Voltage Doubler https://www.circuitlab.com/editor/24t6h3ypc4e5/

Diode Cascade Voltage Multiplier https://www.circuitlab.com/editor/mh9d8k/

(note: I wrote the simulation engine)

show 2 replies
sehugg11/04/2025

You can put a small ROM on your board with diodes, for example to store bitmaps, and for style points you can even arrange the diodes in the shape of your bitmaps: https://technologizer.com/2011/12/11/computer-space-and-the-...

show 2 replies
djmips11/04/2025

And here's another that's always fascinated me -> Diode Ladder Filter.

https://www.youtube.com/watch?v=jvNNgUl3al0

show 1 reply
petermcneeley11/04/2025

Btw you can try these out online with a circuit simulator

https://www.falstad.com/circuit/circuitjs.html

kens11/04/2025

The description of forward current and the graph are completely wrong. The graph shows approximately linear current above 600 mV, and the text says "When the threshold is cleared, the diode admits current that’s roughly proportional to the “excess” applied voltage, an ohmic behavior that’s a consequence of the resistance of the material itself".

The current through a diode is exponential with voltage, not "proportional". The graph shows 1.6V applied to a diode yielding 250 mA. In reality, this isn't possible since you'd get a huge current and destroy the diode.

See the Shockley diode equation: https://en.wikipedia.org/wiki/Shockley_diode_equation

I'm surprised that nobody has mentioned that the article is messed up, so am I missing something here?

show 1 reply
SAI_Peregrinus11/04/2025

> The diode is given neither the mathematical rigor of linear circuits nor the red-carpet treatment of the transistor

Sedra/Smith dedicates Part I chapter 4 (pages 174-229 in the 7th edition, not counting the exercises) to diodes. That's longer than chapter 5 (MOSFETs) or chapter 6 (BJTs), and a substantial portion of chapter 3 is devoted to pn junctions. "The Art of Electronics" by Horowitz & Hill dedicates less space to diodes, but it's also much less mathematically rigorous. And they have you building radios & diode mixers before they introduce any sort of transistor. So I'm not sure I agree with this line since neither of the two most popular university electronics textbooks really fits that characterization. It's definitely true of many online electronics "tutorials" though.

show 1 reply
eimrine11/04/2025

I have used some regular diodes today as a way to lower the input voltage and this case is not covered. A diode might be more effective than a buck converter because all I wanted was to have a 0.7V lower voltage and the converter can not work in this condition. Zener diode can but it dissipates too much heat for high-current application.

brucehoult11/04/2025

He mentions diode logic and points out the drawback of the limited output current, but doesn't mention the obvious solution of a transistor in voltage-follower configuration.

I always thought RTL was pretty nifty, and it was used in a lot of early computers. I think it's a lot less fussy of component values than the earlier RTL.

blankx3211/04/2025

Lectenna / Rectenna https://en.wikipedia.org/wiki/Rectenna

mitthrowaway211/04/2025

You can extend the voltage doubler idea to even higher voltages with the voltage multiplier:

https://en.wikipedia.org/wiki/Voltage_multiplier

mattclarkdotnet11/04/2025

This is excellent but in typical low voltage scenarios (5V or lower) the 600mV diode voltage drop becomes very significant. Simple diode half wave rectification works fine at 100V, but at 3.3V it breaks down.

show 3 replies
jagged-chisel11/04/2025

> ... There is a positive charge on the n-side and a negative charge on the p-side.

How completely unintuitive.

show 1 reply
Cymen11/04/2025

Also missing solar heating from diodes:

> This topic seems to be broadly misunderstood. It is 100% verified fact by both myself and others (including university researchers) that diode strings can produce more heat (or watt-hours, BTU) from a given solar panel than a bare resistance element.

https://www.youtube.com/watch?v=42XIbHA9Dv0

show 4 replies
ToddWBurgess11/04/2025

This article reads like study notes for the Canadian Advanced ham license exam. It's a great crash course on diodes.

shevy-java11/04/2025

Back in the oldschool days in the 1990s, I remember our school had soldered diodes, that is, we pupils had to do so manually. That was quite fun. Unfortunately I haven't quite had a need or use case to do so again; I tried to get into arduino, but I found it too much needing self-learning. With that I mean I'd have to understand a lot in order to do something useful. I have no problem with learning something new, but my time is super-limited these days and I need to prioritize hard, so I kind of gave up. Perhaps I try for Raspberry Pi but I am afraid it will also require a lot of time investment before it becomes "useful" (aside from learning something new, which is always useful, but other things also need to be learned, so time is of limited value here).

speff11/04/2025

Is (like the article said) this information really not taught in electronics curriculum anymore? It's been a while since I was in school, but this was all covered in my undergrad EE 2XX/3XX classes. Do modern designs use fewer diodes and more ICs in their place?

show 1 reply
kazinator11/04/2025

Another one: Baker clamp to speed up a transistor.

https://en.wikipedia.org/wiki/Baker_clamp

Flyback diode:

https://en.wikipedia.org/wiki/Flyback_diode

A diode can switch off an AC source when a battery is present: see second circuit in accepted answer, introduced by, "Alternatively, you can probably get away with just using some schottky diodes:"

https://electronics.stackexchange.com/questions/71753/whats-...

Also, diodes can be used to provide a controlled discharge path for capacitors when a device is turned off.

The circuit in this EE StackExchange question shows it:

https://electronics.stackexchange.com/questions/471285/capac...

It has one RC constant when charging and a different RC constant when discharging through the diode.

Why would you want to charge a capacitor slowly when power is applied to the device, but discharge it fast when power is cut? There are various applications for that.

For instance, circuits that control some timed behavior, like holding a CPU chip in a reset state at start up while power stabilizes, and then releasing it. You want that circuit to reset itself quickly if power is lost.

Analog circuits have things like that in them: for instance circuits that mute an audio amplifier on power up for a bunch of milliseconds until a capacitor charges. If the power is cycled, you want that timer to reset itself.

Another application: Log amp: https://en.wikipedia.org/wiki/Log_amplifier

This exploits the diode's characteristic V-I exponential curve in amplifier feedback to produce output proportional to the logarithm of the input.

wormius11/04/2025

I know we're on hacker news, but let's just say I misread the title.

show 3 replies
hinkley11/04/2025

I had a friend in high school who brought in the Tesla coil he made with among other things a PSU from an old computer.

I pestered that kid so hard about DC-DC voltage regulators and he did not know enough electronics to design one from first principles. I think ladder circuits was as far as he got. But I wanted step-down not step-up transformers.

15 years later when the first gen of really good LED flashlights with built-in voltage regulators popped up I owned at least one at all times.

TrackerFF11/04/2025

If you’re into audio, they can easily be used for distortion. You “clip” the top of the audio wave. Usually in a asymmetrical way, to get more pleasant sounding distortion.

dogman105011/05/2025

I've been looking for something to do with the bag of 1N4001 diodes I trash-picked decades ago. There are 1,000 pieces minus the dozen or so I've used in projects. The 50V PIV and slow switching speed limits their application, but I have a lifetime supply!

iainctduncan11/04/2025

I'ma just leave this bad boy here.... https://www.youtube.com/watch?v=xNF891FVC6M

AJH Synth Sonic V Diode Ladder Filter. (IMHO AJH make the best eurorack filters out there..)

uticus11/04/2025

> The reason I put “gate” in scare quotes in the illustration is that the circuits are not readily composable to implement more complex digital logic...

Any good suggestions on resources talking about building complex digital logic out of something more suitable?

show 4 replies
ee99ee11/04/2025

I'll be honest. I misread the title as "Things you can do with dildos"

show 2 replies
lightedman11/04/2025

Not present and ultimately-cursed - using LEDs not only as bridge rectifier but also as the voltage drop for power conditioning before going into a processing IC.

I'm not called the LED Punisher without reason!

wkjagt11/04/2025

Interesting coincidence. I should receive a bunch of diodes from digikey today to fix the bridge rectifier on the control board of our pool heater.

jamesnorden11/04/2025

You can also use a bunch in series as a cheap voltage dropper (eg to make a PC fan run slower/quieter).

atan211/04/2025

Nice timing. I just saw pikuma's email with his new course on digital electronics and saw this here.

hshdhdhehd11/04/2025

Current/voltage chart looks a lot like a RELU.

show 1 reply
airbreather11/05/2025

before silicon, rectification was often achieved with copper oxide

skopje11/04/2025

forgot adc converter! series diodes tapped at each connection.

sanskarix11/04/2025

[dead]

uvaursi11/04/2025

> The diode might be the most neglected component in the electronics curriculum today.

Nonsense like this is why I don’t read lcamtuf. His “electronics 100” falls short of any standard-issue books - today and in the past. And you can open any of them up and very often the very first thing they discuss is the Diode, not only because it’s an “easy” case to begin understanding semiconductor materials (as opposed to tube diodes), but because it forms the basis of understanding more complicated semiconductor devices and why they work the way they work.

I’ve been wholly unimpressed by lcamtuf’s output on this subject because he’s trying to teach but doesn’t know how. He’s trying to come across as smart but his covering of the subject matter is dwarfed by someone like Forrest Mims, which is amusing to think about.

Pick up a book by someone like Melvino or Floyd. They cover analog, digital, computer systems, all sorts of shit. Even the old NEETS books along with technician manuals are a godsend. NEETS approach is particularly good because it moves between phenomena and application in a broad spectrum, which is what helps for concepts to stick.

jimmygo11/05/2025

[dead]

monicanilo27411/05/2025

[flagged]

ada198111/04/2025

[flagged]

howmayiannoyyou11/04/2025

I misread the title at first and forwarded this to my wife.