Searching \ for '[PIC] First PIC based circuit' 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: 'First PIC based circuit'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] First PIC based circuit'
2004\12\15@162643 by crayola

flavicon
face
I just finished designing my very first PIC based circuit and
I was wondering if anyone would be willing to review it for me.
Its a pretty simple relay control circuit. I am using the 16F877A
because I have a bunch of them laying around. This is just
a hobby circuit and wont be put into any type of production.
I havent breadboarded it yet but I believe the design is correct.

Any suggestions? Tips? Wrong Resistor or Capacitor values?
Spot any mistakes?

http://www.hauntedlane.com/Generic%20Prop%20Control.JPG

Thanks for any help you can offer..
Mike

____________________________________________

2004\12\15@164050 by Bob Axtell

face picon face
Normally, you'll want to place a series resistor into the lines driving
all the 2N2222
emitter followers, about 1K will be OK.

How will you develop the code? With the MCLR having a cap, the ICD2 won't be
able to be used.  There is no need for a cap on MCLR any more, there is
a startup
timer. Then you need to take PB7, PB6, VCC, GND and MCLR to a connector so
you can develop your code and program the device. You CAN keep a cap from
VCC to GND, as long as it isn't a large one.

--Bob



spam_OUTcrayolaTakeThisOuTspamoptonline.net wrote:

{Quote hidden}

>_____________________________________________

2004\12\15@171550 by csb

flavicon
face
Hi,
I think you should arrange the relay driving transistors differently. Or use PNPs with the same pin config, but NPN would probably be cheaper.
So you would connect the NPN base through a resistor (about 1-4.7k, depending on current needed by the relay coil) to the PIC pin, put the emitter to ground and collector to coil, and other side of coil to V+. There might be some problems if the relay coils are noisy/eat a lot of current, that V+ might be unhappy about it. Best is to isolate the +5V and driving voltage.

If you still have mAs left on your driving pins, you can put your coil satatus LEDs there instead, but be sure to stay under the max current source/sink for the pin.

That's pretty much what I've seen, and probably what I'd do (as a hobbyist)... Anyway you'll probably get more (and better) advice from more knowledgable PIClisters...

Good luck
Christian


____________________________________________

2004\12\15@171955 by Jose Da Silva

flavicon
face
On Wednesday 15 December 2004 01:26 pm, .....crayolaKILLspamspam@spam@optonline.net wrote:
> I just finished designing my very first PIC based circuit and
> I was wondering if anyone would be willing to review it for me.
> Its a pretty simple relay control circuit. I am using the 16F877A
> because I have a bunch of them laying around. This is just
> a hobby circuit and wont be put into any type of production.
> I havent breadboarded it yet but I believe the design is correct.
>
> Any suggestions? Tips? Wrong Resistor or Capacitor values?
> Spot any mistakes?
>
> http://www.hauntedlane.com/Generic%20Prop%20Control.JPG

If you put the transistor between gnd and the relay, then you can use a 12
volt relay instead of a 5volt relay.  5volt relays use a lot more current
than 12 volt relays so your 5volt power supply must be sourcing a lot of
current. Even though you have protection diodes on the relays, if you use 12
volt relays, then they are also seperate from the 5volt supply, so any coil
voltage spike doesn't get fed back into the 5volt line.

The LEDs you have in parallel with the relay coils can be put in series with
the coil if you choose 12volt relays (depends on relay current). If the
12volt relay coil current is too great, then you can use a low ohm resistor
in parallel with the relay LED. If the LED is in series, then if the relay
or transistor fails, then the LED won't light. The way it is right now, the
LED still lights even if the coil fails.
____________________________________________

2004\12\15@172433 by crayola

flavicon
face
> Normally, you'll want to place a series resistor into the
> lines driving all the 2N2222 emitter followers, about 1K will be OK.

Okay, Picture updated..
http://www.hauntedlane.com/Generic%20Prop%20Control.JPG

Why should I do that (just wondering)?

> How will you develop the code? With the MCLR having a cap,
> the ICD2 won't be able to be used.  There is no need for a
> cap on MCLR any more, there is a startup timer.

I thought it was important to have a stable supply for MCLR. I
guess the timer takes care of ignoring any flucations?

> Then you need to take PB7, PB6, VCC, GND and MCLR to a
> connector so you can develop your code and program the
> device. You CAN keep a cap from VCC to GND, as long as it
> isn't a large one.

Actually I was just going to pop the chip in the programmer.
I didnt think about ICD2. I will have to incorporate that. Should
save some headache down the road.

Thanks,
Mike

____________________________________________

2004\12\15@172646 by Mark Rages

face picon face
On Wed, 15 Dec 2004 14:40:39 -0700, Bob Axtell <engineerspamKILLspamcotse.net> wrote:
> Normally, you'll want to place a series resistor into the lines driving
> all the 2N2222
> emitter followers, about 1K will be OK.

Not necessary, they are emitter followers.

Mike, follow Bob's advice about in-circuit programming.

Regards,
Mark
markrages@gmail
____________________________________________

2004\12\15@172905 by Dave Mumert

flavicon
face
Hi Mike

You may want to consider using a quad driver to drive the relays.  That
would eliminate a bunch of parts on your breadboard.

The ULN2003 is cheap, has lots of drive capabilities, built in suppression
diodes, and no need for resistors between the PIC and the driver.  It has
more outputs than you need but it is cheap.
http://www.allegromicro.com/sf/2001/

The UCN5800 would also work.
http://www.allegromicro.com/sf/5800/

If you connect the relays between the 12 volt supply (assuming 12 volt
relays) and the transistor collectors (ground the emitters) you can take
most of the load off your 5 volt regulator and get a bit more isolation
between the PIC and the spikes that the relay coils produce.

If you are using this in an automotive environment you may want to use an
LM2931-5 regulator in place of the LM7805
http://cache.national.com/ds/LM/LM2931.pdf

Dave

>I just finished designing my very first PIC based circuit and
> I was wondering if anyone would be willing to review it for me.
> Its a pretty simple relay control circuit. I am using the 16F877A
> because I have a bunch of them laying around. This is just
> a hobby circuit and wont be put into any type of production.
> I havent breadboarded it yet but I believe the design is correct.
>
> Any suggestions? Tips? Wrong Resistor or Capacitor values?
> Spot any mistakes?

____________________________________________

2004\12\15@173604 by Bob Axtell

face picon face
crayola@optonline.net wrote:

>>Normally, you'll want to place a series resistor into the
>>lines driving all the 2N2222 emitter followers, about 1K will be OK.
>>    
>>
>
>Okay, Picture updated..
>http://www.hauntedlane.com/Generic%20Prop%20Control.JPG
>
>Why should I do that (just wondering)?
>
>  
>
The main reason is that if the PN2222 fails, you will have a short to VCC.
But the second reason is that the relay is going to generate noise, and
it will be fed back into the PIC that way; the R will limit that.


>>How will you develop the code? With the MCLR having a cap,
>>the ICD2 won't be able to be used.  There is no need for a
>>cap on MCLR any more, there is a startup timer.
>>    
>>
>
>I thought it was important to have a stable supply for MCLR. I
>guess the timer takes care of ignoring any flucations?
>  
>
No, the MCLR circuit has been improved dramatically. Newer PICs just don't
need them. And with the cap, the ICD2 won't operate in debug mode (in might
not operate in program mode, either). Make the puullup resistor 10K-33K, no
less.

{Quote hidden}

That gets old fast. The Incircuit method just can't be beat for speed.

--Bob


>Thanks,
>Mike
>
>_____________________________________________

2004\12\15@174858 by Richard.Prosser

flavicon
face

Pretty much as Jose has already commented.
What current do the relays require?. - Can the 7805 handle the power
requirement if all are on at once?

e.g. - 4 relays @ 5V, 30mA(?) each (LED current etc would need to be added
in as well )
120mA relay coil load, so the 7805 is dissipating at least (12-5) * .12 =
0.84 W. Should be ~OK provided relay current is <30mA. If it is too much
higher you will need a heatsink of some sort and it would be advisable
anyway unless it is very well ventilated.

