Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Power Supply - Modifications

Status
Not open for further replies.
rect sine fourier.jpg


There is no fundamental after rectification.. WHen cap is added asymmetry adds even harmonics.
 
325Vdc from 230Vac.
That is why there must be a load.
The 0.68uF cap is much like a constant current source. (When the output voltage is low (like 12V)). In the first design; with a light load the voltage goes up and up. I have seen many designs where the voltage goes up until the capacitor is over voltage and leaks current. That is the regulation, the capacitor getting hot from too much voltage.

In post #11 D6 and D7 are 12V Zeners that keep the voltage from going too high when the relay is open.
_______new subject________
The 1k resistor on the base of the transistor is using more power the micro. I think this resistor should be 4.7k to 10K.
You could use a small MOSFET.
 
All rectifiers on AC double the fundamental frequency
Yes but the 0.68uF cap does not know there is rectification happening. The 0.68 sees 50 or 60hz. The 220uF cap does see 100 or 120hz.
Xc(f) for 0.68uF @100Hz =~2k2 ohms
No this cap is across the power line. It sees 50 or 60hz.
Red trace is 0.68uF current, 60hz. Green trace is 220uF current, 120hz.
upload_2015-11-1_16-56-8.png
 
Last edited:
Thanks Ron , I agree C1 is 50Hz

Ignoring Zener for now, I compute loop current of relay as follows.

Xc(f) for 0.68uF @ 50Hz ~ 4700 Ω, for C1, but when switched off 50% from diode it becomes 9400Ω .
The 30mA 12V relay coil is 400 Ω
The original schema 47Ωx2 = 94 Ω, R4,R5
Ztotal = 9900Ω ~10k, thus If= 230Vrms/10k= 23 mA which is margin for 30mA relay.

Changing C1 to 1uF , Xc(50Hz)@50%d.f.=6366Ω,
Ztotal=6860Ω, thus 230Vac/6860=33 mA
offline 30mA.png

https://www.falstad.com/circuit/cir...+9.765625e-55+1+-1 o+0+64+0+290+640+0.1+2+-1
 
Last edited:
I agree on several things you show.
Change the base resistor from 1k to 4.7k to 10k. You show 5.6k. (I think a MOSFET is better)
Change the resistor that feeds the 5.1V Zener. Probably the 1k eats too much current. I agree with the 4.7k. (depends on what is happening with the micro)

You like the 1uF cap and two diodes.
I think the 0.68uF cap and 4 diodes has less board space and less cost. (I did not look up the price)

Because of the cost of the high voltage cap, in one design I used a latching relay. The relay coil(s) were driven for only 10mS. This way we used a 0.15uF cap to run the micro and charge up a cap that stored enough energy to fire the relay. The relay could could only be turned on or off once/second but that was fine.

I am not worried about ripple voltage. The 4 diode version has lower ripple voltage.
 
4k7 *220uF has a 1 second time constant = 100 * 10ms charge interval , (1/f) for half wave rectifier.
Using this Zener current limit causes problems for C2 voltage when Relay is OFF

So my selection in #24 is flawed with 4k7.

Using the 1uF equivalent impedance to 4k7+Zener is insufficient to load series Cap the load ratio like a resistor divider,

C1 to 1uF
, Xc(50Hz)@50%d.f.=6366Ω, so C2 voltage blows up.
upload_2015-11-2_3-38-18.png
 
Ron, is that why you chose a 12V Zener bridge?
 
Ron, is that why you chose a 12V Zener bridge?
Yes.
In your case; make the diode sitting on ground a Zener. OR Put one across the 12V supply.
The DC model of the supply is a 320V DC supply and a 6k resistor charging the 220uF cap. The cap will charge up too much. The current needs a place to go so the cap will not over charge.

If you look at post #1. He did not have enough current to run the relay AND too much current for just the micro.
Now with the 1uF cap OR the 4 diodes there is power for the relay, but TOO much current for the micro. A Zener is a good way to limit the voltage.
 
