0
\$\begingroup\$

I have a project right now where I have access to a header to control standard 12v 5050 LED strips. What I'm trying to do is read that signal with an Arduino, and then use the values to control other types of RGB strips/bulbs that are connected to the Arduino.

I cannot seem to wrap my head around how to pull the signal I want. I've got a +12V, and an R, G, and B signal. The RGB ones aren't + voltage so... what are they then? How do I go about converting them into something the arduino can read on the Analog pins?

\$\endgroup\$
  • 1
    \$\begingroup\$ Show us some schematic, it's unclear what You asking about. \$\endgroup\$ – Jakub Rakus Jun 10 '16 at 6:52
  • \$\begingroup\$ Buy market available Solid state relay cross wire it with the 5050 LED strip, put it as the input on the PWM pins and use it as a frequency counter. \$\endgroup\$ – MaMba Jun 10 '16 at 9:11
  • \$\begingroup\$ Let me just add that 5050 is only the package size designator; it tells you nothing about the electrical characteristics of the LEDs. Saying "standard 5050 LED" is like "standard 1210 capacitor"--there are literally thousands, if not millions, of totally dissimilar and non-interchangeable products that this could refer to. There is nothing standard about it, apart from that they all take up the same area on the PCB. \$\endgroup\$ – Oleksandr R. Jun 10 '16 at 9:37
1
\$\begingroup\$

The LEDs are almost certainly controlled via PWM, so the RGB signals are 12 V PWM.

You can read these into an Arduino (with a slight loss of precision), by low-pass filtering the PWM signal to get an analog voltage between 0 and 12 V, and then adding a voltage divider to scale the 12 V down to a maximum of 5 V so that you can use the Arduino ADC to read the values. The order of the voltage divider and LPF is non-critical, either way works.

However, beware that the impedance of the voltage divider will affect your LPF and vice versa, so you need to either carefully design your circuit, or add a buffer of some sort in between.

One of the simplest ways to avoid this inter-circuit interaction would be to use the 12 V PWM to switch a MOSFET supplied from 5 V, effectively level shifting the 12 V down to 5 V, and then choosing an appropriate RC LPF to adequately smooth the 5 V PWM on the Arduino analog input. You will want to choose your filter cutoff based on both the PWM frequency and your expected response time (how fast you want to detect changes); a larger filter time constant will give you better accuracy at the cost of slower response time.

\$\endgroup\$
  • \$\begingroup\$ I think this gets me on the right track. I also have some reading to do on common anode leds and how that all works. Thanks for pointing me in the right direction! \$\endgroup\$ – Nitemayr Jun 14 '16 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.