A few questions about solid-state relays

  • Thread starter Thread starter KingNothing
  • Start date Start date
Click For Summary
SUMMARY

This discussion centers on using a solid-state relay (SSR) to switch 120VAC, controlled by an Arduino Uno with an Atmega 328 microcontroller. The SSR operates as a current-controlled device, requiring a forward voltage of 1.2V at 20mA for activation. Due to the triac design of the SSR, PWM cannot be directly applied for switching; instead, a low-pass filter is recommended to convert PWM to a variable DC voltage. The relay will switch at the next zero crossing, allowing for effective control within 1/120th of a second.

PREREQUISITES
  • Understanding of solid-state relays (SSRs) and their operation
  • Familiarity with Arduino Uno and Atmega 328 microcontroller
  • Knowledge of PWM signal generation and low-pass filtering techniques
  • Basic electronics concepts, including current limiting resistors and triac functionality
NEXT STEPS
  • Research the design and implementation of low-pass filters for PWM signals
  • Learn about triac-based solid-state relay operation and zero-crossing detection
  • Explore current limiting resistor calculations for controlling SSR inputs
  • Investigate alternative methods for controlling AC loads with microcontrollers
USEFUL FOR

Electronics enthusiasts, hobbyists working with Arduino, and engineers interested in controlling AC loads using solid-state relays.

KingNothing
Messages
880
Reaction score
4
Today I bought a solid state relay, the datasheet for which can be found here. My goal is to use it to switch 120VAC, controlled by an Arduino Uno board (with Atmega 328 microcontroller). I am very rusty since my days in EE classes, and have not worked with solid state relays at all.

In the datasheet, under Electro-optical Characteristics > Input, it shows the typical forward voltage is 1.2V under the condition that the forward current is 20mA. This leads me to believe that it is a current-controlled device (similar to a diode). Is this indeed the case?

Would it be a problem to just apply ~1.2V?

Essentially I have to drive it with a PWM signal. Any advice on some simple circuitry that I could use to accomplish this? I have essentially no requirements on switching time, anything under 1s is acceptable to me.
 
Engineering news on Phys.org
There may be different types of solid state relays, but the ones I have seen use a triac as the switch.

They are controlled by a current which turns on a LED and this is detected by a photo transistor which turns on the triac.

Being a triac, you can turn it on, but you can't turn it off until the supply voltage is removed.

Normally this doesn't matter, but it means you can't directly use PWM on it. Switching can only happen once every half cycle because the triac will stay on after you turn it on until the voltage reverses.

Actually, rereading your post, the relay you have will switch at the zero crossing point (to minimise radio frequency noise) so you won''t be able to use it for PWM.
 
vk6kro said:
Being a triac, you can turn it on, but you can't turn it off until the supply voltage is removed.

Normally this doesn't matter, but it means you can't directly use PWM on it. Switching can only happen once every half cycle because the triac will stay on after you turn it on until the voltage reverses.

Thanks for the help; however, I don't think I completely understand. Specifically:

vk6kro said:
Being a triac, you can turn it on, but you can't turn it off until the supply voltage is removed.

I'm not sure what you mean by 'supply voltage'. Do you mean the control voltage? The SSR only has four pins, two for the control and two for the load connection. If you do mean the control voltage, I do plan to turn that off (duty cycle 0%).

I should clarify that I'm not actually trying to switch the relay on and off with a PWM signal, a PWM is just what's available to me. My plan was to pass the PWM signal through a low-pass filter, then vary the duty cycle (either 0% for on or some other % for on), as shown in the attached picture.
 

Attachments

  • Capture.PNG
    Capture.PNG
    12.2 KB · Views: 619
Supply voltage means the mains supply.

If you just want to turn the relay on or off, you could certainly do that.
The action would take place at the next zero crossing, so within 1/120th of a second.
 
vk6kro said:
Supply voltage means the mains supply.

If you just want to turn the relay on or off, you could certainly do that.
The action would take place at the next zero crossing, so within 1/120th of a second.

Okay, good. I am essentially hoping to use a variable PWM and a low-pass filter as a variable DC voltage. Although, the board is also capable of digital output at +5V, +0V. Would it be sufficient to drive the relay using just a 178-ohm current-limiting resistor? In the picture, I did not mean to make it look like the SSR inputs were connected :P.

This would, in theory, put the SSR in its operating range of 1.2V/20mA when Vout is +5. Does that sound right?

Thanks for all the help. Ever since I took a software job I feel out of touch with electronics, and this is a great little start-back-up project for me.
 

Attachments

  • Capture.PNG
    Capture.PNG
    1 KB · Views: 603
Yes that seems OK.

3.8 volts / 0.02 amps is 190 ohms, so a 180 ohm resistor would be the nearest standard value.

Be careful.
 
Why do you want an analog voltage signal? From the data sheet, I see what you mean when you theorize that this is a current controller device. It seems that applying a current source of 20mA to the input pins should close the relay, and 0.1mA will open it on the next zero crossing. I agree you should use a digital output of the MCU through a current limiting resistor to accomplish this, although you may consider using the digital pin to drive a transistor as shown in the datasheet under Standard Circuit.

I made a 120VAC switching circuit using a SSR before but I used a voltage controlled relay and just applied 5V CMOS logic from a binary counter.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
12
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
8
Views
4K
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
7
Views
15K
  • · Replies 13 ·
Replies
13
Views
7K