By moving to 12V relays you remove most of the load from the 7805 & shift
the dissipation to the relays themselves - and they are designed to handle
it. And save on the 1k resistors.

You may need to add protection and/or filtering to the "trigger on high"
input.

RP





I just finished designing my very first PIC based circuit and
I was wondering if anyone would be willing to review it for me.
Its a pretty simple relay control circuit. I am using the 16F877A
because I have a bunch of them laying around. This is just
a hobby circuit and wont be put into any type of production.
I havent breadboarded it yet but I believe the design is correct.

Any suggestions? Tips? Wrong Resistor or Capacitor values?
Spot any mistakes?

http://www.hauntedlane.com/Generic%20Prop%20Control.JPG

Thanks for any help you can offer..
Mike

____________________________________________

2004\12\15@174942 by Jose Da Silva

flavicon
face
On Wednesday 15 December 2004 02:24 pm, .....crayolaKILLspamspam.....optonline.net wrote:
> > Normally, you'll want to place a series resistor into the
> > lines driving all the 2N2222 emitter followers, about 1K will be OK.
>
> Okay, Picture updated..
> http://www.hauntedlane.com/Generic%20Prop%20Control.JPG
>
> Why should I do that (just wondering)?

The resistor goes between uProcessor and NPN base to protect the uProcessor
from shorted relay or voltage kick-backs from relay getting turned-off.

You'll probably have several people on the list point-out the resistor is in
the wrong place   ;-)   Cheers!
____________________________________________

2004\12\15@175441 by Stephen R Phillips

picon face

--- EraseMEcrayolaspam_OUTspamTakeThisOuToptonline.net wrote:

> I just finished designing my very first PIC based circuit and
> I was wondering if anyone would be willing to review it for me.
> Its a pretty simple relay control circuit. I am using the 16F877A
> because I have a bunch of them laying around. This is just
> a hobby circuit and wont be put into any type of production.
> I havent breadboarded it yet but I believe the design is correct.
>
> Any suggestions? Tips? Wrong Resistor or Capacitor values?
> Spot any mistakes?
>
> www.hauntedlane.com/Generic%20Prop%20Control.JPG
>
> Thanks for any help you can offer..
> Mike
Yes I do your relay circuits are going to be a problem.
Put the 2n2222 emiter to ground and tie the top of the relay to 5V
instead you'll have some nasty surprises otherwise I also recomend
using 12V relays and power them straight from your supply to the
regulator. Otherwise you will be drawing 120 ma from a 12V source per
relay activated. This means 480ma @ 12V or 6W of which 3.2W will be
dumped out as heat from the power supply. A rather fivolous waste of
energy and likely to cause eratic behavior of the supply.  Only use
regulated power for things that absolutely need it, learned that the
oopsie way myself :)

The 1K resistors on the relays are in the wrong place. The resistors
need to be between the PIC and the base of the NPN transistor to
prevent pulling too much current from the PIC.  Otherwise the basic
idea is fine.  I would use a ULN2003A or equivalent instead of descrete
transistors, it eleminates the 4 transistors and 4 diodes and 4
resistors (and gives you 3 more 500ma outputs), and is very easy to
bread board with (16pin dip). The relay LED's I recomend placing
between the collector output of the driver plus a 2.2K resistor to 12V
power. This adds 5ma for the LED bright enough for daylight, VERY
bright in the dark.





=====
Stephen R. Phillips was here
Please be advised what was said my be absolutely wrong, and hereby this disclaimer follows.  I reserve the right to be wrong and admit it as well. :)


               
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
____________________________________________

2004\12\15@180434 by Dave Mumert

flavicon
face
Hi Mike

Here is a schematic of the output circuit using a ULN2003.
http://www.mumert.com/Image2.gif

Using a double pole relay allows you to monitor the actual circuit
operation, if you are OK monitoring the intended operation and assuming the
relay is OK then connect R1-D1 across the relay coil and use a single pole
relay.

Dave

