110v-230v AC to Mysensors PCB board
-
@aproxx said:
Hi all,
After spending a few months on this forum and a few prototypes later, I decided I wanted to build a small but cheap PCB which could be placed in either the wall behind the light switch, or above the lamp.
Besides the boards I've seen on this forum, I wanted these boards to contain a module to go from 230v AC to 5/3.3v DC in order to power an Arduino nano and the NRF module. I eventually ended up with a PCB which is about 4 by 4.5cm. So with all components attached I'm hoping to get in stuffed in a 5x5x3cm plastic printed case.
Modules which I've used to power the board:
[http://www.aliexpress.com/item/5-pcs-HLK-PM01-AC-DC-220V-to-5V-Step-Down-Power-Supply-Module-Intelligent-Household/32319202093.html?spm=2114.32010308.4.19.8oKfZgUPDATE: 2015/09/18
As promised, I've got an update for this project. The board has been tested in the past week, and everything is working as expected. Compared to the previous board I've posted, I have updated the following:
• Solder pads of LE33CZ have been placed a little wider apart to avoid short circuit while soldering.
• Solder pads of the resettable fuse (Fuse2) has been placed closer together to better fit the fuses of the BOM.
• Moved the NRF24L01 connector a bit away from the solid state relay. Should make it easier to solder.
• Moved Fuse2 to another location on the board, away from the 230v circuit.Some 3D pictures (Top and bottom):
Anyone who is interested can order the PCB HERE
Some documentation, complete list of required components and all gerber / DipTrace files (in case you would like to make some modifications) can be found here: MySensors board v3.2.3.zip.
-
Just ordered 10 pcs of this board. Great Job!
-
thanks for the update on the resettable fuses! Another rookie ?. I ordered 0.4A fuses since the 0.3A are sold out. Is this a classic dumb move thinking that 0.1A is no big deal?
-
HLK spec. is max input of 0.2a with small spikes tolerance to 1.0A. I also ran out of 0.3 but are now using 0.2a and that works fine.
-
Does the light switch need to be a SPST or can you use a pushbutton? Curious how this would work with a SPST switch. I haven't looked at the code to see what is setup.
-
-
Hi,
I understand that the question has already been asked, but ... Is there a possibility to adjust the scheme to the ESP8266 instead of Arduino? Anybody can tell or help - how to do it?
Regards,
Nikolay
-
yes, now how to use ESP8266 instead of arduino for the same function that we are discuss in this topics.
-
Hey Guys,
I am working on ESP8266 as well. But I am newbie to electronic designs. But in my view it should be silmple and we can replace Arduino nano with ESP8266 and remove NRF module.One diagram and circuit is explained here http://iot-playground.com/blog/2-uncategorised/77-esp8266-internet-controlled-switch-easyiot-cloud-mqtt-api#materials
@csa02221862 you can use this cercuit with SPST buttons. But Switch will notbe connected to mains. It will be conneted to ESP8266 GPIO of (or arduino). And in Sketch (i.e code ) you have to write code based on GPIO when ever it goes 0 to 1 or 1 to 0 Relay state shoud be toggled.
I hope I make sense
@aproxx you did great job here.
I am looking to reduce its size more if possible and wish to use ESP8266. Also looking to add more then one relays to the board. In some rooms there are 3 buttons on one panel. So thinking to use 3 relays. Will it be a good Idea? I think should not matter as long as I have enough GPIO to control relays and Electric wire connectors can bear the load.
-
yes , I also thinking to use more than one relay.
-
Found something interesting on Aliexpress which is a drop in replacement for the HLK-PM01:
the HLK-PM03
Same size and pin locations, but 110-200 V AC to 3V3 DC.
It fits my multi-power options board perfectly.
-
Nice find GertSanders ... I am planning to use esp8266 which runs on 3.3 volt... best fit ..
If we use this we may have to drop few things from 5.5 board right?
Like no need of 5v - 3.3 converter
change relay to match 3.3v like this http://vod.ebay.com/vod/FetchOrderDetails?qu=1&itemid=401045943120&transid=522355020027&viewpaymentstatus=Anyexpert around? do we need to remove anythingelse (any capacitor?)
-
But 3.3v relay will not match the board. If we use 5.5v relay do we need to add something to circuit?
-
Hi,
Thank you for this pcb. In which program did you do the design? Do you think you can share an editable version of the design?
I would like to modify it to accept the Mean Well IRM-05-5 instead of the Hi-Link.
It is more expensive and bigger AC-DC circuit but since I hace some in my stash i would like to use them.
-
@toabhishekverma said:
change relay to match 3.3v like this http://vod.ebay.com/vod/FetchOrderDetails?qu=1&itemid=401045943120&transid=522355020027&viewpaymentstatus=
That's a link to your shopping cart, we don't have access to...
I'm interested in the relay, can you post a working link?
-
-
I use the same SONGLE relays:
http://www.aliexpress.com/item/5pcs-SRD-03VDC-SL-C-3V-relay-5-feet-10A/32453591000.html
-
@GertSanders thanks for this link.
So do you have working prototype? what board are you using? I am in middle of finalising components and trying to finalise design. With little knowledge of electronics my progress is slow.
Also for 220 to 3.3v there is another converter from Olimex https://www.olimex.com/Products/Power/PWR-90-240V-3.3V0.8A/
overall its abit smaller then Hi-Link... Hi-Link abit better because all covered and less dangerous.Please share if you have any design finalised.
-
@GertSanders @toabhishekverma Do you have the dimensions and/or holding resistance?
-
Sorry I didnt get your questions .. do you mean dimensions of 220-3.3v converter. Here they are.
output 2.5W 3.3V/0.8A +-0.2V size: 30x20x18mmI am not from electronics background so didn't get what holding resistance means?
-
@toabhishekverma No, I meant for the relay
What's the resistance of the 3V coil? I want to know the current flowing when the relay is active.
-
@Yveaux Still no idea about it. Check link if you get something from it. what I know is it can bear up to 10A current and can be controlled using 3v .... my order still in shipping so don't know more then that.
-
@toabhishekverma Ah, ok. Didn't know they were still in transit.
Maybe @GertSanders has them 'on stock'?
-
-
@HenryWhite Awesome! Didn't even think of looking for a datasheet of a Chinese relay
-
Another source :
50Pieces/Lot JRC-21F 4100 3V DC 6 Pins Miniature PCB Relay Brand New
http://s.aliexpress.com/MNVv2myE
-
@Yveaux No, also still waiting for the order to arrive. But a coil resistance of 20-25 Ohm means driving the coil with a FET. Not directly from a atmega328 pin.
-
@Porky6666 : only switches 3A, SONGLE relay can switch 10A.
-
@GertSanders said:
@Yveaux No, also still waiting for the order to arrive. But a coil resistance of 20-25 Ohm means driving the coil with a FET. Not directly from a atmega328 pin.
Correct. Here's how I wired the songle relay on my Lithium Ion Sensor PCB:
@GertSanders said:
@Porky6666 : only switches 3A, SONGLE relay can switch 10A.
I wouldn't trust both of them when it comes to switching high amp devices over 3A. I think there is a reason no german electronics shop sells songle relays
Plus, relays from an electronics shop in your country might cost the same than the songle relays or will just be a tiny bit more expensive.
At least this is true for 5V relays. 3V relays are hard to find (at least in germany)
-
@HenryWhite said:
I wouldn't trust both of them when it comes to switching high amp devices over 3A.
I agree, I plan to switch lights, so my preference goes to the 10A model, just to be sure. I have used the SONGLE 5V versions, and none have ever given me reason to doubt their quality. Since I found a 3V3 powersupply I want to try building a full 3V3 board. Should be fun.
-
@HenryWhite why do we need D1 Diode (if i am write) in that circuit? do this circuit will not work without diode?
(sorry dont know much about electronics)
-
@toabhishekverma https://en.m.wikipedia.org/wiki/Flyback_diode
in short: It is needed to protect the NPN transistor from damage.
The circuit will work without diode, But eventually damage the transistor.
-
@GertSanders Have you breadboarded your 3.3V design? I'm a bit worried that removing linear converter will impair the performance of the our fussy nRF clones due to less power supply ripple rejection. I think those going for the ESP8266 are better off.
-
Anyone has an idea where to source the 5.5V varistor? I received a bunch from AliExpress following which seem to be broken.
I found this link http://www.farnell.com/datasheets/575651.pdf. However, there seem to be a bunch of 5.5 V varistor. Can anybody help me figuring out the right ones?
-
@tomkxy I'm using this one: http://hu.farnell.com/multicomp/mcvz1206m050agt/varistor-multilayer-4vac-0402/dp/2462756
-
@m26872 I have not used the 3V3 version of the Hilink converter, it was just shipped today (ordered last week). It will take a few more weeks to reach me. But then I will test it on my ac board. We will see.
23/FEB: Update: the converters are here. I will make a node with this converter version this weekend.
-
@icebob said:
@tomkxy I'm using this one: http://hu.farnell.com/multicomp/mcvz1206m050agt/varistor-multilayer-4vac-0402/dp/2462756
Thanks! It's a pity that the chinese "varistors" seem to be jumpers. I even saw in some offers on AliExpress that they are referred to as jumpers.
-
How can I check whether the solid state relay works at all. My assembled board receives messages and sets state properly, I have 5V on the pin, however the relay does not seem to switch. Should I hear it? Any other ideas for "debugging"?
-
@tomkxy
Measure the resistance over the AC terminals of the SSR. It should be very high when "open" en very low when "closed". SSRs do not make sounds when they switch, so sound will not give a clue if they work.
-
Most SSRs cannot be checked this way because they can only switch AC and not DC. See https://en.wikipedia.org/wiki/Zero_cross_circuit
-
I don't know if this has been answered already. But I have some major problems soldering the thermal fuse to the board. It always blows. Any tips ?
-
@Cliff-Karlsson Be quick
I have the same problem - dont know any better sollution atm... solder for 0.5 sec and remove - then you need to let it cool down before adding more solder.
-
I read something before about low temp thermal sensors usally being crimped to place. Do you know how this works and if it is usable on the pcb?
Also the last times I tried to assemble the parts on the pcb I noticed that the holes for one of the fuses are too narrow for the standard brown(?) auto reset fuse. I have managed to destroy the solderpads every time I tried to drill the holes a little bigger.
Can I use a standard glass fuse for this one with the same value?
-
Just a couple of questions. Most of the components are 240V, are these the same as used for 110/120v in the US? Also one of the varistors is not available, suggested alternative?
Thanks
-
Hi,
thanks for your great work..
great to have chosed a pwm output for the relay (ssr can be used as a dimmer)
but is it possible to add a fuse on the ssr output too ?
and a second switchand imho relay's trace is too near a nrf trace..
and return the draw of le33sry for my english
thanks
-
Hello,
I love your design!
However, I must have missed something. Considering I want to retain the ability to turn the light off with the wall switch, this board does not allow to connect the relay as a 3-way switch.Also, considering it could be mounted inside the wall (and not only in the lamp base) - having 2-3 relays would be very functional! In my house, it is very common that a single wall mount has 3-4 switches that control 3-4 separate lamps. It will probably make the board bigger, more so if we support 3-way switches (see above comment), but it will be very versatile, especially for 4-way switches (see http://forum.mysensors.org/topic/3173/3-4-way-switch-with-a-relay )
-
Hi Sefi Ninio,
There are two ways you can do it, Either change relay to SPDT Relay which is two way relay. this option is not feasible with this pcb. But if you are not using same PCB you can try SPDT relays.Second option which can work with this setup is ,
Your light switch has two pins, connect them with gpio and 3.3 power .
when switch turn on/off gpio pin input goes high(when on) and low (when off).
You have to write a code to monitor this gpio and if its state changes, you have to toggle the relay state.This is my idea, I havent tried it yet. and I am newbie too, Please comment.
I hope I am clear enough
Regards,
Abhishek
-
Hi, @toabhishekverma
Well, your suggestion might work, I am not sure a switch that is meant to be connected to 220v mains can be connected to the gpio pin.I think, adding an additional relay to the pcb and allowing them both to behave like a 3way switch will allow for maximum flexibility.
- It could control 2 separate lamps
- It could behave like 2 3-way switches
- It could behave like a single 4-way switch
I would have done it myself, but I have no clue
-
I have several lamps where I have done something similar. The bulbs are wireless wemo-bulbs and I have connected the wires behind the lampswitch so that the bulbs are always powered. The I have placed a battery powered arduino witch is connected to the wall switch pin3-gnd.
Every time I flip the switch the arduino wakes up and the controller sends a toggle command using REST
-
@Cliff-Karlsson said:
I don't know if this has been answered already. But I have some major problems soldering the thermal fuse to the board. It always blows. Any tips ?
Raise the temperature of your soldering iron, and you'll be able to do it quicker with less propagating heat. You could also add some extra bend and length to the fuse legs.
-
@Sefi-Ninio said:
Hi, @toabhishekverma
Well, your suggestion might work, I am not sure a switch that is meant to be connected to 220v mains can be connected to the gpio pin.I think, adding an additional relay to the pcb and allowing them both to behave like a 3way switch will allow for maximum flexibility.
- It could control 2 separate lamps
- It could behave like 2 3-way switches
- It could behave like a single 4-way switch
I would have done it myself, but I have no clue
@aproxx , what do you think about adding another relay (for a total of 2 on board) and making them 3-way?
-
Another question about the thermal fuse. I might be wrong on this, but I guess its purpose is to break the power if the HLK overheats. But If placed in the intended place would not the PCB need to be on fire to have the thermal fuse be warmed up to 73 deg C?
-
@Cliff-Karlsson said:
Another question about the thermal fuse. I might be wrong on this, but I guess its purpose is to break the power if the HLK overheats. But If placed in the intended place would not the PCB need to be on fire to have the thermal fuse be warmed up to 73 deg C?
I guess you're supposed to glue the thermal fuse to the hlk and run wires from this point to the designated footprint of the fuse on the pcb.
-
@Sefi-Ninio said:
@Sefi-Ninio said:
Hi, @toabhishekverma
Well, your suggestion might work, I am not sure a switch that is meant to be connected to 220v mains can be connected to the gpio pin.I think, adding an additional relay to the pcb and allowing them both to behave like a 3way switch will allow for maximum flexibility.
- It could control 2 separate lamps
- It could behave like 2 3-way switches
- It could behave like a single 4-way switch
I would have done it myself, but I have no clue
@aproxx , what do you think about adding another relay (for a total of 2 on board) and making them 3-way?
OK Guys,
I've decided to try and use the original V3.2.3 plans and add another relay to them (with your permission, @aproxx).The board will have to be a bit bigger, I will have to make room for another relay along side the existing one, and I will have to also make room for its connectors.
Not a big problem, I think, as it is already very well designed and has a small footprint, but still.I need a bit of help from you guys, though - I am a complete noob when it comes to the wiring and electricity. I can handle the coding, no problem, but the electricity is very new to me.
I am assuming that besides adding the second relay, no other components need to be added - no resistors, capacitors, varistors etc.
Is my assumption correct?Thanks!
-
@Sefi-Ninio said:
I am assuming that besides adding the second relay, no other components need to be added - no resistors, capacitors, varistors etc.
Is my assumption correct?Thanks!
You need at least a second transistor.
-
maybe a fuse to protect relay output.. ?
and plz add a second switch, to control an other node or anything..
-
So basically, I should duplicate the current circuit for the new relay...
-
I am facing a little problem with the fuses. I am using these:
5V DC: http://www.ebay.de/itm/321697892220?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
When I connect the pcb to power the LED on the Arduino flashes and then the 500 mA Fuse in the 5V circuit dies. I am now using the 300 mA resetable Fuse for the 5V part as well, which seems to work without problems. How can it be, that the 500 mA fuse dies and the 300 mA fuse does not?
-
Jan Gatzke; chinese brand electronics... who knows what can happens....
i ordered all stuff needed to make my pcb with maximun 4x4cms to use inside wall switches (like zwave fibaro modules). i will try to reduce that board by not using connectors and solder the cables directly etc..
Something that i don't know is why use a varistor and fuse on secundary??? arduino already have an polyfuse PPTC Resetable fuse, and someting bad that happens with nrf24 will burn the 3.3V regulator.. its that varistor and fuse realy needed?
-
@aproxx hello. can i know how you rendered your PCB layout to 3D , if any tutorial it can guide me
to achieve that .thanks
-
Wow, this thread has been really active in the past few months! I'm sorry for my absence, but I kind of got dragged into other projects..
A new version of the board will be shared soon! Compared to the current board following changes have been made:
- A second solid state relay has been added. This 2nd relay is optional, so if only 1 device needs to be controlled just 1 relay needs to be installed and everything will still work fine.
- The board size has been increased just a little bit to fit this 2nd relay. Size is still 5x5cm only.
- Some components have been moved in order to make it easier to solder them (This was a bit tricky on version 3.2.3 because some components were really close to each other).
- Traces between the relays and the connectors are now 'open air'. So there is no mask on top of the traces. This way it is possible to reinforce the traces. By doing this it shouldn't be any problem to connect a 2A load to the board.
- A temperature cut-off has been added to the board.
- The varistor for the low voltage circuit has been removed because it's not really needed anymore with all the extra security measures on the high voltage side of the board.
Currently this board is still on it's way from China, but as soon as I've received this board I'll share all the documentation and everything else which is needed on this forum! This will probably happen in 3-5 weeks from now, so stay tuned!
-
Great @approx, please consider to create it as new project over at openhardware.io, much easier to keep track of things (and a forum thread will be created automatically).
-
@hek That sounds as a great idea. I'll share it on OpenHardware as soon as I have confirmed that everything works as expected!
-
@aproxx said:
- The varistor for the low voltage circuit has been removed because it's not really needed anymore with all the extra security measures on the high voltage side of the board.
exacly what i was talking about!
-
bad news then why have you fuse at home ? 400 000 V has security measures, why add more security ? it's juste our life, childs life !!
do you know what is a "security transformer" ? the hlk-pm01 isn't one.
-
@vil1driver said:
bad news then why have you fuse at home ? 400 000 V has security measures, why add more security ? it's juste our life, childs life !!
do you know what is a "security transformer" ? the hlk-pm01 isn't one.It's not that I think that security isn't important, but I believe that no security on the low voltage side is safer than having a false sense of security. As I've read above, lots of the low voltage fuses were not reliable. And that's one reason I dropped it in the newer design.
All that aside: I never ever EVER intend to mount these boards on locations people can reach (unless they intend to). Everything is placed safely behind a light switch or in a completely closed plastic box. The only thing that COULD be touched is the wires to the switch itself (And even those will be out of reach if the lid of the switch is on). But since these switches are only connected to ground and a digital input, those wires don't do any harm.
But yes, I do know what a 'security transformer' is. And no, I completely agree the HLK-PM01 itself isn't a secure transformer. But considering the price, the added fuses and temp cutoffs, and the plan to mount these in a safe location, I believe the HLK-PM01 does the job well.
-
thanks for your answer,
-
Secure? ... A varistor and a 8v fuse on secundary line! ...
Never touch devices when powered to mains. A simple light bulb that you can touch on metal part, a tablet charger that can blow up... just don't touch the module and put it inside wall (not wood) or circuit case.
-
@aproxx
what is your progress for new version of two relay switch board?
-
@jemish The boards were sent to me from China 5 days ago. I don't have a tracking number available, but usually it takes between 3 and 5 weeks before they reach me (Belgium). I already have all the necessary components, so within a week after I received the boards I'll provide this topic with an update.
-
Its been a long time since I built one of these but I recall there were some gotchas. I have a bunch of version 2.2.3. Besides the silk screen showing wrong orientation for the regulator what else was there?
Perhaps @aproxx could update first post?
Thanks!
-
Hi @shabba.
I assume you mean version 3.2.3 of the board?
Besides the silkscreen of the LE33 being the other way around, there are a few other things to keep in mind:- The drill holes of the fuse/varistor on the 230v side might be a bit small. So it is advised to either make those holes a bit bigger, or to make the legs of the fuse/varistor a bit thinner using some sandpaper.
- Make sure to solder the components in the correct order (As mentioned in the Word document, which is part of the ZIP file of the opening post).
I'll update the first post of this topic in a few weeks, which includes the newer board version that fixes all the problems as stated above.
-
@aproxx Thanks - It was a while since I did my last one so wanted to be clear. Looking forward to seeing new one. Great work - appreciated!
-
Ordered the boards... Can't wait!
Ever thought of implementing ACS 712 ?
-
I waiting for new version of two relay switch board.
-
@jemish
Then your wait is almost over! I'm currently doing my latest tests on the board, and so far everything works perfectly. I'll try and see if I can post everything during next weekend.
-
@aproxx great news! This is something I look forward to!
-
@aproxx will the second relay be opt-in?
I mean, will the board function normally with only one relay?
-
@Sefi-Ninio
Yes, it will be perfectly possible to just install 1 relay on the board and it will still work fine.
More news in the next few days!
-
SuperCool!!
I have business trip to China in the middle of May, so I can take the PCBs directly from dirtypcbs!
Many Thanks for your work!!
-
The latest version of this board is available here!
Because of the large number of request a second (optional) solid state relay has been added to the board. Enjoy!
-
Thanks!!
-
@aproxx Where is the button/ Switch connection pin.
-
@jemish
It's on the middle of the board on the top side. 4 pins are present to use as switch inputs. 2 pins are ground, and then pin 4 and 7 are available as well.
By closing the connection between pin 4 and ground you will switch te status of relay 1. When closing the connection between ground and pin 7 you'll switch the status of relay 2.
-
@aproxx I have a few left-over boards from the earlier release - where the holes for fuse2 were smaller than required (PTC Resettable Fuses 250V 1A TRF250-1000 PPTC Polymeric PTC PolySwitch). I wanted to use up the remaining boards, and wondering if the following fuse could be a substitute (USA-based, leads are smaller diameter and would fit the holes) - MF-R110 FUSE PTC RESETTABLE 1.10A HOLD MF-R110 110 MF.
Thanks for your guidance.
-
-
@Fat-Fly these tiny boards have really bad isolation and are dangerous tu use.
And did you have a look at this 1-diode "rectifier" ? The ripple is probably awful and the result will affect the quality of the radio transmission.
Saving 0.5$ compared to an HLK is really not worth it !
-
@bruno tanke you, very good.
I share it in facebook.