Author Topic: Possible solutions for (+) control input to LED controller on (-) supply rail?  (Read 1238 times)

0 Members and 1 Guest are viewing this topic.

Offline Metatronic_ModsTopic starter

  • Contributor
  • Posts: 35
  • Country: us
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.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
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.

« Last Edit: August 12, 2017, 04:47:02 am by Ian.M »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
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.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
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.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Overly complex, yes, but hard to damage. (I have trust issues with zeners long term)
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
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.   
« Last Edit: August 12, 2017, 06:04:15 am by Ian.M »
 

Offline Metatronic_ModsTopic starter

  • Contributor
  • Posts: 35
  • Country: us
Thanks guys, this is why I ask :D  It 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!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf