Simple Circuit to test Solid State Relays

solid-state-relay

Solid State Relays can be purchased mounted on boards from one to eight mounted on boards for the Arduino. I purchased a two relay board, like this one here. Currently they cost around two to three times a conventional relay mounted on a PCB. The advantages are that they are smaller, have no moving parts and are silent in operation.

I put together a simple circuit to test a two channel SSR, but it could be expand as required. The relay board  has a Ground Connection and a 5 volt supply pin. Each relay has a trigger pin. The Relay is switched on with a logic HIGH (5 volts).

The circuit I used is shown here:

solid-state-relay-circuit-diagram

And here is the sketch I used:

/***************************************************
*
* Solid State Relay, Simple Test Circuit
*
* Connections:
* DC_ to Arduino 5 volts
* DC- to Arduino Gnd
* CH1 toArduino pin 2
* CH2 to Arduino pin 3
*
* Chris Rouse December 2016
*
***************************************************/
#define CH1pin 2
#define CH2pin 3

void setup() {
Serial.begin(9600);
pinMode(CH1pin, OUTPUT);
pinMode(CH2pin, OUTPUT);
digitalWrite(CH1pin, LOW); // turn CH1 OFF
digitalWrite(CH2pin, LOW); // turn CH2 OFF

}

void loop() {
digitalWrite(CH1pin, HIGH); // turn CH1 ON
digitalWrite(CH2pin, LOW); // turn CH2 OFF
delay(1000);
digitalWrite(CH1pin, LOW); // turn CH1 OFF
digitalWrite(CH2pin, HIGH); // turn CH2 ON
delay(1000);

}

The two relays are simply turned off and on and the LEDs light to show the relays are operational.

Advertisements