ESP32_Light_Switch icon indicating copy to clipboard operation
ESP32_Light_Switch copied to clipboard

power management board rev 4

Open 356579 opened this issue 7 months ago • 11 comments

I saw in the README that the Power Management Board Rev 3 has issues and can damage components, and that you’re already ordering a fixed version. However, I noticed that the latest version available on OSHWLab is still Rev 3. Could you clarify whether the fixed Rev 4 design will be uploaded soon?

356579 avatar Aug 26 '25 22:08 356579

Good question.

The online versions of the power board do not work and I have been waiting for parts to become avilable to start testing. At last check a couple weeks ago they were still out of stock. I need to with find a new method of power measurment or wait for the chips to become avilable. The board inPCB folder work but there is no energey monitoring.

bhboyle avatar Aug 26 '25 22:08 bhboyle

Thanks for the update.

If you're open to it, would you mind sharing the V4 design with me? I'd like to see if I can track down the components locally or from other sources so I can start testing on my end.

Also, is the current design intended to work with 230V, 120V, or is it compatible with both?

356579 avatar Aug 27 '25 22:08 356579

Sure the link to the test bed is below but please bear in mind that it i not directly attached to the power board. I have broken this out to a seperate testing module project.

I wouldlove to hear how your testing goes.

Regarding powering, the power supply is an "IRM-02-5" this device can handle input voltages of 85 ~ 305 VAC so 230v should be fine.

https://oshwlab.com/bhboyle/current-sensor-test

bhboyle avatar Aug 28 '25 11:08 bhboyle

Thanks a lot for sending me the PCB.

I had a question regarding the Power Management Board rev 1: on OSHWLab I only see rev 3, and on GitHub there’s just a PDF. Would it be possible for you to share the PCB design files for rev 1?

I’ll probably be ordering the PCBs next week. Once the test board arrives (likely in about a month) and I get it assembled, I’d really appreciate your help with setting up the testing module for example, a wiring diagram or recommended connections. I just want to make sure I don’t blow it up on the first try.

356579 avatar Aug 28 '25 22:08 356579

Unfortunitly EasyEDA does not keep previous version of designs and I didnt think to Stop on one design and dupliucate when testing new ideas. so the only version of the rev 1 design is the PDFs. The switch works perfect without the power metering. The only thing iit does not do well is if the switch is in a 3way config it does not know when the other end turns on the light. That was my motivation for the power metering. It had nothing to do with know how much power was being used it was about knowing if the other switch turned on the circuit.

If your need is only switching and you could do without the power monitoring then the plafirm is stable and thee will be not blown parts. I have had two switching runing for two years without any issues. Way more stable than the TP-Links I replaced.

bhboyle avatar Aug 29 '25 11:08 bhboyle

Hi, I’m new here and just getting up to speed with the Power Management Board. I read in the README and issues that Rev 3 has problems and can actually damage components, while Rev 1 seems to work fine (just without the power monitoring).

Since I don’t really need the power monitoring feature, I was wondering is there a way to still use the Rev 3 PCB safely by just leaving some components unsoldered or leaving certain solder bridges open? If that’s possible, could you point out exactly which parts I should leave off so it works only as a switch?

Or is Rev 3 not safe to use at all, and the only option would be to recreate a board from the Rev 1 schematic PDF?

Sorry if this is a basic question I’m just trying to figure out whether I can work with the available files or if I should start from scratch. Thanks for the help.

B5ds53 avatar Sep 03 '25 12:09 B5ds53

Sorry for the delay in respondiing. I had surgery this week and I am still a little grogy. Your best bet then is to remove the power monitorng hardware. The image here shows all those parts. One very notable exception is R19. This is the shunt resitor used to measure current flow and if you exclude it power will never reach your devices.

Image

bhboyle avatar Sep 05 '25 19:09 bhboyle

Hi, no problem at all hope you're recovering smoothly from surgery!

I’ve attached an image of the modified PCB. Could you take a look and let me know if it aligns with the suggestions you mentioned?

Also, I noticed U6 on the PCB and saw that it’s marked as a solder bridge. Could you please clarify what its purpose is in this context?

Thanks again for your help—I really appreciate the guidance as I get up to speed!

Image

B5ds53 avatar Sep 07 '25 00:09 B5ds53

Hi there.

U6 was inteded to isolate the ground from U4 and the Hot connetion. That was ment for testing. Since your removing all the measuring components U6 is not required at all.

Also, if you are removing all the measuring compnents you should remove R19 and connect the Hot input directly to the relay. R19 is also not needed. I only mentined keeping it because I didnt expect you to modify the board.

bhboyle avatar Sep 07 '25 12:09 bhboyle

The switch works perfect without the power metering. The only thing iit does not do well is if the switch is in a 3way config it does not know when the other end turns on the light. That was my motivation for the power metering. It had nothing to do with know how much power was being used it was about knowing if the other switch turned on the circuit.

@bhboyle Have you considered flashing ESPHome to the ESP32 and using Home Assistant? That will solve your three way switch problem as long as both switches are using ESPHome. You can detect the state of the light by querying Home Assistant from the ESP32.

If you would prefer to stick with your custom firmware implementation, you can still do this. Since your switches expose a web server you could have the switches talk to each other. For example if one of the switches is flipped on, it could make an API request to the other switch and update the state of the light to on. Something as simple as a /api/state endpoint that is for switch <--> switch communication only. It could POST a payload like this (you could even add a signature so the lights can only communicate with each other as long as they have a shared key):

{
  "light": "on",
  "timestamp": 1758763147649,
  "sig": "U2lnbmF0dXJlIGZvciB0aGUgbGlnaHQgc3RhdGUgYW5kIHRpbWVzdGFtcA=="
}

I think using power metering just to detect if the light is on is way overkill, especially since you have a whole microcontroller with wireless capabilities to work with.

mpaw avatar Sep 25 '25 01:09 mpaw

You make an excelent point. When I started this project I was not using Home Assistent and by extension I was also not using ESPHome. I am now and I think I will try you idea. That means I have to order more boards :)

I will have to think about the logic of how to detect the on off state but that shouldnt be to hard. I also wonder about tracking in the event of a power failure but thats ann interesting challange.

Cheers!

bhboyle avatar Sep 26 '25 12:09 bhboyle