|Readme v Češtině|
Table of contents
- SeeedStudio Fusion PCB
- After you build it
- Soldering cheatsheet
- What's next?
What is it?
ESP8266 based WiFi enabled relay board, that will let you easily turn any light or any plug to SMART one. Easily control using HomeKit (other HW needed) or using any MQTT based SmartHome application. Or if you are skilled developer, write any code you want.
What can it do?
Main purpose is to turn things ON or OFF. But it can do lot more than that, swifitch is equiped with header to connect another 4 digital devices and 1 analog. These could be sensors etc.
If you need, by sacrificing one of the data pins, you can get 5V for your 5V sensors.
⛔ Be aware that swifitch's pins are not 5V tolerant and cannot accept 5V on any of the pins provided, and it will damage the ESP.
There are also two jumpers. One is for enabling deep sleep and the other is to put ESP into flash mode when you use conventional USB2UART programmer. We have reused one NodeMCU to make a lot more convenient programmer out of it, because it handles resets and flash mode boot automatically. Details will follow.
What is expected cost?
We have designed swifitch to be both cheap and safe. So it is not ultra cheap but not expensive too. Our cost calculations has stoped at $8! Not bad, what you think?
How does it look like?
How big is it?
Actually very small, you should be able to fit it almost anywhere without any hassle. But I know, numbers tell it all, so here it is.
|Width||Height||Depth||Weight W/O BOX||Weight W/ BOX|
|42mm / 1.65"||60.5mm / 2.36"||19.6mm / 0.77"||~42g / ~1.48oz||~72g / ~2.54oz|
Is it safe?
We have designed few safety features in swifitch. Most important are fuses on mains input. There is one overcurrent fuse and one overvoltage fuse (surge protection), and more importantly temperature fuse that will disconnect swifitch from mains input when temperature raises above 100°C. There should be another few safeties in HLK-PM01 but we didn't want to depend on it's quality.
OK I'm sold! What do I need to build it?
Power and Controls
|SCHURTER MST 250VAC 500mA|
|PROFFUSE TZ-P100/2 100°C or similar|
|Hi-Link HLK-PM01 AC-DC 5V/3W|
Other SMD Parts
|MCP1825T-3302E/DC Voltage Regulator|
|Ferrite Bead 600Ω 100MHz 0805|
|Any 0805 LED diode|
|Headers 1x2 2.54mm pitch|
|Headers 2x5 2.54mm pitch|
|Terminal 2P and 3P, 5.08mm pitch rounded lead|
Most of it could be purchased on AliExpress or eBay for what we call "no money", some parts are safer to get from your local trusted electricians shop (fuse and relay if you do not want chinese).
Most AliExpress links in table above are tested and trusted sellers, but we do not give any guarantees.
TME.eu is good source for EU citizens and especially guys in Czech Republic.
Farnell should be OK for all over world.
SeeedStudio Fusion PCB
How to order PCBs
First grab gerber files ZIP and upload it to SeeedStudio Fusion PCB then follow instructions below.
We have created sreenshots from ordering process so you can recreate the process in same manner. Decide how many pieces you want and get started. Keep in mind that each board are actually two swifitches ;). That makes it even cheaper.
Gerber files preview:
After you build it
OK DONE! What's next?
Now you need to flash some software to it. Either use conventional CP2102 USB2UART programmer or build your own as we did from NodeMCU, it is definitely best option you have.
This image tell you all you need to know but basically this is the list of steps:
- Desolder ESP8266 from NodeMCU (Heatgun baby!! But carefully you can use it for swifitch then.)
- Solder colored wires to the contacts according to image below
- Insert these wires to 2x5, 2.54mm pitch connector
- Connect to swifitch and flash firmware
We have created software for you to get started quicky so go to it's own repository.
⚡ DO NOT CONNECT SWIFITCH TO MAINS VOLTAGE WHEN FLASHING ⚡
It should be safe, but we do not recommend it!
Swifitch default software
If you went with our software you are good to go, just follow the README in the repository.
Just few things you need to know if you develop your own software.
- Relay is controled by D1 or GPIO5 PIN
- Built in LED is controled by D6 or GPIO12 PIN
If you have access to 3D printer, have a look at our original swifitch box.
If you wish to design your own box and you use Fusion 360, here is 3D model of Swifitch.
Use ABS plastic filament as this device is using mains voltage and ABS is safer for such devices.
DO NOT USE CONDUCTIVE FILAMENTS
Purchased ABS box
We have fitted swifitch to box that can be purchased from various electrical shops. May not be available in all countries thought.
Start with SMD parts on the BACK side.
|FB1||FB 600Ω 100MHz|
Front side contains mostly THT parts, but start with SMD parts that would be harder to solder when you finish all bigger parts.
|R1||470Ω < Rled < 2kΩ (depends on LED1)|
|LED1||Choose color you like|
|SB1||Optionaly enable D5 or 5V|
- PCB design, electronics ideas, parts selection - Miroslav Batěk
- SW, Git Repo, design, 3D printed enclosure - Martin Doubek
Czech - with English subtitles
If you liked swifitch and want to submerge deeper into IoT we will reference some other projects here.
IoT platforms and enablers.
- Homebridge - HomeKit server
- Blynk - platform and applications for IoT - Swifitch is supported
- Soldering timelapse from one of our builders - YouTube