Dual Channel Relay Control Module


Smart Relay Module

This is a low cost 2 channel smart relay module. Two high current relay outputs, 6 low voltage control inputs, 1 low voltage transistor output. The standard setup provides general purpose mains power rated switching. Other configurations and specific control applications are available.

Designed, produced and supported in New Zealand, originally for lighting control but well suited to other applications as well.

It can also be programmed to manage logic control on-board. For home and industrial use such as temperature, pump, fan, sump pump and alarm signalling and control.

Also ideal for hobbyists and educational projects. It can be connected to provide output switching for Arduino, Raspberry Pi and other controllers.

Example Application

See HERE for – Lighting Control – details.

We generally supply the relay module already loaded with the lighting control example program.

This manages two circuits of push button controlled lighting. Ideal for shops, offices, public foyers etc. or for the garage-workshop at home. Two buttons, each toggle a light circuit on/off/on with a third button to turn both circuits off. A movement detector can be connected to provide automatic lights with timeout; great for saving power. A light sensor can be connected so that the auto-lights lights only come on when it’s getting dark. One circuit can be configured for security lights – on at dusk, off at dawn.

We can supply a lighting control kit that includes the relay module, movement sensor, light sensor, light switch, plug-pack power adapter, connectors and some low voltage switch cable. This kit should be installed by an Electrician.

It’s easily connects to a fire or security system to switch lights on when an alarm activates. Great for improved safety and security, and can reduce power use.

Light Switches

We can also provide low voltage light switches with LED back-lighting for convenient connection with the Smart Relay Module.

smart 2 circuit relay module

Shown with switch etc.

Electrical Safety

This relay module can be used to switch mains voltages up to 240V AC and currents up to 10 Amps. Depending on where you are in the world, you will have various regulations and safety requirements to deal with. Common sense dictates that the board must be suitably mounted with appropriate clearances to correctly earthed metalwork.

Our mounting base provides a safe backing and mounting for the relay module.

Typical Applications

Hobby and Education

  • project interfacing
  • learning micro programming

Industrial and Commercial

  • lighting control
  • save power with simple auto-lights
  • lighting for security and safety
  • display control (on/off, flashing etc.)

Relay Output Terminals

Both relays are 230V mains rated 10A. Relay-1 provides a single phase/active switched circuit. Relay-2 provides a phase/active change-over circuit. Both relays switch phase/active out on the Load terminals.

2 circuit relay output terminals
pin function note .. ..
1 Phase Supply ? ..
2 Phase Supply ? ..
3 Relay-A – N.O. Load – 1 Switched Phase ..
4 Relay-B – N.C. Load – 2 Switched Phase ..
5 Relay-B – N.O. Load – 2 Switched Phase ..
6 Neutral Loop ? ..
7 Neutral Loop ? ..
8 Neutral Loop ? ..

Low Voltage Connections

The 4 screw terminals are the 12V DC power in/out connection. The 8-way plug connector is the control wiring.

The terminals on the left are +ve and -Ve 12V DC in. Generally from a 12V power supply or regulated plug-pack. The next two terminals are +ve and -ve 12V DC out, which is intended as a input and sensor supply. The +ve 12V out is switched to the control inputs on the white 8-way connector and can power movement detectors, smoke detectors etc.

The white 8-way connector is the low voltage control wiring connection. Generally we’ve used a 0.1″ pitch IDC type connector but we can supply a crimp type housing connector on request

Typically, Cat-5E or similar wiring works well with these connectors and is suitable to be run some distance from the relay board to control switches and sensors.

2 circuit relay input terminals

..

pin Typical Function note Lighting Control – example ..
1 Reset-1 (1) Input-1 reset (relays off) ..
2 Reset-2 (1) Input-1 reset (relays off) ..
3 Analog Input (2) Input-2 light sensor ..
4 Input (3) Input-3 Relay-A toggle ..
5 Input (4) Input-4 Relay-A on with timeout ..
6 Input (5) Input-5 Relay-B toggle
7 Input (6) Input-6 Relay-B on with timeout ..
8 Output-1 1 Amp, 12V DC Backlight on-off (switches low) ..

