Thanks! You guys have been a great help.=20 With the full-wave rectifier I just couldn't see how the grounds of the = AC and logic was going to be common, but with a half-wave rectifier I now understand. Using an opto-coupler with full-wave rectification I would not have to = worry about this of course, since that basicaly isolates the AC on the one = side of the opto-coupler from the logic supply on the other side, right? One more question about the circuit below, what would a suitable value = be for the resistor between the rectifier diode and GND? _____ =20 Andr=E9 Miller =09 -----Original Message----- From: pic microcontroller discussion list = [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Spehro Pefhany Sent: 15 March 2004 10:08 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [EE:] Switching 24V AC inductive load with PIC, coupling & protection? At 11:38 AM 3/15/2004 -0700, you wrote: >At 08:34 AM 3/15/2004, Andre Miller wrote: >>Thanks for the circuit diagram! >> >>I still have one question though, how do I connect the AC supply and=20 >>the 5V DC supply together? >> >>Say I have a 24V transformer, which will drive the load, and I rectify = >>/ regulate this to drive the PIC. Where is 'ground' in this case for=20 >>the rectified/regulated supply and where is ground for the two AC=20 >>wires coming out of the transformer? And do I just connect these two grounds together? >> >>Sorry if you've answered this already. (And apologies about my poor=20 >>ASCII art!). Are there any connections missing from the below=20 >>schematic? And would it work like that? I know the supply is missing = some filter/smoothing caps. >> >> 7805 >> A K ,----------. >>-------)-+----------|>|---+----|IN G OUT|------ +5V to PIC >> 24V AC } CAP `----+-----' >>-------)------+-----------+---------+------------ GND to PIC >> | | 470 uF 50V >> | | ____ >> | | ------------|____|-------------- Trigger from PIC >> | _|_/ Rg >> | V_A >> | | >> C| | >>Solonoid C| | >> C| | >> | | >> +----+ > >Easy - don't use a bridge rectifier. Use a single diode as a half-wave = >rectifier. Look at it this way: the PIC and its associated circuitry=20 >does not consume much current (5 - 20 mA). You can tolerate a lot of=20 >ripple going into the regulator with no problems. You just double the capacitor value and you'll have the same ripple as = with a FW bridge rectifier. Here's what I think Dwayne is talking about. Of course if you had an opto-isolator you could use the bridge. You should not use the 7805 in the above circuit, BTW, it's far too = tight on maximum input voltage. +----------------------------+ | Vdd | | | | | | | o-+ +----------+----+-------+ --+ | + 5.1| | _|_/ | --- 470uF - / --- V_A .-. 24VAC --- 50v / ^ --- | | | |- ___ | | 0.1uF | | | Rg o---|<-+---|___|--+----+ | '-' | 1N4004 =3D=3D=3D | | C| GND | o C| | To PIC C| | or collector | | +------------------------------+ >Most of my 24 Vac stuff doesn't even use an IC regulator - just a=20 >simple series resistor / zener shunt regulator. I'm just doing one with a tiny ~1MHz buck regulator. But it needs a few watts, not just 100mW. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: = http://www.trexon.com Embedded software/hardware/analog Info for designers: = http://www.speff.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body