09-28-2017 10:39 PM - edited 09-28-2017 10:42 PM
Hi Everyone,
I have an USB-6501 connected to several electro-mechanical relays through digital out which control several solenoid valves. I also have one digital out pin connected to a fluid sensor calibration pin (low (0v) initiates calibration while high does not). When I trigger a single digital output to activate a solenoid valve (low to high back to low) the digital output pin holding the calibration pin high spikes down to low then back up to high immediately after the solenoid valve output goes from high to low. I've probed the digital output connected to the calibration pin with an oscilloscope right when the solenoid valve is turned on and off and have noticed a very noisy signal oscillating between negative 5v and positive 15 volts lasting ~ 100us as soon as the solenoid valve is turned off (high back to low). An image of the oscilloscope trace is attached. This behavior is also seen in other digital output pins, briefly activating other solenoid valves.
I am wondering what is causing the creation of this signal in all of the digital output ports when one port is toggled from low to high back to low. Does anyone have any ideas how to remove this behavior?
Thanks in advance!
09-29-2017 04:38 AM
Unless the relays are specifically designed for TTL control, you really should not be directly controlling a relay with a DIO. The DIO usually cannot output the current needed to drive a relay. Plus the breakdown current when turning the relay off is likely what is throwing so much noise on your other lines. You need to add in a buffer chip that can handle the current demanded of the relay.
Another thought is that many solid state relays (SSR) work with TTL control. You could use one of these instead of a mechanical relay.
10-04-2017 09:55 PM
Hi Crossrulz,
Thank you very much for your feedback. I should have specified, the relays are TTL compatible. Long story short, I found out that I needed a few fly-back diodes for each solenoid (inductor). Introduction of the fly-back diodes fixed the voltage spikes and noise issues. The system is working properly.
Cheers!