0

I want to use an Arduino Uno to control the LED light strips, based on the input signal from a robot controller. The robot controller sends a digital signal with "HIGH" of 24 V and "LOW" of 0 V. I have thought of using an optocoupler between the robot controller and the Arduino to reduce the voltage from 24 V to 5 V, suitable for the Arduino pin.

Can I connect the optocoupler's emitter to the Arduino ground?

The LED strips work on 12V DC and at 2000mA. If I power the Arduino with 12V DC power source connected to the DC jack, can I give the power to the LED's also using the V-in pin of the Arduino?

Please look at my circuit and tell me where I went wrong and why?

Circuit schematic

  • I have attached an image of my circuit? ... Why are you asking us? Don't you know if you did or not? – Majenko Dec 12 '17 at 15:50
  • why do you think that you went wrong? – jsotola Dec 12 '17 at 23:54
1

Can i connect the optocoupler's emmitter to the arduino ground?

Yes. Don't forget to either enable the internal pullup on the GPIO pin or use an external pullup on the collector.

If i power the arduino with 12 V D.C power source connected to the D.C jack, can i give the power to the LEDs also using the V-in pin of the arduino?

Not at the current rating you are talking about, no. The header is only rated for 1A, and the diode on the barrel jack input is also rated for only 1A. You would need to split the LED power off from the incoming power before it goes into the Arduino.

The way you have your MOSFETs wired at the moment is wrong. The moment you turn one on it will let the Magic Smoke escape. You are using them to short circuit the LEDs, which is very very bad.

Each one should be wired in series with the LED between the cathode and ground:

schematic

simulate this circuit – Schematic created using CircuitLab

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.