This is a PCB that uses AC power to run a MySensors node and a relay (SSR) inside a wall socket. The main goal is to have a MySensors node with I/O to be able to build your own node with your own sensors inside a normal (European) wall socket. It comes with PCB and a 3d box for protection and safety.
This is a development of my first In-Wall-ACDC-Pcb-for-MySensors (Not SMD components, only axial)
Note: This PCB are using SMD components!
Testing rev 7.1
For rev history, see Changes.txt
Note when buying through openhardware.io may say another rev. This is only revision for manufacturer, not current PCB revision. I always update PCB gerber files for sale first on openhardware.io
I designed this project for the main purpose of safely powering a node from a AC source. Battery operations and 5v phone chargers in all its glory but I needed a node small enough to put inside a wall-socket, adaptable/dynamic and AC powered.
We have AC mains running everywhere in our houses today and this project aims for converting AC to 5vDC with safety as priority #1.
Convert 240v/120v AC to 5v DC (using HLK-PM01)
Make it safe!
Fit inside standard appliance box / in wall
Run MySensors node (Arduino Pro Mini, NRF24L01+, MysX Gpio for sensors)
Have a on board relay (SSR).
Make it as small as possible using SMD components.
By using this you have everything you need for a AC powered MySensors node. With MysX connector you have plenty of options both digital and analog input/outputs for you sensors. For the AC power there are both a temperature fuse, a normal fuse, and a varistor to protect your node.
I wanted the node to be dynamic (no sensor specific) - and therefore the MysX connector. Now you can add any sensor you like to the connector. Also, while at it - why not add a relay. Since Im going to use this around AC i might also be able to switch it in the same time.
Follow this thread for latest info: https://forum.mysensors.org/topic/4187/in-wall-pcb-with-relay-for-mysensors-smd
Build instructions coming soon, see BOM for more info.
**Power **- Using the HLK-PM01 converting AC 240/120v to 5v dc and running the MySensors node. The input is protected with a fuse, temp fuse and varistor (read this discussion).
**MySensors **- A Atmega328p-au (normal schematics) and a Nrf24l01+ SMD Radio with all the normal components.
I/O - MysX (Raw input not possible) + some extra (A4+A5), ICSP**
Relay(SSR) - A Omron G3MC-202PL protected with a fuse of your choise (axial)
3d-box - A part of safety, attached is a .stl file with a case for 3d printing. This can be printed in your 3d printer or sent to a 3d-hub.
MysX 2,1 - This is The MySensors expansion connector to which you can connect any daugherboard using this standard. This is also your main input/outputs for sensors and actuators so any wires can be connected accordingly. With this PCB as motherboard you can use draughtboards if you need multiple copies and needs a quicker way to build - just like a shield on Arduino or Raspberry Pi.
Safety is one of the most important aspects of this project! Se more here: https://forum.mysensors.org/topic/4175/clearance-creepage-and-other-safety-aspects-in-mysensors-pcbs. It is highly recommended to use the latest revision for best safety.
Text below is written for the latest posted revision. For older revisions, please see changes.txt
My thoughts has been to separate AC (primary) and DC (secondary) sides completely. At this point (Rev 7.0) this separation is 6.5mm so below minimum for use outdoor (in pollution level 3 = 8.0mm) but it should be OK if you dont use in in worst case pollution. In upcoming revisions I may add millings to increase creepage. This revision i recommend using it indoors and with the 3d case (or any case!) If you put it in a completely sealed case it should be ok to use outdoor.
Note: there has recently (Sept 16) been some fake/pirated HLK components! Warning!
As for the separation within the AC traces I have tried to use 3mm creepage and clearance but this turned out to be to hard. This PCB (Rev 7.0) has a creepage distance on the AC side of 2.5mm. This means if you are using 240v you can put it in pollution level II Sames as above, dont use it outdoors and put it in a case.
If you order or use this you agree to and understand that the author is not liable for any injury or damage howsoever caused and that you use this PCB at your own risk. This is DIY and the author has not made any professional test. This product has not been marked with any certification marks and cant be guaranteed to compliance with any standards.
Total cost for one node is about US$14 where the relay and HLK-pm01 is about US$10(See BOM).
You can actually cut/split the PCB between AC and DC side and get a normal 5v MySensors node where you can attach sensors to MysX connector.
|Fuse||Ceramic Slow Blow Fuse||250V, 0.2A (50W)||Axial||US $0.99||0.09||Ebay: http://www.ebay.com/itm/111433875797?_trksid=p2057872....|
|Thermal Fuse||Thermal Cutoffs FUSE||73degr C||Axial||US $4.99||0.5||Ebay: http://www.ebay.com/itm/221560426284?_trksid=p2057872....|
|F3||Glass Tube Fuse Axial Leads 3.6 x 10mm 2A||2A, 250V||Axial||US $1.99||0.2||Ebay: http://www.ebay.com/itm/NEW-10pcs-Glass-Tube-Fuse-Axia...|
|g3mc-202pl||Omron SSR Relay (Optional)||g3mc-202pl||Axial||US $5,95||5.95||Ebay: https://www.ebay.com/itm/1PCS-G3MC-202PL-VD-2-Encapsul...|
|T1||2n2222 npn transistor (not tested!)||NPN||SOT-23||US $0.99||0.0099||Ebay: https://www.ebay.com/itm/261820786286?_trksid=p2057872...|
|Varistor||Zinc Oxide Varistor||250VAC 60J 2500A 10mm||Axial||US $1.89||0.19||Ebay: http://www.ebay.com/itm/260848704608?_trksid=p2057872....|
|AC||2 Pin Screw Terminal Connector||5.08mm||Axial||US $1.23||0.06||Ebay: http://www.ebay.com/itm/181759858196?_trksid=p2057872....|
|MYSX 1.3||Pinheads 2x7||5.08mm||Axial|
|-||Tactile Push Button Switch||3*6*2.5mm||SMD||US $1.78||0.0178||Ebay: https://www.ebay.com/itm/191674536296?_trksid=p2050601...|
|-||Crystal Oscillator||16mHz||SMD||US $1.38||0.069||Ebay: https://www.ebay.com/itm/20Pcs-New-16-000MHZ-16MHZ-16M...|
|-||HLK-PM01||220V to 5V||SMD||US $3.99||3.99||Ebay: https://www.ebay.com/sch/sis.html?_nkw=HLK-PM01+AC-DC+...|
|-||NRF24L01+ SMD||SMD||US $7.73||1.546||Ebay: https://www.ebay.com/itm/5PCS-New-Mini-NRF24L01-SMD-1-...|
|Volt_Reg||662K 5V-3.3V Step Down Regulator||SOT-23||US $0.99||0.0495||https://www.ebay.com/?icep_ff3=2&pub=5575069610&toolid=10001...|
|ATMEGA328P-AU||ATMEGA328P||SMD||US $12.16||1.216||Ebay: http://www.ebay.com/itm/10PCS-NEW-ATMEGA328P-AU-MEGA32...|
|C1 (Volt reg)||Capacitor SMD Ceramic||0,1uF||0805||US $4.10||0.041||Ebay: http://www.ebay.com/itm/100PCS-0805-0-1uF-100nF-50V-X7...|
|C2 (volt reg)||Capacitor SMD Ceramic||10uF||0805||US $1.47||0.0147||Ebay: https://www.ebay.com/itm/100Pcs-chip-Value-Capacitor-0...|
|C3 (Radio)||Capacitor SMD Ceramic||4,7uF||0805||US $2.12||0.0212||Ebay: https://www.ebay.com/itm/100pcs-0805-50V-SMD-50v-4-7uF...|
|C4 (Oscillator)||Capacitor SMD Ceramic||22pF||0805||US $2.14||0.0214||Ebay: http://www.ebay.com/itm/100PCS-0805-22PF-220J-5-SMD-Ce...|
|C5(Oscillator)||Capacitor SMD Ceramic||22pF||0805||US $2.14||0.0214||Ebay: http://www.ebay.com/itm/100PCS-0805-22PF-220J-5-SMD-Ce...|
|C6 (Gnd-Vcc)||Capacitor SMD Ceramic||0,1uF||0805||US $4.10||0.041||Ebay: http://www.ebay.com/itm/100PCS-0805-0-1uF-100nF-50V-X7...|
|C7 (Aref)||Capacitor SMD Ceramic||0,1uF||0805||US $4.10||0.041||Ebay: http://www.ebay.com/itm/100PCS-0805-0-1uF-100nF-50V-X7...|
|C8 (Reset ISCP)||Capacitor SMD Ceramic||0,1uF||0805||US $4.10||0.041||Ebay: http://www.ebay.com/itm/100PCS-0805-0-1uF-100nF-50V-X7...|
|C9 (Reset MysX DTR)||Capacitor SMD Ceramic||0,1uF||0805||US $4.10||0.041||Ebay: http://www.ebay.com/itm/100PCS-0805-0-1uF-100nF-50V-X7...|
|R1 (Reset button)||Resistor SMD||10k ohm||0805||US $0.99||0.0099||Ebay: http://www.ebay.com/itm/100pcs-SMD-Chip-Surface-Mount-...|
|R2 (Led SCK)||Resistor SMD||330 ohm||0805||US $0,99||0.0099||Ebay: http://www.ebay.com/itm/100pcs-SMD-Chip-Surface-Mount-...|
|R3 (Led ON)||Resistor SMD||330 ohm||0805||US $0,99||0.0099||Ebay: http://www.ebay.com/itm/100pcs-SMD-Chip-Surface-Mount-...|
|R4 (Relay)||Resistor SMD||1k ohm (not sure)||0805||US $0.99||0.0099||Ebay: http://www.ebay.com/itm/100pcs-SMD-Chip-Surface-Mount-...|
|LED1||LED SMD||Red||0805||US $0.99||0.0198||Ebay: http://www.ebay.com/itm/50-pcs-SMD-SMT-0805-Super-brig...|
|LED2||LED SMD||Red||0805||US $0.99||0.0198||Ebay: http://www.ebay.com/itm/50-pcs-SMD-SMT-0805-Super-brig...|
|TestPoints||Total US $||14.1911|
|rev1||6 years ago||2||50 × 50|