{Original Message removed}

2004\12\15@180921 by Jinx

face picon face
Hi Mike, couple of things

gif is better than jpg for line drawings. Your 240kB jpg is only 30kB
as a gif and also lossless. Irfanview is a free utility worth getting.

http://www.irfanview.com I think

A diode, eg 1N4001, from the output (anode) of the 7805 to the
input (cathode) is recommended with such a large o/p cap. If the
input is shorted to ground for some reason the 7805 will die because
its o/p V is higher than its i/p

There's a good chance the relays will cause major spiking on the
PIC's 5V line that may cause the PIC to reset every time a relay
energises/de-energises.

Run the relays from the unregulated 12V (you'd need to add a resistor
in series with the coil to drop the voltage to 5V across it). This means
you'd have to move the transistors to the low side, ie emitter to ground,
collector to coil. This 12V should be fed through a diode and have a
filter cap so that spikes don't get back to the i/p of the regulator.

Beefing up the PIC's supply filtering probably won't work as well as
isolating the relays on their own supply. Even splitting the 5V into two
paths with a pair of diodes would do, although you'll have 5V minus
a small voltage drop for a supply

And as Bob Axtell suggests, freeing up RB7 will make it easier to ICSP

____________________________________________

2004\12\15@182629 by Rob Young

picon face
From: <crayolaspamspam_OUToptonline.net>
To: <@spam@piclistKILLspamspammit.edu>
Sent: Wednesday, December 15, 2004 3:26 PM
Subject: [PIC] First PIC based circuit


{Quote hidden}

The PN2222 is a jellybean NPN transistor.  You should have a base current
limiting resistor.  You could sit and calculate the ideal value or just use
4.7K and hope for the best.  1K as a base resistor would also work,
definately driving the transistor into saturation. :-)

I didn't see a value for the clamp diodes on the relays.  Make sure you
don't use something too small.  1N400x type are definately OK (if only a bit
slow) but probably much tougher than you will need.

Also, depending on the relays you have chosen you may not need the 1K
resistor.  Check on the coil resitance of the relay and also look at the
PN2222 datasheet to see if you are going to be trying to pull too much
current through the transistor.  If you do add the resistor, you will need
to size it for both the maximum current through the PN2222 and the minimum
pull-in voltage of the relay.  Alternatively you could ditch the PN2222s and
use the UNL quad driver chip suggested in another post.

If you are planning on in-circuit programming, move your trigger signal to
another pin.  RB0 would be my first choice so that I could use an ISR to
deal with the trigger and not need to poll on the pin state.  Depending on
the programmer you use, RB3 may also be necessary for ICSP.  Maybe use PORTD
for your LEDs and relays.

You might need another 10uF to 47uF of bulk capacitance on the VDD pins of
the 16F877A.  When the relays kick on or off your +5V line will glitch.
maybe not enough to cause a problem but you never know.  On a related note,
when building the circuit, use a "star" ground so that return currents from
the relays go directly to your ground as it enters the PCB instead of
past/through the PIC.

Unless you plan on resetting the chip yourself with the switch, I'd just use
a 4.7K resistor from /MCLR to +5V.  Also use the power-on-timer fuse in your
code.  Your reset circuit may also get in the way of ICSP, especially the
0.1uF capacitor.

Enjoy! :-)  Looks like you have a good grasp of the situation just maybe a
little bit of tweaking.  Take good notes, especially when something goes
wrong!  You learn lots by fixing "mistakes".

Rob Young

____________________________________________

2004\12\15@183200 by Rob Young

picon face
> Any suggestions? Tips? Wrong Resistor or Capacitor values?
> Spot any mistakes?
>
> http://www.hauntedlane.com/Generic%20Prop%20Control.JPG
>
> Thanks for any help you can offer..
> Mike

Also I forgot two more things about the relays:

1) consider switching to a +12V coild and running them from the un-regulated
side of the power supply.
2) Move the transistor to the "bottom" side.  +12V to coil_a, coil_a to
transistor, transistor to ground.  Keep the clamp diode across the coil with
the cathode pointed at the +12V and the anode to the transistor.

