Alternate 3 states RGB led from one output using a counter.

Hello everyone!

I am trying to build a circuit to lit up a RGB led ribbon with different states using only one output.

I would like to help on this wiring, because I am not familiar with all these components together.

To begin, I am using a counter (4017) so it can have 3 states from an output:
state 1) RGB ribbon is off.
state 2) only Red;
state 3) all RGB is turned on.
state 4 is wired to reset, so I think it will go back to 0 again and turn ribbon off.

By far, I think it is working as only Red for state 1, and only Green and Blue for state 3...

I have attached a picture (sorry the way I attempted on doing that) to show more or less the idea, regardless of the right components specifications (which I don't know actually).

I am also not aware if I need relays in this case, (i am using 12V for led ribbons, 1A). Also, not related but, I am not sure if I could connect the ground from a 12V to the ground at Arduino. Is it ok?

Any help would be really appreciated!

Thanks in advance,

Bontempos~

So you have a 4017 like this

that only has 1 low output at a time, and you want to have output 1 turn on 1 relay, and output 2 turn on both relays?
I think you need a 3rd transistor, with 2 in parallel to relay.
T1 connects to Relay 1, controlled by output 1.
T2 connects to Relay1, T3 connects to Relay 2, both controlled by output 2.
Transistors need to be PNP so that a Low on their base turns them on.
All transistors needs a base current limit resistor as well so don't burn out the 4017 outputs.
Don't forget current a current limit resistor in series with each LED anode as well.

Can also skip the relays entirely. Still need 3 transistors.

I just realized I misread the CD4017 datasheet - looked at it too quickly earlier.
It has 1 of x High outputs.
So the transistor need to be NPN and sink current thru the loads.

Hey! Thanks a lot for the assistance!

I have made another picture to confirm if I understood it correctly ok? Also, I don't know which resistor to use, or how to calculate them.

Thanks,

Bontempos~

Can you Modify your post and resize the pic to be more like 1000 wide vs 3200+?
Can't pan around enough to make it all out.

Sure! just did! Thanks!

Also, your "RGB LED ribbon": that has a + pin for each color, and common ground?

Exactly - I think. I uploaded a picture.

That would be a problem for the third transistor, right?

IF that is what the LED strip is, a dumb strip where you apply power to each anode and ground for all, then you need this:
4017 high out turns NPN on, which pulls PNP base low to apply power; i.e. high side power switching.

Unroll some of the strip and get a clear, close up picture. I'm seeing what could be an IC in there, in which case a different approach is needed.
Or, it could just be the connector area between segments.
Or better, post a link to the LED strip.

Again, thank you very much!

I am sorry I couldn't find a website with the data sheet of the product.

the reference is LED-TP50-WP-RGB-5M

I could find it at

and here, even it is in Japanese, It has some information including the picture:

Also, I tried to figure out the PNP transistors circuit part but still struggling a little on understating the way it works. I think I get the main idea, however.

1st link says Common Anode, so may just need this.

Depending on how many you light up, you will likely need to switch to N-Channel MOSFET also.
NPN needs current to turn it on - 4017 are not known for high current output.
MOSFET need very little current, they are voltage controlled devices.
A good Logic Level, Low Rds, low input gate capacitance device will do, such as:

With its low Rds, it will heat up very little while switched on:
P = IIR, so at 2 Amps, 22.01 = 40mW.
At 5A, it may feel a little warm: 55.01 = 0.25W.

Important thing is to figure out what you have.
Take your 12V source, and see if there is One 12V+ input and 3 returns (connect to 12V-), 1 for each color.
Or three 12+, and 1 return.

Thanks! Indeed it is a common anode.

So, I was looking information about the MOSFET.
I understand that the output from Arduino to the clock pin at 4017 doesn't need a resistor. And that I would connect the MOSFET as a Capacitor (? but couldn't figure out the pins), in the 4017 Vdd pin, in order to increase the amount of its current output to turn on the NPN transistor. Is that so?

I would probably use the whole ribbon (5 meters, using up to 1A), but each output of arduino would drive only a part of it.

Given that, this part would fine: AOI516 or AOI518 from digikey.com

The capacitor on VDD only ensures proper operation, nothing to do with current drive to the outputs.

Thanks for the information!

I wasn't understanding I had to replace the 3 transistor for the 3 MOSFETs. Although I couldn't understand the forth MOSFET.
Also, a capacitor of 100nf will do ok, between Arduino output and 4017 vdd pin?

That was pasted from a page of 32 I had drawn up for another project. You just need 3 as drawn earlier.
100nF = 0.1uF

Thank you very much for the instructions!

I have to build this for every output from arduino, and because I am not familiar with components, I would like to confirm if I have made any mistaken before ordering the materials. I am uploading a picture. Is this ok?

Considering the leds attached on the strip have already resistors on it. Indeed I would probably need to use a connector to unplug the strip from the circuit too...

No quite.
You wanted output 2 to turn on all LEDs?
Connect D2 to L1, and and D3 to L2 and L3.

Connector for LED strips makes life easier.

The diodes are not needed - the MOSFET has one built in already.
http://aosmd.com/res/data_sheets/AOI516.pdf
AOI518 is similar part; I can't find a datasheet for it.

I corrected the circuit! Thanks.

In time, I could not find any AOI516 at stores here. I will keep looking for it. In case I couldn't have one, can I replace it somehow?

You can replace it with any logic level FET.
Look in the data sheet for the full on resistance or Rds that is quoted at a gate voltage, that voltage must be 5V or under to make it a logic level FET.