I've completed the design of my pool timer that can turn the pump and light on/off via WiFi and would love to get my design reviewed.

At 120 V the pool light should handle 500 W. The pump is 0.5 HP. Since I'm using the HLK-PM03 as a power converter, I've also added a temperature and safety fuse for safety. Two MOVs are used to protect each relay, although the light shouldn't really generate much noise. There's a jack for a one-wire thermometer, another to program the ESP32 and three pins of extensions to future-proof the board if I ever need to add additional relays boards without the CPU.

The board will be mounted in a traditional pool enclosure and I plan to apply a conformal spray on it to shield it against moisture. The digital ground will be connected to the box's ground through the corner screws. The digital grounds are not connected because I'm creating two ground planes (front/back).

The PCB presented below shows a 1 mm grid for a total PCB size of 3"x3". I'd appreciate any feedback before I order the appropriate hardware.

The schematic: PCB Schematic

The PCB: enter image description here

Part list:

Some questions:

  • I have chosen to place two ground planes on the digital side, one on top and another at the bottom. I was trying to figure out if ground loops would be an issue here. I could easily route the ground on the bottom layer if that's the case, but I like the cleanliness of the planes.
  • My neutral is 4 mm wide everywhere except when it connects to the MOC since the pads can't handle that size. That said; the MOC won't take that much power so I connected it to a 1 mm trace instead. I'm assuming that should be fine.
  • \$\begingroup\$ Why are you using opto-isolators to drive relay coils? Why is your load in series with MOV1 back to neutral - that doesn't seem right. Why does REL1 and REL2 control the same load (at T2)? \$\endgroup\$
    – Andy aka
    Commented Aug 2, 2020 at 13:21
  • \$\begingroup\$ Where's the pukka data sheet for the HMK-PM03? \$\endgroup\$
    – Andy aka
    Commented Aug 2, 2020 at 13:30
  • \$\begingroup\$ optos are used here since the relays are triggered by 120VAC voltage and the CPU can't drive that sort of power. Sorry the HLK-PM03 was in the list, but it wasn't pulled out as its own bullet. I've corrected that and you can now find the datasheet above :). REL1 and REL2 control different things but they both let through lines of 120VAC. \$\endgroup\$
    – ti_chris
    Commented Aug 3, 2020 at 6:28
  • 1
    \$\begingroup\$ I’m voting to close this question because it is an abandoned design review \$\endgroup\$ Commented Dec 30, 2020 at 1:36

1 Answer 1


Unfortunately, you have a couple major design issues here that will prevent this board from working.

  1. The relays you are using AZ21501-A cannot have their coils driven by AC. Their data sheet very clearly states that they are DC coils to 120 VDC. If you put 120VAC through their coils, the contacts will simply chatter rapidly instead of staying closed. Relays with AC coils have a shading ring added which is necessary for their operation on AC. Shading rings are effectively a single, shorted turn (or sometimes several turns). The primary magnetic flux from the relay coil induces current in the shading ring, resulting in an auxiliary magnetic flux 90° out of phase with the main flux. This prevents the magnetic field from dropping to 0 during the zero-crossing periods of the AC current through the coil. DC coils do not have a shading ring, and every time the current reverses direction (crosses zero), the magnetic field will be collapsed entirely, opening the contacts. This results in the relay chattering rapidly.

    This kills the relay.

    You will need to change your relays to ones intended to have their coils driven from AC, the ones you have chosen will not work.

  2. Get rid of those MOVs. MOVs wear out and are not designed nor intended for use in repetitive transients like those of a relay coil. They are meant to stop unexpected surges that occur far more infrequently. MOVs also tend to have spectacular (as in, with fire or smoke) failure modes, especially when used in a clamping configuration. They also serve no purpose when used with a correct coil type (remember that shading ring? Any collapsing magnetic field has a nice shorted turn to induce current in, back emf will be negligible). What you DO need is an RC snubber across the relay coil to dissipate extra energy instead of letting it oscillate between the coil and shading ring. Try a 39Ω resistor in series with a 10nF capacitor across each of the relay coils.

  • \$\begingroup\$ Apologies. I should have specified the full spec of the relay. They do support AC: AZ21501–1A–120AE is the version that I'm using. I looked at snubbers, but I didn't like that it would siphon energy all the time. A forum I had found suggested MOVs were also a reasonable approach: forum.arduino.cc/index.php?topic=430486.0 Partly I chose a beefy relay of 40A such that it could more easily handle the abuse. You still believe that it would need a snubber? How did you come up with those values for RC? \$\endgroup\$
    – ti_chris
    Commented Aug 3, 2020 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.