Another diode comment would be to add one from the +5V side of the regulator
back to the +12V.  Helps keep sudden capacitor discharges from running
through your circuit.  Anode to +5V, cathode to +12V.  1N400x is a good
starting point.  And you can also add one in series with your +12V into the
regulator as anti-reversal protection.

I'm betting that you will get these same suggestions from 93 other people on
the list.  In fact you probably already have since the list server seems to
have the odd habit of posting responses before the original question...

Rob Young
____________________________________________

2004\12\15@201346 by John J. McDonough

flavicon
face
----- Original Message -----
From: "Rob Young" <KILLspamrwyoungKILLspamspamieee.org>
Subject: Re: [PIC] First PIC based circuit


> If you are planning on in-circuit programming, move your trigger signal to
> another pin.  RB0 would be my first choice so that I could use an ISR to
> deal with the trigger and not need to poll on the pin state.  Depending on

I would start with ICSP - might as well learn right, and on your first
peoject, you will undoubtedly do some experimenting with the software, so
start out thinking ICSP.  It's only about 1000 times nicer.  See my Appendix
B at http://www.amqrp.org/elmer160/lessons for a quick lesson on how to set
that up using your current programmer, whatever that is.

> the programmer you use, RB3 may also be necessary for ICSP.  Maybe use
PORTD
> for your LEDs and relays.

You will want a circuit that has RB3 pulled low when the circuit is not
operational for a "normal" programmer, for a low voltage programmer your
programmer will need to be able to control it.  Unless you have a really
wimpy programmer, going to the base of Q4 should be OK, but you have plenty
of pins, why not take Rob's advice and use PORTD.

> You might need another 10uF to 47uF of bulk capacitance on the VDD pins of
> the 16F877A.  When the relays kick on or off your +5V line will glitch.

Again, look at where you put your (new) diode with respect to that cap.  You
can actually take a pretty serious glitch on Vdd without ill effect, but
depending on your relays, they could be nasty.  I would also put a small cap
(.01, .001, something like that) right at the relays to get rid of the high
speed component.

Whenever you put an electrolytic on the supply rail, you also want to
parallel it with something smaller like a 0.01 or so.  The reason is that
the electrolytic has significant inductance, and won't nail high frequency
transients.  Meanwhile, a little ceramic doesn't have enough capacitance for
the big boys.  So you use one of each.  For a circuit that is only audio you
probably don't need this, but for RF, or a situation like this where those
relays can be nasty, it's a good idea.

1000u looks a little fat for the output of the 7805.  You might look at the
datasheet.  This is one of those cases where more isn't always better.
Sometimes the regulator will go into oscillation if the caps aren't right.
They don't need to be exact, but they probably should be within an order of
magnitude of what is recommended on the data sheet.  Some people insist that
they need to be exact, but I've never seen one oscillate when my caps are
somewhere on the right planet.  I have seen them go when I am way off,
however.  I didn't check the sheet, but I think 1000u is way off.

> Unless you plan on resetting the chip yourself with the switch, I'd just
use
> a 4.7K resistor from /MCLR to +5V.  Also use the power-on-timer fuse in
your
> code.  Your reset circuit may also get in the way of ICSP, especially the
> 0.1uF capacitor.

I guess when you are experimenting having a reset button is kind of handy,
but PICs are remarkably resilient to startup nasties, or so it seems.  I
used to be that we went through all sorts of gyrations on the reset lines of
microprocessors, but with PICs it seems hard to get it wrong.  However, when
you go to ICSP (and again, I think it is something you might as well learn
right out of the box), you do need to think a little about where you put the
capacitance.

Your running circuit needs to get the /MCLR up to 5 volts fairly cleanly.
However, your programmer needs to get it from zero to 12 (or so) very fast.
So you add a diode, preferably a schottky, to protect the rest of the
circuit from the 12 volts, and also to "hide" the capacitors from the
programmer.

--McD


____________________________________________

2004\12\15@201449 by John J. McDonough

