I am making a liquid filling mechine. Basicly it works like User set a target value in kg. When pedal is triggered 2 channel relay card activates and pump stars and valve opens the nozul. When measurement hits the target value accordibg to loadcell measurement relays closes. Circut schema is below:
My problem is when the pump is turned off by the relay. Arduino reset itself. But my relay card already has a diot in it. When i disconnect the pump every thing works smoothly. What could be the problem.
Sounds to me like you're operating both valve and pump at the same time. What about your valve? Is it diode-protected (it depends, of course, on the nature of the power to the valve, which you've not told us. 115V AC, 24VDC, ???)?
Valve is 24Vac but i tested it stand alone valve does not causes this. It was causing at first but whne i change with a new one it worked fine. Pump is 220VAC 1A.
If the 220V and 24V AC wires are intermingled with your digital signals, it's very likely the transient 'snap' when your relays open is being propagated into your Arduino via 5V, GND, or signal wires. It's best to keep the higher voltage stuff strictly segregated from the low voltage circuits. Certainly, without doing that, adding suppression will be iffy.
At this point, sounds to me like rats-nest wiring issues - please post a photo of your apparatus, showing the internals.
On top left side lcd screen arduino and hx711 is in it. Only electronic is in the desk with the electronic part is relay. Relays, pedal and loadcell is connected to screen with the isolated cables.
What signals are shielded, or unshielded? It's hard to tell what is where in that photo. A full schematic might be useful at this point, showing power, etc. A layout drawing showing locations, feedthroughs, etc. might also help.
Remember, we're not able to look over your shoulder, or look at your apparatus from a different angle, or open a panel, or in any other way learn anything you don't tell us.
You need to power the relays from an external power source, the Arduino is not a Power Supply. The LCD etc are OK. You are much better switching ground not the +5, this would require you to change your input interface. Consider shielding all external wires and put a snubber across the relay contacts. How is the system powered? Using the appropriate solid state relays would help a lot. Zero crossing for the AC. NOTE: AC and DC relays are different.
Your pictorial is missing a lot of detail. All signal wires should cross any current carrying conductor at a right angle. Remember any wire connected to the Arduino is an antenna hungry for electrical noise. This should get you started.
I am using 220v 10 amper pedal on arduino connected to 3.3v and pin13 to start relays. Can this cause the restart? But i waas using this before and seemed ok to me.
Probably not, they do not have dry contacts, you need to switch current to keep the contacts clean. It will work for a while but when the contacts oxidize it will go intermittent then quit.