5 ms·
I like the enthusiasm, but you REALLY shouldn't be DIYing this. This project is almost certainly violating half a dozen safety standards which exist for a very
by crote 3y ago
I like the enthusiasm, but you REALLY shouldn't be DIYing this. This project is almost certainly violating half a dozen safety standards which exist for a very good reason.
Don't toy around with mains voltage - especially when an off-the-shelf solution is widely available for less money. A Sonoff smart socket is only $15, and you can even flash your own firmware on its ESP8266. All of the benefits, none of the "accidentally setting the house on fire" or "giving yourself a fatal shock"!
- aulin 3y agoI'd be more worried about the 2A solid state relay, seems way underspecced for a typical 10/16A plug.
- deleted 3y ago[deleted]
- jacquesm 3y agoHave a look at what is inside a typical blister packaged smart socket and you'll never use one again.
- aulin 3y agoI've used tasmota pre-flashed Athom 16A smart plugs with discrete success. According to this video https://www.youtube.com/watch?app=desktop&v=FWQe4RFgY1s https://www.youtube.com/watch?app=desktop&v=FWQe4RFgY1s at least the relay is the proper one and wires seem beefy enough. Unfortunately they tend to die prematurely for some LVDC regulator problem.
- jacquesm 3y agoBoth the relay and the wiring in that particular smart plug looks to be up to spec, going by the markings on the relay and the apparent wire thickness. At the end of the video he does an insulation test as well and it passes with room to spare. There even is a basic surge protection in there (the big blue disc). I would have liked to see the circuit board airgapped between the HV lines to reduce the chance of creep if it ever gets humid, but for dry applications indoors this should be ok. I didn't see a fuse and I would have liked to see a small inductor to separate the HV from the LV section but that's expensive so many brands choose this kind of directly coupled system. R1 (the high wattage resistor next to the relay) and the two 400V caps are doing the heavy lifting there and even though that works I just don't like having electronics directly coupled to mains voltage. The 'Sonoff' devices do this better. I've done a similar teardown on KaKu, Tuya and Shelly products and only the latter were - in my opinion - acceptable from a mechanical and electrical design perspective. The Tuya stuff was absolutely terrible (and required a server in China to have access to stuff in my home which will never happen), the KaKu ones are confusingly labelled (but if used at the lower of the two labelings probably safe) and much lighter in construction than the website suggested. The Shelly stuff is simply solid and comparable to the one in this video and doesn't require any cloud services. So that's what I went with. Bonus because it integrates seamlessly with HA.
- deleted 3y ago[deleted]
- squarefoot 3y agoTrue, especially if bought from Aliexpress, Amazon, Ebay or similarly unreliable source: most solid state relays sold there are relabeled fakes claiming higher specs than their actual one. https://protosupplies.com/inferior-counterfeit-fotek-ssr-25-solid-state-relays-on-the-market/ https://protosupplies.com/inferior-counterfeit-fotek-ssr-25-... https://www.eevblog.com/forum/reviews/warning-dont-buy-fotek-solid-state-relays/ https://www.eevblog.com/forum/reviews/warning-dont-buy-fotek... Buy parts only from reputable sources, especially when safety is involved, which is the case with everything that is connected to mains voltage.
- jacquesm 3y ago> I like the enthusiasm, but you REALLY shouldn't be DIYing this. Of course you should be, this is hacker news after all. But this guy shouldn't be because his soldering skills are atrocious. At least he put a big fat warning on the article. I've built a 15 KW solar installation here and it's safer and better constructed than what your typical professional around here delivers. DIY electronics and working with mains are perfectly ok. I've been doing so since I was 12 or so and I really don't get this kind of alarmist attitude towards electricity, it isn't magic.
- GeoAtreides 3y agoBut how would you know if your work is better (and safer) than what a professional delivers? The professionals, in theory, have more experience and more knowledge in depth than an amateur; and if an amateur has greater knowledge than a professional, is he really an amateur still? Of course, some things might be obvious to an amateur or a lay person (walls not straight, for example), while others might be more subtle and deadly at the same time (foundation issues). > DIY electronics and working with mains are perfectly ok That's great to hear! Now let me connect this beefy microwave oven transformer to the mains and do some electrical wood burning, surely it will perfectly ok
- jacquesm 3y ago> But how would you know if your work is better (and safer) than what a professional delivers? Common sense? > The professionals, in theory, have more experience and more knowledge in depth than an amateur; and if an amateur has greater knowledge than a professional, is he really an amateur still? An amateur is someone who doesn't do what he does professionally, a professional is someone who makes a living with the thing they do. That doesn't say anything about their knowledge level. But when you're a professional and you claim that you are 'done' with the installation and I spot: a HV DC wire pinched between a panel and the mounting rail, a HV DC wire (the + terminal) run through the cooling ribs of the inverter (sharp af near the ends) and a mains cable whose connectors aren't torqued down to the point that I smell ozone then you have to wonder. Note that there is a distinguishing factor with solar installers: they are not afraid of heights. Electrical knowledge is apparently secondary. > Of course, some things might be obvious to an amateur or a lay person (walls not straight, for example), while others might be more subtle and deadly at the same time (foundation issues). The above are a mix between obvious and non-obvious but those guys probably did 400 installations last year and if my n=1 sample is any indication then I wouldn't be surprised if they left some latent problems behind them. > Now let me connect this beefy microwave oven transformer to the mains and do some electrical wood burning, surely it will perfectly ok If you insist on being stupid then I don't think that's a fair way of conversing here. You can use common sense, read the electrical code (though it's an expensive book, which is kind of weird, you'd expect it to be free) and you can get yourself some basic knowledge about electricity and electronics all the while doing nothing more 'scary' than using batteries or sitting on the far side of an insulation transformer. If and when you feel ready for it you can switch to mains powered stuff. The scariest stuff to work on: old fashioned tube based color TVs but I haven't seen any of those in a couple of decades. Other than that, I would be very careful with a microwave because it is probably easy to create a radiation leak and I don't have the proper gear to detect one. So I'd stay away from that. Again: common sense.
- newzisforsukas 3y agobeh. these aren't high voltage transformers or anything. you can buy diy "mains voltage" equipment at any hardware store. no one is shouting from the rafters "you REALLY shouldn't buy that!"
- crote 3y agoCorrect, but those are pre-built parts which have been certified. They are designed to be safe, even when mildly mishandled. Plugging in a toaster or installing a wall socket is indeed pretty safe. In this project, on the other hand, you are building something new which will handle mains voltage, using the cheapest parts you can find on AliExpress. It's not designed to be safe, and it's definitely not certified or even tested. That's not something you should do without doing a loooot of research first.
- newzisforsukas 3y ago> you are building something new which will handle mains voltage, using the cheapest parts you can find on AliExpress This seems like an invented argument. Many relays you find on amazon and similar marketplaces are CE or likewise rated. Add a quick blow fuse to the circuit if you are skeptical of the thresholds. I would also say if you sat through a primary school science curriculum, it doesn't take a "loooot of research" to understand the basics of residential electricity. Fifteen year old students learn it in vocational technology courses.
- crote 3y ago> Many relays you find on amazon and similar marketplaces are CE or likewise rated. The tutorial got them from AliExpress. The links are long-dead, but if they have any ratings they are almost certainly fake. Also, CE ratings apply to finished products - they don't make sense for individual parts. > Add a quick blow fuse to the circuit if you are skeptical of the thresholds. ... which the tutorial didn't do. > I would also say if you sat through a primary school science curriculum, it doesn't take a "loooot of research" to understand the basics of residential electricity. Fifteen year old students learn it in vocational technology courses. That's the problem: this isn't basic residential electricity! You're building a new device, without all the mandatory safety precautions you'll find in off-the-shelf products. The most dangerous part is that at first glance it looks fine, while it's actually violating some quite basic design rules.
- mytailorisrich 3y ago@jacquesm nailed it. I will just add that a competent DIY enthusiast will be able to design a better and safer switch than those cheap ones you find online, not least because they are probably not trying to cheap out on everything.
- exe34 3y agoI had the same plans, and then came to the same revelation that not only would I be violating a bunch of rules, but I might void insurance and take on liability for a whole bunch of houses in case of fire, even if my shoddy work didn't start it. As a compromise, I got a bunch of radio controlled plug-sockets, and started on hooking up a 433mhz transmitter to an esp8266, and....... well the transmitter stopped working once I soldered everything down and I then got distracted by other shiny things. Been meaning to go back to it ever since.
- shswkna 3y agoI disagree strongly. Safety should be adhered to and reminding him/her even once too many times is the right thing to do. BUT a lot of things are dangerous, and we can become proficient at it. Driving a car is helluva dangerous but we can learn it. You can learn about mains voltage, and you should learn about it properly first. But to suggest that one not try to innovate like he does - then hackernews is not the right place for your nerves :)
- yonatan8070 3y agoI recently had a conversation about this, and someone said this: "The graveyard is full of people who knew what they're doing"