SSR with Arduino or can it be done with attachInterupt() and digitalWrite()

I have an existing custom made circuit/control board and proprietary software that I need to replace (I don't have the code for the software.) I was planning on using an Arduino Uno and software I write.

The overall project has two acquisition systems being time synced by a common TTL clock, with the TTL clock being gated through the control board connected to a handheld-trigger.

CURRENT SYSTEM (can be skipped):
It works by System-1 generating a 1kHz TTL clock (or 500 Hz, or 2kHz - user selected). The operator presses the trigger, passing a signal to System-1, creating "mark 1". At the same time the TTL is then allowed to pass through the control board to System-2. System-2 then takes data on each TTL pulse (1 kHz). The operator presses the trigger again, passing a signal to System-2, creating "mark 2". At the same time the TTL is not allowed to pass through the control board to System-2, halting acquisition.

System-1 and System-2 are on the same time basis because System-1 knows "when" the mark-1,2 come in (in terms of the TTL time basis), and System-2 is acquiring data triggered by the TTL.

PLAN OPTIONS TO COMMENT ON:
1.) So my plan was to have a trigger detected by Arduino, then send digital out which creates Mark-n in System 1 and drive open/close a relay to allow TTL to pass through to System 2. I haven't spec'd out a relay yet, but I think I'll need an SSR for the vibration exposure. And it will need to be fast b/c of the time/precision. If the TTL is 1 kHz, then a 1 ms response time is a full cycle. 10 us is 1% of a cycle.

OR

2.) Could I avoid using an SSR by sending the TTL into pin-1, using attachInterupt() to detect the change, and doing a digitalWrite() to essentially pass the TTL out on another pin? The Interrupt Service Routine called by attachInterrupt would only operate if handheld-trigger was in correct state.

So is Option 2 feasible? From what I've read, the responsiveness of the seperate parts (attachInterrupt() and digitalWrite() ) rivals that of some SSR's I've found. The build would be simpler than Option 1 (no extra components, all on the Uno). But I'm not sure the Arduino for Option 2 would be as consistent as an SSR in Option 1.

Thoughts?

https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/

I have to guess about your SSR mentions, they must be DC SSR's, Right? Are you aware that DC SSR is a transistor driving a MOSFET? Yes, you can buy a single package SSR, or can create it from individual components. You do not even need the transistor if you invert your switching logic.

Paul

Yes it would be a dc relay. No I didn’t know dc ssr were just transistors and mosfets. I thought they were different. Mosfet turn on times of 25 ns seem very fast.

But my quick reading said mosfets can cause impedance while relays should not. And mosfets can couple input with control, while relays are isolated. So I thought I should avoid mosfets to protect TTL and source.

mosfets can cause impedance while relays should not

I do not know what that means.

Relays need significant current all the time that the relay is held closed. MOSFETs draw a tiny current, briefly, only while turning on then draw virtually zero current.

I might be confused but I thought it would cause a voltage drop of the TTL passing through it. Maybe the circuit would have to be designed differently for a mosfet than a relay...? Not thinking so bc of reading prompted by the prior post... That SSR are opto-isolated with mosfets inside.

Really though the question was could I avoid having any components by just using the uno and better programming.

A circuit using a MOSFET as a DC switch has negligible voltage drop across the MOSFET, and is much more efficient than a relay. Be sure to use a logic level MOSFET!

Typical circuit (the diode is required for motors and solenoids):

bliswell:
I might be confused but I thought it would cause a voltage drop of the TTL passing through it. Maybe the circuit would have to be designed differently for a mosfet than a relay...? Not thinking so bc of reading prompted by the prior post... That SSR are opto-isolated with mosfets inside.

I can tell you have not dealt much with relays. The transfer time for a relay is slow and the release time is even slower if you are trying to pass a square wave through the contacts without distortion.
Paul

Good advice from everyone, thanks.

I am not sure what the signals are but if they are in the logic level range, there is a device we can use from the analog/digital world called an analog switch such as the 4066. They are bidirectional and available in many configurations such as SPST, SPDT, DPST, DPDT, search for them you will find all types of them.

You can use a part like PVT212, has 0.25 ohm on-resistance. 3mS turn on time 0.5mS turn off time.
Good for AC/DC, 120VAC and 825mA switching current.
https://www.mouser.com/datasheet/2/196/pvt212-1732959.pdf
Mouser has them, Digikey does not.
PVT312, PVT412 could work, and are less expensive.

As is so often the case, I can see no place here for an interrupt. :astonished:

The overall project has two acquisition systems being time synced by a common TTL clock, with the TTL clock being gated through the control board connected to a handheld-trigger.

I see the need to use an interrupt, but don't see any need for an SSR or MOSFET. If you're just interfacing signal wires between the 2 boards and you're concerned with isolation, then opto isolators would work perfectly.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.