Relay Shield PCB Design for IoT Applications and Home Automation
by arshmah in Circuits > Arduino
451 Views, 0 Favorites, 0 Comments
Relay Shield PCB Design for IoT Applications and Home Automation
Relay Shield can be used to be control devices wirelessly with your smartphone from anywhere. Its purpose is to turn on or off electrical grid power to household devices.
Every household has electronic devices which are a major part of our everyday life like dishwashers, washing machines, boilers (water heaters), kettles. All of the previous devices are a combination of mechanical – electronic – power sets. The main part of devices operation is electrical power. It’s well known that AC electrical power is dangerous for humans and that’s exactly the type of power for devices operation. For example, if you leave your kids at home alone, they could turn on, by accident, an electrical stove which can produce fire in your house. Or even worse, they can place their little fingers into an electrical outlet and hurt themselves.
On the other hand, a boiler (water heater) can lead to unnecessary power consumption if it’s turned on all the time. The recommendation is that you turn off the boiler whenever you take a shower because if it’s on while you are showering it can get damaged which produces a short circuit in the device and can kill you through the water.
Let’s imagine a device that can be controlled wirelessly with your smartphone from anywhere. Let’s name the device a relay shield; a device for wireless control of AC-powered devices. It can only control if the device is getting power or not, a very simple design. It can also control power for DC devices. If you leave your kids home alone before you go, just connect the smartphone to the relay shield and turn off power for the electrical stove and electrical outlets. When you have a need for showering, turn on the boiler and then turn it off when you go to take shower, wirelessly.
Motivation:
The motivation behind this type of project is to make use of everyday devices easier and more reliable.
- It can detect error’s in the electrical grids, cables, and outlets
- Using this device gives users a larger control of their households.
- Users can heat up their room before they came to it and don’t need to enter cold apartments anymore
- Data transfer and control are wireless which is the best part of the device
- A relay shield can be used in various situations. It can be used in households for battery chargers, for LED displays, in cars
Supplies
Hardware Components:
- Connector 2 pin 2.54mm →1
- Barrel jack 5.5mm→1
- Schottky diode 30V, 2A→2
- Ceramic capacitor 50V, 10uF 1206→2
- Ceramic capacitor 16V, 10uF 1206→3
- Ceramic capacitor 50V, 100pF 0805→2
- Ceramic capacitor 50V, 10nF 0805→3
- Resistor 62k, 0.125W, 0805→1
- Resistor 12k, 0.125W, 0805→1
- Resistor 1k, 0.125w, 0805→9
- Step down converter→1
- Blue LED→1
- Inductor 6.8uH→1
- Connector 3 pin 5mm→4
- Connector 24pos 2.54mm→2
- Connector 8pos 2.54mm→1
- Male header 2pos 2.54mm→4
- Shorting jumper 2.54mm→4
- Resistor 10k, 0.125W, 0805→4
- NPN Transistor→4
- Relay→4
- Flyback diode →4
- RED led→ 4
Software Tools:
- Inventhub
- Altium Designer
Working Description
A relay shield is a baseboard device for an electronics platform with a microcontroller like Arduino. It is developed primarily for a Wi-Fi IoT device named Photon from Particle company, but it can be used with other devices with slight modifications of hardware. Following is the description of the block diagram:
- DC/DC converter: Make sure that input voltage is in range 7 to 20VDC. The converter gives power for MCU and relays control segment which is 5VDC. The maximum converter current is 1.2Amp. Blue indicator is present as an indication for power. Following are the ways to provide power to the device:
- Terminal block: Maximum current: 6A and Maximum voltage: 125V
- Power jack
- MCU Photon: MCU for relays control. The device has physically connected pins D3, D4, D5, D6 to segment for selecting control pins. D3 controls Relay 1, D4 Relay 2, D5 Relay 3, D6 Relay 4. Relay shields can be powered with an MCU cable. Don’t power device with MCU cable and DC/DC converter! It can lead to devise damage. Primarily, PCB is designed for Photon MCU. Maximum logic level voltages are 6.5V (determined from NPN transistor maximum emitter-base voltage)
- Segment for selecting control pins: Place short jumper to use pins D3, D4, D5, D6 from MCU. For using pins that are not D3,…, D6 remove the short jumper and connect pin from MCU with relay pin using a jumper cable.
- Relay Control: Segment for the interface between logic pins and relays. A red indicator is present as an indication for the relay state.
- NPN transistor for activating relay: Maximum collector current: 500mA
- Flyback relay diode: Maximum DC Reverse voltage: 75V and Maximum forward continuous current: 300mA
- Output relay: SPDT relay. If the logic pin from MCU is in “logic low” state COMM and NC are connected. If the logic pin from MCU is in the “logic high” state, COMM and NO are connected.
- SPDT relay: Relay contacts can’t exceed values; Maximum AC load voltage: 250VAC and Maximum DC load voltage: 110VDC Maximum current: 10A
Schematic Diagram
Below is the schematic design of the design which I have designed on Altium Designer. After designing on a software I have uploaded all my design files online on Inventhub for the users, manufacturer, and the component provider. There is no need to visit the manufacturer manually he can download my schematic design from Inventhub. Here you can find my design files on Inventhub.
PCB Board Design
After designing the schematic, I have converted it into the PCB design. Here I can see the 3D view of my PCB board. For fabrication, I will send the release file of my project to the manufacturer that will be containing all design, PCB, and component files. He will easily export the file and can fabricate the board without any error. This is the link to Inventhub to the release file of my project.
Bill of Material (BOM)
At the last stage of designing of PCB board, I have to embed components on the board. For the exact dimensions, and size of the components, I have created a BOM file of my project that contains library reference, part manufacturer, size, dimensions, and footprints. I will send this BOM file to the component provider he will download the file in MS Excel and can view my parts details. My BOM file is available on Inventhub.