Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« on: February 18, 2018, 08:26:19 20:26 » |
|
The picture below is what I've copied well reversed engineered from a CE product, It from a PIR sensor for light switch using a 24V relay to switch the mains on/off. Then the 5V side just runs the controller circuit, R1 looks like a 2W resistor, R2&3 are SMD resistors, ZD1&2 are 24V zener diodes, C12 should be 100Uf, I've not added the filter/decoupling caps from the input and output side. I'm after something like this to run an NRF24L01, Arduino mini from the 5V or even the 3V version save using a 3.3V regulator and the same 24V relay to help reduce the current from the supply. I need to make the unit as small as posslibe on footprint, I understand about the EMC and gaps for the tracks on PCB.
I was wondering and looking for input on how good this is or better or safer way of doing it ?
thanks
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
|
Sideshow Bob
Cracking Team
Hero Member
Offline
Posts: 1002
Thank You
-Given: 231
-Receive: 983
|
|
« Reply #2 on: February 19, 2018, 08:33:35 08:33 » |
|
I remember Microchip had some white papers about transformerless power supplies ww1.microchip.com/downloads/en/AppNotes/00954A.pdf Also this is quite good www.designercircuits.com/DesignNote1b.pdfPS. If you go for capacitive transformerless AC supply remember to use a X rated capacitor. Also The DesignNote1b.pdf warns about errors in AN954 (revision A) Se page 4 DesignNote1b.pdf
|
|
|
Logged
|
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
|
|
|
udhay_cit
Newbie
Offline
Posts: 25
Thank You
-Given: 13
-Receive: 26
|
|
« Reply #3 on: February 19, 2018, 10:53:44 10:53 » |
|
Not very much differ from regular transformerless fullwave rectifier circuit. But here we are replacing two diodes of bridge rectifier with two zener diodes. So we can get better and smoother waveform compare to the regular halfwave rectifier circuit.
For safety, we can use this circuit only for closed enclosure designs or 3 pin power socket designs. If Line & nutral wires are interchanged, it is not advisable to touch the DC supply ground point.
I've attached the LtSpice simulation here.
|
|
|
Logged
|
|
|
|
pickit2
Moderator
Hero Member
Online
Posts: 4667
Thank You
-Given: 834
-Receive: 4321
There is no evidence that I muted SoNsIvRi
|
|
« Reply #4 on: February 19, 2018, 12:57:56 12:57 » |
|
As the original was an enclosed PIR switch and the external contact is vis a relay, then that is ok. it's when they start making phone & tablet chargers the problem bites you, and that is with switch mode power.
|
|
|
Logged
|
Note: I stoped Muteing bad members OK I now put thier account in sleep mode
|
|
|
Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« Reply #5 on: February 19, 2018, 01:38:27 13:38 » |
|
Thanks guys, how would I work out the max current that this can supply ?
I’ve not worked on this stuff like this and it’s all new learning curve for me
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
titi
Active Member
Offline
Posts: 230
Thank You
-Given: 3802
-Receive: 834
|
|
« Reply #6 on: February 19, 2018, 06:13:31 18:13 » |
|
Hi Wizpic,
To calculate how much current you could obtain, you need to calculate the reactance of C13 (equivalent resistance in alternative).
A formula give the reactance of the capacitor xc=1/C13*2*Pi*frequency.
I assume that the frequency is 50Hz so xc=1/(0.39E-6*2*3.1415*50)=8162 Ohms. (C13 in Farad, xc in Ohms)
Like R1 is in series, REquiv=xc+R1=8312 Ohms.
The voltage drop in Requiv is Vin-Vout=240v-24v=216v.
The Current is U/REquiv so 216/8162=0.025986423 A so 26mA.
Example : For C13=1uF current=65mA, C13=4.7uF current=261mA.
Best regards.
|
|
|
Logged
|
|
|
|
solutions
Hero Member
Offline
Posts: 1826
Thank You
-Given: 656
-Receive: 904
|
|
« Reply #7 on: February 20, 2018, 11:22:28 11:22 » |
|
Pretty close.
C12 should charge to peak voltage, vs the RMS you used in your calcs, right?
I believe you also have to subtract out the current being shunted by DZ2 (and by the 24V load if you are looking for the 5V current), since it looks like it is being used as a 24V (plus a diode drop) regulator vs merely a clamp.
|
|
|
Logged
|
|
|
|
udhay_cit
Newbie
Offline
Posts: 25
Thank You
-Given: 13
-Receive: 26
|
|
« Reply #8 on: February 20, 2018, 11:27:55 11:27 » |
|
titi, The power rating what you have mentioned with the calculation is not the power delivering capacity of the circuit. This is no load power consumption of the circuit. As per the Wizpic circuit, the circuit will consume 25.9mA (because of the zener in shunt) no load current, but I really don't know how to calculate the maximum current driving capacity of this circuit. I've experience to use this circuit with 100Ω/2W & 0.47µF/400V film capacitor will provide nearly 100mA (LED lamp) power.
Till now you can see lot of Chinese LED lamp products come with this circuit to drive 5-6 numbers of 0.25W LED.
Wizpic, if you need more reliable and can spend some extra money, you can go for non isolated buck converter. I've attached an example circuit. But its worth to try the capacitor power supply with veroboard so you can practically experience the circuit.
|
|
|
Logged
|
|
|
|
Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« Reply #9 on: February 20, 2018, 06:05:30 18:05 » |
|
Thanks guys for your inputs,it has given me the info I need and some good information I only need to run an NRF24L01 and Arduino and relay the Arduino is bare minimum to run to help reduce current
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
metal
Global Moderator
Hero Member
Offline
Posts: 2420
Thank You
-Given: 862
-Receive: 678
Top Topic Starter
|
|
« Reply #10 on: February 21, 2018, 09:35:59 21:35 » |
|
wizpic, u'r expert 'n wise enough to be aware that running directly from mains is not recommended.
|
|
|
Logged
|
|
|
|
Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« Reply #11 on: February 21, 2018, 10:16:47 22:16 » |
|
I know how dangerous it is but I reversed engineered it from a commercial product and used to control all the toilet/ office lights at work, this is where I got the idea from. This would be fully enclosed mounted within the light fitting or socket so no wires connections will be exposed or accessible. The project I'm playing with is Alexa to control all my lights and stuff around my home rather than using lots of Esp8266 I use one and then send the commands over the NRF24L01 network each node as its own code I can add upto 14 devices in one unit plus this saves running wires everywhere. I have 4 nodes working at the moment and it's all working great, this also is the reason I need to make it as small as possible to enclose it in the light fittings. The worse that can happen if it fails then it just will destroy the Arduino stuf 😬
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
Parmin
Hero Member
Offline
Posts: 582
Thank You
-Given: 496
-Receive: 133
Very Wise (and grouchy) Old Man
|
|
« Reply #12 on: February 21, 2018, 10:38:33 22:38 » |
|
I have problem getting NRF24L01 to work reliably directly from mains with similar transformerless supply, perhaps the filtering is not clean enough and stray frequency goes into the oscillator. I like to know more as well.
|
|
|
Logged
|
If I have said something that offends you, please let me know, so I can say it again later.
|
|
|
Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« Reply #13 on: February 22, 2018, 06:36:10 06:36 » |
|
Over the next few days I will be trying this type of power supply as at the moment it's been runn off some little dev boards and trying it in real time power supply. Will let you know how it goes if I can get it to work as I did think about if it would work or not
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
Sideshow Bob
Cracking Team
Hero Member
Offline
Posts: 1002
Thank You
-Given: 231
-Receive: 983
|
|
« Reply #14 on: February 22, 2018, 08:02:08 08:02 » |
|
I have problem getting NRF24L01 to work reliably directly from mains with similar transformerless supply, perhaps the filtering is not clean enough and stray frequency goes into the oscillator. I like to know more as well.
You may take a look here. http://www.ijmer.com/papers/Vol3_Issue1/DQ31551563.pdf Some analysis are done on the capacetive variant versus a supply using transformer. I think some of the problem is that many transformerless power supplies are made with a bare minimum or less regarding the specs. Hence the functionality is what it is
|
|
|
Logged
|
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
|
|
|
solutions
Hero Member
Offline
Posts: 1826
Thank You
-Given: 656
-Receive: 904
|
|
« Reply #15 on: February 22, 2018, 09:54:12 09:54 » |
|
This would be fully enclosed mounted within the light fitting or socket so no wires connections will be exposed or accessible.
Most lighting in The Greatest Country in the World*, despite being in metal non-exposed, non-accessible, "fittings", has no earth wire. If you don't have an earthed enclosure, I would not even consider a non-isolated supply. There are some really cheap flyback designs these days...probably costs, in total, about the same as that film cap you're going to use. *run by elected idiots & thieves
|
|
|
Logged
|
|
|
|
Sideshow Bob
Cracking Team
Hero Member
Offline
Posts: 1002
Thank You
-Given: 231
-Receive: 983
|
|
« Reply #16 on: February 22, 2018, 11:00:36 11:00 » |
|
I know how dangerous it is but I reversed engineered it from a commercial product and used to control all the toilet/ office lights at work, this is where I got the idea from. This would be fully enclosed mounted within the light fitting or socket so no wires connections will be exposed or accessible. The project I'm playing with is Alexa to control all my lights and stuff around my home rather than using lots of Esp8266 I use one and then send the commands over the NRF24L01 network each node as its own code I can add upto 14 devices in one unit plus this saves running wires everywhere. I have 4 nodes working at the moment and it's all working great, this also is the reason I need to make it as small as possible to enclose it in the light fittings. The worse that can happen if it fails then it just will destroy the Arduino stuf 😬
I would be careful to use any homebrew stuff connected to the mains for "permanent" unattended 24/7 operation. If anything happens you will be in deep shit with the insurance company and or the authorities. I am not saying anything will happen at all or that you are a bad or careless designer. It is just if anything goes wrong the consequences may be severe.
|
|
|
Logged
|
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
|
|
|
DTiziano
Active Member
Offline
Posts: 104
Thank You
-Given: 41
-Receive: 168
|
|
« Reply #17 on: February 22, 2018, 03:42:58 15:42 » |
|
Hi
I do not like this solution. Be very careful not to exchange phase and neutral. Any way, if the neutral get few volts from ground, the ZD1/C12/IC3 will be loaded/overloaded/destroyed. The load current goes to ground, if any Residual current device (protections) is installed, this circuit may trigger it.
Regards
|
|
|
Logged
|
|
|
|
Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« Reply #18 on: February 22, 2018, 07:05:09 19:05 » |
|
After getting information and feed back from you guys and searching some more I think I will look for alternative method, the current draw is not massive. Is there ones that are safe and isolated with transformer, something like and iPhone charger ? Ideally small as possible price not a real matter as long as it is safe
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« Reply #19 on: February 22, 2018, 11:29:41 23:29 » |
|
Would something like this do the job or simular ? https://uk.rs-online.com/web/p/led-drivers/8813970/It’s a bit bigger than I’d like but better to be safe than sorry
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
metal
Global Moderator
Hero Member
Offline
Posts: 2420
Thank You
-Given: 862
-Receive: 678
Top Topic Starter
|
|
« Reply #20 on: February 22, 2018, 11:44:13 23:44 » |
|
If you can wind your own transformers :- ) Otherwise, stick to transformerless PSUs, LED drivers: look at http://uk.farnell.com/c/led-lighting-components/led-driver-ics/ac-dc-led-driver-ics, there are ICs that withstand voltages of the mains.. Posted on: February 23, 2018, 02:43:48 02:43 - Automerged
we posted at the same time
|
|
|
Logged
|
|
|
|
|
|
weetit
Newbie
Offline
Posts: 17
Thank You
-Given: 18
-Receive: 9
|
|
« Reply #23 on: February 23, 2018, 04:36:38 04:36 » |
|
I think the circuit look fine but 24 to 5 volt with linear power supply is too much. Depend on your current out. But only 19 volt Vdrop and few hundred mA may make the LD1117 very hot.
|
|
|
Logged
|
|
|
|
Wizpic
Global Moderator
Hero Member
Offline
Posts: 1203
Thank You
-Given: 553
-Receive: 409
|
|
« Reply #24 on: February 23, 2018, 06:25:59 06:25 » |
|
I think I posted the wrong link 😬, I’m not after and led driver a small PSU, Top I did see them but never thought about farnell as those or simular where out of stock in RS might look into those but a little bit big for my application, with 3.3v version I could get the 3v pro mini with 3v relay then. Still pondering and looking into it
Thanks all for the input
|
|
|
Logged
|
When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
|
|
|
|