next

Example Applications

Lighting controller

A simple automatic controller for 2 lighting circuits.

Details and source code : Here

Fridge/Freezer temperature Control

This is a application that monitors a thermistor and controls a refrigeration compressor. It sounds simple but there is quite a bit to it. There are various timers and checks applied to ensure that the compressor doesn’t run for too short or too long a time, or cycle too rapidly. There are minimum cycle and off times applied and a maximum on run time. This is done to protect the compressor.

An LED indicates what it’s up to; preparing to run, running or withing the specified temperature range.

Only one Relay is used to switch the compressor. The second relay could be used for another function, maybe an alarm output.

Custom Applications

By changing the installed program, the module can perform specific tasks requiring some logic or external sensing; such as temperature control, pump or fan control or maybe automatic door control.

The module has already been used in our fire safety cutoff controller for computer equipment cabinets and laser cutting as well as refrigeration temperature control.

Technical Specifications

Feature list:

  1. Power Supply: 12V DC at 100mA max.
  2. Series diode reverse polarity protection on 12V supply input.
  3. 12V output terminals to connect auxiliary equipment, sensors etc.
  4. 5 low voltage switch inputs. Switch to +12V to activate.
  5. 1 analog input can connect to a temperature sensor or light sensor.
  6. 1 transistor output : 12V DC, 1 amp, open collector (switches to -12V DC).
  7. Two relay outputs : 230V AC, 10A (mains power rated).
  8. LEDs indicate relay activated state.
  9. PIC16F676 series micro controller (see ordering details below).
  10. ICSP programming port on board.
  11. LED general purpose (pulse) indicator .
  12. Output terminals arranged to suit mains power wiring.
  13. Optional plastic backing plates for safety and easy mounting.

The board has four 3mm holes that can be used to mount it on insulated stand-offs or spacers. Mounting screws must be Nylon if mains voltages are being switched.

Processor connection – functions

The 4 screw terminals are the 12V DC power in/out connection. The 8-way plug connector is the control wiring.

Function CPU notes .
2x Reset A0-AN0 Input-only, pull-down .
Input-2 A1-AN1 (A4 pull up/dn) pull up/down .
Input-3 A2-AN2 Analog/Digital .
Input-4 C0-AN4 pull-down .
Input-5 C1-AN5 pull-down .
Input-6 C2-AN6 pull-down .
Relay-A C3-AN7 Output-only .
Relay-B C4 Output-only .
Ouput-1 C5 Output-only, Open collector .
LED A5 Output-only (0 = on) .
. . . .

Schematic Diagram

Dual channel relay module schematic

Click image for pdf schematic.

The schematic shown matches the current PC-board version RLE_1A4.

Nothing too special here. The input control connections come in through resistor networks to protect the micro during normal use. The relays are switched by fets and have standard coil protection.

The relays and terminals are simple enough as is the mosfet transistor output.

The power supply has 12V in through a reverse-polarity protection diode and onto a standard 5V regulator supplying the micro. The 12V after the diode is fed back to the 12V out terminals to supply the input switches and sensors.

The ICSP header is a 5-pin SIL 0.1″ pitch header that can be mated to a PICkit programmer with a simple adapter lead.

Firmware and programming

To date, being a PIC16F676 we have programmed it using Microchip tools using assembly language but it can be programmed using higher level tools such as C or even Basic. We use assembly language because it’s efficient, small (code size) and fast. Using the existing well commented framework template and free Microchip tools, it’s not such a challenge.

Our template provides a basic structure that supports input debounce and detection of single, double and long press inputs, analog filtering for temperature and light level monitoring and real time support for repetitive functions and time delays.

This was created using Microchips MPLAB-X on Kubuntu but should be fully compatible with MPLAB on Windows. There are no advanced/special features or libraries used, it’s just one well documented source file and a processor definition file.

Ordering Options

Ordering options include:

IDC or crimp connector

Mounting base

Micro change to PIC16F684 for more memory)

.