SCR02 - Sensor Controlled Relay with 16A Relays 
Technical Documentation 

The SCR02 is a sensor controlled relay module capable of autonomous operation. The SRC02 may be connected to most of our ultrasonic rangers or to 0-5v analogue inputs.
The operation of the SCR02 is configured using the free configuration utility described below. 

Operating Temperature
-40C to +70C

LED indication
The SCR02 provides a Red LED mounted immediately next to each relay to indicate whether it is in a powered state (LED on). 
There are two status LEDs. A Green LED indicates power is on (USB 5v and/or 12vdc), and a Red LED which flashes if no sensor is found.

Relay power rating
If the contact load voltage and current of the relay are in the region below the solid line in the
figure below, the relay can perform stable switching operation. If the relay is used at a voltage or current exceeding this region, the life of the contacts may be significantly shortened.


 load type   Typical applications   Rating  Max DC load capacity

 AC1  Non inductive or
 slightly inductive loads 
 16A @ 250V AC 
 AC15  Control of 
 electromagnetic load 
 3A @ 120V AC  
 1.5A @ 240V AC 
 AC3  Control of motor   750W
 DC1  Non inductive or
 slightly inductive loads
 16A @ 24V DC 
 DC13  Control of electromagnetic 
 0.22A @ 120V DC
 0.1A @ 250V DC

A full datasheet for the relays used on the SCR02 is here: HF115FD datasheet


PL1 Pin SRF01 SRF02/08/10/235 SRF04/05 Analogue
5 0v Ground 0v Ground 0v Ground 0v Ground
4 n/c Mode Mode n/c
3 Serial I/O SCL Trigger 0-5v (Relay 2)
2 n/c SDA Echo 0-5v (Relay 1)
1 +5v +5v +5v +5v
0v 0v
0v 0v
RS485- RS485+
12v 12v
12v 12v Pin1

PL1 is used to connect to most of our ultrasonic rangers and for the analogue modes. PL2 is used for the SRF485 and SRF485WPR and carries the 12v supply needed for those modules. The SCR02 will automatically configure its I/O lines as required for the selected sensor. 

The photo's above illustrate the easy 1:1 connections between the SCR02 and our ultrasonic rangers. The SRF485 and SRF08 are used as examples, but any listed sonar connects as easily. 

Pin Headers
There are also two 2-pin links on the board, the one nearest the power connector will have a link on it, the other one is open. They are actually for use with the built in boot-loader. We will document the procedure if and when there is a firmware update, but for now the links should be kept in this position.

First Step - Install the USB Driver
The SCR02 module uses the Microchip PIC18F14K50 to handle all the USB protocols. Before using the SCR02 you will need to download the Devantech inf files and unzip them into a temporary folder. Connect the SCR02 and windows will detect it and ask for the drivers. Point windows to the inf folder and it will install the driver. The SCR02 will now appear as a com port.

Which COM port?
After installing the drivers and plugging in the SCR02 module to a spare USB port, you will want to know which COM port it has been assigned to. This will vary from system to system depending on how many COM ports you currently have installed. To find out where it is right click on your "My Computer" desktop icon and select the "Device Manager" tab. Now scroll down and open the "Ports (COM & LPT)" tab. You should see the USB serial port listed - COM2 in the example below. If you want to change the COM port number - just right click on it, select properties, select advanced and select the COM port number from the available list. The COM port may be left at the default baud rate etc because they are not actually used - there is a direct USB connection into the processor. 


The SCR02 configuration utility is used to setup the SCR02. Reconfiguration is achieved by first disconnecting the 12vdc supply and any connected sensor. The USB cable is then connected to the SCR02 before running the configuration utility. The 12vdc supply is not required during configuration as the USB 5v will supply the processor. When the USB lead is connected normal operation of the module is suspended and it enters configuration mode. 

Load the SCR02 configuration utility and select the COM port from the list.


The configuration utility will load the current configuration from the SCR02. In this case the Firmware version is V2 and nothing else has been set.

The first thing to select is the sensor to be used from the Device list, this includes most of our ultrasonic rangers as well as an Analogue mode so you can connect your own sensors to the module. In this example we will use the SRF02 ultrasonic ranger. The next item to set is the activation mode. 
Here you have a choice of:

Never    The relay never operates, use this if you don't need the second relay
Range>Min If Min Range is 50cm, this will operate the relay when the range is greater than 50cm
Range<Min If Min Range is 50cm, this will operate the relay when the range is less than 50cm
Within Window If Min Range is 50cm and Max Range is 100cm, this will operate the relay when the range is between 50cm and 100cm
Outside Window If Min Range is 50cm and Max Range is 100cm, this will operate the relay when the range is less than 50cm or greater than 100cm
Always The relay is permanently energized. Useful as a "module powered" indicator. 

I will select "Range<Min" for this example.

Next enter suitable values in the remaining fields.
Set the Minimum Range, I want the relay to operate when the range is less than 30cm, so enter 30.
Set Maximum range. This is used for windowed operation and is grayed out here.
Set the Hysteresis. Used to prevent relay jitter. I will set 1cm. This means the the relay will operate when the range is less than 30cm and release when greater than 31cm. This can be set to 0cm if not required.
Set the Time On. Once triggered the relay will remain on for this many seconds, even if the trigger is removed. I will set five seconds in this example. It can be set to 0 if not required. All timers maximum count is 65535 seconds (over 18Hrs)
Set ReTrig if required. This means that the on timer will be restarted whilst still timing if the trigger is still present. The relay will de-energise "Time On" seconds after the trigger is removed. If unchecked the relay will de-energise after both "Time On" and the trigger is removed.
Set the Time Off. When the relay is de-energised, it will remain off for "Time Off" seconds before is can be re-triggered. I will set 1 second in this example. Set this to 0 if not required.

Here you see Relay 1 configured as described above. I have also set Relay 2 to operate within a window between 35cm and 45cm.


Here I have selected Analogue mode.
Relay 1 will operate when the Voltage on PL1 Pin2 is less than 1.25v.
Relay 2 will operate when the voltage on PL1 Pin3 is between 2.5v and 3.75v

In Analogue mode, all references to cm are actually the analogue values in the range 0-1023. The SRC02 uses a 10-bit A/D to convert the 0-5v input to a number in the range 0-1023.
To find the analogue value: av = (volts*1024)/5
To find the volts: volts = (av*5)/1024
Do not apply more than 5v, you will damage the module.

After configuration exit the configuration utility then disconnect the USB cable. Now connect the sensor then the 12v power supply.

Note - Do not connect/disconnect sensors whist the module is powered as this can damage both the sensor and the SCR02.

Board dimensions