220VAC Detecting by PIC18FXX

MikeML

Joined Oct 2, 2009
5,444
Correction:

I just noticed that in the sims, V1 was incorrectly modeled. To correctly reflect a 220VacRMS power source, the voltage specification for V1 should be replaced with {1.414*220}

I rechecked the power dissipation in R1 and R2, and 1W is ok...
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
@MikeML
How about this diagram. I plan to use standard 3mm green led on the PCB. Would the circuit suffice.
I do not use ur simulation software, but LT seems better. Can you simulate my circuit when you get the time.
 

Attachments

Dodgydave

Joined Jun 22, 2012
11,285
Its a transformerless psu,!!

i would use a capacitor to drop the mains like the circuit in my pm, resistors get warm dropping too much voltage.
 

MikeML

Joined Oct 2, 2009
5,444
Its a transformerless psu,!!

i would use a capacitor to drop the mains like the circuit in my pm, resistors get warm dropping too much voltage.
The resistors dissipate ~1/2W each. A mini-transformer would dissipate >1W. A relay about 2W.

You have to be real careful with using capacitors as a non-dissipative series impedance. Any voltage spikes on the AC line comes sailing through the capacitor and blows up the LED. You also have to provide a bleeder resistor to discharge the capacitor, else you can leave a lethal charge in the capacitor...
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
So here is my final version.
All components are just lying around here and there. Quite easy to repair. Output is clean and fast but slow enough for power glitches.

I will bread board this and scope the output and will post 'em results
 

Attachments

cmartinez

Joined Jan 17, 2007
8,220
I see you opted for a full wave rectifier. I'm not fond of half waves either... it's part of my impractical, perfectionist side, I guess.
 

MikeML

Joined Oct 2, 2009
5,444
I see you opted for a full wave rectifier. I'm not fond of half waves either... it's part of my impractical, perfectionist side, I guess.
I was going to as ask about that. For this circuit, it is a mistake, as was adding the 100uF across its output. All it does, is make a lot more heat in the series resistors...
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Circuit revised after breadboarding.
Managed to blow two LEDs, hence R37 is added.
The Power resistors are doubled since using just two they feel warm to the touch. Since they will be powered 24/7 I do not like to feel them warm. Now cool to the touch.
The Led goes off as soon as switched off and comes on almost instantly. :D

Tomorrow I will add the schmitt and scope the output to finalize the circuit.
 

Attachments

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
I know, I need the cap to smooth out the ripple u know . But I will confirm after scoping whether the cap is needed or not.
 
Top