The Dark Secret of Smart Sockets and How I Fixed it! (DIY or Buy)

  Переглядів 337,146

GreatScott!

GreatScott!

День тому

$2 for 2-4 Layer PCBs, free ENIG for 6Layer PCBs:jlcpcb.com/AAA
Get $54 New User Coupon &3D Coupon: bit.ly/3UlsFjE
Free Altium Designer Trial: altium.com/yt/greatscott!
Previous video: • I tried finding Hidden...
HomeAssistant Video: • DIY Home Automation In...
Facebook: / greatscottlab
Twitter: / greatscottlab
Instagram: / great.scott.lab
Support me for more videos: www.patreon.com/GreatScott?ty=h
More project information here: www.patreon.com/posts/7325577...
Parts list: (affiliate links)
ESP-12F: s.click.aliexpress.com/e/_DF1...
HT7833: s.click.aliexpress.com/e/_DF5...
5V Power Supply: s.click.aliexpress.com/e/_DcZ...
Mini Transformer: s.click.aliexpress.com/e/_Dl3...
Current Transformer: s.click.aliexpress.com/e/_Dmd...
CS5460A Power Measurement IC: s.click.aliexpress.com/e/_DBa...
0805 Resistors: s.click.aliexpress.com/e/_DE6...
0805 Capacitos: s.click.aliexpress.com/e/_DkG...
Relay: www.mouser.de/ProductDetail/6...
Crystal: lcsc.com/product-detail/Cryst...
Choke: lcsc.com/product-detail/Commo...
Varistor: lcsc.com/product-detail/Varis...
Input Capacitor: lcsc.com/product-detail/Suppr...
Fuse: lcsc.com/product-detail/Fuse-...
MOSFET:
Flyback Diode: lcsc.com/product-detail/Diode...
Tactile Switches: lcsc.com/product-detail/Tacti...
In this episode of DIY or Buy we will be having a closer look at Smart Plugs, Sockets, Outlets.....However you want to call them. I love using such Smart of Wireless outlets to completely disconnect my appliances from the grid and thus getting rid of the standby power. But commercial smart outlets do often fail when I use them. So in this video we will investigate this problem, find a solution and possibly build the BEST DIY Smart Outlet that exists. Let's get started!
Websites which were shown/used during the video:
esphome.io/components/sensor/...
www.mouser.de/c/electromechan...
datasheet.lcsc.com/szlcsc/190...
circuitjournal.com/esp8266-wi...
asset.conrad.com/media10/add/...
ibex.tech/resources/geek-area...
www.cirrus.com/products/cs5460a/
statics.cirrus.com/pubs/proDa...
www.mouser.de/ProductDetail/6...
www.mouser.de/datasheet/2/418...
Thanks to JLCPCB for sponsoring this video.
Visit jlcpcb.com to get professional PCBs for low prices.
Thanks to Altium for sponsoring this video.
0:00 The Relay Sticking Problem!
1:42 Intro
2:06 Reason for the Relay Sticking?
3:53 Testing the Solution
5:09 DIY Smart Socket Features
6:01 Power Measurement
8:27 Circuit (PCB) for the DIY Solution
10:13 First Tests & Improvements
10:49 Final Version & Verdict

