Wide supply voltage isolation possible? - Page 1
Forum section: electronics / beginners

author: rthorntn
author_rank: Frequent Contributor
timestamp: July 25, 2025, 12:26:21 am
content: Hi,I can't figure this out, is there a digital isolator or circuit with a wide supply voltage (3.3-12V) and a fixed output (3.3V), I want to take various voltage square waves (<1KHz) into a 3.3V GPIO and not release magic smoke?Not sure this makes sense or I'm missing something obvious, it should be plug and play as all I know is the input voltage is somewhere between 3.3-12V.Thanks!

author: Andy Chee
author_rank: Super Contributor
timestamp: July 25, 2025, 03:29:23 am
content: You haven't given much detail to go on.As such, my suggestion is to clamp your input voltage signal to 3.3V (strictly speaking, 3.6V) by using two 3.3V zener diodes in series and cathode to cathode (or anode to anode). Connect these series zeners across from input to ground. A series resistor (say, 330 ohms) in series with the input and before the zeners, is also a good idea to limit current through the zeners on the large input voltages. This now clamped signal can then be fed into whatever GPIO pin you wish.

author: Ian.M
author_rank: Super Contributor
timestamp: July 25, 2025, 04:11:31 am
content: Alternatively, if you really require opto-isolation, you could try this. It limits the optocoupler's LED current to approx 5mA all the way from 2.4V to 40V (or whatever the max Vcbo of Q1 is), and below 1.1V has negligible LED current. If you need it to tolerate negative input voltages greater than -5V, add a Schottky diode in series with the input. I'll leave the output side of the optocoupler's GPIO connection up to you . . .

author: rthorntn
author_rank: Frequent Contributor
timestamp: July 25, 2025, 04:57:34 am
content: Thanks Andy & Ian.Sorry for it being vague, I want to feed modular synthesizer clocks into a Pi. Eurorack uses ±12V and the clock voltages are all over the shop.Isolation probably isn't super important.The clocks can have negative voltages and the GPIO ain't going to like that.

author: Psi
author_rank: Super Contributor
timestamp: July 25, 2025, 05:03:37 am
content: If what you want to connect is an AC waveform you can decouple it with a series capacitor with the other side connected to the middle of a voltage divider connected across 3.3V. You'll probably want a series resistor too.This way you can convert your +/- 12V waveform into something centered at a much lower voltage and keep it isolated through the cap.You can add a diode if you want to clamp the negative side.The size of the cap and series resistor control how much force the external signal can pull/push the voltage divider away from its nominal voltage.

author: tooki
author_rank: Super Contributor
timestamp: July 25, 2025, 10:12:15 am
content: Quote from: rthorntn on July 25, 2025, 04:57:34 am“All over the shop“ meaning what, in practice?

author: langwadt
author_rank: Super Contributor
timestamp: July 25, 2025, 10:30:32 am
content: Quote from: Andy Chee on July 25, 2025, 03:29:23 amyou only need one zener, you don't want negative voltages. There is no need for such a small resistor, at <1kHz several kOhm would do. Depending on the spec for the io SED diodes a zener might not even be necessary

author: rthorntn
author_rank: Frequent Contributor
timestamp: July 25, 2025, 10:31:48 am
content: "A confused state" a lot of clock inputs in eurorack have voltage clamping because folks will plug all sorts of square waves into clock inputs, you have digital and analogue clocks or even LFO's, lots of DIY and ±12V supply compound the problem.

author: rthorntn
author_rank: Frequent Contributor
timestamp: July 25, 2025, 10:50:23 am
content: Quote from: langwadt on July 25, 2025, 10:30:32 amCould you expand a bit please?

author: langwadt
author_rank: Super Contributor
timestamp: July 25, 2025, 11:53:37 am
content: Quote from: rthorntn on July 25, 2025, 10:50:23 amif the IO has ESD diodes to gnd and vcc, and the datasheet specifies that you are allowed to inject current into them all you need is a series resistor to limit the current (and makes sure the consumption on vcc is always atleast that current) but check the datasheet, not all mcus allow injecting current ( like for example stm32 5V tolerant pins)

author: tooki
author_rank: Super Contributor
timestamp: July 25, 2025, 05:00:44 pm
content: Quote from: tooki on July 25, 2025, 10:12:15 amOK, so youthankedmy question, rthorntn, but what I wanted was an answer to the question. What voltages does “all over the shop” mean?

author: Ian.M
author_rank: Super Contributor
timestamp: July 25, 2025, 06:09:37 pm
content: RS232 line receiver ICs may well fit your requirements.