agreed , I wonder if an inductive series element with an MOV is needed to protect it from power line transients up to 6kV (PLT)
I might add an MOV and 100uH choke in front to reduce the transient wave. with a bidirectional 350V MOV .
 
I wonder if an inductive series element with an MOV is needed to protect it from power line transients
Most circuits, like this, I have seen do not have protection.
The high voltage cap is made to sit on the power line. I have used millions of these and have not had troubles.
The 47 ohm resistor will be under stress with a lightening strike.
1) Use a carbon comp resistor. It will handle large voltages and currents.
2) Use a film resistor. It will open up like a fuse.
The power line spike will travel through the 220uF cap. The internal resistance and inductance of the cap will cause a very short spike in the 12 volts. The Zener diodes should take much of the current. The relay will be fine with a spike. The micro is protected by the RC and Zener on it's supply.
Most of these power supplies are in products that cost less than $5.00. (at the store) Adding any parts is a big problem.
I designed a LED night light and it was almost impossible to damage.

If cost was not a big problem I would add an small inductor in series with the 47 ohm resistor.
 
Hi thanks for the support.Got lots of design considerations.
I changed from half wave to full wave as ron mentioned.

Here is the one I am going to use.I need a compact design because i have a very limited space.

Please guide me.
 

Attachments

  • cappower.JPG
    cappower.JPG
    40.9 KB · Views: 169
Moved Zener from relay to 12V supply.
Added cap to +5.1V supply. (micro needs cap on supply)
upload_2015-11-2_21-28-53.png

How much current does the micro consume?
How much current does the temp censor consume?
For "Br1" is this one part or 4 diodes?
D3 1N4007 could be 1N4001,2,3,4,5,6 or 7. Or any small diode like 1N4148, 1N914.
C2 220uF 25V could be 16V because if there is a 12V Zener across the cap. This cap will be smaller.
 
Last edited:
Hi.

Its a TSOP1738 IR reciever.it takes 5mA. The PIC has TSOP reciever and a red LED.I think all together 15mA fine.

Br1 has 4 diodes built in.
 
@Suraj143

I would suggest wirewound R rated for reliability and impulse reduction from inductance, LC effect)

If you calculated original circuit, remember when switching components ( either PWM or half bridge), that the average impedance is 1/d.f. , in your case half wave rectifier doubles R and cuts C in half for impedance for average current, so you didn't have enough current. That is why (almost) doubling C1 or full wave both worked.


Also derate W rating and V rating at least 30%, pref 50%
... meaning , dont use a 0.25 W rated part for 0.2W load, use 1/2W for cooler operation.
 
Its a TSOP1738 IR reciever.it takes 5mA. The PIC has TSOP reciever and a red LED.I think all together 15mA fine.
TSOP1738: data sheet shows 100 ohm resistor on supply. Current is 0.6mA typical and 1.5mA max.
I don't know what micro you are using. This micro has a very simple job. Do not use the fast clock. Use 1mhz to save power. I will guess 1mA.
The R5 4.7k will use 1mA.
The total current is 3.5mA, when the relay is on. or 2.5mA when the relay is off. So useing the 1k resistor is good.
 
Which reminds me when I said, understand why you are wasting power in the Zener, one reason is to prevent overvoltage in the C1 charge pump into C2, when Relay is OFF.

Adding another Zener for 12V or a lower R5 like 470R when relay current (400 Ohms) is when off. If so choose, 50V 220uF cap normally rated for >=200mA ripple current and appropriate power passives.

For efficiency one doesn't need more than 20mA to hold the relay and 25V start voltage for the coil would quickly reduce as it closes. ( if you didn't have a 12V zener.) In which case the relay , really wont get hot or worn out, just act faster then reduce current to hold ON.
 
Hi,

It has been known for some time for these offline power supplies that a full wave bridge allows better "utilization" of the capacitor, due to the fact that twice as much power can be transferred with full wave compared to half wave. This means a capacitor half the size can be used if the design is moved to a full wave configuration from a previously half wave configuration.
I tried to explain this back in the 1990's to many people but sometimes they insist on using only two diodes anyway :)
The cost of the capacitor will normally outweigh the cost of two more diodes, and two more SMD diodes would not take up as much room as a bigger capacitor would.

