Searching \ for '[PIC]Fewest parts and lowest cost.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Fewest parts and lowest cost.'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]Fewest parts and lowest cost.'
2007\02\13@105614 by Recon

picon face
I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
It  needs to be low cost, fewest parts & safe for the pic.

Thank you in advance.
Recon



2007\02\13@110406 by PAUL James

picon face

Recon,

The fewest parts need are a PIC of any type.  Connect one leg of the AC
line to Vdd.  Connect the other AC line to Vss.  Plug it in, and if you
see a puff of smoke, and plastic bit being strewn about, the circuit is
hot.

Jim   :')
-----Original Message-----
From: spam_OUTpiclist-bouncesTakeThisOuTspammit.edu [.....piclist-bouncesKILLspamspam@spam@mit.edu] On Behalf
Of Recon
Sent: Tuesday, February 13, 2007 9:56 AM
To: Microcontroller discussion list - Public.
Subject: [PIC]Fewest parts and lowest cost.

I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
It  needs to be low cost, fewest parts & safe for the pic.

Thank you in advance.
Recon



2007\02\13@111153 by Gerhard Fiedler

picon face
Recon wrote:

> I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
> It  needs to be low cost, fewest parts & safe for the pic.

A few large resistors and a schottky diode to the positive supply? That
assumes the PIC's ground is on AC ground. If not, you need to specify...

Usually, a circuit isn't hot, it's a point (a wire) in a circuit, and it's
hot WRT a reference (usually neutral or safety ground).

Gerhard

2007\02\13@111432 by Bob Blick

face
flavicon
face
On Tue, 13 Feb 2007, Recon wrote:

> I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
> It  needs to be low cost, fewest parts & safe for the pic.

Getting a pic to "see" if a circuit is powered? Perhaps you could be a
little more specific. Can you attach electrically to this circuit? Are
your grounds common? What powers the pic? If you want a circuit designed
by the group, you need to give some clue as to the application.

Cheerful regards,

Bob

2007\02\13@111507 by Dario Greggio

face picon face
PAUL James wrote:

> The fewest parts need are a PIC of any type.  Connect one leg of the AC
> line to Vdd.  Connect the other AC line to Vss.  Plug it in, and if you
> see a puff of smoke, and plastic bit being strewn about, the circuit is
> hot.

LOL :-))

Seriously Recon, you should define "hot".
IMO, I'd use a 16F628 and a TC74.

--
Ciao, Dario

2007\02\13@121026 by Tony Smith

picon face
> Recon,
>  
> The fewest parts need are a PIC of any type.  Connect one leg
> of the AC line to Vdd.  Connect the other AC line to Vss.  
> Plug it in, and if you see a puff of smoke, and plastic bit
> being strewn about, the circuit is hot.
>
> Jim   :')>


Pfft.  I can test for hot WITHOUT a Pic.  Ok, not often, mind you...

Tony

2007\02\13@121441 by Bob Axtell

face picon face
Dario Greggio wrote:
> PAUL James wrote:
>
>  
>> The fewest parts need are a PIC of any type.  Connect one leg of the AC
>> line to Vdd.  Connect the other AC line to Vss.  Plug it in, and if you
>> see a puff of smoke, and plastic bit being strewn about, the circuit is
>> hot.
>>    
>
>  
I don't think he really means that...I think its a joke..

Use an opto isolator and drive the emitter side through a capacitor
(.033 @250vdc if 115VAC, 0.022 @ 450vdc
if 230VAC) thru the HOT side, while the optoisolator emitter GND is
connected to the AC low side. This makes the
PIC circuit free of direct AC power, which is not normally allowed  in
commercial designs.

When the AC peak is reached, the opto isolator output (connected to any
PORTB pin set to input, with internal pullup)
will go to ground occasionally. That GND signal means the AC is ON. The
signal will occur at approx 1/60 hz
(USA/CAN) or 1/50hz (EU, UK, JP). If it fails to go low within 50mS or
so, the AC is no longer present.

