Hacker News

zdw
Things you can do with diodes lcamtuf.substack.com

wkjagt2 minutes ago

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.

dietrichepp11 hours ago

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.

adrian_b24 minutes ago

For log converters you should not use diodes, because their parasitic currents mask the current component that has an exponential dependence from the voltage.

For log converters, bipolar transistors are used, because their collector current depends only on the ideal diode current of the base-emitter diode, not also on its parasitic currents, so the base-emitter voltage has a logarithmic dependence on the collector current, for a relatively wide range of currents.

exDM692 hours ago

Two more from the world of analog music/guitar electronics:

1) Ring modulator: https://en.wikipedia.org/wiki/Ring_modulation

A device used to multiply two analog signals in time domain. Best known for the sound of the Daleks in the original 1960s Doctor Who series. Has some applications outside of music and sound effects. If you can find those old fashioned audio transformers, this effect does not require a power source.

2) Diode clipper: https://en.wikipedia.org/wiki/Clipper_(electronics)

Two diodes in parallel with opposite polarities. Clips the incoming AC signal to a +/- diode threshold voltage. Put a high voltage gain amplifier stage in front of it and you get the classic electric guitar distortion tone you know and love. Allegedly works best with germanium-unobtainium diodes. In their absence, using two different kinds of diodes can also have pleasant tonal qualities.

nomel11 hours ago

4. Varactors! https://en.wikipedia.org/wiki/Varicap

Reverse biasing a diode at different levels changes the junction capacitance. Also used in radio, for things like variable filters.

edit: oh, it's topped pinned comment!

summa_tech8 hours ago

You could also make a high speed signal sampler.

https://w140.com/tekwiki/wiki/Sampler

bob102910 hours ago

Zener diodes can be used as the basis for a quantum random number generator.

https://opg.optica.org/optcon/fulltext.cfm?uri=optcon-1-7-15...

joconne5 hours ago

Diodes are also used as a radiation detector in radiotherapy: https://oncologymedicalphysics.com/diode-detectors/

4gotunameagain4 hours ago

And particle accelerators ! They mostly detect gamma radiation, and they are used in conjunction with other detectors (ram chips, mosfets)

hshdhdhehd11 hours ago

From my hobbying decades ago there is also the boring old rectifier to convert AC to a wavy DC.

kennywinker5 hours ago

Those are covered in the article

[deleted]10 hours agocollapsed

temporallobe6 hours ago

Clipping diodes are common in distortion effects as well, especially guitar distortion pedals. Examples include silicon, germanium, LEDs, etc.

timonoko3 hours ago

Stereo decoder. You feed L+R and L-R to the corners of Full Bridge Rectifier and out comes Left and Right.

goodpoint3 hours ago

I heard his voice while reading this.

f1shy4 hours ago

With some capacitors you can build a voltage multiplicator

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

RossBencina10 hours ago

4. Voltage controlled filter, (diode ladder VCF), as used in the Roland TB303

gblargg8 hours ago

Temperature sensor.

liffiton7 hours ago

I did this once with a diode when I was a baby electrical engineer in college. But of course you need some kind of measurement circuit. So somehow(???) I figured out I could wire a diode into one axis of my analog Gravis joystick--hooked up to my soundcard--and get a fairly accurate and stable measurement of temperature by poking the monostable multivibrator (pretty sure that's what it was called) in the soundcard that would trigger the time it took to drain a set amount of charge through the joystick's x-axis/now-diode.

Novices who don't have a clue nor know any better come up with the weirdest solutions. I have no clue whatsoever now what inspired me to even try something like that.

beckler10 hours ago

Kinda interesting to hear about. I have a 500 chassis I’m slowly working on filling. I’m between the RND 535 or 543, and had never heard of a diode bridge comp before looking at the 535.

What kind of 33609 clone do you have?

dietrichepp7 hours ago

I have the Heritage HA-609A. I considered going 500-series. Maybe some day in the future. For now, I have two preamps and the HA-609A in a 4U rack, and most of my other gear is in storage. Keeping things light.

cozzyd9 hours ago

And a square law detector!

normel65 hours ago

PIN diode, a diode used as an AC on/off switch by passing current through it, very useful in RF circuits above 1GHz

compumike7 hours ago

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)

dr_kiszonka6 hours ago

Looks great! Would you have a recommendation for intro materials to help me learn the basics of electronics using CircuitLab? I have a working understanding of signal processing but building an actual circuit without electrocuting myself, not setting my Raspberry Pi on fire, or selecting the right set of components for the simplest DIY project based on spec sheets are a mystery to me.

compumike6 hours ago

Not sure if it’s a fit for what you’re looking for, but maybe https://ultimateelectronicsbook.com/ (maybe more theoretical than practical).

I’ve heard good things about “Practical Electronics for Inventors” but haven’t gone through it myself.

djmips10 hours ago

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

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

iainctduncan7 hours ago

Diode ladder filters are a mainstay of old analogue synths... and sound awesome.

youngtaffan hour ago

They certainly do… I’ve few in my Eurorack synth

petermcneeley9 hours ago

Btw you can try these out online with a circuit simulator

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

sanskarixan hour ago

funny how we've abstracted so far up the stack that most people building "tech" companies have zero clue what a diode actually does. not judging - you don't need to know this stuff to ship a SaaS product.