КОМЕНТАРІ: 765
@HMPirates
@HMPirates Рік тому
Always take a actual size printout of your pcb before sending out to the manufacturer. That way you can try all the components and size any enclosure you want.
@Mdsoebee
@Mdsoebee 10 місяців тому
Great advice. What computer program do you use to do this?
@micah2936
@micah2936 8 місяців тому
@@Mdsoebee there are many ways to do this. Most softwares for PCB design allow you to directly print your design into paper or PDF directly. Most also allow you to export the PCB to a 3D file which is what I do, and then you can 3D print the design to see if it will fit Personally, I always make the enclosure first then I design the PCB around the design. When I use Fusion 360 for PCB design they have an option to just select a sketch and turn it into a PCB outline. If you use any other PCB software such as KiCAD, you can export a fusion 360 sketch as an DFX file and then import it into KiCAD or other as the outline
@wildniscamper7276
@wildniscamper7276 Місяць тому
or use the fusion360 electrical 3d tool..
@MichelSatoer
@MichelSatoer Рік тому
You could also add a snubber circuit over the relay-switch to prevent electrical interference noise and sparking. (I have had micro controllers reset because of electrical interference from switching relays)
@greatscottlab
@greatscottlab Рік тому
Also sounds like a good idea. Might try that in another video ;-) Thanks.
@jorno1994
@jorno1994 Рік тому
@@greatscottlab would be cool to have a video on methods to reduce sparking in relays/switches!
@ianthehunter3532
@ianthehunter3532 Рік тому
@@jorno1994 and what about solid state relays, like I know he did a video on them, but he didn't mention them here
@zyghom
@zyghom Рік тому
@@ianthehunter3532 SSR with 10A capability has to be big I think, much bigger than mechanical one. And their reliability is not as good either
@omsingharjit
@omsingharjit Рік тому
Than three will be no proper seperation between mains and load .
@connecticutaggie
@connecticutaggie Рік тому
Looks like a fun project. As a fellow EE, I do have a couple of things to recommend you consider to increase the life of your switch. First, as an aside, I am also working on a own project that includes an ESP32 - a ceramics Kiln remote temperature monitor. But, let's get back to you. Here is what I would consider. 1) The simplest solution would be to move from a relay to using an AC solid state relay. These always switch when the ac crosses zero so no nasty current transition issues. You could buy one but, I would expect that you would want to make you own one. 2) If you really want to stick with the relay, add a PTC thermistor in series. I expect that the high current you are seeing must be due to inrush, not the static current or the circuit would overload. Adding the PTC will limit the inrush current when you turn the relay on and hopefully prevent the contact from arcing. Have fun and stay creative!
@dl5244
@dl5244 Рік тому
2) you probably meant to say NTC instead of PTC? NTC (Negative Temperature Coefficient) start as high impedance as cold and then current flow dissipates power for them to warm up and become low impedance. A PTC is the opposite - useful to protect from battery overload, but WAY too slow to protect from inrush.
@connecticutaggie
@connecticutaggie Рік тому
@@dl5244 Thanks DL, I don't use this technique very often so I guess I got the terms swapped.
@george-broughton
@george-broughton Рік тому
Some people have solved this problem using one of the aforementioned relays, but also ensuring that the switching occurs at the zero crossing point in the AC waveform. Though with switch bounce being a factor, it might be worth measuring how long the bounce effect occurs for your given relay before trying it.
@aleksandar4923
@aleksandar4923 Рік тому
Great project! You should remove ground plane copper below ESP antenna
@NabilTouchie
@NabilTouchie Рік тому
i learned that the hard way
@pauldale260
@pauldale260 Рік тому
How about having the antenna at the edge of the main PCB, even hanging over the edge?
@therealjammit
@therealjammit Рік тому
One thing you may want to try to prevent inrush relay sticking is to use a dual inrush relay circuit. Basically you have two relays where the load contacts are in parallel. One relay has a current limiting in series (resistor will do for testing). You close the current limited relay first then the non-limited relay is energized and bypasses the current limiting. When turning off you open the non-limited relay contacts and then the current limited contacts.
@fodl4387
@fodl4387 Рік тому
There's is a really old method for starting motors using this system to prevent inrush current.
@NicksStuff
@NicksStuff Рік тому
Smart! And the double click must be nice to hear for the connoisseur, a bit like someone heel&toeing while downshifting
@foogod4237
@foogod4237 Рік тому
This can be useful for really high loads, high switch frequency, or something which requires precise start timing, but is usually overkill for something like this IMHO. Much the same result can usually be achieved (much more easily) using something like a negative-temperature-coefficient (NTC) thermistor in series with the load... Also, a lot of the time, relay arcing is actually not because of inrush current, but occurs when _disconnecting_ due to back-EMF from things like motors (this doesn't usually result in relay sticking, but can result in contact degradation which ultimately leads to high resistance and relay failure (or worse, fire risk). For that sort of issue, adding a metal-oxide-varistor (MOV) can often reduce or eliminate the problem...
@ShainAndrews
@ShainAndrews Рік тому
Double the failure modes. Brilliant.
@williamhuang8309
@williamhuang8309 Рік тому
@@fodl4387 Some old electric trains use this system, they have massive DC motors connected to massive banks of resistors which are bypassed/put in parallel as the train speeds up and current reduces. But not all old trains use resistors, some use tapping contactors.
@foogod4237
@foogod4237 Рік тому
One thing I was surprised you didn't mention was proper derating for relays depending on anticipated load type. One of my pet peeves about these sorts of "smart switch" things is that they generally use the cheapest relays they can get away with, which means they are also not derating them properly. If the switch claims it supports, say, 10A, they actually mean that only for *purely resistive loads.* (and sometimes it may even say that somewhere in the fine print, but often not) For any other types of loads it will only be able to handle a fraction of that without eventually failing. If you are switching inductive loads (like something with a transformer), you really need your relay to have twice the current rating. If you're switching motors, it should be around 4 times. If you're switching "tungsten" loads, such as incandescent lamps, the relay should actually be rated for somewhere around *8 or 10 times* the nominal current in order to actually reliably function and last properly over time. Since these sort of "outlet switch" devices could theoretically have all kinds of different loads plugged into them, and you can't know what the user is going to try to switch, you really need to design conservatively, IMHO, and should usually be substantially oversizing your relay specs to be safe. You also really should design your circuit with some thermal protection to detect if the relay gets too hot (because somebody's plugged too big a load into it, or because its contacts have degraded over time so it can't support as high a load as it should be able to). Most commercial products place some sort of thermal fuse right next to the relay to detect problems and cut out before things get so toasty that they start melting things or burning your house down.
@SquintyGears
@SquintyGears Рік тому
For the massive wall of text you wrote, it's weird that you end up contradicting yourself. A tungsten lamp is a purely resistive load. Meaning 25 regular bulbs would be what they expect you to use. Well in general these are intended to smarten up lamps. They don't expect people to use them on their ac or fans because they think you should normally have that installed and not plugged into an outlet. They're made in China they don't think people live in decades old buildings in Europe. I don't know what you're trying to control through these but it just wasn't intended for that, i don't think it's really the fault of the specs they report.
@foogod4237
@foogod4237 Рік тому
@@SquintyGears No, that's a common misunderstanding, but a tungsten lamp is *not* a purely resistive load (at least the way the term is typically used in electrical engineering). This is why if you look closely, many components like switches will have a separate "normal" wattage limit and a (much lower) "tungsten" wattage rating listed. The reason is that the materials that incandescent filaments are made out of actually have a resistance that varies depending on the temperature. When they are cold (right after turning on), they actually have a fairly low resistance, and it's only as they warm up (and start glowing) that they settle down to their nominal resistance/wattage. That means that at first, they will actually pull substantially higher current (10 times or more) when they're initially switched on than they do after they're fully "on". So any components designed for switching "tungsten" loads like incandescent bulbs really need to be designed to handle substantially higher instantaneous currents than one would expect from the nominal wattage of the bulbs themselves. (And in my experience, people often do put these sorts of switches on things like pumps, fans, even sometimes things like refrigerators, etc, and then usually get annoyed when they fail after a few months of use, even though they never exceeded the power ratings the thing claims it's supposed to be able to handle...)
@SquintyGears
@SquintyGears Рік тому
@@foogod4237 a variable resistor is still only a resistor. I'm not confused about that part. I guess i see what you mean, they don't include the burst rating of the first 5s of short circuit current from turning on cold. That's the source of the arcs. That's why the contacts fuse. But shouldn't that only covers the material choice? because 5 bulbs doesn't trip anything pulling double breaker limit during the warm-up.
@dl5244
@dl5244 Рік тому
@@SquintyGears A typical "40 watt" tungsten filament bulb (120 volts) has a cold resistance of about 28 Ohms. If you apply 120VAC (0% THD) at 90deg phase angle, the peak applied voltage is ~170V. This means the peak power for a couple milliseconds (plenty of time for bouncing and sparks) is about 1kW. Averaged over the first half-cycle (8-10ms) it's still 500W. After many cycles the wire temperature and its resistance has increased to ~360 Ohm, so the average power dissipation is now 40W. Circuits don't "trip anything pulling double breaker limit during the warm-up" because breakers are designed with a time delay. Mechanical ones use a bi-metallic strip that (like the tungsten filament) takes time to warm up. Fancy new electronic breakers basically emulate this with a time-constant or i^2-t implementation.
@foogod4237
@foogod4237 Рік тому
@@SquintyGears I think your confusion is that "pure resistive load" actually has a specific meaning in electrical engineering, and it doesn't just mean "there are resistors involved". It actually means a load which behaves exactly the same as if a single, standard resistor were put in its place (that also means the resistance not change value over time, etc). The reason that tungsten loads don't generally trip circuit breakers, etc, is that the current spike is for only a brief moment when turning them on (it's actually only a fraction of a second, not even anywhere near 5s), and most breakers and fuses are actually designed to be fairly slow-acting (partly for this reason). This can cause a problem, though, if for example somebody replaces a regular fuse with a fast-blow type fuse in circuits involving incandescent lights, etc, because those often will blow in that situation when the more common slow-blow fuses won't.
@thesimbon
@thesimbon Рік тому
In next revision you may consider a better placement for the poor antenna of the esp8266, as I'm not sure it would like that big ground plane around it 😀
@EdHayes3
@EdHayes3 Рік тому
Was going to say the same thing! Follow their guide on it. I place mine at the edge of the board, and have the PCB vendor rout out the PCB under the antenna. 15mm clearance on either side I think is in the guidelines.
@abrarahmed1269
@abrarahmed1269 Рік тому
Hello mate I've been loving the content for years now, and have been watching since I was 16. I am now in my 2nd year of electronics engineering degree thanks to your content too! Please keep it up and I love the content!
@Connie_cpu
@Connie_cpu Рік тому
I'm really excited about the ESP32-C3 for projects like this, it feels more like the next evolution of the ESP8266 than it does the other ESP32 series chips. One nice feature about it is that it has a built-in USB Serial/JTAG port, so by simply connecting IO18/19 to USB D-/D+ you can connect it to a computer and program it without even having to mess with programming pins
@zyghom
@zyghom Рік тому
S2 has this for ages already, S3 as well ;-)
@Connie_cpu
@Connie_cpu Рік тому
@@zyghom Oh that's awesome! I've mostly been sticking to the chips on the lower end, so it's great to see this feature is now in one of the boards you can get for under $2 each
@joekinsella1203
@joekinsella1203 Рік тому
Another advantage of the ESP32 is the GPIO matrix which allows almost complete flexibility of which signal connects to which pin. The SPI wiring issue in this video could have been addressed without a hardware revision.
@phizc
@phizc Рік тому
ESPs are great. I wanted to experiment with making a joystick a while ago, but it turned out none of my arduinos supported USB HID.. I remembered I had an ESP (not sure what model atm). It too didn't have USB HID either though, so I ended up creating a Bluetooth joystick instead 😅. I found a sketch online and was up and running in less than an hour. It did turn out that the only potentiometer I had was for audio volume, thus logarithmic/exponential, so didn't make for a precise input device. Still a cool experiment. The "joystick" was a single axis input for a mining throttle in Star Citizen.
@Connie_cpu
@Connie_cpu Рік тому
@@chrisreynolds6331 That's awesome, Tasmota is really cool for tasks where you don't want to write your own application code from scratch. My builds are fairly specialized though so I'm writing code for them in Rust with ESP-IDF. I can deploy my code to the ESP32-C3 with a simple `cargo espflash --release` command
@p_mouse8676
@p_mouse8676 Рік тому
A cheaper relay can also be used, as long as a simple soft-start circuit is being used. Either with resistors or with a NTC, to bring down the inrush current. Downside is that it will take a little longer for the devices to get needed energy to power on.
@RandomUser2401
@RandomUser2401 Рік тому
0.7W of standby consumption per outlet is a lot, mate.
@ddavid2
@ddavid2 Рік тому
I love the way you introduce the topics, and how clear you speak!
@cde875
@cde875 Рік тому
Next time you may want to use cutouts between your low voltage part and the mains voltage part on the PCB to get the insulation voltage up and prevent creepage paths on the pcb
@RandomUser2401
@RandomUser2401 Рік тому
why exactly is it a problem to put the current measurement IC on the mains side and isolate the SPI? You anyways have mains voltage in there and the transformers seem like a ton of added build volume and BOM cost.
@bentfishbowl3945
@bentfishbowl3945 Рік тому
I think the reason the small transformer distorted was because most mains transformers saturate a bit with no load. That's the same phenomenon that makes old school power supplies warm
@RandomUser2401
@RandomUser2401 Рік тому
why exactly is it a problem to put the current measurement IC on the mains side and isolate the SPI? You anyways have mains voltage in there and the transformers seem like a ton of added build volume and BOM cost.
@karthikrajagopal6162
@karthikrajagopal6162 Рік тому
Great work again! You can add a small transistor circuit to switching the coil to a lower holding current to make the circuit more power efficient. Since you were concentrating on improvising the design, you could have included low power considerations also for the electronics.
@spaideri
@spaideri Рік тому
One thing to note that usually cheap relays are specced to AC currents or to a rather low voltage resistive load. In your tests you kinda have a capacitive load in DC.
@Farm_fab
@Farm_fab Рік тому
Scott, I got some threaded, silver tipped contacts, from a big brother of the relay, which was a contactor, and it was made for a large DC drive motor from some warehouse transport equipment. I used these for my welding earth ground as they were much more conductive than the copper plated steel ones that were standard on a battery charger clamp. These were for my "new" flux core welder. It was a heavy clamp with a rubberized coating, and was replaced with a newer clamp, but wasn't worn out. I ran a tinned braided copper cable from the welding lead end which were both attached at the jaw on one side. I then secured this with a contact stud from the former contactor behind the back of the pivot inside the grip, around to the other jaw of the clamp. Then I attached a silver contact on this side as well. It was a fair substitute for a proper earth ground, and will work until I find a suitable replacement. The contacts are proud in the clamp, and have a good "bite" on the steel thanks to a good spring.
@crazyirishman121
@crazyirishman121 Рік тому
Nice Job. Consider switching the relay at the zero crossing of the mains (since you are measuring the voltage). That should dramatically increase the life of the relay.
@bansheedearg
@bansheedearg Рік тому
Zero crossing is 120 times per second and relays are mechanical. I used such a detector for triacs but a relay? Iffy.
@strehlow
@strehlow Рік тому
@@bansheedearg It could use a triac to switch the load directly.
@crazyirishman121
@crazyirishman121 Рік тому
@@bansheedearg Good Point
@tin2001
@tin2001 Рік тому
@@bansheedearg 100. He's not in North America.
@fltfathin
@fltfathin Рік тому
@@bansheedearg doesn't have to be perfect, triacs detector is used to rearm the triac for every cycle but for relay you only to do it once every switching. even if you miss the timing by 3ms you still subject to ~30% voltage which creates smaller spark
@martin09091989
@martin09091989 Рік тому
There is one thing you could add also to such a divice, called zero point switching! It´s used in modern impulse switches and stairwell relais! Problem with modern contact materials are that the use of beryllium copper was baned some years ago, until then such problems where more or less unheard of!
@stevesfascinations1516
@stevesfascinations1516 Рік тому
I love your channel and the way you explain things in detail. I built a spot welder one time, and had the high power switching turn on at the zero crossing point so there was no current flow on switching and no arcing. I am surprised you did not do something similar.
@hoctrimededebutry8655
@hoctrimededebutry8655 Рік тому
Hello from Frankreich !! Once again a GREAT job 👌 I like your approach of problem and your methodology to resolve them. Thanks for sharing your thoughts, projects and tips !!
@geddysciple
@geddysciple Рік тому
I've been uninstalling some smart switches I put in 5 years ago that have all stopped working, and I'm seeing here what probably happened to all of them. Thank you for your endless creativity and educational efforts.
@GoncaloGarciaGG
@GoncaloGarciaGG Рік тому
Hi @GreatScott! , one way that I found that can help improve the relay sticking problem is using a zero crossing circuit to turn on or off the relay at the zero voltage of the sine wave of the main voltage, I believe the IC that you used have that functionality and improves a lot the arc problem ;)
@twoliterturbo8hp
@twoliterturbo8hp Рік тому
You made a video about something I've been exploring over the past few weeks. Fantastic job and a great project!
@greatscottlab
@greatscottlab Рік тому
Glad you liked it!
@mikm.6375
@mikm.6375 Рік тому
@GreatScott! I went trough this too. Realized that the sockets are built to a cost not a high standard. Id thought about moding them for higher load but the reality is they already sell them if you look hard enough on google & are willing to pay for it. Would also point out Outdoor smart plug applications tend to have the internals were after
@antonstolbunov6620
@antonstolbunov6620 Рік тому
Nice work. You could as well keep the old relay but add an NTC resistor in series with the load. This eliminates the inrush current capacitor charging problem. I did it with one nasty socket some years ago and it is still going strong.
@RomanoPRODUCTION
@RomanoPRODUCTION Рік тому
Great Smile implies Great DIY Project. Good Job GreatScott!
@dodutils
@dodutils Рік тому
Know I finally understand why so many remote controlled sockets dies and I needed to open the socket box and replace the relays ! Thank you !
@john_hind
@john_hind Рік тому
I've been thinking about this for some time but have not built anything yet. Some ideas I've been toying with: 1. Make a multiway strip. That way you avoid duplicating the LV power supply, the voltage sensor and the controller chip. Plus you put less burden on your WiFi router. Plus you can build in value added functionality like turning off peripheral power supplies when the main device power drops to standby level. 2. Use latching relays. That way you avoid consuming current to hold the relays on. These relays have gotten surprisingly inexpensive. 3. Use a hall effect sensor for current measurement. It ought to be possible to build this like a miniature clamp meter on the PCB. Intrinsically safe and should be much smaller than a current transformer. 4. Zero- current switching. If sensing AC current you can delay opening the relay contacts until the zero crossing of the current waveform to eliminate arcing. Also may be worth closing the contact on the zero crossing of the voltage waveform. 5. Genuine zero-power standby. This could be done with a super capacitor and push-button for wake up. Maybe even a solar cell and an IR transmitter for cordless remote.
@andi
@andi Рік тому
Really awesome project and the result was great! I did not know about the relay sticking!
@millomaker
@millomaker Рік тому
Great project 😊 And happy to see that we can also repair the cheap smart sockets with a better relay. I think a awesome project could be to do that with each port of a power strip
@Henry-sv3wv
@Henry-sv3wv Рік тому
@Annette Singleton Steele i prefer to invest in drugs
@AlexanderHrabovy
@AlexanderHrabovy Рік тому
You can try designing a hybrid relay switch combined with triac: to power on some consumer, first the signal comes to a triac, which opens at zero cross point and only after that a signal to relay is sent. And the reverse process is used to cut the power. Thus, we receive highly efficient arcless relay work. The only drawback is necessity of extra circuit controlling components. I've already implemented such device using ESP 8266 for automatic heat control, and it works as expected.
@fr33dumb0
@fr33dumb0 Рік тому
such a cool concept for a series as I think the same way
@MCsCreations
@MCsCreations Рік тому
That's just brilliant, dude! Fantastic work! 😃 And this way you can get data for almost everything in the house! Anyway, stay safe and creative there! 🖖😊
@allezvenga7617
@allezvenga7617 Рік тому
Many thanks for your sharing That is what I am searching for
@kreinova2747
@kreinova2747 Рік тому
yes ! this just solved my curiousity !!! i know them are Planned Obscolescence as i bought 4 of them and they just dead and yes, they have that pop sound always
@BrotUndSaft
@BrotUndSaft Рік тому
Great video as always, I am a big fan of JLCPCB for my DIY Projects.
@nonchip
@nonchip Рік тому
by the way since you're already monitoring mains you could also make your relay switch in a very low current part of the waveform to extend its lifetime even further (this would also prevent arcing on disconnection of inductive loads for example, not necessarily catch _all_ the inrush current though, but should definitely make it "nicer" / less spikey).
@Wrublos212
@Wrublos212 Рік тому
I thought it gonna be solid state relay switching at the zero crossing of the mains. It would be also beneficial in scenario where you have 5 PSU under one socket. It popping 16A circuit breaker if you hit peak mains voltage when turning on. Great job with DIY smart socket :)
@DJW3lch
@DJW3lch Рік тому
Great project! I had no idea how much extra work went in to voltage and current monitoring. I wonder if it would be possible to precisely time the relay turning on and off to match the current waveform you showed. If you were able to reliably switch the relay at the 0 point of the current cycle, then theoretically you wouldn't have to worry about arcing or welding of the contacts.
@greatscottlab
@greatscottlab Рік тому
Definitely worth a try :-)
@PNWZombieWatch
@PNWZombieWatch Рік тому
I was going to mention the same. Mr Carlson's Lab did a similar upgrade on a refrigerator light that used a zero crossing circuit to prevent the inrush/arcing. It didn't use relays but could probably be used as a starting point.
@oddzc
@oddzc Рік тому
Just use a zero crossing SSR.
@zyghom
@zyghom Рік тому
I am 100% with you - I recently replaced all my cheap boards I bought on Ali (with blue relays, SONGLE) that were almost all sticky, to the new ones - FANHAR - and these are with AgSnO2. Btw good companies use exactly FANHAR relays. It is not easy to find the 5V ones (black, FANHAR) but I back ordered 100 pieces on LCSC. And the cost of FANHAR is just about 0.5$/piece P.S. your solution is kindly 4x more expensive than the good sockets i.e. from Athom and they use AgSnO2 relays, that are also providing power measurements and are based on ESP so super easy with ESPhome
@Maisonier
@Maisonier Рік тому
Amazing as always. Greetings from Argentina.
@inventorkr1
@inventorkr1 Рік тому
You are creative I salute you for this wonderful work✅✅
@greatscottlab
@greatscottlab Рік тому
Thank you! Cheers!
@juniorjunior7179
@juniorjunior7179 Рік тому
Great topic. This "fragility" is part of planned obsolescence... I made my own system a few years ago and it still works great. Here in Brazil people have been doing home automation with low quality "smart devices" without worrying about safety and this is dangerous.
@Sekir80
@Sekir80 Рік тому
Oh, I thought the solution will be solid state relays. But, as it wasn't the case I learned something new about relays. Thanks Scott!
@Alan123456789876543
@Alan123456789876543 Рік тому
A solid state relay as 1-st phate of turning-on and after it should be crossed by a normal relay. Well, there is already 3.3V PSU, so why can't be used both? Pretty simple in my opinion and NO sparks on connect (on disconnect - still possible - need tests).
@limtbk
@limtbk Рік тому
@@Alan123456789876543 on disconnect just turn off normal relay, and then solid state. Agree with you, this will work.
@mortimersnead5821
@mortimersnead5821 Рік тому
My aquaponics system has an ac pump that I control with an Arduino. Every mechanical relay I tried would eventually stick in the on position. A month ago I switched to a solid state relay, and it's been fine so far.
@arshiajalali3622
@arshiajalali3622 Рік тому
This video was great! The quality of your videos continue to improve. I do miss EasyEDA though.
@chrismalone3980
@chrismalone3980 Рік тому
I did this by simply buying a $1 power socket and rewiring it to a hlk relay and ESP breadboard. Would love to see you redo it that way with your circuit
@tommyle628
@tommyle628 9 місяців тому
very good explanation, I revisit this video again after studying Ugreen power strip teardowns on a Chinese website, apparently Ugreen uses the relay that has AgSnO2 as the contact material as you explained to reduce sticking, thus I know they do care about quality.
@bansheedearg
@bansheedearg Рік тому
I did something similar, twice. Parts: 4 gang outlet box, populate with 4 dual outlets and a 4 gang plate. Recycle a power cord from something heavy. Inside is an 8-relay board from SainSmart but any relay board will do. The brains is a Raspberry Pi using the Wiring Pi to switch the relays, which are connected to the outlets. Use a USB charger and a 6 inch usb cable to power the rPi. The pi has a USB wifi adapter for communication. Finally I use the web server on the pi and CGI scripts (and some SUID scripts) to turn outlets on and off. I use it for Christmas Lights, our lawn irrigation system, and to shut down an internet switch so the kids are not up all night. Putting it in a 4 gang outlet box means it is more like a chunky power strip than a single outlet. Very useful though and doesn't serve ads, require a subscription, or anything. Code can be found here: github.com/zettix/outlet
@PriyankaMajumdarOfficial
@PriyankaMajumdarOfficial Рік тому
It's a great educational video! I just wanted to share a data with you, you might know also that the enclosed air-tight relay are basically spark-protected by its design. Inside the air-tight encloser, their are no Oxygen available to make a spark/fire. Because the fire triangle is broken here. That's why it's fill with some inert gas like N2, it may be welded together if really high current passes through the contact point(Over 2-3 times of rated current).
@foogod4237
@foogod4237 Рік тому
I think you have some misunderstanding of the basic physics of electrical arcing. Electrical arcing is not actually fire, and it does not require oxygen (or any combustible material) to occur. What you see when electricity arcs from one contact to another (and what causes much of the damage) is the ionization of the gas molecules into an incandescent plasma. This can happen with any gas, even completely inert ones (this is actually the same thing that happens (in a controlled way) in flourescent and neon lamps, etc, which also have no oxygen in them). Removing oxygen can prevent oxidation of the relay contacts (which can lead to high resistance and relay failure), but it does not prevent the arcing itself, nor does it prevent the high heat of the arc which is what results in relay contacts ultimately fusing and sticking together in these sorts of scenarios. Also, hermetically sealed relays are actually not that common, and are usually substantially more expensive. Most common relays are not actually sealed in any way that can keep oxygen out to begin with.
@PriyankaMajumdarOfficial
@PriyankaMajumdarOfficial Рік тому
@@foogod4237 May be you are right...
@pyrobeav2005
@pyrobeav2005 Рік тому
The 3d printed mains enclosure concerns me. There are many considerations given to fault containment and flammability in rated (UL) enclosures that may or may not be covered by a print. Many (most?) molded enclosures are ABS or polycarbonate same as could be done on a 3d printer, though I was under the impression that they have flame retardants added. *After a quick search you can in fact buy flame retardant ABS filament, neat! That being said, there are no shortage of sketchy, unlisted devices that don't end up burning your house down, so in all likelihood it's probably ok.
@deterdamel7380
@deterdamel7380 Рік тому
There're some other filaments out there. For example INKRAYON Glass (PEN-PET, like PETG), UL94V-2. Sometime you can get it for a very low price on ebay(DE/EU). But's transparent.
@nagi603
@nagi603 Рік тому
@@deterdamel7380 > But's transparent. For some of us, that's an improvement :D
@deterdamel7380
@deterdamel7380 Рік тому
@@nagi603 Yes, we have nothings to hide there. And the color of this filament is very nice, too.
@KaylaJoyGunn
@KaylaJoyGunn Рік тому
Love your series, thanks you so much for sharing with us
@greatscottlab
@greatscottlab Рік тому
You are so welcome!
@deviantstudio
@deviantstudio 7 місяців тому
this is so cool! i really tired of crappy sockets from aliexpress. most of the time they are non-esp so can't be reprogrammed with tasmota or similar. sometimes they just don't work or work only via Chinese cloud. the idea of opensource reliable wifi socket is flying around for years. i really glad that somebody finally did the good job on it. btw 3d printed case is amazing too!
@galangtirtayudha3973
@galangtirtayudha3973 Рік тому
Glad to see you are finally use your DIY T12 Soldering Station :)
@LordPhobos6502
@LordPhobos6502 Рік тому
Ok, I'm curious... Scott, what are your thoughts on solid state relays? I've used some DC driver solid state relays on arduino projects, on the theory that solid state won't weld contacts, I know AC driver solid state relays are a thing, but I've never used them.
@asadabdulqaabir4006
@asadabdulqaabir4006 Рік тому
My exactly same thoughts.
@per995
@per995 Рік тому
I have for many years done service on ultra low temperature freezers. The main problem was sticky relay contacts for the compressors duty relays. The worst working relays was with long contact legs and two poles. The speed and torque of the switching is so important. In the last 15 Years s the relays was changed to a single pole Potter and Brumfield that never let me down. Those small 25amp had one big diameter curved contact side and the other a smaller that rolled a little to the side on every action. The duty cycle of every 15 minutes 24/7 and never made a failure. The sugar cube sized beauties was awesome in function. The ones to try on heavy load and frequent duty😊
@henkdevries2971
@henkdevries2971 Рік тому
Interesting video 🤩 Looking forward to an in-wall edition 😇
@josephlunderville3195
@josephlunderville3195 Рік тому
If you are taking on the complexity of measuring the power at the ESP anyway, you can add a zero crossing detector and switch the relay on/off close to the zero to minimize sparking as well.
@RedstoneHair
@RedstoneHair Рік тому
I wanna be like you, you inspire me so much!!
@jsecret9459
@jsecret9459 Рік тому
Great video ad always. Would have liked to see an explanation of a diode across the relay to decay the avalanche properties of the coil discharge.
@greatscottlab
@greatscottlab Рік тому
I talked about that in previous electronics basics videos ;-) Check them out
@msm2029
@msm2029 Рік тому
Ralph S Bacon's video #131 also goes over the relay damage and sparking and how to fix it using the snubber. Worth checking out.
@fiveleafcloverfpv4445
@fiveleafcloverfpv4445 Рік тому
Great idea to put in the power consumption. Never had issues with sticking contacts.
@GoofyChristoffer
@GoofyChristoffer Рік тому
Very cool! Will you be sharing the BOMs and Gerbers for this project? My preferred smart socket is completely sold out, but I need more of them. Also, an inline cable design might be cool.
@greatscottlab
@greatscottlab Рік тому
Yes. Of course. I will share all the information. Coming soon😁
@MartinBalle7
@MartinBalle7 Рік тому
I only have one concern. As you said in the video we are dealing with mains voltage. There are codes and standards the normal manufacturers have to follow. Depending on the country you live in, it may not be up to code.
@biggityboggityboo8775
@biggityboggityboo8775 Рік тому
Don't forget that smart sockets also have their own, always on, power draw! I thought you'd have gone with a solid state relay too.
@Teleport73
@Teleport73 Рік тому
Wow. Nice solution and you taught me something about relays. It's sad that the market for these goods is all about the lowest possible price, to the detriment of longevity and creation of waste. My only recommendations are to maybe add a manual override switch to the case and also check that the case material is of a suitable type and thickness to be safe, in terms of both electrical insulation (double) and flammability.
@marshallscholz8629
@marshallscholz8629 Рік тому
Adding a zero crossing circuit, and also a triac to handle the surge then you close the relay slightly later to remove that extra ~2v of drop can extend the life nearly indefinitely. Though some arcing in relay contacts can be good. It clears off nonconductive oxide layers and makes a better connection.
@dgusw
@dgusw Рік тому
Hey, nice video! A solid state relay would also be an option in this case
@russthibault8800
@russthibault8800 Рік тому
specially if it has a zero crossing detection ckt built in
@timobk14
@timobk14 Рік тому
Nice project. I also worked on a solution like this for years. So I think your solution is safe and the pirce is ok. But I think your standby power consumption is about 1-2W? Maybe you show us the disadvantage in a future coming video?
@beehumble92
@beehumble92 Рік тому
Hi great Scott. I have a good video Idea for you to do! Get the biolite camp stove. A camp stove which has and inbuilt power bank that recharge with fire
@timberthewolf733
@timberthewolf733 Рік тому
I have had great luck with my Kasa smart outlets, after 4 years of use i haven't had any issues. ...But I am only running lights and lower power items. I have one on my window AC, no issues so far but good to know I should keep an eye on it.
@timberthewolf733
@timberthewolf733 Рік тому
They are $20 USD each so definitely more expensive. I try not to cheap out on something that controls mains power in my home.
@catchmypoint6756
@catchmypoint6756 Рік тому
Hi Scott have a great Sunday
@greatscottlab
@greatscottlab Рік тому
You too!
@jlucasound
@jlucasound Рік тому
Thank You for the Pix-elation! After all, this _is_ a Family Oriented Channel. 🤣😂🙂
@Pippy626
@Pippy626 Рік тому
Love the videos look into a Shelly 1 they are 19$ (they have other versions too and work with home assistant and other apps. This doesn’t have a enclosure but it goes behind plug or in a project like yours has Wi-Fi and Bluetooth around 1watt waiting
@Ryuseigan
@Ryuseigan Рік тому
Awesome work making a more reliable plug.
@rubabmubarrat
@rubabmubarrat Рік тому
I had built an ESP8266-01 4 channel relay controller board for 220v ac appliences last year. It has been 1 year+. I use it daily, controlling Fan rated 80W, LED Tube light rated 25W, A Lamp rated 20W and a small dim bulb of 2W. No problems found yet, best of all they don’t stick in my case which might be due to low current consumption of appliences.
@greatscottlab
@greatscottlab Рік тому
Sounds like a useful project :-) Yep. I think the power draw is too little to cause sticking.
@kataseiko
@kataseiko Рік тому
I would love to see your comparison between what JLCPCB offers in 3D printed parts and what you can create at home. I have used their 3D printed parts in the past and I am quite happy with them, especially compared to the quite a bit lower quality of the parts from my own 3D printer.
@HiruS22
@HiruS22 Рік тому
I’ve done this too where I need a hard wearing part, print in PETG on my Ender and order it online in Nylon once I’ve tested my prototype works/fits well
@phillipmugisa3065
@phillipmugisa3065 Рік тому
Hello, thank you for the video. I am inspired by your understanding of electronics. What advice would you give someone trying to pursue that journey without doing an electrical engineering course? Thank you.
@troublehd7236
@troublehd7236 Рік тому
Cool project, incredible content quality
@VolpeInCalze
@VolpeInCalze Рік тому
Have a peek at railway signal relays. So many different ones and for different applications. All analog. Pretty cool stuff. Studied it for 4 years
@analoghardwaretops3976
@analoghardwaretops3976 Рік тому
Railway signalling relays is another wholly different ball game specially for signalling apps...the handle much lower currents and are deliberately designed to be slow acting. mostly are made with(48Vdc ??) dc coil actuators..
@patrickjoseph9476
@patrickjoseph9476 Рік тому
Here is a good project idea: DIY frequency response analyzer. Try using AD9833 to generate a sine wave and a peak detector circuit to find amplitude. Should be a good alternative to those in the oscilloscope.
@therandomguy7738
@therandomguy7738 Рік тому
Great Scott to the rescue again✨
@greatscottlab
@greatscottlab Рік тому
Always!
@stratos7755
@stratos7755 Рік тому
You should've tested this agains the shelly relay. They are freaking amazing, as they fit behind your socket/switch and some support power monitoring.
@bivekkarn4771
@bivekkarn4771 Рік тому
Great video 👍 I was wondering why didn't you use a static relay?
@ajciccone88
@ajciccone88 Рік тому
(note: I do too) Great video as always, been watching your stuff a lot recently and although I understand 10% of it I love 100% of it.
@lazytsfarm3708
@lazytsfarm3708 Рік тому
relays which are crucial will often have a carbon block contact on the front/back and silver on the hinge.
@argoscerberus
@argoscerberus Рік тому
love to see how much you enjoy making your video :D
@argoscerberus
@argoscerberus Рік тому
your Great..Scott
@electronics.unmessed
@electronics.unmessed Рік тому
Cool project!
@JAMP1865
@JAMP1865 Рік тому
Great! Nice tutorial. You can consider using an SCR instead and gain dimmer capabilities along the way, but you will need to deal with triggers or use an SCR driver
@greatscottlab
@greatscottlab Рік тому
SCR also come with a bigger voltage drop.
@JAMP1865
@JAMP1865 Рік тому
I forgot to mention, I had to control a vapor generator with electrodes and ended using a solid state relay
@ArifKhan-bp9zx
@ArifKhan-bp9zx Рік тому
Finally 😢😢 A DIY winner
@Alexander91
@Alexander91 Рік тому
Did you ever take a look at the Shelly devices? Comparable to your DIY version, the Shelly plug S is also based on ESP32, works with home assistant, has a relay and voltage/current measurement. I am not sure about the used relay, but never had any sticking up to now, although I have multiple ones that are switched many times per day.
@cosminnci
@cosminnci Рік тому
Instructive video thank you. there are a lot of commercial versions, maybe you would just need to replace the relay.
@Drxxx
@Drxxx Рік тому
amazing channel! 😍😍😍😍 super video
@ZongyiYang
@ZongyiYang Рік тому
I'm curious about the selection of R7 in the schematic for the current sense burden resistor. At a turn ratio of 1:1000, a 20 ohm resistance would cause a differential voltage at 30A to exceed 250mV differential voltage spec for the CS5460A chip. The resistance needs to maybe be like 8.2 ohms. Also I suggest looking at the upgraded CS5463 chip as a drop in replacement.
@robinholmes785
@robinholmes785 Рік тому
With the power monitoring, is it possible to add a programmable fuse and/or current limiting feature?? that would a very interesting video??
@klave8511
@klave8511 Рік тому
Lots of suggestions to use zero crossing, how well will zero crossing work if you have contact bounce and a dead time between de-energizing the coil and when the contacts actually open? Most likely relay and load specific.
@priyanshubhagat6002
@priyanshubhagat6002 9 місяців тому
Hey wanted to know did you make the breakout board for esp8266 yourself, if yes then can you share the schematic and layout design please. And if not then can you give some insights on how to do so.
@limtbk
@limtbk Рік тому
You can add solid state relay in parallel with mechanical one, and turn it on just a moment before mechanical. You'll get: 1) guaranteed turn on when voltage will cross zero 2) shunted relay contacts, that will significantly increase it's lifetime because of no sparks 3) low resistance and no heat comparing with stand-alone solid state relay
@jlucasound
@jlucasound Рік тому
Hey Scott! It's "Next Time"!! 😄😀
@Silas155
@Silas155 Рік тому
I would recommend print from filament with UL 94 rating if it's for mains voltage.
RFID Locks are way too easy to "Hack"! Let me show you!
11:41
GreatScott!
Переглядів 1,3 млн
I tried finding Hidden Gems on AliExpress AGAIN!
11:53
GreatScott!
Переглядів 1,4 млн
КАК ГЛОТАЮТ ШПАГУ?😳
00:33
Masomka
Переглядів 2,1 млн
EEVbog 1613 - Audiophile REPAIR: $4500 Chord Hugo DAC
25:18
EEVblog
Переглядів 13 тис.
We should use this amazing mechanism that's inside a grasshopper leg
19:19
Pushing a "legal" Mini Solar System to its LIMIT!
12:36
GreatScott!
Переглядів 275 тис.
Say Hello to My Little Rack!
15:16
Level 2 Jeff
Переглядів 43 тис.
With Just $0.50 Components I turned Garbage Products into GOLD!
11:44
GreatScott!
Переглядів 610 тис.
My new house is gonna be MAGIC - New House Z-Wave Setup
16:56
Linus Tech Tips
Переглядів 2,3 млн
This Component solves "All" Motor Problems?! (Motor Encoder) EB#58
11:34
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 369 тис.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 369 тис.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 369 тис.
RTX 4070 Super слишком хороша. Меня это бесит
15:22
Рома, Просто Рома
Переглядів 87 тис.
GitHub Copilot just got promoted to Captain
4:01
Fireship
Переглядів 475 тис.