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 Жыл бұрын
Great advice. What computer program do you use to do this?
@micah2936 Жыл бұрын
@@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
@wildniscamper72769 ай бұрын
or use the fusion360 electrical 3d tool..
@connecticutaggie2 жыл бұрын
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!
@dl52442 жыл бұрын
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.
@connecticutaggie2 жыл бұрын
@@dl5244 Thanks DL, I don't use this technique very often so I guess I got the terms swapped.
@MichelSatoer2 жыл бұрын
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)
@greatscottlab2 жыл бұрын
Also sounds like a good idea. Might try that in another video ;-) Thanks.
@jorno19942 жыл бұрын
@@greatscottlab would be cool to have a video on methods to reduce sparking in relays/switches!
@ianthehunter35322 жыл бұрын
@@jorno1994 and what about solid state relays, like I know he did a video on them, but he didn't mention them here
@zyghom2 жыл бұрын
@@ianthehunter3532 SSR with 10A capability has to be big I think, much bigger than mechanical one. And their reliability is not as good either
@omsingharjit2 жыл бұрын
Than three will be no proper seperation between mains and load .
@ddavid22 жыл бұрын
I love the way you introduce the topics, and how clear you speak!
@abrarahmed12692 жыл бұрын
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!
@therealjammit2 жыл бұрын
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.
@fodl43872 жыл бұрын
There's is a really old method for starting motors using this system to prevent inrush current.
@NicksStuff2 жыл бұрын
Smart! And the double click must be nice to hear for the connoisseur, a bit like someone heel&toeing while downshifting
@foogod42372 жыл бұрын
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...
@ShainAndrews2 жыл бұрын
Double the failure modes. Brilliant.
@williamhuang83092 жыл бұрын
@@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.
@Connie_cpu2 жыл бұрын
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
@zyghom2 жыл бұрын
S2 has this for ages already, S3 as well ;-)
@Connie_cpu2 жыл бұрын
@@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
@joekinsella12032 жыл бұрын
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.
@phizc2 жыл бұрын
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_cpu2 жыл бұрын
@@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
@george-broughton2 жыл бұрын
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.
@p_mouse86762 жыл бұрын
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 Жыл бұрын
0.7W of standby consumption per outlet is a lot, mate.
@aleksandar49232 жыл бұрын
Great project! You should remove ground plane copper below ESP antenna
@NabilTouchie2 жыл бұрын
i learned that the hard way
@pauldale2602 жыл бұрын
How about having the antenna at the edge of the main PCB, even hanging over the edge?
@Farm_fab2 жыл бұрын
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.
@thesimbon2 жыл бұрын
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 😀
@EdHayes32 жыл бұрын
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.
@karthikrajagopal61622 жыл бұрын
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.
@cde8752 жыл бұрын
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 Жыл бұрын
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.
@crazyirishman1212 жыл бұрын
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.
@bansheedearg2 жыл бұрын
Zero crossing is 120 times per second and relays are mechanical. I used such a detector for triacs but a relay? Iffy.
@strehlow2 жыл бұрын
@@bansheedearg It could use a triac to switch the load directly.
@crazyirishman1212 жыл бұрын
@@bansheedearg Good Point
@tin20012 жыл бұрын
@@bansheedearg 100. He's not in North America.
@fltfathin2 жыл бұрын
@@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
@bansheedearg2 жыл бұрын
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
@bentfishbowl39452 жыл бұрын
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 Жыл бұрын
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.
@spaideri2 жыл бұрын
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.
@martin090919892 жыл бұрын
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!
@geddysciple2 жыл бұрын
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.
@foogod42372 жыл бұрын
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.
@SquintyGears2 жыл бұрын
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.
@foogod42372 жыл бұрын
@@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...)
@SquintyGears2 жыл бұрын
@@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.
@dl52442 жыл бұрын
@@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.
@foogod42372 жыл бұрын
@@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.
@kreinova27472 жыл бұрын
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
@German_byte2 жыл бұрын
Thanks
@greatscottlab2 жыл бұрын
Thanks for the support :-)
2 жыл бұрын
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 ;)
@DJW3lch2 жыл бұрын
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.
@greatscottlab2 жыл бұрын
Definitely worth a try :-)
@PNWZombieWatch2 жыл бұрын
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.
@oddzc2 жыл бұрын
Just use a zero crossing SSR.
@antonstolbunov66202 жыл бұрын
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.
@zyghom2 жыл бұрын
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
@PriyankaMajumdarOfficial2 жыл бұрын
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).
@foogod42372 жыл бұрын
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.
@PriyankaMajumdarOfficial2 жыл бұрын
@@foogod4237 May be you are right...
@dodutils2 жыл бұрын
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 !
@20turbo2 жыл бұрын
You made a video about something I've been exploring over the past few weeks. Fantastic job and a great project!
@greatscottlab2 жыл бұрын
Glad you liked it!
@nonchip2 жыл бұрын
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).
@mikm.63752 жыл бұрын
@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
@Sekir802 жыл бұрын
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!
@Alan1234567898765432 жыл бұрын
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).
@limtbk2 жыл бұрын
@@Alan123456789876543 on disconnect just turn off normal relay, and then solid state. Agree with you, this will work.
@millomaker2 жыл бұрын
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-sv3wv2 жыл бұрын
@Annette Singleton Steele i prefer to invest in drugs
@john_hind2 жыл бұрын
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.
@RomanoPRODUCTION2 жыл бұрын
Great Smile implies Great DIY Project. Good Job GreatScott!
@per9952 жыл бұрын
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😊
@therandomguy77382 жыл бұрын
Great Scott to the rescue again✨
@greatscottlab2 жыл бұрын
Always!
@hoctrimededebutry86552 жыл бұрын
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 !!
@Maisonier2 жыл бұрын
Amazing as always. Greetings from Argentina.
@rubabmubarrat2 жыл бұрын
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.
@greatscottlab2 жыл бұрын
Sounds like a useful project :-) Yep. I think the power draw is too little to cause sticking.
@GoofyChristoffer2 жыл бұрын
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.
@greatscottlab2 жыл бұрын
Yes. Of course. I will share all the information. Coming soon😁
@MartinBalle72 жыл бұрын
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.
@chrismalone39802 жыл бұрын
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
@Wrublos2122 жыл бұрын
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 :)
@SimplyElectronicsOfficial2 жыл бұрын
Thyristors would make sense. As easy as switching a transistor and relatively cheap with high current capabilities for their size
@greatscottlab2 жыл бұрын
They are more inefficient.
@inventorkr12 жыл бұрын
You are creative I salute you for this wonderful work✅✅
@greatscottlab2 жыл бұрын
Thank you! Cheers!
@stevesfascinations15162 жыл бұрын
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.
@Tadcrazio2 жыл бұрын
(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.
@junior.juniorrr2 жыл бұрын
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.
@kataseiko2 жыл бұрын
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.
@HiruS222 жыл бұрын
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
@AnshumanFauzdar2 жыл бұрын
Very interesting and useful project! I have a small question - can a solid state relay be considered over electromechanical for longer life and compact design?
@greatscottlab2 жыл бұрын
Yes. Should work longer. But also is a bit more inefficient since it comes with a voltage drop of 1V to 2V.
@AnshumanFauzdar2 жыл бұрын
@@greatscottlab Thanks for replying! That's a good point to consider ☺️
@Electronzap2 жыл бұрын
It's amazing how many problems are solved with a well placed smack :)
@msm20292 жыл бұрын
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.
@franganghi2 жыл бұрын
What about using a solid state relay? What do you think about this kind of solution?
@PanicsX12 жыл бұрын
Okay.. looked through the Video, load Patreon, downloaded the files, send JLCPCB a new job to make me 50 of this PCB´s, Ordered all parts direktly after that.. now i am waiting and just loving (as always) your videos. Can´t count how often you make a video and my online thoughts are "i need to build this too". It started a few years back and is still going strong today. Thought i contaced you one time due to a mistake i made..(?) Great video and top build again. Keep it up :)
@greatscottlab2 жыл бұрын
Thanks for the feedback. Glad I inspire you :-)
@jsecret94592 жыл бұрын
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.
@greatscottlab2 жыл бұрын
I talked about that in previous electronics basics videos ;-) Check them out
@argoscerberus2 жыл бұрын
love to see how much you enjoy making your video :D
@argoscerberus2 жыл бұрын
your Great..Scott
@MCsCreations2 жыл бұрын
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! 🖖😊
@dgusw2 жыл бұрын
Hey, nice video! A solid state relay would also be an option in this case
@russthibault88002 жыл бұрын
specially if it has a zero crossing detection ckt built in
@josephlunderville31952 жыл бұрын
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.
@Adrian-qc1yc2 жыл бұрын
Using Shelly 2.5 relays in all of my relevant sockets works for over a year without any issues yet with daily switching cycles.
@Cuplex12 жыл бұрын
I know right, and they also have the PM switch models. My Shelly Plug-S also measures power consumption and is only a small fraction of the size of the wireless relay built here. And it can handle 10 A at 240v while also being able to set a current limit/maximum power limit.
@andi2 жыл бұрын
Really awesome project and the result was great! I did not know about the relay sticking!
@tsbrownie2 жыл бұрын
What about replacing the mechanical relay with a solid state one?
@mortimersnead58212 жыл бұрын
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.
@galangtirtayudha39732 жыл бұрын
Glad to see you are finally use your DIY T12 Soldering Station :)
@jlucasound2 жыл бұрын
Thank You for the Pix-elation! After all, this _is_ a Family Oriented Channel. 🤣😂🙂
@marshallscholz86292 жыл бұрын
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.
@limtbk2 жыл бұрын
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
@tommyle628 Жыл бұрын
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.
@LordPhobos65022 жыл бұрын
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.
@asadabdulqaabir40062 жыл бұрын
My exactly same thoughts.
@timobk142 жыл бұрын
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?
@rajagopalann.16392 жыл бұрын
I think to kill spark while closing the relay contact we normally use a shunt capacitor of low value across the relay contact. This method was adopted in earlier induction coil. By killing the spark across contact erosion as well as contact stickiness can be obviated.
@lazytsfarm37082 жыл бұрын
relays which are crucial will often have a carbon block contact on the front/back and silver on the hinge.
@VolpeInCalze2 жыл бұрын
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
@analoghardwaretops39762 жыл бұрын
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..
@TheUnknownCatWarrior2 жыл бұрын
Cheap relays can be used as long as there is a snubber circuit between the relay contacts. I will only recommend an NTC thermistor in parallel with a timer-relay if the load has a high inrush current. Note that the capacitor may act as a short when power is applied barely powering the load.
@biggityboggityboo87752 жыл бұрын
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.
@robinholmes7852 жыл бұрын
With the power monitoring, is it possible to add a programmable fuse and/or current limiting feature?? that would a very interesting video??
@ArifKhan-bp9zx2 жыл бұрын
Finally 😢😢 A DIY winner
@jlucasound2 жыл бұрын
Hey Scott! It's "Next Time"!! 😄😀
@timberthewolf7332 жыл бұрын
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.
@timberthewolf7332 жыл бұрын
They are $20 USD each so definitely more expensive. I try not to cheap out on something that controls mains power in my home.
@deadall1272 жыл бұрын
pro tip: place the wireless module so that no power plane fits under its antenna the modules' datasheets often have a small chapter on this topic ;)
@fatfox35312 жыл бұрын
I really appreciate your efforts and I like this video. Creating independent solutions for the proprietary smart home jungle could not be honored enough but for the comparison the time for the design process of circuit, board, case and the documentation needs to be taken into account. Feature wise your solution is far more advanced but even if you only add only 40h of development time in total (which is surely not that unrealistic) economically your solution sadly won't be able to compete with the commercial product in my opinion.
@greatscottlab2 жыл бұрын
Yeahh....it is not very cheap.
@bubbleboy8212 жыл бұрын
@@greatscottlab Please sell these!
@r2db2 жыл бұрын
@@greatscottlab There is a market for something like this. The Tasmota smart bulbs (which can be re-flashed to ESPhome if one wishes) cost 2-3x more than the Tuya ones but people do buy them. The market is smaller, because the average person does not consider the security implications of using the multitude of "no hub" smart home apps.
@scruggs.jonathan2 жыл бұрын
What about a solid state relay? I don't know much about how they work or if they could handle the current but seems like it wouldn't wear out. Cool project!
@fiveleafcloverfpv44452 жыл бұрын
indeed. Maybe even with a mosfet but the problem is main power isnt decoupled from the electronics.
@BrotUndSaft2 жыл бұрын
Great video as always, I am a big fan of JLCPCB for my DIY Projects.
@tjk01022 жыл бұрын
Awesome Work! Thank you for sharing! :) On a side note: Something that popped into mind is that you may be able to extend relay life by creating a zero crossing circuit. Maybe that could be a future video topic? :) Stay Creative! :)
@greatscottlab2 жыл бұрын
I can put it on my to do list :-)
@samuraisystemsllc2 жыл бұрын
I actually thought this video was going to be about zero-crossing switching. A little annoying to tune the timing, but once you have the contacts closing at less than 10-20V, there's essentially no chance of welding. I'd be interested to see how disconnecting works. I made my circuits open at zero-cross as well, but I never really knew if it had the desired effect.
@foogod42372 жыл бұрын
@@samuraisystemsllc The problem with zero-crossing on open is that you actually need to open at zero _current,_ not zero _voltage._ With purely resistive loads, they will be the same, but many types of things people plug into outlets are not purely resistive, so you need to be able to account for a (often unpredictable) offset between voltage and current zero-points. It also doesn't necessarily help that much if you have inductive loads, due to back-EMF, etc, which can still produce voltages across the contacts far higher than the relay is designed for, even after they're fully open. For this sort of concern, something like a MOV in parallel with the relay is usually an easier and more effective way to deal with the issue.
@deviantstudio Жыл бұрын
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!
@RedstoneHair2 жыл бұрын
I wanna be like you, you inspire me so much!!
@MrBobWareham Жыл бұрын
A snubber across the contacts will stop the arching off the relay contacts with any load with in specs of the relay, and you can purchase them plotted with flying leads
@Teleport732 жыл бұрын
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.
@arshiajalali36222 жыл бұрын
This video was great! The quality of your videos continue to improve. I do miss EasyEDA though.
@Random_44002 жыл бұрын
Nice, however i think an even better solution would be to have some sort of transistor or MOSFET that can obviously handle the load to switch off the power to the relay before the relay connects or disconnects that way it can last even longer (considering the MOSFET doesn't fail first of course) but i think that would be also a good reliable way to do it :) Although at that point you might as well have the MOSFET do everything 😆 you get my point
@klave85112 жыл бұрын
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.
@pyrobeav20052 жыл бұрын
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.
@deterdamel73802 жыл бұрын
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.
@nagi6032 жыл бұрын
@@deterdamel7380 > But's transparent. For some of us, that's an improvement :D
@deterdamel73802 жыл бұрын
@@nagi603 Yes, we have nothings to hide there. And the color of this filament is very nice, too.
@Alexander912 жыл бұрын
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.
@fr33dumb02 жыл бұрын
such a cool concept for a series as I think the same way
@billstoner55592 жыл бұрын
I haven’t read all the comments, so someone have suggest this. Do zero crossing switching. That is only open or close the relay when the line voltage/current is zero. May require additional sensing circuitry but the esp32 could be easily programmed to add this function.
@mid9ightwalker2 жыл бұрын
Also you can commute the load with mosfet through bypass and after the inrush current is settled close the reley.
@phillipmugisa30652 жыл бұрын
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.
@patrickjoseph94762 жыл бұрын
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.