but here's where it matters: when your hardware breaks in weird ways or your IoT thing has power issues, and you're stuck debugging with vendors. I've watched founders burn weeks because they couldn't speak the language.

maybe the real lesson is knowing when to stay in your lane vs when to dive one layer deeper. most of the time you don't need this. but when you do, not knowing costs you time and money.

sehugg9 hours ago

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-...

[deleted]7 hours agocollapsed

eimrine4 hours ago

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.

Cymen11 hours ago

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

labcomputer8 hours ago

TL;DW: Isn't that just because the diode matches the PV array's max power point, assuming they both use the same technology (e.g., silicon)?

It seems like that depends on the diode string and PV array remaining at approximately the same temperature as heat is dumped into the diode.

Retr0id10 hours ago

Intriguing, but wouldn't it be even more efficient to just paint something black and let the sun heat it directly?

cwillu9 hours ago

At the cost of very efficiently radiating that heat back out into space at night.

Making electricity and then using that electricity to heat something elsewhere lets you insulate, effectively allowing you to create a box that heat energy can only pass one way.

jaggederest7 hours ago

We have a one-way diode technology for heat, it's called "glass", and it'll bump your efficiency by about 25% versus uncovered flat plates on a still day. More in windy conditions etc, lots of hand waving assumptions about spherical cows in a vacuum etc.

b00ty4breakfast7 hours ago

You'd need some kind of storage for the heat, something with a large thermal mass that doesn't readily give up it's heat to the surroundings. Sand or water or even big rocks or a thick slab of concrete.

Scoundreller10 hours ago

depends how hot you want to get something

petermcneeley8 hours ago

where is this 'extra' heating coming from?

labcomputer8 hours ago

I suspect (didn't watch) it's just that a diode makes a crude MPPT tracker (since a PV array is just a bunch diodes arranged to collect photons at the P-N junctions). The benchmark is probably "non-variable resistor".

Scoundreller5 hours ago

my thought was that a diode removes all the current from its voltage drop (aka: why your LED will burn out if it gets uncontrolled current). A resistor will never remove all the current going through it.

Maybe we're saying the same thing in different ways.

nandomrumber7 hours ago

From the misleading sound-bites themselves, they’re know to increase conversation metrics.

blankx326 hours ago

mitthrowaway28 hours ago

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

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

kazinator9 hours ago

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.

wormius10 hours ago

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

jug3 hours ago

I went up 4:30 am today for a flight to Gothenburg, pretty tired and slow... and you and me both.

devsda7 hours ago

And keeping up with the spirit of HN, we would have hopefully learnt something new either way.

tt_dev10 hours ago

Was looking for this comment

TrackerFF5 hours ago

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.

mattclarkdotnet6 hours ago

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.

tiniuclx4 hours ago

You can also build a rectifier with no voltage drop using an op-amp with some diodes in the feedback loop. But that might be considered cheating :)

xxs5 hours ago

at that point (and in general) you'd like to use Schottky ones. MOSFETs are an option for low extra efficiency.

iainctduncan8 hours ago

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..)

brucehoult10 hours ago

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.

uticus10 hours ago

> 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?

JKCalhoun10 hours ago

They might be referring to RTL (resistor-transistor logic). A transistor in the circuit can maintain the same output current that was input. (A transistor in fact a diode and a half.) RTL was superseded by TTL (transistor-transistor logic) but, hey, the Apollo computers that put astronauts on the Moon used RTL logic.

You could start with the late Don Lancster's book [1].

I have a little "breadboard helper" that I am wrapping up (that includes a project manual) for creating RTL circuits and others [2]. (I hope to sell a few.)

RTL book [1]: https://archive.org/details/RTL_Resistor-Transistor_Logic_Co...

Prototyping [2]: https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:oxjqlam...

cwillu9 hours ago

https://en.wikipedia.org/wiki/Logic_family has a list of common families; of particular note is CMOS, which is essentially what modern computing is based on.

_whiteCaps_8 hours ago

Bebop To The Boolean Boogie might be useful for you - it's kind of a kids book but the concepts are all well done.

[deleted]10 hours agocollapsed

jagged-chisel11 hours ago

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

How completely unintuitive.

Shellban11 hours ago

You can blame Benjamin Franklin for that. By the time we figured out the mistake, the standards were set in stone.

dietrichepp10 hours ago

It would be like this either way.

The N side has negative charge carriers. It has a positive charge in the depletion region because the charge carriers are missing. Likewise, the P side has positive charge carriers, and when they’re missing, you get a negative charge.

This is true whether we live in the current universe or live in an alternate universe where we say that electrons have positive charge. The depletion region is where the charge carriers are missing (depleted), so you get the opposite charge of whatever the charge carriers are.

WorldPeas7 hours ago

atan29 hours ago

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

hshdhdhehd11 hours ago

Current/voltage chart looks a lot like a RELU.

CamperBob28 hours ago

That's exactly why it's called a 'rectified' linear unit! It's a half-wave rectifier. The ReLU function is just what you'd see if you put an (ideal) diode on a curve tracer.

skopje10 hours ago

forgot adc converter! series diodes tapped at each connection.

ada19819 hours ago

[flagged]

hn-front (c) 2024 voximity
source