I am working on extending a reverse switch that is initially wired by 5 inches 3-5v wires. I extended the wires to 4 m long, when I turn ON the reverse switch the display shows reverse. when run the motor for longer time, the reverse relay gets stuck. does not go back to normal state when turn OFF the reverse switch.
The code has delay cycle of 2ms ( Delecycle(2)) to drain the voltage.
What can I do to make the reverse switch work properly without changing the code? Adding capacitor, resistor or diode could help?
Does increasing the delay cycle time get the work done?
Questioners know what their hardware and software looks like but the volunteers here do not; you need to fully explain what’s not working, and how it is supposed to work.
Please read all the posting guidelines before asking your questions; follow these guidelines in your post.
Hardware
As always, show us a good schematic of your proposed circuit.
Show us good images of your ‘actual’ wiring.
Give WEB links to your major components.
Software
In the Arduino IDE, use CtrlT or CMDT to format your code, then copy the complete sketch.
Use the < CODE / > icon from the ‘posting menu’ to attach your copied sketch.
When you follow the posting guidelines, volunteers can be more effective.