I have the following circuit where an arduino nano is controlling a number of 12v devices; a 12v rgb led strip switched using transistors and also a 12v solenoid valve switched using a relay. For power I'm using a desktop ATX psu, 5v going to the nano and 12v going to the solenoid/leds.
Within my sketch, pin2 (INT0) is pulled high using its internal resistor and listening for interrupts on a falling edge when it is pulled to ground.
The problem I'm currently facing is whenever the solenoid valve is switched on it somehow manages to pull pin2 low and fire an interrupt, causing unwanted behaviour. As part of my troubleshooting I replaced the solenoid valve with another 12v device (non-inductive) and the circuit performed fine with the relay switching the device on/off without any unwarranted interrupts being fired. As another test I also isolated the solenoid valve from the nano by powering it off a second discrete power supply and again it solved the problem.
I'm trying to figure out how to modify the above circuit so I can continue to use a single power supply without the solenoid valve firing these unwanted interrupts. I asked this question elsewhere and was pointed towards "de-coupling" but reading up on that subject left me with more questions and I'm still wondering how to solve this problem. Are there any easy solutions to this?
Within my sketch, pin2 (INT0) is pulled high using its internal resistor and listening for interrupts on a falling edge when it is pulled to ground.
The problem I'm currently facing is whenever the solenoid valve is switched on it somehow manages to pull pin2 low and fire an interrupt, causing unwanted behaviour. As part of my troubleshooting I replaced the solenoid valve with another 12v device (non-inductive) and the circuit performed fine with the relay switching the device on/off without any unwarranted interrupts being fired. As another test I also isolated the solenoid valve from the nano by powering it off a second discrete power supply and again it solved the problem.
I'm trying to figure out how to modify the above circuit so I can continue to use a single power supply without the solenoid valve firing these unwanted interrupts. I asked this question elsewhere and was pointed towards "de-coupling" but reading up on that subject left me with more questions and I'm still wondering how to solve this problem. Are there any easy solutions to this?