flavicon
face
----- Original Message -----
From: "Rob Young" <RemoveMErwyoungTakeThisOuTspamieee.org>
Subject: Re: [PIC] First PIC based circuit


> In fact you probably already have since the list server seems to
> have the odd habit of posting responses before the original question...

And all this time I thought that was just me.

--McD


____________________________________________

2004\12\15@201829 by John J. McDonough

flavicon
face
----- Original Message -----
From: "Jinx" <spamBeGonejoecolquittspamBeGonespamclear.net.nz>
Subject: Re: [PIC] First PIC based circuit


> A diode, eg 1N4001, from the output (anode) of the 7805 to the
> input (cathode) is recommended with such a large o/p cap. If the
> input is shorted to ground for some reason the 7805 will die because
> its o/p V is higher than its i/p

Is it even possible to kill a 7805?  I've run them into a dead short and got
some nasty burns to show for it, but the 7805 merrily kept trying to drive
ground to 5 volts.  But watch out, they can get amazingly hot!

--McD


____________________________________________

2004\12\15@202354 by Peter van Hoof

picon face
My guess would be that the values of c1 and c2 are switched
It is highly unusual to have 1000uF at the output of a 7805 (more
appropriate is 10uf in parralel with a 0.1uF ceramic)

I agree with previous posters , add connector for icsp or debugger, power
relays from 12 volt unregulated etc

Kind regards

Peter van Hoof



{Original Message removed}

2004\12\15@205101 by Rob Young

picon face
> ----- Original Message -----
> From: "Jinx" <TakeThisOuTjoecolquittEraseMEspamspam_OUTclear.net.nz>
> Subject: Re: [PIC] First PIC based circuit
>
>
>> A diode, eg 1N4001, from the output (anode) of the 7805 to the
>> input (cathode) is recommended with such a large o/p cap. If the
>> input is shorted to ground for some reason the 7805 will die because
>> its o/p V is higher than its i/p
>
> Is it even possible to kill a 7805?  I've run them into a dead short and
> got
> some nasty burns to show for it, but the 7805 merrily kept trying to drive
> ground to 5 volts.  But watch out, they can get amazingly hot!
>

I like it when you leave your fingerpring embedded in the IC's epoxy.  Looks
really neat, your finger and the part both!

I think it depends on the brand of 7805.  A good "name brand" like Motorola
or Fairchild or National Semi or Micrel (do they even make a 7805 or just
LM340s now?) probably has a working and reliable thermal-shutdown.  However
there is still a limit in the datasheets about the voltages on the pins.
Another message suggested the LM2940 (I think, anyway do some research)
which is rated for use in automotive electronics where you can get
monsterous current dumps and voltage spikes on the +12V rail.

But a craptacular 7 cent bargin purchased out of the back of a seedy looking
panel van or on eBay?  Or on a prototype where you plan on doing silly
things just to see what will happen?

I bought 1,000 Diode's Inc brand ("name brand" so I have some idea of
quality) 1N4004s once and so they cost almost nothing per diode.  So to me
it is just a simple thing to add a couple of them to a linear regulator of a
prototype circuit.  But when it comes time to generate the schematics for a
large production run I start looking at things to eliminate.  That reverse
diode may get removed in production if I can guarantee a good quality
regulator, and I've sized the capacitors and characterized the turn-on and
turn-off voltage/current spikes.

Rob Young
____________________________________________

2004\12\15@211103 by Jose Da Silva

flavicon
face
On Wednesday 15 December 2004 05:18 pm, John J. McDonough wrote:
> ----- Original Message -----
> From: "Jinx" <RemoveMEjoecolquittspamTakeThisOuTclear.net.nz>
> Subject: Re: [PIC] First PIC based circuit
>
> > A diode, eg 1N4001, from the output (anode) of the 7805 to the
> > input (cathode) is recommended with such a large o/p cap. If the
> > input is shorted to ground for some reason the 7805 will die because
> > its o/p V is higher than its i/p
>
> Is it even possible to kill a 7805?  I've run them into a dead short and
> got some nasty burns to show for it, but the 7805 merrily kept trying to
> drive ground to 5 volts.  But watch out, they can get amazingly hot!

Jinx was pointing at the input, sort of like putting an IC in backwards  ;-)
____________________________________________

2004\12\15@211951 by Bob Ammerman

picon face
>> Is it even possible to kill a 7805?  I've run them into a dead short and
>> got
>> some nasty burns to show for it, but the 7805 merrily kept trying to
>> drive
>> ground to 5 volts.  But watch out, they can get amazingly hot!

It is difficult to kill one just be overloading the output, but they'll drop
like flies if at any time Vout is > Vin for more than a very short period of
time. Hence the suggestion to connect a (normally reverse biased) diode
between Vout and Vin. In the event the Vout becomes greater then Vin the
diode will conduct and your regulator will live to see another day.

Bob Ammerman
RAm Systems


____________________________________________

2004\12\15@220340 by John J. McDonough

flavicon
face
----- Original Message -----
From: "Jose Da Silva" <DigitalEraseMEspam.....JoesCat.com>
Subject: Re: [PIC] First PIC based circuit


> Jinx was pointing at the input, sort of like putting an IC in backwards
;-)

I have to admit, that's something I never tried.

--McD


____________________________________________

2004\12\15@220701 by John J. McDonough

flavicon
face
----- Original Message -----
From: "Rob Young" <EraseMErwyoungspamieee.org>
Subject: Re: [PIC] First PIC based circuit


> I like it when you leave your fingerpring embedded in the IC's epoxy.
Looks
> really neat, your finger and the part both!

Never managed that, but I did run around with a heat-sink shaped burn on my
finger for months.  Really smarted and it took like forever to fade.  I
don't recommend replicating the experiment.

--McD


____________________________________________

2004\12\15@222013 by Michael Cunningham
flavicon
face
Thanks for the help everyone!!  I will redesign the circuit
to use 12 volt relays, ICD2, and implement the suggestions
regarding the 7805 caps. I'll send another email when its
updated. Ya'll have been a big help so far.

Next time it will be gif as well:)

Thanks,
Mike


____________________________________________

2004\12\16@005536 by Jinx

face picon face
> Is it even possible to kill a 7805 ?

It is, with their own caps

As Chris from Family Guy would say, "Here, it's all
in this brochure"

http://www.national.com/an/AN/AN-182.pdf

In particular, Figure 2 and text thereof

____________________________________________

2004\12\16@081655 by olin_piclist

face picon face
crayola@optonline.net wrote:
> http://www.hauntedlane.com/Generic%20Prop%20Control.JPG

1mF is a lot on the output of the 7805, and 100nF very little on the input.
I think you have these flipped.

You are driving LEDs so that the PIC pins are sourcing the current.  What
you have is correct and within specs.  However, the low side drivers have
lower impedence than the high side drivers.  For that reason I try to make
PIC pins sink current rather than source it when there is a choice.  Minor
issue.

You didn't give the specs for the relays, but it doesn't look like there is
anywhere near enough drive current for a "10A Relay".

I don't like the emitter follower relay driver in the first place.  It
results in higher drop accross the transistor.  Why not use the normal
common emitter circuit?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
____________________________________________

2004\12\16@082945 by olin_piclist

face picon face
crayola@optonline.net wrote:
>> Normally, you'll want to place a series resistor into the
>> lines driving all the 2N2222 emitter followers, about 1K will be OK.
>
> Okay, Picture updated..
> http://www.hauntedlane.com/Generic%20Prop%20Control.JPG

It doesn't look any different from your first message, or did you change the
picture in place?  Don't do that.  Remember that people are seeing it at
different times.

I guess you added theh 1K resistors in series with the relay drive emitters.
Take them out.  That was bad advice in the first place.  That's one of the
problems with a list like this.  You get a lot of responses but there is no
guarantee of the quality.  You always have to understand the reason behind
each comment and make your own mind as to whether it makes sense or not.

Without the resistors, the relay coils will be driven to about 4.3V.  This
is a little low for a "5V" relay, but would probably work.  The 1Kohm
resistor almost certainly prevents enough current from flow thru the coil.
It is not needed because you can safely put 5V accross a relay coil rated
for 5V.  There is no need to additional current limiting, and in fact it
gets in the way.

Again, why not use the normal common emitter circuit?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
____________________________________________

2004\12\16@084145 by olin_piclist

face picon face
Rob Young wrote:
> The PN2222 is a jellybean NPN transistor.  You should have a base
> current limiting resistor.

No need in this emitter follower configuration.  However, he really should
be using common emitter configuration, in which case a base resistor is
needed.  I also like the idea others have suggested of using 12V relays to
get the relay current (and glitches) off the regulated supply.

It sounds to me that the knee jerk 1kohm base resistor is unnecessarily
small.  Here's a rough pass at a proper calculation:

Unfortunately he didn't give the relay specs, so I'll use 30mA as an
example.  Let's say the transistor can always be counted on to have a gain
of at least 50.  That means the base current needs to be at least 30mA / 50
= 600uA to guarantee saturation.  With a B-E drop of 700mV, there will be
4.3V accross the resistor.  4.3V / 600uA = 7.2Kohms.  In this case I would
use 5.1Kohms, since it's a common value and gives a little extra margin, but
still draws 5x less current from the PIC pin than the knee jerk 1Kohm case.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
____________________________________________

2004\12\16@084358 by olin_piclist

face picon face
John J. McDonough wrote:
> Is it even possible to kill a 7805?

Yes.

> I've run them into a dead short
> and got some nasty burns to show for it, but the 7805 merrily kept
> trying to drive ground to 5 volts.  But watch out, they can get
> amazingly hot!

They are pretty much invulnerable to load abuse, but don't like reverse
voltage (output > input).


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
____________________________________________

2004\12\16@101801 by Rob Young

picon face
In a previous post I suggested it might be alright to remove the diode
between Vout and Vin of a regulator after testing.

That is a dumb idea.  I should re-read what I type before posting.  In my
defense however I did recommend adding the diode in the first place...

Linear regulators really don't like Vout > Vin.  Spend the extra 25 cents
and two diodes, one to keep Vout < Vin and another to rectify the voltage
into the regulator so you don't accidentally hook up backwards.

But I do advocate testing and characterizing a circuit once built in an
effort to identify sections that can be simplified.

Rob Young
____________________________________________

2004\12\16@121556 by Peter L. Peres

picon face


On Wed, 15 Dec 2004, John J. McDonough wrote:

{Quote hidden}

You can kill an old 7805 like this, and a clone 7805. New 7805s of good
make have SOA limiting and shut down when they get too hot.

Peter
____________________________________________

2004\12\16@131201 by Spehro Pefhany

picon face
At 09:17 AM 12/16/2004 -0600, you wrote:
>In a previous post I suggested it might be alright to remove the diode
>between Vout and Vin of a regulator after testing.
>
>That is a dumb idea.  I should re-read what I type before posting.  In my
>defense however I did recommend adding the diode in the first place...
>
>Linear regulators really don't like Vout > Vin.  Spend the extra 25 cents
>and two diodes, one to keep Vout < Vin and another to rectify the voltage
>into the regulator so you don't accidentally hook up backwards.
>
>But I do advocate testing and characterizing a circuit once built in an
>effort to identify sections that can be simplified.
>
>Rob Young

There are many cases where adding such diodes to a production circuit
is a total waste of money. If the power supply is internal (eg. a transformer,
and rectifier and filter cap) then it's generally unnecessary (as is
polarity protection).

If the power supply is external, then a diode (or bridge) for polarity
protection also will protect the regulator from the output cap being
discharged through the input (from outside the housing).

And finally, if your output caps are small or the input current is
limited by some impedance in the circuit, then it may be unnecessary.

Note that if the "input short protection" diode is accidentally installed
backwards or becomes shorted it will probably destroy all the circuitry in
the product when power is first applied (except the regulator. ;-))

Eliminating unnecessary parts is just good engineering.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
RemoveMEspeffspam_OUTspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com




____________________________________________

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