There are various ways around the voltage pump up problem where the voltage goes up when the load is reduced. A second transistor and load resistor to turn on during down times for example. If the relay has an extra set of contacts, the second set may turn on a small load resistor to keep the Vcc line from going too high during times when the normal load is switched off.

There may be a simpler solution too, depending on the characteristics of the relay, taking into account the holding current of the relay coil which is usually much lower than the turn on current level. If the right balance can be found the relay can turn on with say Vcc=20vdc, then hold at Vcc=6vdc for example, so it may not matter if the Vcc supply falls as long as the uC gets the required voltage too and the ripple doesnt dip too low. Relays typically stay turned on when the supply voltage dips quite a bit because of this holding current property of most DC relays.
 
MrAl,
I thought about bring up your idea much earlier but the design requires more thinking.
Most relays will "hold" to 1/2 voltage, but I would not design a product like that with out much testing or getting a guarantee from the relay maker.
I think a 30mA relay would hold at 20mA and 9V reliably. But 15mA and 6V is too close to the edge.

Make the 0.68uF cap a little smaller so it delivers only 22mA. Let it charge up to 20V.
20V with a 220uF cap will close the relay. 20mA will hold the relay.
!!!!The micro must know that if the relay is turned off, there must be a delay of 75mS before the relay can be turned back on. (time for the supply to charge back up) AND At power up there must also be a delay for the relay supply to charge up. This may be too much thinking.

I have a fear that if the supply is allowed to drop to 9V or 6V the micro might turn on the relay not knowing there is not enough power to do the job. This is a very bad state. This condition could also happen at "power up". This condition will happen with a "brown out". (low line voltage)
 
Hi there Ron,

Well, although i do have to agree with you in part, i also have to wonder: if someone does not know how to program a 100ms delay in their code, how could they know how to program the more complicated things needed for a total project design :)
Programming delays was one of the first things i learned when i first started with the PIC line of chips. I made sure i could write code that would give me any delay i needed and that it would be as accurate as the crystal would allow. That's because i realized how important delays were in micro controller code for interfacing with the real world. To test myself, i programmed a bit banged RS232 interface so that the uC chip could talk to the PC computer serial port. So i guess it comes down to who is doing the hardware and the code :)
 
When designing a power supply it is good to design from 200vac (low line) to 240 or 250 high line. And to design for 50 and 60hz.
60hz increases the current by about 20%

Here is a very strange idea: We were trying to make a supply for 30mA for the relay plus 3.5mA for the micro and IR thing.
Size of the PCB is critical so I want to change the two bigger parts.

I changed things so power to the relay also flows through the micro. So 30mA is all that is needed not 33.5mA.
I changed the 0.68uF cap to 0.47uF to make it smaller.
At first I removed the 220uF cap and things worked BUT a spike on the power line killed the supply!
Then I made the 220uF cap only 22uf and placed a 18V Zener across it. (important)
I made C2 small (25V) and C3 larger (6.3V). R4 is the relay and its current goes through D3 to power the micro.
When the relay is to be off Q2 shorts it out. (no diode is needed)
Q1 is a 1mA current source. probably 0.5mA would work fine.
V2 is the micro.
upload_2015-11-4_15-43-27.png

At low line 50hz D4-18V Zener has not current.
At high line 60hZ D4 eats up the excess current.
In this case, the micro should be run at full speed to help eat up more current. In fact you could add more parts because there is 30mA at 5V that could be used up. R5 is the micro current of about 2.5mA.

This is a very strange design. The goal is to reduce the size of the 220uF cap.
upload_2015-11-4_15-56-4.png

RED trace is the output pin of the micro. (off---on at 150mS---off at 300mS) power goes off at 500mS
BLUE trace is the supply. (12V+5V) Ripple is fine.
GREEN trace is the 5V supply.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top