hi,
I have 16 channel relay shield and cant turn on all relays.
Then I connet arduino tu PC all relays works fine (all at once) but then I disconect arduino from PC and power on 12V power supply all relays start blinking, looks like they dont have enoth power. If I use only 5 at once everything is ok.
I dont connect 12V to relay shield:
can this be the reason?
all 16 relays are connected to 220V
You should check the data sheet of the relay shield. Eventually there are jumpers that have to be inserted or removed. But unless you did something very weird, connecting a 12V supply to the marked shield connectors should not do any harm. I'd be prepared for more trouble with such a shield.
first I try to use 16 relay shield and get problem to run all relays at once. Then I build my own 13 relay shield to solve that problem, but get the same result.
Then I open all 13 relays looks like arduino mega cant sustain that much mA and restarting. How to increase arduino mega power?
In my shield arduino mega open C2073 transistor which open 5V to open RAS-0515 relay.
PIN22->C2073->RAS-0515
PIN24->C2073->RAS-0515
....
Do I have to use other 5V power supply not from arduino?
It depends on how the relays are wired. The common relay modules with optocouplers allow you to use a completely isolated power supply for the relay coils. The Arduino only drives the optocouplers.
There are several versions of that (badly designed) 16-relay board.
With/without 12>5volt buck converter, and with 5volt or 12volt relays.
The one pictured has the buck converter fitted (top-right corner), and it seems to have 12volt relays.
A 12volt/1Amp supply is needed to power the relays (relay coils draw ~600mA when all are active).
I would not trust that relay board on 220volt.
It has optocouplers, but no opto isolation.
Leo..
The real problem are the PCB gaps or shielding, that separate the mains voltage from the logic circuit. In so far relays are as safe as are optocouplers.
DrDiettrich:
The real problem are the PCB gaps or shielding, that separate the mains voltage from the logic circuit. In so far relays are as safe as are optocouplers.
Two gaps (relay+opto) is better than one gap.
Leo..
johnwasser:
Aren't those 16 little 4-pin packages optocouplers?
Yes, but 16-channel relay boards have a serious design fault.
There is a permanent connection between the opto LED and the opto transistor,
so the optocouplers on those boards are just ornamental (to trick the buyer/user).
I tried to convince (email) shops like Sainsmart about the dangers, but they choose to ignore.
They still advertise it as "opto isolated", while in fact it's not.
They have the board .pdf files on their site in case you want to check.
1-8 channel boards (the ones with a JD-VCC jumper) don't have those problem.
Leo..