Author Topic: Can someone help me review this schematic?  (Read 6388 times)

0 Members and 1 Guest are viewing this topic.

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5171
  • Country: ro
  • .
Re: Can someone help me review this schematic?
« Reply #25 on: July 09, 2020, 04:18:09 pm »

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. :)

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

 
The following users thanked this post: redgear

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Can someone help me review this schematic?
« Reply #26 on: July 10, 2020, 07:52:24 am »
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

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 :)
« Last Edit: July 10, 2020, 09:06:51 am by redgear »
 

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Can someone help me review this schematic?
« Reply #27 on: July 10, 2020, 01:02:31 pm »
Here is an update. I have a minimal schematic now.
1020512-0

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

« Last Edit: July 10, 2020, 01:04:44 pm by redgear »
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1063
  • Country: us
Re: Can someone help me review this schematic?
« Reply #28 on: July 10, 2020, 03:44:28 pm »
 Don't connect N to gnd. AC relay?  don't connect through gnd.
« Last Edit: July 10, 2020, 03:46:00 pm by phil from seattle »
 
The following users thanked this post: redgear, Syntax Error

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: Can someone help me review this schematic?
« Reply #29 on: July 10, 2020, 04:10:46 pm »
Don't connect N to gnd. AC relay?  don't connect through gnd.
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.
 
The following users thanked this post: redgear

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5171
  • Country: ro
  • .
Re: Can someone help me review this schematic?
« Reply #30 on: July 10, 2020, 06:07:47 pm »


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 :)
You're welcome.  I think a fuse will be enough, no need for MOVs and complex things.  Make sure you pick a suitable fuse though , properly sized.
For example, let's say you have a 115v to 12v transformer and your circuit consumes up to 2 watts (around 150mA) ... that would be about 2 watts / 115v = 0.017A of current on the primary.
You'd probably want the fuse to blow if the circuit starts to consume more than double that, so probably a 50mA fuse on the primary side would be a good choice. 100mA would be overall safer.... may be too big to pop if a relay shorts out.
Make it slow blow, because when you first plug in your device that capacitor right after the bridge rectifier will suck energy like a black hole, especially if it's low esr, so you'll get a current spike on the transformer for a few milliseconds until the capacitor fills up.
 
As for using chips like TNY ... that's an offline power switcher, they're more complex circuits than regular dc-dc switching regulator chips. You're too much of a beginner to deal with such ICs that work with mains voltage ... stick to the safety that a classic transformer gives you or use a ready made ac-dc adapter  (a phone charger, usb adapter, wallwart)
Also, that TNY chip would require a custom made high frequency transformer that would probably cost more than a ready made switching power supply.

 
The following users thanked this post: redgear

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Can someone help me review this schematic?
« Reply #31 on: July 11, 2020, 05:31:24 am »
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.

Don't connect N to gnd. AC relay?  don't connect through gnd.

Oops. I totally forgot. I had a different component there at first. Thanks for pointing it out.
Yes, it is an AC relay. I am adding a annotated schematic with this post.

1021128-0

I have some components in the circuit that requires AC mains supply. The Arduino must switch on or off based on few conditions. The components should be powered when SW1 and either of switches SW3 or SW4 is closed. I had initially connected the switch directly to Arduino. SW1 is a cut-off switch, so I directly connected it to supply. I felt it is more reliable, as soon as the switch is opened, the power to the components is cut-off. So even if the micro-controller malfunctions, I can be sure that the power will be cut-off when the switch is opened. Is there a better way to do it?

You're welcome.  I think a fuse will be enough, no need for MOVs and complex things.  Make sure you pick a suitable fuse though , properly sized.
For example, let's say you have a 115v to 12v transformer and your circuit consumes up to 2 watts (around 150mA) ... that would be about 2 watts / 115v = 0.017A of current on the primary.
You'd probably want the fuse to blow if the circuit starts to consume more than double that, so probably a 50mA fuse on the primary side would be a good choice. 100mA would be overall safer.... may be too big to pop if a relay shorts out.
Make it slow blow, because when you first plug in your device that capacitor right after the bridge rectifier will suck energy like a black hole, especially if it's low esr, so you'll get a current spike on the transformer for a few milliseconds until the capacitor fills up.
 
As for using chips like TNY ... that's an offline power switcher, they're more complex circuits than regular dc-dc switching regulator chips. You're too much of a beginner to deal with such ICs that work with mains voltage ... stick to the safety that a classic transformer gives you or use a ready made ac-dc adapter  (a phone charger, usb adapter, wallwart)
Also, that TNY chip would require a custom made high frequency transformer that would probably cost more than a ready made switching power supply.
Alright, thanks. Considering the maximum power consumption for micro and the display, the current was around 500mA, so I doubled it and included a 1A fuse. The components would consume around 2.4A in total and I have a 5A fuse.
« Last Edit: July 11, 2020, 05:34:05 am by redgear »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5171
  • Country: ro
  • .
