Thread 2932625 - /diy/

Anonymous
7/19/2025, 5:54:59 PM No.2932625
file
file
md5: 56f7f0556a544c502fc8f14e434865f9๐Ÿ”
Anons, I'd like to build a small smart power strip controlled by a small ESP32 where I can use a special sketch to "time" the various Schuko sockets. Basically, it's all relatively simple. The ESP runs a tiny web server that allows you to monitor, turn on/off, and time the various sockets. Obviously, I can't run 230AC at 16A on the ESP, so I was thinking of using relays, but I hate the fact that they consume current to stay energized and then close the contact (which also consumes energy). So I was thinking of bistable relays, perhaps step-by-step ones that open or close the contacts with each incoming pulse, effectively consuming energy only when needed.

On paper, it should sound good. Let's also consider the fact that I'd like to power the ESP32 and the various relays with a battery pack (or a power bank) that can be recharged when the batteries run out, so as not to further impact consumption.

I can't find any Arduino-powered relays online right now, and I don't know if they exist. Any suggestions?
Replies: >>2932644 >>2932655 >>2933025
Anonymous
7/19/2025, 7:50:19 PM No.2932644
>>2932625 (OP)
This is a basic bitch project, use your LLM of choice to walk you through it or find one of the million "how to relay with arduino/esp32" tutorials. There are tons of logic level controlled relays on the market.
>bistable relay to save power
You're on AC, this is pointless. If we assume that the bistable relay costs just $1 more than the regular relay, you can run the regular relay for at least 1000 hours on that $1. With a bistable relay you also don't necessarily know what the state is on startup, further complicating the project.
>I want to run an AC-coupled esp32 that does one thing, turn AC relays on and off, on a battery pack
???
>to save power
??????
Replies: >>2932645 >>2932661
Anonymous
7/19/2025, 7:53:00 PM No.2932645
>>2932644
ChatGPT suggests the G5RL-K1-E DC5...

My goal is to not keep the relay constantly energized!
Replies: >>2932673
Anonymous
7/19/2025, 9:18:52 PM No.2932655
>>2932625 (OP)
I dunno, but my old clutch relays are running 24vdc, to keep the amperage down, so they must consume a fair bit, to change states. Don't remember how much. They're rated at 20 amps/277 volts. Hit up Mouser and check specs.
Anonymous
7/19/2025, 9:43:57 PM No.2932661
>>2932644
Basic project my ass kiddo, OP don't trust this phaggot.

Search something like "latch relay 230AC 16A 5V coil then use a transistor to pilot
Anonymous
7/19/2025, 9:47:50 PM No.2932662
DIY_BINGO
DIY_BINGO
md5: 049253312b850c63b3791a1194580796๐Ÿ”
Anonymous
7/19/2025, 10:21:11 PM No.2932673
>>2932645
The one ChatGPT gave you seems fine, just consider that you still need a transistor to drive it from the ESP32, since the ESP32 doesn't have enough current on its pins.
Replies: >>2932783
Anonymous
7/20/2025, 11:27:29 AM No.2932783
>>2932673
But how it works? Datasheets doen't evene has a pin out or an example
Replies: >>2932784
Anonymous
7/20/2025, 11:31:09 AM No.2932784
>>2932783
No way datasheet doesn't have pinout, you're looking at the wrong thing then. Here's the pinout: https://www.mouser.com/datasheet/2/307/en_g5rl_uk-1061771.pdf
Replies: >>2932785
Anonymous
7/20/2025, 11:36:35 AM No.2932785
file
file
md5: 9041a2dce1b9164baaa540a0c8ad87c8๐Ÿ”
>>2932784
Yeah, but that's the footprint, i do not know what pin is (cause i'm an idiot dick sucker who's a software guy not an hw one, so sotty guys for my faggottry), anyway thanks for the help
Replies: >>2932786 >>2932798
Anonymous
7/20/2025, 11:44:48 AM No.2932786
file
file
md5: 3156c6e8810f717aeb9f4fac2cf7d77d๐Ÿ”
>>2932785
maybe this?
Replies: >>2932910
Anonymous
7/20/2025, 1:39:03 PM No.2932798
>>2932785
The pins on the right half are the switching outputs. You'd put AC live on 6 or 3 or both, AC live out on 4 or 5, or 2,7.
>In these relays, the input pulse of the set coil causes the operating condition to be maintained ... whereas input pulse to the reset coil side puts the relay into the reset condition
so if you give DC5V to the R-side - and +, it switches to one position, if you give DC5V to the S-side + and - (+ is common) it switches to the other position. So you need two NPN transistors to drive pin 1 and 8 respectively, and the esp32 gives a signal to one or the other to switch the position of the relay, while a common + is always connected.
Replies: >>2932799
Anonymous
7/20/2025, 1:40:30 PM No.2932799
>>2932798
Actually AC live in on 4/5 and AC live out on 3/6, so you don't energize the other side unnecessarily.
Replies: >>2932851
Anonymous
7/20/2025, 7:40:52 PM No.2932851
>>2932799
WTF? Explain pls
Replies: >>2932852
Anonymous
7/20/2025, 7:44:52 PM No.2932852
>>2932851
If you put AC live input on 3/6, then either 2/7 or 4/5 will always be live. But you only want an on-off switch, so having 2/7 live when there's nothing connected to it is pointless (and possibly dangerous if you have the terminals dangling around), so it's better to have AC live input on 4/5, that way only 3/6 and 4/5 can ever be energized and 2/7 are safe to dangle. If you design your PCBs well, this is a non-issue either way, but it's maybe better to err on the side of caution.
Anonymous
7/21/2025, 12:11:29 AM No.2932910
>>2932786
I didnโ€™t check the transistors or resistors but yes thatโ€™s the idea. IIRC for this purpose the arduino folks use 817C or PS2705 optocouplers these days instead of transistors
Anonymous
7/21/2025, 9:14:48 AM No.2933025
>>2932625 (OP)
A few pointers:
>hate the fact that they consume
Always look at those things in relation to the bigger picture. You're not building an ALU out of relays. You're looking to switch kWs. A relays power draw is negligible.
Also there is not a single electronic switch technology that does not consume any power to be on, latching relays might be the closes you'll get to that.
Bipolar devices will have a voltage drop. Any may need base current.
Unipolar devices have rds_on.
Relays need the coil energized.
Such is life.
Do not fall for cheap chinese SSR. The construction is always ass, the nameplate fraudulent and they will draw alot of power from probably every terminal they have and may try to kill you.
So:
Get a power strip,
crack the fucker open,
chuck some 230V relays rated for the amperage in for every socket, chuck a buck converter followed by a linear 5V reg in there. ESP32 and a 2N7000 or similar for every relay. Done.
Replies: >>2933070 >>2933269
Anonymous
7/21/2025, 4:21:25 PM No.2933070
>>2933025
He want the fucking omron anon...
Replies: >>2933075
Anonymous
7/21/2025, 4:54:36 PM No.2933075
>>2933070
Im just saying it doesnt make sense.
You know switch kW and worry about 'lost' mW
Replies: >>2933113
Anonymous
7/21/2025, 7:36:46 PM No.2933113
>>2933075
Well if you got 4 sockets and you keep them on more often than not, it's like 20kWh a year, so bistable latching relays are a fine choice if you want to make anything half-decent. But if it's one's first electronics project, then maybe better just go with the aliexpress $2 relays that don't require you to build circuits.
Replies: >>2933136
Anonymous
7/21/2025, 9:34:56 PM No.2933136
>>2933113
Well, I'd have zero issues walking OP through kicad, pcbway, components, soldering it etc
so why not
Anonymous
7/22/2025, 9:11:47 AM No.2933245
colori-piu-usati-1
colori-piu-usati-1
md5: 2554cbf8b9ffaf6c78a560d6f931f957๐Ÿ”
What do you mean by AC LIVE IN and AC LIVE OUT? I'm asking because I'm Italian and we have "fase," "terra," and "neutro," so I don't know which ones correspond to which.

I'm posting from work
Replies: >>2933261 >>2933282
Anonymous
7/22/2025, 11:42:59 AM No.2933261
>>2933245
well fase will be in and neutro out, nah?
Replies: >>2933272 >>2933282
Anonymous
7/22/2025, 12:01:38 PM No.2933269
>>2933025
OP wants to keep the 5V draw low because he runs it from battery. He just needs to let the relays energise from the 230 once theyโ€™re switched on
Replies: >>2933272
Anonymous
7/22/2025, 12:22:36 PM No.2933272
>>2933261
And terra? Is it common or ground?

>>2933269
I do not want to conusme energy for costantly energizing coils
Anonymous
7/22/2025, 3:26:19 PM No.2933282
>>2933245
Nigga you might be better off not messing with AC electricity if this is holding you back. Maybe make some 5VDC circuits with motors and shit and learn how switching works.
>>2933261
And you should very much never touch any AC wiring
Replies: >>2933286 >>2933299
Anonymous
7/22/2025, 4:01:19 PM No.2933286
>>2933282
So, can you help me out figuring out the omron pinout with phase, neutral andd ground?
Anonymous
7/22/2025, 5:07:59 PM No.2933299
>>2933282
LMAO
this nigger tells an electrical engineer to not touch AC
Replies: >>2933649
Anonymous
7/22/2025, 6:43:44 PM No.2933318
file
file
md5: ce703100dd48e79d46e71a3529d63621๐Ÿ”
What about that, is it okay? :/
Replies: >>2933478 >>2933496
Anonymous
7/23/2025, 7:08:50 AM No.2933478
>>2933318
Umh

Muriatic acid?
Anonymous
7/23/2025, 8:33:03 AM No.2933496
>>2933318
Dude WTF? How do you expect there to ever be a voltage drop across any of the coils?
The opto isolators are ISOLATORS. The ground on the LED side is only connrcted to the LED.
Also I am assuming your logic voltage is 5V? Is 2 mA really enough to make the opto change state?
Replies: >>2933507 >>2933630
Anonymous
7/23/2025, 9:45:04 AM No.2933507
>>2933496
Actually it's true, the GND is practically not connected to the coils, what a fucking mistake I made... However, I have another doubt about the Omron, given that in the diagrams it seems that pins 2 and 7 are also getting energized with the phase, or am I wrong?
Replies: >>2933630
Anonymous
7/23/2025, 7:50:36 PM No.2933630
file
file
md5: e93059b7c4214ba61dcb9142b0130d8e๐Ÿ”
>>2933496
>>2933507
BETTER?
Replies: >>2933768 >>2933894
Anonymous
7/23/2025, 9:13:14 PM No.2933649
>>2933299
>electrical engineer
>phase will be in, neutral will be out
>in a relay
>literally a short circuit switch
>electrical engineer
Replies: >>2933889
Anonymous
7/24/2025, 7:53:17 AM No.2933768
>>2933630
bump
Replies: >>2933878
Anonymous
7/24/2025, 9:03:00 PM No.2933878
>>2933768
bump
Anonymous
7/24/2025, 10:07:02 PM No.2933889
>>2933649
can you read you disgusting retarded abomination of a dysgenic nigger?!
Some pastanigger asked about the equivalency of english terms and pasta terms for the lines.
Go die you retarded piece of shit.
Replies: >>2933891
Anonymous
7/24/2025, 10:12:28 PM No.2933891
04967249702f70f70bf173e8c831652d810fad10c619ecf73fff4660f50ad66e
>>2933889
>"can you read you disgusting retarded abomination of a dysgenic nigger?!"
>t. person who misread a post
>also electrical engineer that made a dead short
Replies: >>2933895
Anonymous
7/24/2025, 10:22:46 PM No.2933894
>>2933630
Better dude. I'm not going to read your datasheets for you. But you should read your datasheets.
Place your freewheeling diodes in a neater fashion maybe. In a way that reflects their function. Like from pins 1 to 9 and from 8 to 9.
Since terminals 2&7, 3&6 and 4&5 are connected internally consider tying them both to the same net.
Did you consider relays that have one input for a SR flop?
Replies: >>2933903
Anonymous
7/24/2025, 10:23:49 PM No.2933895
>>2933891
>What do you mean by AC LIVE IN and AC LIVE OUT? I'm asking because I'm Italian and we have "fase," "terra," and "neutro," so I don't know which ones correspond to which.
YOU FUCKING NIGGER
Replies: >>2933902
Anonymous
7/24/2025, 10:41:10 PM No.2933902
>>2933895
We hate them, and you
Anonymous
7/24/2025, 10:42:11 PM No.2933903
>>2933894
Ty for the advice anon, in these days i will buy the omron and play with it witho DC voltage only
Replies: >>2933924
Anonymous
7/24/2025, 11:40:10 PM No.2933924
>>2933903
You're welcome.
Sinxe you'll be ordering anyways:
Get a simple 1/4W resistor kit. Axial with leads. Whenevet you're unsure about something: Comsult datasheet and if still unsure chuck a resistor in there just to be sure. You can always go down in resistance when things don't react but you can't put the smoke back in when things react.
I hope you have a multimeter or a LED and some wire at least.
Get the diodes, if the relays have no internal protection, the transients can be nasty. Consider getting stuff to build an RC snubber with. Diodes generally are slow to react. Snubbers are not.