Can't control all of my relays

Hey guys,
I bought some led strips and I want to control each one of them (i got 10). I did the same circuit like CIRC-11 (from the Sparkfun handbook) for each one of my led strip.
The first problem I had was that I could only turn on 2 led strips at the same time (some times 3), i understood that it was because the relay needs 50mA to work and the arduino got only 100mA from usb (I didn't manage to let it has 500mA). 2*50mA = 100mA so its logical that I could turn on only 2.
Because of that I bought transformer to 5V and 2A and connected it to my arduino. So now my arduino got 10 cabels going out of its pins and a USB (for signals from computer). every relay needs 50mA and I got 2A so its about 40 relays. The problem is that I can only turn 5 relays (some times 6).
I dont know why i cant turn on more relays. I want to emphesize that the only thing the arduino does is to send signal to the transistor that control the relay.
Do you guys have any idea why I cant turn on more relays? What can I do?

*NOTE: the led strips powered from an external 12V power supply

You're scaring me.
Draw a schematic with pen & paper and post a photo of your schematic. We need to make sure you're not doing anything 'crazy'.

Quite apart from what total power the Arduino may be able to supply each of the individual digital I/O pins can only supply about 20 milliamps (absolute max for a brief period is 40 mA - beyond that the Arduino will be damaged).

This is not enough to power any relay with a coil (a solid state relay would be OK). There MUST be a suitable transistor between the Arduino pin and the relay coil power supply.

...R

You won't get any help until you post a schematic.

raschemmel:
You're scaring me.
Draw a schematic with pen & paper and post a photo of your schematic. We need to make sure you're not doing anything 'crazy'.

this is the circuit: http://puu.sh/8PTDW.png
each led strip is connected to the same 5v and 12v power supplies (same for grounds)

Your schematic looks fine but FYI, it is MUCH easier to just pick up a pen and pad and draw a schematic any way you want than to use some funky software and wind up with ground symbols upside etc. Hand drawn schematics are more effective and faster for anything but complicated circuits. Just take a photo of the schematic you draw. You'll find it much more convenient.

About your schematic, you did neglect to mention something , right ? (like the schematic represents ONE of many similar circuits you have connected )

You do realize the arduino on board regulator is only good for slightly more than 500mA (the USB limit)(onboard running off the ext dc pwer jack is good to about 800mA)

If you draw a proper schematic showing EVERYTHING you have connected it will be obvious what your problem is.
You should be able to power the relays off the 5V 2A supply and the led strips off the 12V supply so I don't know why you are saying your limit is 5 or 6 relays. (250 to 300mA) Have you actually measured the current from the 5V supply powering the relays ?

raschemmel:
Your schematic looks fine but FYI, it is MUCH easier to just pick up a pen and pad and draw a schematic any way you want than to use some funky software and wind up with ground symbols upside etc. Hand drawn schematics are more effective and faster for anything but complicated circuits. Just take a photo of the schematic you draw. You'll find it much more convenient.

About your schematic, you did neglect to mention something , right ? (like the schematic represents ONE of many similar circuits you have connected )

Yes. There are 8 such circuits, each one connected to different arduino port. all get the external power from the same power supply.
Do you see a reason why i can turn on all of them at the same time?

someone?

the power for the arduino could be from the USB, but the USB will never deliver enough power for multiple relays.

you should have a separate power supply for the relays and a separate one for the Arduino.

tie the grounds together.

the contacts side of the relay are totally isolated and those connections should not be connected to either of the other power supplies.

in reality, if you are using the same power supply for the motor, you could just use a transistor and not the relays.

what you did not list
#1) the power consumption rating for the relays coils.
#2) the relay part number. a link to the data sheet would be welcome.
#3 ) the relay coil power supply ratings, how much current does it deliver
#4) the part number for the transistor.
#5) the math to show why you chose that resistor.

fundamentally, you do not have any problems.
however, the implementation sounds like it needs some attention.

I edited your drawing to show separations of power supplies.

relay.bmp (144 KB)

raschemmel:
Your schematic looks fine but FYI, it is MUCH easier to just pick up a pen and pad and draw a schematic any way you want than to use some funky software and wind up with ground symbols upside etc. Hand drawn schematics are more effective and faster for anything but complicated circuits.

Ahem.

Looks to me as if that schematic was pretty much "hand drawn" and I'm figuring the "funky software" was "M$ Paint".

It certainly wasn't Fritzing (err, I hope!).

It also suggests the LEDs are connected to the normally closed contacts on the relay. :smiley:

What's missing is the Common Ground connection from the 5v ps to the 12V ps to the relay bd GND.
All three should have a COMMON GND.

raschemmel:
What's missing is the Common Ground connection from the 5v ps to the 12V ps to the relay bd GND.
All three should have a COMMON GND.

if the relay board has a power supply and an opto, then I believe a common ground is not required.

the relay coil can be isolated from the control signal by the opto and it definitely isolated from the contacts.

I think that the most of the cheap e-bay relay boards are already tied to share a common ground between the power supply of the signal and the power supply of the coil. simply by the fact that most of the e-bay specials only have one input for voltage and one input for ground and one pin for each signal. ergo, ground is tied together.

the contacts side of the relay has no need to share any electrical connections with either the coil or the signal.

the OP said he has a 5v 2 amp power supply, I am not sure of the 50mA for the relay coil. I would really like to see the data sheet. the typical relay is the Songle and they draw about 100mA and about 0.45w.

Check out this post for photos and schematic. I am currently trying to find out how you can maintain the isolation when the
relay board does not provide a separate screw terminal for the Relay Vcc. I understand about the opto-isolation but the schematic
at the other post seems to indicate that the little blue jumper connects the two Vccs thereby eliminating the opto-isolation and the only way to maintain it is to remove the little jumper and plug a jumper wire with a female connector onto the pin labeled
"JD-VCC". Seem like a stupid design to me. Just to save the cost of the added screw terminal.

MyNick:
someone?

Get relay boards that use optical isolators to connect to the arduino. The arduino only powers the optical isolator, the rest of the relay board would use the external power supply to operate the relays.

raschemmel:
Check out this post for photos and schematic.

More precisely, this one. :smiley:

ha ha , that's where I got the information for the last post. XD