That's three parts. That still too many?   This is the way I would do it.

OT: This joke is similar to the ADVERTISEMENT I saw in Popular mechanics
that would reveal, for only $1, a surefire
way to kill roaches. I sent in my dollar, and I received two small
pieces of balsa wood. The attached instructions read:

"Place block A on a hard surface, like a table top.

Place roach on block A.

Rapidly strike black A with block B, from the top.

Remove dead roach from block A."

--Bob

2007\02\13@122108 by alan smith

picon face
So you detect that AC power is present..then what?  So assume you are talkling to some other device or turing on a LED or something....you can simply power the PIC from the AC line, or if its part of another circuit, then feed it with two high Megohm resistors (cheap but non-isolated) to a port pin and look for transistions..ie....signal is present.  
 
 Now there are other ways, if you have DC source as well.  Just use an opto, and drive that output into a PIC.  That would only be the opto, couple of resistors, and your there.  Safer than just inserting the AC right into the PIC, since you really need the return also attached to the PIC for its reference.
 
 
 
 Now, lets take this one step further.  Say I have a powered circuit, but I want to know if something is plugged into it and *drawing* power...ie....current is flowing.  Probably looking at very small amount of current at that, say a few mA like a wall wart or other small power supply.  I was thinking of using a hall sensor, keeps it isolated but needs 5V and the rest of the circuit is running on 3.3V.  And even at that, mA draw is a smallish, so I would need to have a gain stage before presenting to the PIC.  I'd like to do that  with the smallest amount of parts.


---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

2007\02\13@122600 by David VanHorn

picon face
On 2/13/07, PAUL James <James.PaulspamKILLspamcolibrys.com> wrote:
>
>
> Recon,
>
> The fewest parts need are a PIC of any type.  Connect one leg of the AC
> line to Vdd.  Connect the other AC line to Vss.  Plug it in, and if you
> see a puff of smoke, and plastic bit being strewn about, the circuit is
> hot.



But it would be faster with an AVR!  :)

2007\02\13@125217 by Bob Axtell

face picon face
David VanHorn wrote:
> On 2/13/07, PAUL James <.....James.PaulKILLspamspam.....colibrys.com> wrote:
>  
>> Recon,
>>
>> The fewest parts need are a PIC of any type.  Connect one leg of the AC
>> line to Vdd.  Connect the other AC line to Vss.  Plug it in, and if you
>> see a puff of smoke, and plastic bit being strewn about, the circuit is
>> hot.
>>    
>
>
>
> But it would be faster with an AVR!  :)
>  
Yes, AVRs blow up much faster than PICs. Sorry, Microchip, you can't be
good at everything.

<G> --Bob

2007\02\13@125732 by peter green

flavicon
face


> -----Original Message-----
> From: EraseMEpiclist-bouncesspam_OUTspamTakeThisOuTmit.edu [piclist-bouncesspamspam_OUTmit.edu]On Behalf
> Of Gerhard Fiedler
> Sent: 13 February 2007 16:11
> To: @spam@piclistKILLspamspammit.edu
> Subject: Re: [PIC]Fewest parts and lowest cost.
>
>
> Recon wrote:
>
> > I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
> > It  needs to be low cost, fewest parts & safe for the pic.
>
> A few large resistors and a schottky diode to the positive supply? That
> assumes the PIC's ground is on AC ground. If not, you need to specify...
won't you wan't diodes to both supplies to cut off both the positive and negative half cycles and leave a nice squareish wave which can then be detected by the pic?

a better soloution imo is to use an optocoupler, connect a suitable resistor in series with the optocoupler to limit the current to something the led in the optocoupler can handle and stick a suitable diode in inverse paralell with the optocoupler LED to prevent reverse breakdown.

then the output of your optocoupler is nicely isolated from the mains (make sure you buy an optocoupler with suitablly rated insulation between input and output) allowing your pics ground to be anywhere.


2007\02\13@131346 by Vasile Surducan

face picon face
On 2/13/07, Recon <KILLspam556reconKILLspamspamcharter.net> wrote:
> I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
> It  needs to be low cost, fewest parts & safe for the pic.

I will respond with a joke, which could be applicable.
Put the 220 hot wire bellow the belly of a PIC. Run an RTC software and ask Jinx
where is the table corespondence between the PIC package temperature
versus RTC timing variation. Voilla. The most complicated way.

Vasile

2007\02\13@132305 by Peiserma

flavicon
face
piclist-bounces@mit.edu wrote:
>   Now, lets take this one step further.  Say I have a powered
> circuit, but I want to know if something is plugged into it
> and *drawing* power...ie....current is flowing.  Probably
> looking at very small amount of current at that, say a few mA
> like a wall wart or other small power supply.  I was thinking
> of using a hall sensor, keeps it isolated but needs 5V and
> the rest of the circuit is running on 3.3V.  And even at
> that, mA draw is a smallish, so I would need to have a gain
> stage before presenting to the PIC.  I'd like to do that
> with the smallest amount of parts.

if fewest parts is the primary consideration, then a current transformer with a suitable turns-ratio and load resistor is the best I can think of. No need for a separate supply, either.

On the other hand, if the load to be measured plugs into your PIC circuit, then there may be other interesting solutions. Say the PIC uses a triac to power the load. You can then place an opto-isolated measuring circuit (consisting of resistors and a 4N3x) in parallel to the triac. Now you can do rudimentary fault monitoring. If the triac is supposed to be on, but the opto circuit is not detecting any voltage, then either there is no load connected or the triac is bad. You can also detect a shorted triac (load is supposed to be off, but the opto-circuit is giving you a signal). I hope that verbal description made sense.

2007\02\13@132915 by Carl Denk

flavicon
face
For both voltage and frequency of 120 VAC I have used a 9 VAC 50 ma
output wall wart, for the frequency it goes through a TIL157 Opto
coupler to a PLC input port that can handle 5VDC and measure the
frequency. For  the voltage it goes through  a bridge rectifier,
resistor voltage divider and one of the PLC ADC inputs that is 5VDC max.
like the PIC. There are a few resistors and capacitors scattered around
for current and voltage ranges.

RemoveMEpeisermaTakeThisOuTspamridgid.com wrote:
{Quote hidden}

2007\02\13@142506 by John Chung

picon face
if you can live with detecting half a cycle use
a diode and a high value resistor.

John


--- Recon <TakeThisOuT556reconEraseMEspamspam_OUTcharter.net> wrote:

> I want to use a PIC to sense to see if  a 110 220
> VAC circuit is HOT.
> It  needs to be low cost, fewest parts & safe for
> the pic.
>
> Thank you in advance.
> Recon
>
>
>
> --

2007\02\13@153302 by Dwayne Reid

flavicon
face
At 08:56 AM 2/13/2007, Recon wrote:
>I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
>It  needs to be low cost, fewest parts & safe for the pic.

What is the application?

Is this being used as a stand-alone device used only to sense that a
wire is live (something like the Fluke Volt-tick (I *think* that's
its name)?  In other words, a hand-held probe that would sense the
electric field of a live AC wire?

If so, a PIC is probably not a good choice.  Too much leakage on the port pins.

However, if you need to sense the presence of an AC supply, that's easy.

First: is the PIC powered from that supply?  In other words, does the
PIC and that supply share a common ground?

Or: do you need to sense that voltage across an isolation barrier of some sort?

Give us some more information and we should be able to help.

dwayne

--
Dwayne Reid   <RemoveMEdwaynerspamTakeThisOuTplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 22 years of Engineering Innovation (1984 - 2006)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

2007\02\13@154006 by Dwayne Reid

flavicon
face
At 10:15 AM 2/13/2007, Bob Axtell wrote:

>Use an opto isolator and drive the emitter side through a capacitor
>(.033 @250vdc if 115VAC, 0.022 @ 450vdc
>if 230VAC) thru the HOT side, while the optoisolator emitter GND is
>connected to the AC low side.

Bob - need at least 2 other components:

1) a reverse-connected diode across the opto LED.  2 reasons:
excessive reverse voltage across the LED destroys it and (2) if the
LED *DID* have a sufficiently high reverse breakdown voltage, the
capacitor would charge up and that's it - doesn't work anymore.  Got
to have bidirectional current flow for this to work.

2) need a surge-limiting resistor in series with the capacitor.  470R
or 1K (based upon the size of your capacitors) should be OK.

dwayne


--
Dwayne Reid   <dwaynerEraseMEspam.....planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 22 years of Engineering Innovation (1984 - 2006)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

2007\02\13@154742 by Dwayne Reid

flavicon
face
At 10:56 AM 2/13/2007, peter green wrote:

>a better soloution imo is to use an optocoupler, connect a suitable
>resistor in series with the optocoupler to limit the current to
>something the led in the optocoupler can handle and stick a suitable
>diode in inverse paralell with the optocoupler LED to prevent
>reverse breakdown.

Peter - if you were using a resistor to limit the current, you would
be better off putting the diode in series with the resistor rather
than across the opto LED.  The LED needs to see current in only one
direction.  By putting the resistor in series with the diode, you
have reduced the power consumption by half.  This allows a smaller resistor.

That said - I don't think that a resistor-based approach is 'best',
especially if sensing 220 VAC.  Too much dissipation in the resistor.

dwayne

--
Dwayne Reid   <EraseMEdwaynerspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 22 years of Engineering Innovation (1984 - 2006)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

2007\02\13@161914 by Jinx

face picon face

> I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
> It  needs to be low cost, fewest parts & safe for the pic.

http://home.clear.net.nz/pages/joecolquitt/zc-detect-opto.gif

Remove one opto -> 20ms pulses

2007\02\13@170843 by Steve Smith

flavicon
face
No pic

220k and a neon             neon o its hot..............

Steve..

-----Original Message-----
From: RemoveMEpiclist-bouncesEraseMEspamEraseMEmit.edu [RemoveMEpiclist-bouncesspam_OUTspamKILLspammit.edu] On Behalf Of
PAUL James
Sent: 13 February 2007 16:04
To: Microcontroller discussion list - Public.
Subject: RE: [PIC]Fewest parts and lowest cost.


Recon,

The fewest parts need are a PIC of any type.  Connect one leg of the AC
line to Vdd.  Connect the other AC line to Vss.  Plug it in, and if you
see a puff of smoke, and plastic bit being strewn about, the circuit is
hot.

Jim   :')
-----Original Message-----
From: RemoveMEpiclist-bouncesTakeThisOuTspamspammit.edu [EraseMEpiclist-bouncesspamspamspamBeGonemit.edu] On Behalf
Of Recon
Sent: Tuesday, February 13, 2007 9:56 AM
To: Microcontroller discussion list - Public.
Subject: [PIC]Fewest parts and lowest cost.

I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
It  needs to be low cost, fewest parts & safe for the pic.

Thank you in advance.
Recon



2007\02\13@195121 by jtroxas

picon face
wont a relay be a better option...

"Dwayne Reid" <RemoveMEdwaynerKILLspamspamplanet.eon.net> wrote in message
news:20070213204740.34VH3HNBQQSTOPspamspamspam_OUTpriv-edtnaa05.telusplanet.net...> {Quote hidden}

> --

2007\02\13@203059 by Jinx

face picon face
> 220k and a neon             neon on if its hot..............

Add an LDR or similar for detection by a micro

2007\02\13@203634 by Jinx

face picon face


> wont a relay be a better option...

A relay is likely to cost way more than an opto-coupler. Plus
you can make your own opto if you had to / wanted to out of
a "canned" (eg TO18) transistor by taking the top off it. Not a
production solution, but handy nevertheless, especially if you've
got old what-am-I-going-do-with-these boards with that sort
of transistor on them

2007\02\13@211707 by Vitaliy

flavicon
face
Dwayne Reid wrote:
> Peter - if you were using a resistor to limit the current, you would
> be better off putting the diode in series with the resistor rather
> than across the opto LED.  The LED needs to see current in only one
> direction.  By putting the resistor in series with the diode, you
> have reduced the power consumption by half.  This allows a smaller
> resistor.
>
> That said - I don't think that a resistor-based approach is 'best',
> especially if sensing 220 VAC.  Too much dissipation in the resistor.

Why not use a small cap in place of the resistor? Zero power dissipation.

Vitaliy

2007\02\13@220835 by jtroxas

picon face
Is the OP talking about household current... here is about 30Amps at
220volts.. What type of resistor are we talking here?...

regards...

"Jinx" <KILLspamjoecolquittspamBeGonespamclear.net.nz> wrote in message
news:01b201c74fd8$7e23bcb0$0100a8c0@ivp2000...
{Quote hidden}

> --

2007\02\13@233323 by Vasile Surducan

face picon face
On 2/13/07, Recon <EraseME556reconspamEraseMEcharter.net> wrote:
> I want to use a PIC to sense to see if  a 110 220 VAC circuit is HOT.
> It  needs to be low cost, fewest parts & safe for the pic.

Now more serious. If for you HOT means phase and COLD menas neutral,
then you must be English. What is "front end" then ?

If you may talk with an experienced electrician, you'll find such
devices are 90% useless in the real life, just because are sinking
zero current.
What is happening if your null fuse is broken and you have a vacuum
cleaner plugged? On your main fuse you'll see HOT on both phase and
neutral fuse sockets....

Now, connect all PIC IO pins except the MCLR, VDD and VSS pins
toghether and to the 220V phase. Connect Vdd and VSS toghether to a
1W/220V or 125V Edison bulb (you know who was Edison, right?) Keep
MCLR not connected. The other end of the bulb must be connected to the
Earth protective ground. Hurray, you have the best sensing lamp and it
has PIC !

And the best thing: this pic must not be programmed and will work !
And in the future when you'll understand I had right, you may take the
PIC and use it for something usefull. Like hunting crows with it.
:)
greetings,
Vasile


>
> Thank you in advance.
> Recon
>
>
>
> -

2007\02\13@234812 by Jinx

face picon face

> Is the OP talking about household current... here is about 30Amps
> at 220volts.. What type of resistor are we talking here?...

The circuit I posted

http://home.clear.net.nz/pages/joecolquitt/zc-detect-opto.gif

has 100k 1W. This higher than might be expected from calculated
but it works fine. It's been in use for zero-crossing detection for a
long time. The other option would be an X2 capacitor, 0.33uf
would pass 25mA. Depends on the efficiency of the opto's LED
and CTR what current you'd actually need. As above, mine puts
out perfectly detectable pulses into INT0 with low input current
on the mains side


2007\02\13@235010 by Jinx

face picon face
> I will respond with a joke, which could be applicable.
> Put the 220 hot wire bellow the belly of a PIC. Run an RTC
> software and ask Jinx where is the table corespondence
> between the PIC package temperature versus RTC timing
> variation. Voilla. The most complicated way.
>
> Vasile

Haha, now that's thinking outside the square. Just like a
flow meter eh ?

2007\02\14@114444 by Bob Axtell

face picon face
Dwayne Reid wrote:
{Quote hidden}

Yes, you are right. .022/.033 are poorly reactive at 60hz, but a surge
might occur.
A diode reverse-connected would kill the reverse voltages, too.

--Bob

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...