[SOLVED] Problem witch "too high" current on relay 8 chanel module.

Hi, I want arduino to control few devices by using relay 8-chanel module(i used 4 chanel in picture but idea is the same).

Power supply for devices connected to relay prowide little more current than devices need (depends from number of devices which can change).

Let say that devices needs each 12V, 500mA.My power source (A) is 12V, 2A.
When im using let say source (B) 12V power 800mA, all works ok but only for 2 devices (not enough power for other).
When im using power source 'A' arduino restart each time i try to switch pin state to HIGH.

 ...
void setup()
{
    pinMode(pin , OUTPUT);
}
void loop()
{
    digitalWrite(pin , HIGH);
    digitalWrite(pin , LOW);
    digitalWrite(pin , HIGH); // here arduino reset with 'A" power supply
}
...

For me its strange that external power, not connected to arduino can cause problems.
Probably some how too big cuurent is generated on arduino 5V-GND poweriing relay.
Question is if the 8pin relay isjust broken and i have to exchange it or its typical behaviour and need to figure out how to provide correct current ?

Circuit.png
It is not clear from your diagram how you are actually feeding 5 V into the Arduino in order to provide it to the relays which requite a total of 320 to 360 mA if all are actuated.

You seem to suggest you are using the "barrel jack" for something. Why? :astonished:

Feeding 5 V from a switchmode "buck" converter into the USB jack would more-or-less be acceptable as the "polyfuse" will be rated at 500 mA, although it would be better to simply provide it directly to the "5V" pin as well as connecting this to the relay power.

Power supply for arduine is irrlelevant in this case, I provide 5V alone with USB, or 9V alone, or 9V + USB (to read serial) because there are many others devices conneced to arduinio (distance sensors, temparature sensors etc. which dont work when there is only 5V from USB).

Only difference between reset/not reset cases is power supplay to relay (no matter if Arduino is powered form USB, 9V, 12V, 9V+USB, 12V + USB).

Hi,
When you power the project through the DC socket with 9V or 12V, you are using the internal 5V regulator in the Arduino, this regulator is not designed to power many sensors on its 5V pin, in fact if the 5V load is too high the regulator will go into thermal shutdown and the 5V will collapse.

When you use USB, the 5V regulator is bypassed and all your 5V current is coming from your PC, this is can be a much higher current.

Do you have a DMM?

Tom.... :slight_smile:

blurrpp:
Power supply for arduine is irrlelevant in this case,

Well, if the power supply is irrelevant, why is it you mention it in your first posting? :astonished:

I think I will have to give up on this one. :roll_eyes:

At first place i mentioned about power source of devices ,not Arduino.
Doasn't matter if i power Arduino with 5V(USB), 9V, 12V +/- USB if i change power supplay (12V, 2A on picture) i get reset of arduino.

Hi,
So the 12V 2A supply causes resets?
Is the supply true DC?
What is its output voltage unloaded?
If you put your DMM on AC volts and measure the unloaded output, do you get a reading?

What are you powering with the 12V supply?
Can you post a picture of your project so we can see your component layout please?

Tom... :slight_smile:

First picture i send and code reproduce error. After some time when pin is set to HIGH pos. Arduino will restart. I noticed that devices (blue elements on picture) become hot and when they becomed hot resetstart start more often (as i said this devices have separate power, and are connected only to relay thats why i wonder why arduino react with reset when pin is set to HIGH.Separate devica can even burn and ardino shouldnt notoce it). Without blue devices powered all works ok, snesors show correct valuse, proper diodes on relay are set.

DMM show nothing interesting 12V +/- 0.1V. Actualy now on circuit from first picture i receive errors even with power 12V,500mA when blue devices are hot.

I attach my working circuit (not exacytly like but amost). Its automatic water supplay to planys, contoled by WIFI, with option to add sources of water, and new sensors. All works in field but some tiems when i remove object volve and sensor i have close it first (set pin to HIGH) and then arduino is reset.

To find a bug i drop almost every code, all sensors and i finished with circuit on first picture and code i send at begining.

So maybe its just borken relay.

Hi,
OPs pic;


Image is not readable..
Can you hand draw a diagram and label your pins and include your power supply please?

Relying on Fritzy is a bad idea as a lot of info and component detail is not included.

WHAT ARE THE BLUE THINGS YOU ARE POWERING WITH THE 12V THAT GET HOT!!!

Tom... :slight_smile:

Hi, this "BLUE" devices are electric velve with strong selenoid, fast changinf magnetic field proboebly caused some piks in arduino circuit. I just screen it with some conductor, now works fine. Thanks.

Hi,
Have you got the 12V and valve wiring well away from any Arduino low voltage wiring?

Good to see you have found a solution.

Tom... :slight_smile:

Now i have, problem is that this velve have to be quite clost to arduino and relay (now is about 20 cm, screened), have to screen it some how better.
Any way i introduced EEPROM class to keep values even when arduino restars and there will be lost message from nodeMCU.

Hi,
Can you post a picture of your project so we can see your component layout?

Tom.... :slight_smile:

When i put it all together i'll send photo. Screening works perfectly.

When you power the project through the DC socket with 9V or 12V, you are using the internal 5V regulator in the Arduino, this regulator is not designed to power many sensors on its 5V pin, in fact if the 5V load is too high the regulator will go into thermal shutdown and the 5V will collapse.

When you use USB, the 5V regulator is bypassed and all your 5V current is coming from your PC, this is can be a much higher current.

So you want to say that connecting arduino with 9-12v 2A to DC input i will get less power (less devices ,sensor i can use) than i connect arduino with 5V from computer (0.5A) ?

What if i connect 5v 3A to DC input ?

Regards.