Is a simple construction with Arduino UNO, motor shield L298N and avoidance that check if train A pass to stop it and start train B. I use 12 V motors and 12 V power for motor shield. When Arduino is connected with PC through USB port everything works perfect. If disconnect USB and power Arduino with 5V or 9V 1.2A does not work. I try to find at internet solution but I think that nobody has similar problem. Any Idea to solve it.
Thnks
Can you post a schematic showing all components and power supplies?
I check again my connections and found that missing between 12v GND and Arduino GND.
After that connection everything works.
thnks for your immediate response.
G. Z.
Please properly check your connections before posting here. Also, if you have questions about your set-up, post a schematic. We (unfortunately) don't have a 6th sense for how you hooked things up.