Recreating a SSR on a breadboard

Bear with me here, I’m more of a programmer than a hardware guy. Basically what I’m trying to do is recreate whats going on inside a SSR onto a breadboard for a demo. I’m unsure if I have the theory in which SSR’s operate down pat, let me know if my thinking here is in the right direction.

I’m going to have my 5v trigger off the microcontroller power an LED that is going to hit a phototransistor (maybe?) which will be connected to a MOSFET to send a 12v output?

I am unclear on how the phototransistor works, or maybe a photoresistor would work better? Basically any guidance one can provide would be majorly appreciated!

More important than recreating an SSR is knowing what you are trying to switch on and off. Is it DC? AC? How many volts and how many amps?

You may be able to turn your load (12V?) on and off without the need for the complexity of an SSR, but you have to tell us more about your application.

The Aussie Shield: breakout all 28 pins to quick-connect terminals

Ideally I was planning on sending the 12v DC out of the relay to power a hydraulic solenoid. Really I could make the load anything I wanted though, 12v DC is already on the station thats just why I picked that. I can definitely turn my load on and off without the need for an SSR, by simply using a MOSFET, but this is for a demo of a simple "how a solid state relay works" and I am looking to over-complicate things. :smiley:

The thing is an SSR is generally designed to switch AC current hence uses an optoisolated triac. This is essentially what you would be building if you did indeed want to overcomplicate things:

The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

There are SSRs that switch DC but these are just FETs that have an opto isolator on the front end.

Thanks for the responses guys! So basically, if I wanted to control a AC load, you use a Triac. Alternatively I would be able to use two mosfets in place of the triac correct?

And if I wanted to control a DC load a MOSFET would be used, right?

Thanks again for your help!

Alternatively I would be able to use two mosfets in place of the triac correct?

No for an DC load you only use one FET.
For an AC load you can use two SCRs or one Triac.

A typical FET for this sort of thing is the FDP8880 or the IRLI640 or the IRLB8748 or the BUZ72L.