Re: Can someone help me review this schematic?
« Reply #32 on: July 11, 2020, 10:32:14 am »
I don't understand the stuff about AC in your schematics.

Relays have two sides, one you connect to your microcontroller / uln2003a ... when 12v+/- something goes through the coil and energizes it the other side of the relay engages and the circuit is closed, connection is made and all that.  As long as that coil in energized, the connection is kept... unless you buy bi-stable relays which only need a pulse for let's say 100ms to permanently switch to one position.

See the ms paint picture i just made....

You may want to look into TRIACs and optical isolators/triac drivers with zero crossing ... you just send signal to the triac driver (which is also optical isolator) and when the AC sinewave is near 0 or at 0, the driver turns on the triac and you get power to your device.
A well known usage is in soldering stations and hot air guns, where a microcontroller or analog circuit turns on the AC connected heating element using a triac and triac driver
See the schematic here : https://sc0ty.pl/2012/10/my-soldering-station/

He's using a MOC3041 triac driver, which is available in DIP package : https://www.digikey.com/products/en/isolators/optoisolators-triac-scr-output/904?quantity=0&ColumnSort=1000011&page=1&k=moc3041&pageSize=25

The triacs will dissipate some heat when in use, so they'll have to be on some heatsink, and you'll have to be very careful about not touching the heatink or the triacs because they'll be live (i suppose you could use a mica insulator between triac and heatsink, so heatsink won't be live, but even then I'd still be careful not to touch the heatsink or get my fingers near the triacs)
« Last Edit: July 11, 2020, 10:37:05 am by mariush »
 
The following users thanked this post: redgear

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Can someone help me review this schematic?
« Reply #33 on: July 11, 2020, 12:33:56 pm »
I don't understand the stuff about AC in your schematics.

Relays have two sides, one you connect to your microcontroller / uln2003a ... when 12v+/- something goes through the coil and energizes it the other side of the relay engages and the circuit is closed, connection is made and all that.  As long as that coil in energized, the connection is kept... unless you buy bi-stable relays which only need a pulse for let's say 100ms to permanently switch to one position.
Yes, I understand that.

Quote
See the ms paint picture i just made....
(Attachment Link)
You may want to look into TRIACs and optical isolators/triac drivers with zero crossing ... you just send signal to the triac driver (which is also optical isolator) and when the AC sinewave is near 0 or at 0, the driver turns on the triac and you get power to your device.
A well known usage is in soldering stations and hot air guns, where a microcontroller or analog circuit turns on the AC connected heating element using a triac and triac driver
See the schematic here : https://sc0ty.pl/2012/10/my-soldering-station/

He's using a MOC3041 triac driver, which is available in DIP package : https://www.digikey.com/products/en/isolators/optoisolators-triac-scr-output/904?quantity=0&ColumnSort=1000011&page=1&k=moc3041&pageSize=25

The triacs will dissipate some heat when in use, so they'll have to be on some heatsink, and you'll have to be very careful about not touching the heatink or the triacs because they'll be live (i suppose you could use a mica insulator between triac and heatsink, so heatsink won't be live, but even then I'd still be careful not to touch the heatsink or get my fingers near the triacs)

In my circuit, what I am trying to achieve is control the components using Arduino with the help of relays. The switch SW1 must be closed in order for the relays to be latched(on). Initially I thought of connecting the relay directly to ULN2003A/Arduino. But to be extra safe I routed the power for components through a switch, so even if the microcontroller fails, the components are switched off as soon as SW1 is open.

I made a stupid mistake in my schematic. I haven't powered the relay coils. I realized it only after I saw your Circuit Diagram. I will make the changes and post the updated schematic.
 
Once again, thank you so much.

Edit: Is it necessary to use need to use a TRAIC/opto coupler. Would a fuse between AC live and each component be enough?
« Last Edit: July 11, 2020, 01:17:25 pm by redgear »
 

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Can someone help me review this schematic?
« Reply #34 on: July 12, 2020, 10:18:56 am »
Here is am update. Thinking to replace the relay with a Triac+optocoupler. Read about both but I haven't decided on one yet.

1021812-0
 

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Can someone help me review this schematic?
« Reply #35 on: July 16, 2020, 11:32:35 am »
For extra fun, you may want to experiment with capacitive touch like you see on lots of devices .. see for example https://www.digikey.com/product-detail/en/microchip-technology/CAP1206-1-SL/CAP1206-1-SL-ND/5886099
whole category here:  https://www.digikey.com/products/en/integrated-circuits-ics/interface-sensor-capacitive-touch/560/page/2?k=capacitive%20touch&quantity=50&stock=1&ColumnSort=1000011&pkeyword=capacitive%20touch

For example

I am wanting to use this, but there isn't much info about this. Is it as simple as designing a PCB with the electrode area recommended in the datasheet, hookup the capacitor and connect the IC to a MCU?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf