1

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

Mat
  • 131
  • 7
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 14 '21 at 20:08
  • Why did you use such thin lines? Especially for power nets – Mike Dec 14 '21 at 22:12
  • 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. – Tom L. Dec 15 '21 at 05:13
  • @mike the power and ground pours should take care of it, though I would use thicker signal traces because why not? – Bruce Abbott Dec 15 '21 at 05:24
  • @Mike +5V to the Arduino is 0.5mm because it shouldn't use that much current, what should I put 1mm ? – Mat Dec 15 '21 at 07:05
  • I read that AC clearance are very large, the top right mounting hole shouldn't be grounded at all ? Like just left unconnected ? – Mat Dec 15 '21 at 07:07
  • 1
    Why are you using through-hole components? – Lundin Dec 15 '21 at 07:37
  • Because the Arduino is through hole so i went with them and it's easier to solder by hand. + I've never used cms for the moment in my designs – Mat Dec 15 '21 at 07:46
  • Your question would work better with a list of all input, process and output specs because there are a lot of assumptions you may have wrong such as the inrush current is 100 to 400 times the rated input current, so don't get fancy switching the input. It will fail. Just switch the output if necessary . Then make a concise list of knowns, unknowns and must-haves with nice-to-haves, then the list of uncertainties you are asking for feedback. use short form. Load needs a big Triac. – Tony Stewart EE75 Dec 19 '21 at 18:09
  • Thanks I edited the question. Didn't understand the inrush / input output & triac explanations ? – Mat Dec 20 '21 at 07:14

1 Answers1

0

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.

bobflux
  • 70,433
  • 3
  • 83
  • 203
  • 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 ? – Mat Dec 20 '21 at 12:07
  • 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. – bobflux Dec 20 '21 at 17:11
  • yes it will be enclosed Sleep mode is disabled (i put 4.7k resistor to ground) – Mat Dec 20 '21 at 17:13
  • 4k7 is fine. I suggest adding holes in the pcb for zipties to hold the wires like this: https://electronics.stackexchange.com/a/464757/13616 – bobflux Dec 20 '21 at 17:16
  • 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 ? – Mat Dec 20 '21 at 17:22
  • What capacitor? On the SIM800? – bobflux Dec 20 '21 at 18:00
  • Yes the one for the sim800l exactly – Mat Dec 20 '21 at 18:10
  • OK, if it draws 2A current spikes, apply ohm's law, voltage drop on capacitor will be ESR*dI so with a typical "general purpose" 100µF cap having an ESR around 1 ohm, it will drop 2 volts and that won't work. The cap I linked has about 0.1 ohm ESR which is great, and it's small and cheap. If you use too low ESR like 0.006 ohm fancy OSCON polymer capacitor, then it will make a LC resonant circuit with the ceramic caps on the module, and it will ring, and that can actually make it worse. – bobflux Dec 20 '21 at 18:25
  • thank you for your great explanation I got it now – Mat Dec 20 '21 at 18:47
  • Thanks for the accept ;) – bobflux Dec 21 '21 at 09:08