Electronics > Projects, Designs, and Technical Stuff

Can someone help me review this schematic?

<< < (6/8) > >>

mariush:

--- Quote from: redgear on July 09, 2020, 06:37:52 am ---
Thank you both :)

Won't the 9v transformer be a better design choice? Since I will be using a Linear Regulator, 9v would mean less energy is wasted as heat.
As for the diodes I'm considering the S1M diodes for the bridge rectifier and 1N4148 as protection diodes for the relays.

My device has a EM ballast, I'm concerned if the LCD Display will output gibberish when they are turned on, is there a way to filter it? Would filter caps be a good idea? How do I calculate the capacitance required?

Looking forward for what you guys have to suggest. :)

--- End quote ---

Actually, no, not really...

You have a few problems.

Low VA transformers (let's say 10-25VA) will have very poor regulation at low currents....  let's say under 50mA, the voltage may be up to 20% higher than the rated voltage.
So, for example, a 9V AC may output 11v AC at very low currents, which rectified ends up to something like 11v x 1.414 - 2 x 0.5v = 14.5v  (the diodes in the bridge rectifier also have low voltage drop at very low currents)

The most power hungry components are the relays, while they're turned on... those will consume around 10-25mA each.  In contrast, your microcontroller will consume maybe 1-5mA and your LCD display will consume 3-5mA plus something like 15-45mA when the backlight (if any) is turned on.  If you add some status leds, maybe 5-10mA per led?

So basically, in the worst case scenario where all relays are off, and the backlight of the lcd display is off, your circuit may consume less than 20mA, which means the transformer has the potential to output higher voltage than expected.

On the other hand, you also have to be aware of fluctuations in the mains voltage.
If you design your circuit to be used in various places, you have to take in consideration that voltage may not be always 110v , 120v or 230v ... it's perfectly legal to have something like -5% ... +10% , or even +/- 10%
I often see at 2-3 AM the voltage on my mains socket creeping up to 247v, which is still legal (230v +10% = 253v)  ... but I can also see the voltage go down to around 215v sometimes.

So here's some calculations for two transformers :  115v/230v AC  -> 9v  and 115/230v -> 12v AC , taking  in consideration low and high AC input (excel spreadsheet attached at the bottom):

 Transformer.xlsx (10.09 kB - downloaded 53 times.)



As you can see, with a 9v transformer in the worst case scenario, you may have as little as 8v AC or a bit under 10v after rectification. That may still be enough to keep relays working, but it's a bit of a worry.
On the other hand, at very low current and if you have a high ac input, your input voltage may be up to 15v..16v ... which is uncomfortably close to 16v, so if you want to be absolutely safe, you'd have to use bulkier 25v rated capacitors.
(a lot of people assume  "oh, i'll just use 9v or 10v ac transformer because I'd be able to use smaller 16v rated capacitors but that's not safe)

With 12v, worst case scenario you'd have 13.35v  or 20-22v at very low currents  but the average would be around 15v
25v rated capacitors would be fine, 35v rated would be even better.
The only concern you would have is using linear regulators with low maximum input voltage (like let's say 1117 series which may have maximum input voltage of 17v DC)



Now going back to linear regulator ... the linear regulator does dissipate the difference between input and output in the form of heat.
BUT, keep in mind that you're gonna power the microcontroller and the lcd display (and maybe <0.5mA for uln2003a) and some status leds ... so let's say under 50mA

Even with high input voltage, the amount of power dissipated with be relatively small :

Power wasted = ( Vin - Vout) x Current ....  ( 15v - 5v ) x 0.05 A  10 x 0.05 = 0.5 watts  ....
This is below the requirements for a heatsink on a to-220 regulator (it will be quite warm at around 50-70 degrees but otherwise will be perfectly fine.
Let's say you're idling the circuit and you use only 10mA and transformer peaks to 22v ... (22v - 5v )  x 0.01A =  0.17 watts

redgear:

--- Quote from: mariush on July 09, 2020, 04:18:09 pm ---Actually, no, not really...

You have a few problems.

Low VA transformers (let's say 10-25VA) will have very poor regulation at low currents....  let's say under 50mA, the voltage may be up to 20% higher than the rated voltage.
So, for example, a 9V AC may output 11v AC at very low currents, which rectified ends up to something like 11v x 1.414 - 2 x 0.5v = 14.5v  (the diodes in the bridge rectifier also have low voltage drop at very low currents)

The most power hungry components are the relays, while they're turned on... those will consume around 10-25mA each.  In contrast, your microcontroller will consume maybe 1-5mA and your LCD display will consume 3-5mA plus something like 15-45mA when the backlight (if any) is turned on.  If you add some status leds, maybe 5-10mA per led?

So basically, in the worst case scenario where all relays are off, and the backlight of the lcd display is off, your circuit may consume less than 20mA, which means the transformer has the potential to output higher voltage than expected.

On the other hand, you also have to be aware of fluctuations in the mains voltage.
If you design your circuit to be used in various places, you have to take in consideration that voltage may not be always 110v , 120v or 230v ... it's perfectly legal to have something like -5% ... +10% , or even +/- 10%
I often see at 2-3 AM the voltage on my mains socket creeping up to 247v, which is still legal (230v +10% = 253v)  ... but I can also see the voltage go down to around 215v sometimes.

So here's some calculations for two transformers :  115v/230v AC  -> 9v  and 115/230v -> 12v AC , taking  in consideration low and high AC input (excel spreadsheet attached at the bottom):

(Attachment Link)



As you can see, with a 9v transformer in the worst case scenario, you may have as little as 8v AC or a bit under 10v after rectification. That may still be enough to keep relays working, but it's a bit of a worry.
On the other hand, at very low current and if you have a high ac input, your input voltage may be up to 15v..16v ... which is uncomfortably close to 16v, so if you want to be absolutely safe, you'd have to use bulkier 25v rated capacitors.
(a lot of people assume  "oh, i'll just use 9v or 10v ac transformer because I'd be able to use smaller 16v rated capacitors but that's not safe)

With 12v, worst case scenario you'd have 13.35v  or 20-22v at very low currents  but the average would be around 15v
25v rated capacitors would be fine, 35v rated would be even better.
The only concern you would have is using linear regulators with low maximum input voltage (like let's say 1117 series which may have maximum input voltage of 17v DC)



Now going back to linear regulator ... the linear regulator does dissipate the difference between input and output in the form of heat.
BUT, keep in mind that you're gonna power the microcontroller and the lcd display (and maybe <0.5mA for uln2003a) and some status leds ... so let's say under 50mA

Even with high input voltage, the amount of power dissipated with be relatively small :

Power wasted = ( Vin - Vout) x Current ....  ( 15v - 5v ) x 0.05 A  10 x 0.05 = 0.5 watts  ....
This is below the requirements for a heatsink on a to-220 regulator (it will be quite warm at around 50-70 degrees but otherwise will be perfectly fine.
Let's say you're idling the circuit and you use only 10mA and transformer peaks to 22v ... (22v - 5v )  x 0.01A =  0.17 watts

--- End quote ---

Wow, Thank you so much for taking the time to explain with so much detail. Time for me to start working on the schematic. Few more questions before I start:
1) For circuit protection will a fuse alone be enough? Will I need to use a MOV?
2) Do I need a EMI filter circuit between the AC in and primary of transformer?
3) While reading about power supplies, I came across the TNY268PN from Power Integrations which can be used to design a SMPS and it fits my requirements. Do I really need a SMPS or transformer + linear reg be enough(with your previous answer, I think this should be enough)?

Thanks :)

redgear:
Here is an update. I have a minimal schematic now.


How does it look? Do I need to make any changes? Should I add any other protection than Fuse?

phil from seattle:
 Don't connect N to gnd. AC relay?  don't connect through gnd.

Syntax Error:

--- Quote from: phil from seattle on July 10, 2020, 03:44:28 pm --- Don't connect N to gnd. AC relay?  don't connect through gnd.

--- End quote ---
Agreed. It's not just your Arduino that is likely to get killed.   :(
Why not dispense with the relay? If you are just sensing mains, then use a 240V rated opto-isolator to signal the micro-controller. You can buy these "arduino mains sensor opto-isolator" boards on ebay for under €10.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod