CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Simple circuit 240v AC to power PIC
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
aphpic



Joined: 01 Sep 2004
Posts: 3
Location: Basingstoke UK

View user's profile Send private message

Simple circuit 240v AC to power PIC
PostPosted: Mon Jan 10, 2005 9:19 am     Reply with quote

Dear group

Some while ago I read about a simple circuit that used a couple of diodes and resisters to tap off mains AC (it may have been 120 volts) to 5 volts DC, to power a PIC. It wasn’t the original posted question but I have tried searching without luck (one link was the Microchip site but searching there got me nowhere). Does this ‘ring any bells’ with anyone?

Thanks in advance.
Ttelmah
Guest







Re: Simple circuit 240v AC to power PIC
PostPosted: Mon Jan 10, 2005 10:15 am     Reply with quote

aphpic wrote:
Dear group

Some while ago I read about a simple circuit that used a couple of diodes and resisters to tap off mains AC (it may have been 120 volts) to 5 volts DC, to power a PIC. It wasn’t the original posted question but I have tried searching without luck (one link was the Microchip site but searching there got me nowhere). Does this ‘ring any bells’ with anyone?

Thanks in advance.

This is a 'can of worms'. You can build a simple potential divider, add a diode to rectify the voltage, and a capacitor to smooth it, and _for a fixed load_, you have a reasonable voltage. However there are a huge number of 'caveats'. If the incoming voltage changes, so will the output. If the output load changes, so will the voltage. The circuit provides no isolation, so is potentially lethal. For a given output power, about 20* this, has to be dissipated in the dropper resistors.
You can cure the first two problems by adding a zener. There are also a number of IC's designed for powering devices like triac dimmers, that have 90% of the parts in one package, and provide better regulation (Harris used to do one). Some of these also cure the third problem, by using a switching FET, instead of the discrete resistors (look at the 'VIPer12A', for an example of such a circuit.
However if you have to ask the question of how to do this, I'd say _use an isolated supply_. The safety this gives, both to 'life and limb', and to the parts involved (as soon as you connect to an external component, you have to consider how this is going to affect the processor inputs/outputs), is almost incalculable. There are dozens of 'monoblock' supplies on the market, some as small as a matchbox, containing complete transformers and regulation, that these provide the easiest way to power a PIC.

Best Wishes
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Jan 10, 2005 11:57 am     Reply with quote

Microchip has several good application notes on transformerless power supplies: AN954 Transformerless Power Supplies: Resistive and Capacitive discusses the advantages and disadvantages of both approaches.
TB008 Transformerless Power Supply discusses a capacitive approach.

Please Note that all these circuits can only deliver a small current (10mA max @ 5V) and because they are connected directly to the mains they are very dangerous. Only use these kind of circuits when cost and size are extremely critical and no part of the circuit can be touched by the user.

I agree with Ttelmah and recommend to use a transformer based circuit whenever possible.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Mon Jan 10, 2005 12:24 pm     Reply with quote

Not too long ago I took my coffee maker apart to see what its supply looked like. This is a 120V 60Hz North American unit.

Not too sure what the secret to posting a picture is.... I have a .pdf of the schematic. Email me if you want it.
aphpic



Joined: 01 Sep 2004
Posts: 3
Location: Basingstoke UK

View user's profile Send private message

Thank you
PostPosted: Mon Jan 10, 2005 1:27 pm     Reply with quote

Thank you for the information, I now have some reading and thinking to do. The 2 Microchip docs are what I saw before.
BitHead
Guest







Yes indeed!
PostPosted: Wed May 10, 2006 7:32 pm     Reply with quote

It is absolutely possible it run a PIC on direct 240V ac @ 900amps.
Diodes, resistors and capacitors are not need as they can be simulated
in software. In fact, most of you hardware people don't know
anything can be substituted software. I've managed to make a PIC10f220
do 470GIPS (470 giga instructions per second). An intel xenon can't come close to that performance.
Perpetual motion and over unity efficiency is perfectly possible in software.
Guest








PostPosted: Thu May 11, 2006 4:54 am     Reply with quote

Quote:

It is absolutely possible it run a PIC on direct 240V ac @ 900amps.


may be too much beer ?
Guest








PostPosted: Thu May 11, 2006 4:56 am     Reply with quote

Quote:

It is absolutely possible it run a PIC on direct 240V ac @ 900amps.


...may be too much beer ? Shocked
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu May 11, 2006 8:32 am     Reply with quote

BitHead is going to get someone killed.
Page 1 of spec say all instructions are 1uS except branch
1uS/inst. thus 1,000,000 inst/sec max. not 470E9inst/sec
http://ww1.microchip.com/downloads/en/DeviceDoc/41270B.pdf
is this a form of sarcasm that I am not getting?


Last edited by treitmey on Thu May 11, 2006 8:53 am; edited 5 times in total
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Thu May 11, 2006 8:42 am     Reply with quote

Quote:
It is absolutely possible it run a PIC on direct 240V ac @ 900amps.


I've done something similar to that a few times. The only problem is that I've not quite figured out how to keep the magic smoke from escaping after about 3 micro-seconds after power is applied. He must have perfected that procedure.

Ronald
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu May 11, 2006 8:57 am     Reply with quote

Quote:

I've managed to make a PIC10f220
do 470GIPS (470 giga instructions per second). An intel xenon can't come close to that performance.


I've managed to make an LM555 to run at 475 THerz (475 Tera Hertz)
After BitHead explains to us how it did it, I will explain yours how I obtained it. Mr. Green
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

View user's profile Send private message Send e-mail

PostPosted: Thu May 11, 2006 3:43 pm     Reply with quote

I dont think you can push 900 amps into any micro however that being said, look at
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011202
it is a dimmer circuit from microchip showing you a micro powered directly from the 240V supply.

Andrew
_________________
What has been learnt if you make the same mistake? Wink
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu May 11, 2006 4:01 pm     Reply with quote

The first sentence says that this is run through a current limiting resistor.
That makes all the difference.
**I like the note on the schematic..Danger Electrocution Hazard Smile


Last edited by treitmey on Thu May 11, 2006 4:45 pm; edited 1 time in total
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Thu May 11, 2006 4:25 pm     Reply with quote

I just had a thought. Hmmm, haven't had one of those in a while. Wink

If you were to completely encapsulate the circuit the magic smoke might be able to be contained and keep stray electrons from jumping around that could cause those nasty electrocutions.

Ronald
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu May 11, 2006 6:07 pm     Reply with quote

**I like the note on the schematic..Danger Electrocution Hazard

Quote:

haven't had one of those in a while


Ronald you would know, usually you can read this warning in the backing of an electric chair...
I like the encapsulation theory. Idea

Humberto
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group