Possible solutions for (+) control input to LED controller on (-) supply rail? - Page 1
Forum section: electronics / projects

author: Metatronic_Mods
author_rank: Contributor
timestamp: August 12, 2017, 03:10:35 am
content: I'm building modular synthesizer cases with built in power supplies (which provides -12V, GND, +12V and +5V). The -12V rail can sink more current than typically required, so I got the idea to add some case lighting with some WS2811 LEDs and a teensy, both powered from -12V and GND.This has worked fine for a passive (no inputs) version. But since this is a modular synth case, I'd like to add some audio or DC control voltage inputs to the teensy to affect parameters in the LED code. The inputs will be in the range -5 to +5V, and will need to be shifted and scaled to match the inputs for the teensy (-12 to -8.7V). This should be a simple matter of finding a rail to rail opamp with (Vdd-Vss) >= 24V and which saturates very near Vss. But I am a little worried how the teensy ADCs will behave being that the 0V reference is now the -12V rail, I'm wondering if this will introduce noise on the control inputs. Does anyone know of a better way to accomplish what I'm trying to do? (power LEDs from the negative supply whilst controlling them from bipolar inputs) Thank you!Illustration attached for clarity sake.

author: Ian.M
author_rank: Super Contributor
timestamp: August 12, 2017, 04:42:27 am
content: Why not run the Teensy from the 5V rail and simply level shift or optocouple its DOUT to the LEDs? It also would be sensible to have Teensy 0V common to the rest of the device if the Teensy USB port is going to be user accessible. You'll still have to do some input buffering and scaling for +/-5V inputs to the ADC (though if you don't mind an input that pulls up to +5V, that can be as simple as an equal resistor potential divider between input and +5V, tap to the ADC), but its much easier when the OPAMPs have dual supplies and you don't have to worry about their rail-to-rail performance, or consider the noise characteristics of the -12V rail.

author: Rerouter
author_rank: Super Contributor
timestamp: August 12, 2017, 05:00:29 am
content: I would suggest keeping your micro at the same ground reference.For communicating to the leds. use a PNP as a level shifter, in the attached image the npn is just there to add some protection incase the pnp gets abused.The voltage across the 4.1K resistor becoems a 5V signal referenced to the -12V supply.

author: Ian.M
author_rank: Super Contributor
timestamp: August 12, 2017, 05:19:57 am
content: That's over-complex. PNP transistor in common base (to 0V rail), input to its emitter via a resistor, output from its collector with a pull-down to -12V. You can add a Zener clamp if you need 5V logic levels referenced to the -12V rail.

author: Rerouter
author_rank: Super Contributor
timestamp: August 12, 2017, 05:24:42 am
content: Overly complex, yes, but hard to damage. (I have trust issues with zeners long term)

author: Ian.M
author_rank: Super Contributor
timestamp: August 12, 2017, 06:02:10 am
content: Well you don't actually need a Zener for the common base level shifter: simply use a high gain transistor and use equal base and pulldown resistors so it doesn't saturate. That shifts the input signal down to the negative rail while preserving its amplitude less one Vbe drop. If the drop's a problem, make the pulldown resistor 10% bigger for 5V logic or 20% bigger for 3.3V logic to get a little voltage gain to compensate.

author: Metatronic_Mods
author_rank: Contributor
timestamp: August 12, 2017, 03:04:41 pm
content: Thanks guys, this is why I askIt was simple enough to just connect the controller/LEDs to the -12V rail, and have it just work (when there were no control inputs from the rest of the system). I hadn't taken the step back to reconsider the overall design once adding the inputs. Cheers!