0
\$\begingroup\$

I have an RGB LED (datasheet here) that I want to control using an Arduino R3 (datasheet here). How can I do this? The LED has a common anode, not a common cathode. However, the arduino's I/O pins can only be +5 volts. This is a problem, because I need to somehow hook up the LED's cathodes to the arduino's I/O pins.

asked Nov 5, 2013 at 13:36
\$\endgroup\$

2 Answers 2

3
\$\begingroup\$

This is only a problem if you think in terms of SOURCING a current from an output. Outputs also SINK current.

enter image description here

When the output is set LOW current will flow INTO the pin to ground (SINKING).

answered Nov 5, 2013 at 14:11
\$\endgroup\$
2
\$\begingroup\$

The Arduino IO pins can "output" high or low (+5v or 0v) which means you can drive a LED either direction. Generic schematic (couldn't find RGB LED in the editor):

schematic

simulate this circuit – Schematic created using CircuitLab

answered Nov 5, 2013 at 14:15
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.