Introduction: USB Relay Module for Windows, Linux, Raspberry Pi
USB is a very well documentated and reliable interface. Nearly every computer system today is equipped with one or more USB host connectors. Sometimes you need some inputs and outputs for tasks surrounding your PC or you have a cool idea for an automation with your Raspberry Pi or other micro computer. In all these cases an USB relay module will help you.
SimpliBox IO is an universal USB IO module with the following features:
- HID USB device – no drivers needed
- 2 relay outputs 240V / 2A (NO, NC and COM)
- 2 opto isolated inputs 5...24VDC
- Status LEDs for any input and output
- Open source firmware available
- Sample code for Python (for example for Raspberry Pi) available
- Sample code for C++ for Windows & Linux PC available
- No additional power supply needed
- Comes in kit form (THT parts only)
- Fits perfect in an optional 3 module cab rail enclosureHow it works:
SimpliBox don't needs USB drivers because of HID technology. It's very easy to combine it with various hosts, different operating systems (Linux, Windows...) and platforms (PC, Laptops, Raspberry Pi, Beagle Bone...)
It based on an ATMEL ATTINY45 microcontroller which runs a firmware with V-USB stack. We have only 5 free IO pins, but we need 6 pins for 2 outputs, 2 inputs and 2 USB GPIOs. The solution is the internal ADC. We measure the voltage of an internal voltage divider. Single resistors are bypassed by the phototransistors of the optocoupler. This is the simple solution for our problem with the pin count.
Please take a look to our website for more information.
Step 1: Tools & Materials
We provide a diy kit on our website. But you will find there the circuit diagram and software - so its also possible to built this by yourself on a breadboard. We provide also an optional 3 module din rail enclosure for the kit.
- a regulated soldering iron (25..40W) with small tip
- a wet sponge to clean the tip
- thin solder wire
- a diagonal cutter for wires
- Needle nose pliers
- small Philips head screwdriver
Step 2: Solder the IC Sockets
Step 3: Prepare and Mount the Terminals
Find the terminal blocks, they're blue or grey and come in 3-pin and 2-pin shapes. We'll need to slide two 2-pin and one 3-pin blocks together.
Place the terminal blocks into the plate Make sure you place them so that the open ends are facing out as shown.
Continue to solder all terminal blocks.
Step 4: LED Assembly
Assemble the 4 leds. The cathode pin (shorter pin) should be place to the outside. Solder only one pin of each LED first. Now you can align all four LEDs to the correct position. Solder now the second pin of every LED.
Step 5: Assemble and Solder All Resistors
We start with the three 68 Ohm resistors. Then we add the 1,5K resistor. The next are the six 1K resitors.
In the last step we add the 3 resistors with 10k, 3,3k and 6,8k.
Step 6: Assemble and Solder the 1N4148 Diodes
Its very important to place the 5 diodes in the right direction to the pcb! The cathode is marked with an black loop.
Step 7: Assemble and Solder the Z-Diodes
Its very important to place the 2 Z-diodes in the right direction to the pcb! The cathode is marked with an black loop.
Step 8: Assemble and Solder the BC548 Transistors
Step 9: Assemble and Solder the USB-B-socket
Step 10: Assemble the 10µH Ferrite
Step 11: Assemble and Solder the Both Capacitors
Step 12: Assemble the Both Relays
Step 13: Place the Both Circuits to the IC Sockets
Step 14: Test Your Work!
Step 15: Option: Mount the Pcb in a Din Rail Enclosure
First use the two self-tapping screws to mount the pcb into the lower part of the enclosure. Click the upper shell to the lower shell. Then mount the both holders for the din rail.
Participated in the