Forum Rule: Always post complete source code & details to reproduce any issue!

# Thread: newbie don't want to fry it's Teensy 3.5 with SSR's

1. ## newbie don't want to fry it's Teensy 3.5 with SSR's

Hi to everyone!

I am doing electronics only on a hobby level and especially that analog part (do I need a resistor or not, which value, etc.) is often a headache for me...

I have searched this forum and also the web on this topic, but unfortunately I haven't found a 100% answer that gave me enough confidence to test it.

The whole project is a bit complex as it is a management system for my backyard observatory (Astronomy is my main hobby), including power management, roof control (open/close), weather monitoring, web interface and heat/cool of electronics and the observatory.

I had a prototype running a while based on two Arduinos (Mega and Uno), but this had several problems. Now I want to transfer it to a Teensy 3.5 and already made some progress. But for the SSR's I am completely lost, as my SSR's say they have a input range of 3V to 32V, with a 20mA LED.

On the Arduino Uno the following circuit worked fine (don't ask me why there is a resistor - found this circuit on the web and it works ):

With this circuit my code was very simple:
In the setup() routine a pinMode(1, OUTPUT); and later to switch the SSR on or off a digitalWrite(1, HIGH); or a digitalWrite(1, LOW);

Due to the 20mA LED I am pretty sure I can't use this circuit with the Teensy 3.5. Now I have some optional circuits and have no idea which one is the correct on:

What is the right one? Do I need some more resistors?
And will the code be the same or do I need to swap HIGH/LOW?

Any help is highly appreciated!

Best regards,
Christian

2. Originally Posted by Christian67
But for the SSR's I am completely lost, as my SSR's say they have a input range of 3V to 32V, with a 20mA LED.
What is a SSR?

3. SSR = Solid State Relay

4. It seems the resistor only pulls the Pinn D1 down when unused.
Looking up a datasheet of a SSR (maybe different model) it suggested to drive the SSR with a transistor
(e.g. NPN with Collector connected to SSR +)

5. This shows the use of a diode to direct the reverse current to GND instead of the Teensy: circuitdigest.com/microcontroller-projects/arduino-relay-control

If I read it right it also shows a transistor in use to supply the power for the relay that would handle the LED current as well - as it is a solid state relay the current may not have the backflow concern.

That is the first I found - if unsure maybe a better answer will appear - or find a second source for safe connection.

6. Thanks for your quick replies.

Seems option C will be the correct way.

I don't think that the diode is needed, because as far as I know only for a inductive relay this would be necessary. But for testing it might be a safe way. As far as I understood, having 5V on the relays + isn't a problem for the Teensy. So this could also increase the chance to get the SSR running w/o baking the Teensy (?)

Maybe someone already successful connected such a SSR to a Teensy 3.5?

Best regards,
Christian

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•