Please read the post at the start of any forum , entitled "How to use this Forum".
To add code please click this link;
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Please include pin labels and your power supplies.
You haven't said whether you have the mandatory free-wheel diodes across the motors, nor whether your 5V supply comes from the 12V supply, nor whether the 12V supply is dipping under load, etc etc.
The output of relays is connected to the 16-channel relay module. I am not having its schematics. I brough this from internet. Here are some photos of the 16-channel-relay module.
Shouldn't everything operate off the 5V you are supplying from the other powersupply?
Sorry but I find your CAD schematic very difficult to read with all its many pages.
Have you got many bypass capacitors on your board?
You really need to provide a CONNECTED diagram of your board so we can see signal and power flow.
These NET type schematics are easy for PCB design, but a nightmare for troubleshooting.
I see 5 sheets of circuit that could be put on ONE sheet.
I am using 12V for multi-coin acceptor. The coin acceptor generates pulses of 5V when we connect a pull up resistance to 5V. However, I removed this 12V connector to the board, still the problem exists.
@TomGeorge , Yeah, I tried to keep the schematic easy to draw but it is difficult to troubleshoot.
However, I see it is working perfectly when no load is connected to the relays. So, the problem is with the relay side. I don't have schematics of the 16-channel relay module.
For power supplies, I am using 12V, 10A and 5V, 1.8A.
@LarryD , This is an amazing video. I didn't use the diode and it must be causing the inductive spiking. I will put a diode like this:
Will reducing or eliminating the inductive spiking causing from the pumps will solve resetting problem?
Is it good like how I put the diode?
Is a diode (1N4003) of 200 V, 1 A is sufficient?
Is snubber circuit and the diode placed in the proposed diagram is the same? If they are not the same, do I need to use a Snubber circuit? Is Snubber circuit required for a DC system?
P.S. Sharing between motor and logic doesn't usually work well. If you look at the design of a
commercial office printer you will find there are separate supplies for logic and motors. There
is some isolation between them. (couldn't give you details but I am sure of it).
Simply adding more and more decoupling and filter caps may or may not work. It may be necessary o have two 12V supplies, one for logic, one for motors. The first step in troubleshooting is finding out the feedback is coming from the 110vac powering the 12V supply. Almost certainly this is the case. To verify this you need to obtain a 12V battery to power the logic temporarily
for the test and see if the problem exists when you use a separate battery power source for the
arduino , while powering the motors from the ac powered 12V supply. If the problem does not
exist under those conditions you have verified that the noise is feeding back through 12V P.S.
If you then power the logic from a separate AC powered 12V supply and the problem reappears
then the noise is feeding back through the AC. If the problem does not exist using separate AC
powered 12V power supplies then you have confirmed that the problem was feedback on the
12V DC P.S. rails, which, as I said , you could modify by adding caps , both 100nF decoupling and
large electrolytic filter caps. (large meaning at least 1000uF). It is difficult to predict if this will help.
It will definitely help - but be aware there can be several routes for interference to get to circuitry, its important to use opto-isolation if your relay module provides it too.
Yes, cathode to +ve supply
The diode just needs to be rated for the voltage and current involved, so for a 60W 12V pump that's 5A, not 1A.
RC-snubbers are for AC. Diodes are simpler for DC.
Just looking at your PCB, you need a bypass capacitor for each of the "encoder" and "decoder" ICs.
A 0.1uF across the Vcc and gnd of each IC as physically close to that IC as possible.
This is where a decent connected circuit diagram would help.
What are all those IC's you don't show in your "schematics"?
You only show 3 ICs, yet I count at least 10 on the PCB?
If the red and black wires are the 12V going in and out to the coin counter, get the two terminals together, side by side.
Running 12V across your PCB just for the counter is also courting problems with inductive noise.
Keep the 12V current trace as short as possible on your PCB.