1
\$\begingroup\$

I am creating a radiator controller by pilot wire (in France) for domestic and personal use.

The general idea is that using the 230V AC (standard) and modifying it with full, half or no wave you set the radiator in different modes. Then control it with the GSM to change modes or get the temperature (no PID of temperature just informative data).

As I don't know how to rectify AC to DC I bought an AC to DC 5V converter Then I have inspired myself with similar circuits online and came up with this one:

Schematic

I have a GSM module, a thermometer, an Arduino Nano and 2 optocouplers. Should I change the type of optocoupler for a "switch at zero cross" one instead of an "instant switch" one?

To point to the potential "error" it's on the SIM800L side, are the DTR resistor to ground and the RST resistor to ~+4.4V are useful or should I delete them and go direct wiring?

I'm more afraid of the PCB which you find below:

PCB

It's a 2 layer board, both sides are ground plane. The rectangle on top right side is a "keepout zone" so that no copper is poured on the AC side.

I'm going to mount the Arduino and sim800l on female header so no worry about the resistors below the GSM module.

I have grounded the mounting holes but for the moment I'm not planning on using them (I will probably glue the PCB in a box)

I would appreciate some feedback, so what do you think?

I'm going to share my design files as "open hardware" so feel free to critique my schematic if it's not clear enough.

[EDIT] Arduino +5V input is 0.5mm, others are 0.25mm and big traces are 1.5mm I think

[EDIT2] I'm using through-hole as it's easier to solder by hand. This is a one piece not industrial production at all

[EDIT3]

Input : +230VAC, ground

Output : +230VAC, different kind of signals (half-wave etc)

I'm guessing the radiator side shouldn't draw any current (maybe an optocoupler to transmit the phase to DC to a microcontroler)

Known :

  • AC to DC is good
  • Temperature is good

Not known :

  • Optocoupler side should be good (half-wave etc)
  • SIM800L circuit
  • AC clearance
  • MOC3023M, good choice ? Should I go with a "zero detection" optocoupler ?

[EDIT4]

The diode is a 1N4007. The grid is 0.12mm/5mils. AC side should have 4mm clearance if i didn't miss something. I didn't change the cap footprint for now I'm searching for a good cap in my stock and will change the footprint if needed ;) And I guess I can ask if you guys have a "drop-in" replacement for the optocouplers ?

The revised PCB is below :

PCB revised

\$\endgroup\$
10
  • \$\begingroup\$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. \$\endgroup\$
    – Community Bot
    Dec 14, 2021 at 20:08
  • \$\begingroup\$ Why did you use such thin lines? Especially for power nets \$\endgroup\$
    – Mike
    Dec 14, 2021 at 22:12
  • \$\begingroup\$ You're missing the most important information: What are your requirements on Clearance/Creepage. I can see some traces which will probably violate them anyway - starting with the GND mounting hole and one of the AC traces at the top right. Also, the track between U2 and U3 unnecessarily reduces your clearance here. \$\endgroup\$
    – Tom L.
    Dec 15, 2021 at 5:13
  • \$\begingroup\$ @mike the power and ground pours should take care of it, though I would use thicker signal traces because why not? \$\endgroup\$ Dec 15, 2021 at 5:24
  • 1
    \$\begingroup\$ Why are you using through-hole components? \$\endgroup\$
    – Lundin
    Dec 15, 2021 at 7:37

1 Answer 1

0
\$\begingroup\$

Should I go with a "zero detection" optocoupler ?

It's not mandatory, but that would be better in case there is a bit of capacitive load on the output.

Optocoupler side should be good (half-wave etc)

Yes

SIM800L circuit

A diode won't always drop 0.6V, it depends on current. To make sure SIM800 never gets more than 4.4V, you can put a resistor between +4.4V and GND to make sure diode current is never too low. If you want to make this wasted current useful, you can add a power-on LED there.

Since this GSM module draws power supply current in peaks that can reach 2A, a larger capacitor than 100µF could be useful. It's not for the capacitance value, but for the ESR. Here's an example low ESR cap.

AC clearance

It's possible to do much better. Don't put traces under the MOCs, because you want the full width of the MOCs to count as isolation barrier between mains voltage and your arduino and USB port. Move the diodes so they're in front of the pins (blue arrow).

enter image description here

You can move and swap the mains connectors so the pinout is easier to route, and move the traces for more clearance.

U4 should be on the edge of the board if you want it to be in contact with something to measure its temperature. If your circuit is in an enclosure, heat from the power supply will cause it to measure higher temperature, so the pcb should be mounted in an enclosure with ventilation holes, and with the power supply on top and U4 on the bottom (because heat rises). Or you can make a hole so the temperature sensor sticks out and measures ambient temperature, not inside the box.

If the power supply it on top, the GSM module should probably be there too so the antenna points up instead of down.

You can move around some components to avoid traces that cross each other, for example you can move the optos and connector up in the top right corner, and put the power supply where the optos were. Also don't be afraid to route traces between pins of your 0.1" headers if that allows you to put less traces on top layer. You'll get a better ground plane this way, with less traces making cuts in it.

\$\endgroup\$
10
  • \$\begingroup\$ Hello thank you for the detailled reply. The diode is a 1N4007, the datasheet says in the graph that at 0.01A you have 0.6 instantaneous voltage so is this diode ok or should I put a resistor as you said ? I will change the capacitor as you recommand. Should the top right mounting hole be grounded or left floatting ? \$\endgroup\$
    – Mat
    Dec 20, 2021 at 12:07
  • \$\begingroup\$ I was worried about the voltage drop when SIM800 draws just a bunch of µA in sleep mode. If you use a plastic box (safer) then no need to ground the hole. \$\endgroup\$
    – bobflux
    Dec 20, 2021 at 17:11
  • \$\begingroup\$ yes it will be enclosed Sleep mode is disabled (i put 4.7k resistor to ground) \$\endgroup\$
    – Mat
    Dec 20, 2021 at 17:13
  • \$\begingroup\$ 4k7 is fine. I suggest adding holes in the pcb for zipties to hold the wires like this: electronics.stackexchange.com/a/464757/13616 \$\endgroup\$
    – bobflux
    Dec 20, 2021 at 17:16
  • \$\begingroup\$ Thanks, and about the capacitor the datasheet just says "Low ESR" but no values are associated what number is low enought the less the better ? \$\endgroup\$
    – Mat
    Dec 20, 2021 at 17:22

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.