Using USB and SSR to switch power to DAQ device

Thread Starter

rauty

Joined Apr 20, 2017
10
Hi all, let me preface this to say I'm not an EE (I don't even play one on TV), but as an ME test engineer I've been learning a smattering of electronics over the last few years. I have a USB data acquisition (DAQ) device that is powered by 24V and is used to supply analog output voltages to control 8 stations with electric motors which spin automotive engines through various test cycles, anywhere from idle up to 6000 RPM or more. These stations run 24/7. If the USB signal to the device is interrupted (without losing the 24 volt power), the device will "stick" or "hang" at the last known analog output voltage command. This can be a major problem if the engine is expected to run briefly at 6000 rpm and ends up staying there for possibly hours overnight (this happens only on very rare occasions, but will still ruin a test if it does). So as a safety feature I tried to design a circuit that will use the USB input signal to power an SSR via a transistor to enable/disable the 24V power input. This way if the USB signal is lost the DAQ device will shut down, thereby shutting down all of the engines. The circuit mostly works okay, with the power being applied when I plug in the USB and shutting down when I remove it, but for some reason after running awhile the USB signal will just drop out randomly, shutting down all of our tests. This can happen after a day or two or possibly a week or two; it's pretty random. This phenomenon seems to be caused by the circuit itself, because if I remove the circuit the disconnects don't happen. I've included a schematic below. Let me know if you require additional information. I'd appreciate any advice you can give to help me mitigate this problem.

USB Relay Board Schematic.png
 

sghioto

Joined Dec 31, 2017
8,634
One thing missing on the schematic is a series resistor (R2) to limit the current to the IR diode in the SSR.
D2 not required also.
Are you sure it's the USB signal dropping out and what are the duration of these dropouts?
1688756528267.png
 

Thread Starter

rauty

Joined Apr 20, 2017
10
One thing missing on the schematic is a series resistor (R2) to limit the current to the IR diode in the SSR.
D2 not required also.
Are you sure it's the USB signal dropping out and what are the duration of these dropouts?
View attachment 297889
Thanks for your reply, and the suggestions. I wasn't sure if I needed D2 either, so thanks for clarifying that. I figured it wouldn't hurt in any event. The USB only needs to drop out for an instant for the hangup to occur. At that point my LabVIEW program will throw an error and stop responding. I've been trying to figure out how to tell it to 'wait' for the USB connection to be restored but I haven't been able to. The funny thing is, when the USB drops out and the power is killed to the DAQ device, the power stays off even if the USB connection gets restored. I need to unplug and reinsert the USB connection for it to power the device back up. I think maybe there's some protection wired into the DAQ device to make it behave that way. I wasn't sure if maybe the data connection is somehow getting flaky over time and maybe putting some kind of damping capacitor from D+ to ground might help? I haven't been able to determine what is causing the dropouts. I only know that they stop once I remove this circuit from the mix. We can run without it, but I'd like to have it in there for safety.
 

sghioto

Joined Dec 31, 2017
8,634
The dropout must be the 5 volt supply to the USB to lose the 24 volt out from the SSR.
However without R2 in the circuit the problem might be with the SSR as the internal LED would be overdriven. I wouldn't be surprised if it's not already damaged. Hence removing the circuit there are no more shutdowns.
 
Last edited:

Jon Chandler

Joined Jun 12, 2008
1,568
The switching power supply seems needlessly complex for the 10mA or so the SSR needs. Even with a 19 volt drop, a linear regulator won't be dissipating much power.

But in fact, even a linear regulator is unnecessary. Supply the LED current through a resistor calculated to provide 12 mA to the LED at 24 volts, and use the NPN transistor as shown in your diagram. Transistor, base resistor, LED series resistor and SSR are all you need. You could add an indicator LED in series with the SSR relay to have a visual indication.
 

Thread Starter

rauty

Joined Apr 20, 2017
10
Thanks for all of your replies! I originally had a linear regulator in place of the buck converter but it got very hot, even with a heat sink. Switching to the buck eliminated that problem. I was just trying to play it safe using the transistor also, but I can see now that it might not be needed. The SSR only takes about 8 mA to turn on according to the datasheet.

One thing that I failed to mention in my original post is that this DAQ unit is connected to the computer with a 50 ft. USB-over-ethernet extender with a shielded ethernet cable. The extender is powered at both ends. I don't think that should be an issue, but just wanted to give more info. When I can get time to interrupt testing for a few minutes I'll implement the changes you've indicated and reply at that time.
 

Thread Starter

rauty

Joined Apr 20, 2017
10
That was because there wasn't a series resistor (R2) to limit the current from the SSR
The circuit in post #1 can be simplified without the need for the 5 volt regulator and transistor.
View attachment 297945
Well, I made the above modifications to my PCB by cutting out traces and running wires with the resistor directly to the SSR from Pin 1 of J3 and grounding it at the J4 GND/Shield. It worked fine at my desk but when I installed it with the DAQ unit plugged in the SSR got very hot and shut down. This never happened with the previous circuit. The DAQ device operates on 9-30V and is rated at 15W max. At 24V that makes the current through the SSR contacts 0.625A max. The LCC110 has an output load current (continuous) rating of 120 mA, which is probably where the issue is. But interestingly, it never overheated before. I could run my finger over all of the components on the board and none of them even got warm to the touch. In any event, I found another SSR here that may do the trick. If anybody else has other suggestions, I'm open to them. Again, thanks for all of the help thus far.
 

sghioto

Joined Dec 31, 2017
8,634
That new SSR should work just fine and doesn't need R2 as the resistor is built in and designed to operate directly from 5 volts.
 

Thread Starter

rauty

Joined Apr 20, 2017
10
That new SSR should work just fine and doesn't need R2 as the resistor is built in and designed to operate directly from 5 volts.
Ah, nice catch! I didn't see the resistor built into the relay at first. Thanks. I'll need to redesign my PCB now for the new relay only. I don't have any other way to prototype test SSD parts, and this one is way too small to try to solder wires to the pads.
 

Thread Starter

rauty

Joined Apr 20, 2017
10
Just a quick update. I redesigned the circuit and had some more boards made. I installed the board a couple of days ago and everything seems to be fine so far. Many thanks for all the of the help I received. Here's my final schematic, for what it's worth:

1690979845129.png
 
Top