part 1 666 bytes content-type:text/plain; charset=us-asciiGreat posts this past week, I've learned alot;
especially about using C. This list is awesome.
I have a basice PCB layout, 5 (Analog) inputs/5
(digital)outputs. I wanted to post it to the board and
see if it looks right, also...if there is something
wrong I can place the whole PCB and corresponding
information out there for other people to make boards.
What may seem unusual in the board are TWO Caps, one
for the initial input power and one for 5V after the
regulator. (anyone else do this?)
Cheers - AL
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
part 2 19006 bytes content-type:image/gif; name="Pic_5-5_PCB.gif" (decode) part 3 35 bytes content-type:text/plain; charset="us-ascii" (decoded 7bit)
Ok, here are my comments. Please note, they may be wrong.
1. You have some extra stuff I don't understand on the board. There is
a little square of holes with an extra hole on top (total 5) between
R5 and INPUT. There is also an extra hole above S1
2. The trace between pin 8 and pin 9 might prove problematic. This
seems to be a problem all over your board. Personally, I would try to
route in orthagonal lines, plus 45 degree lines. Asthetically I find
differing angles to be less visually pleasing. That said, The trace
between 8 and 9 might cause you problems as it isn't straight, and you
may find it too close at one side.
3. You may want to fatten up your traces a bit. Beefier traces will be
easier to etch if you're making the board at home. Your board doesn't
seem that complex, so you should have the room for them.
4. You may want to put an in circuit programming header on the board.
Again, you have spare room, and ICSP is much faster than having to pop
the chip out each time you wish to reprogram.
5. The +V trace that runs by the cathode of the LED looks awfully
close from my view. Couldn't hurt to move it away slightly.
That's about it for me, I'm sure others will comment as well.
Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
-Douglas Adams
On 5/8/05, Alison Lewis <spam_OUTlewischickenTakeThisOuTyahoo.com> wrote:
> I have a basice PCB layout, 5 (Analog) inputs/5
> (digital)outputs. I wanted to post it to the board and
> see if it looks right, also...if there is something
> wrong I can place the whole PCB and corresponding
> information out there for other people to make boards.
I'd add a bypass cap (100nf) between Vcc and Vss pins
of the 876.
I often use a 100nf cap between the output of the
regulator and ground. Supposedly prevents
oscillation. check the datasheet for your regulator.
I assume x1 is a resonator - probably a good idea to
not run any other traces near it. I always try to get
as much ground copper around the crystal/resonator
pins.
You could probably make this a single sided board.
> Great posts this past week, I've learned alot;
> especially about using C. This list is awesome.
>
> I have a basice PCB layout, 5 (Analog) inputs/5
> (digital)outputs. I wanted to post it to the board
> and
> see if it looks right, also...if there is something
> wrong I can place the whole PCB and corresponding
> information out there for other people to make
> boards.
>
> What may seem unusual in the board are TWO Caps, one
> for the initial input power and one for 5V after the
> regulator. (anyone else do this?)
>
> Cheers - AL
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
part 1 1523 bytes content-type:text/plain; (decoded 7bit)
Peculiar, not sure if it's just me or if others see it too, but my last post
returned to me as an attachment... Hmm, let's try again.
What tool are you using to create this?
Are you having the board made professionally or are you etching it yourself?
(plated through holes?)
Personally I don't like the look of traces at random angles, and it can lead
to uncertainties for high frequency work.
I'll have bad dreams about your ground traces. Long, winding and skinny with
analog references on the far end makes for a bad day. Running traces between
IC pins isn't all bad, but avoid it if you can, especially if you're making
the board yourself. Whenever possible line up all the parts in strait rows
(unlike R5-R9), it makes the board look a lot more professional.
Given a similar problem, This is what I might have created:
(red=top, blue=bottom) I'm sure I don't have the same libraries as you, but
I think you'll get the general idea. Notice the power and ground traces are
heavier, and shorter where practical.
I also notice there's a few things I would probably add. Mounting holes?
0.1uF bypass cap near the PIC? Connector or at least pads for ICSP, or
serial port access?
Good luck, let us know how it turns out.
-Denny
----- Original Message -----
From: "Denny Esterline" <firmwareKILLspamtds.net>
To: "Microcontroller discussion list - Public." <.....piclistKILLspam.....mit.edu>
Sent: Sunday, May 08, 2005 5:17 PM
Subject: Re: [PIC] PCB? and Good Posts!
At 11:27 AM 5/8/2005 -0700, you wrote:
>Great posts this past week, I've learned alot;
>especially about using C. This list is awesome.
>
>I have a basice PCB layout, 5 (Analog) inputs/5
>(digital)outputs. I wanted to post it to the board and
>see if it looks right, also...if there is something
>wrong I can place the whole PCB and corresponding
>information out there for other people to make boards.
>
>What may seem unusual in the board are TWO Caps, one
>for the initial input power and one for 5V after the
>regulator. (anyone else do this?)
>
>Cheers - AL
The input capacitor on the 5V regulator is a good idea.
The large output cap may or may not be required for stability,
depending on the regulator you use. You need a bypass close to the
PIC 0.01uF to 1uF ceramic will do it (0.1uF is commonly used)
Why is the 25uF high voltage cap larger than the 10uF low voltage cap?
Don't connect the resonator ground trace to the connector, run it back
separately to Vss on the chip.
The LED is backwards.
Try to increase the size of your pads and traces (especially on things
like the switch), and route traces between IC pins straight to maximize
copper and clearances. Are you sure the switch holes are big enough?
That's all I see with a quick glance. I didn't try to figure out your
battery and other connectors. Your inputs have no added ESD protection.
Denny Esterline wrote:
>> Peculiar, not sure if it's just me or if others see it too, but my
>> last post returned to me as an attachment... Hmm, let's try again.
I got an empty message from you, so it probably did have the text as an
attachment. This time the message came thru fine, but when I did a reply I
got two levels of quoting (>>) as you can see above instead of one.
Strange.
>> Personally I don't like the look of traces at random angles, and it
>> can lead to uncertainties for high frequency work.
The electrons don't care. For high frequency work the straightest and
shortest paths are best. These are often not at nice axis aligned angles.
>> Given a similar problem, This is what I might have created:
>>
>> (red=top, blue=bottom) I'm sure I don't have the same libraries as
>> you, but I think you'll get the general idea. Notice the power and
>> ground traces are heavier, and shorter where practical.
For a two layer thru hole board, I would have set up the bottom layer as the
primary interconnect, and the top layer as a pseudo ground plane. It
wouldn't be a real ground plane since some traces will likely need to be
routed there, but the intent would be to make those traces short and
isolated. Small islands in a ground plane don't matter much. Just be
careful that a bunch of small traces don't clump together to make a big hole
in the ground plane.
I have a standard setup for such boards. I define the pseudo ground plane
in Eagle as a polygon, and set the cost for routing in that layer very high.
Initially the cost will be low to guarantee a solution, but this is cranked
up early in the optimize passes. After 8 optimize passes you usually get a
nice board. Your board isn't very complex, and I expect this technique
would work very well on it.
>> I also notice there's a few things I would probably add. Mounting
>> holes?
Or areas in the corners for rubber feet. For lots of prototype boards I
never intend to put them into a case, just stick rubber feet in each of the
corners.
Another few niceties I like to add:
1 - Put the customer-visible name of the product on the silkscreen, company
name, and the date. For example, the current production version of the
ProProg has:
Embed Inc
ProProg
Version 2
2 Aug 2004
in the lower left corner. If you're making boards for yourself, similar
information is still useful. Three years and 2 revs later it won't be as
obvious as you think to remember which board is which.
2 - Internal name or part number on the top copper along the edge somewhere.
This is the same name I use for the project name in Eagle and that all the
files for this project start with. For example the ProProg has "PPRG2" in
copper near the lower middle.
3 - Take the trouble to clean up the silkscreen after placement and routing.
Part designators at all angles, under parts, and over vias is a pain to use
later and makes it look amateurish. Yes, this takes a little work, but
doing it right usually does.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
On Sun, 8 May 2005 11:27:14 -0700 (PDT), Alison Lewis wrote:
>...<
> What may seem unusual in the board are TWO Caps, one
> for the initial input power and one for 5V after the
> regulator. (anyone else do this?)
Yes, but I'm a bit confused as to the sizes of them - C1 is a larger value than C2, and is upstream of the
regulator so should be at least the same voltage rating, if not higher, but you're showing it physically
smaller - this is unexpected, at least! :-)
Further, you have these two "reservoir" capacitors (to provide/absorb energy to smooth over varying
line/load), but no decoupling capacitors to stop oscillation. As someone else said, you really need 0.1uF
ceramics across the 0V and power close to the regulator and close to the PIC.
Since you have a 5V reservoir capacitor, you should also have a diode across the In and Out of the regulator
(+ve on the In side), so that if the power drops and the input capacitor discharges before the output one,
that the voltage on the regulator's Out pin doesn't go above that on the In pin (otherwise the regulator can
be damaged). In fact it can still be 1 diode-drop (0.6V) above it, but that's OK!
I don't like the 0V trace that connects to your Input header going "through" the resonator's centre pin -
varying current in that trace might upset the PIC oscillator and gain or lose you clock cycles (or even stop
the oscillator all together). Better to run it separately if at all possible.
I don't understand what B1 and B2 are - looking again I suspect they are probably the power-in points, and I
assume they will have wires soldered in directly - it's much neater to have these together if possible. And
please label them - you know what they are now, but when you get the soldering-iron out you don't want to have
to deduce which is which from following the traces :-)
Your "Extra Inputs" are actually 0V and 5V!
There are 4 orphaned holes on the left below the Input header and 6 between C2 and the PIC, for no obvious
reason.
D6 (what happened to D1 to 5? :-) is awfully close to the PIC - if you are going to use a socket for the
latter, a bit more space would be handy.
I notice a lot of unconnected pins on the PIC - make sure you set these to output in your software, as
unconnected inputs can wreak havoc.
On Sun, 8 May 2005 17:48:23 -0400, Denny Esterline wrote:
>...<
> Given a similar problem, This is what I might have created:
>
> (red=top, blue=bottom) I'm sure I don't have the same libraries as you, but
> I think you'll get the general idea. Notice the power and ground traces are
> heavier, and shorter where practical.
Having just had another look at your PCB layout, I see that B2 is "Coin Cell Holder" (when all else fails,
read the instructions! :-) but it seems to have only a 0V connection.
This is a Good Thing because if you were planning to connect a coin cell (presumably 3.2V lithium such as a
CR2032) across 0 and 5V, *don't do it*!
The most likely result would be a loud bang with toxic chemicals being sprayed around... lithium cells can
react really badly if abused, and over-volting them is serious abuse.
Of course this may be fallout from an earlier design (like the missing D1-D5) in which case please ignore me
:-)
>Denny Esterline wrote:
>
>
>>>Peculiar, not sure if it's just me or if others see it too, but my
>>>last post returned to me as an attachment... Hmm, let's try again.
>>>
>>>
>
>I got an empty message from you, so it probably did have the text as an
>attachment. This time the message came thru fine, but when I did a reply I
>got two levels of quoting (>>) as you can see above instead of one.
>Strange.
>
>
>
>>>Personally I don't like the look of traces at random angles, and it
>>>can lead to uncertainties for high frequency work.
>>>
>>>
>
>The electrons don't care. For high frequency work the straightest and
>shortest paths are best. These are often not at nice axis aligned angles.
>
>
>
>>>Given a similar problem, This is what I might have created:
>>>
>>>(red=top, blue=bottom) I'm sure I don't have the same libraries as
>>>you, but I think you'll get the general idea. Notice the power and
>>>ground traces are heavier, and shorter where practical.
>>>
>>>
>
>For a two layer thru hole board, I would have set up the bottom layer as the
>primary interconnect, and the top layer as a pseudo ground plane. It
>wouldn't be a real ground plane since some traces will likely need to be
>routed there, but the intent would be to make those traces short and
>isolated. Small islands in a ground plane don't matter much. Just be
>careful that a bunch of small traces don't clump together to make a big hole
>in the ground plane.
>
>I have a standard setup for such boards. I define the pseudo ground plane
>in Eagle as a polygon, and set the cost for routing in that layer very high.
>Initially the cost will be low to guarantee a solution, but this is cranked
>up early in the optimize passes. After 8 optimize passes you usually get a
>nice board. Your board isn't very complex, and I expect this technique
>would work very well on it.
>
>
>
>>>I also notice there's a few things I would probably add. Mounting
>>>holes?
>>>
>>>
>
>Or areas in the corners for rubber feet. For lots of prototype boards I
>never intend to put them into a case, just stick rubber feet in each of the
>corners.
>
>Another few niceties I like to add:
>
>1 - Put the customer-visible name of the product on the silkscreen, company
>name, and the date. For example, the current production version of the
>ProProg has:
>
> Embed Inc
> ProProg
> Version 2
> 2 Aug 2004
>
>in the lower left corner. If you're making boards for yourself, similar
>information is still useful. Three years and 2 revs later it won't be as
>obvious as you think to remember which board is which.
>
>2 - Internal name or part number on the top copper along the edge somewhere.
>This is the same name I use for the project name in Eagle and that all the
>files for this project start with. For example the ProProg has "PPRG2" in
>copper near the lower middle.
>
>3 - Take the trouble to clean up the silkscreen after placement and routing.
>Part designators at all angles, under parts, and over vias is a pain to use
>later and makes it look amateurish. Yes, this takes a little work, but
>doing it right usually does.
>
>
>*****************************************************************
>Embed Inc, embedded system specialists in Littleton Massachusetts
>(978) 742-9014, http://www.embedinc.com
>
>
> Having just had another look at your PCB layout, I see that B2 is
> "Coin Cell Holder" (when all else fails, read the instructions! :-)
> but it seems to have only a 0V connection.
I've seen several people respond here with advice about the circuit as
apposed to the board. If you want people to comment on the circuit, you
should post a schematic.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
Ake Hedman wrote:
>> I define the pseudo ground plane
>> in Eagle as a polygon, and set the cost for routing in that layer
>> very high.
>
> How is this done exactly? I have never understood how a top layer with
> lots of copper ground plane around a few traces are done in eagle.
If you want an entire inner layer to be a ground plane (or any other
signal), name the layer $<signal name>. If you want a plane on one of the
outer layers, or don't want the entire layer to be the plane, then you have
to use a polygon.
In the board editor, draw a polygon in the desired layer and give it the
name of the signal. There are a few more details which you can see by doing
HELP POLY.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
> In the board editor, draw a polygon in the desired layer and give it
> the
> name of the signal.
This is one of the few times in eagle that I revert to their command
line rather than the GUI. I'll type "poly gnd" in the cli window, and
then draw a big rectangle that usually extends well outside of the
dimension
layer (makes it easier to find later.) Then you click the ratsnest
button
to get it do calculate the polygon/trace interaction.
Make sure you have polygon "isolate" parameters set as you desire, or
it will
probably end up using some tiny value from the design rules...
There were a lot of good things you all pointed out
(like forgetting to lable 5V on the coin cell) and I
made some updates.
I use ExpressPCB to make the diagrams and circuits
because its free and easy.
"I've seen several people respond here with advice
about the circuit as apposed to the board. If you
want people to comment on the circuit, you should post
a schematic."
beard.dialnsa.edu/~lewisa/blogs/DMSpring2005/PIC16F_5in-5out--SCHEMATIC.gif
(I've been using this set up with various
modifications for a year with no problems at all...)
----------
I tend to find it easier to set up a PCB than do a
diagram because I can see the connections. It would be
great if there was a program that made circuit
diagrams from PCBs.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
At 11:52 AM 5/9/2005 -0700, you wrote:
>There were a lot of good things you all pointed out
>(like forgetting to lable 5V on the coin cell) and I
>made some updates.
>
>I use ExpressPCB to make the diagrams and circuits
>because its free and easy.
>
>"I've seen several people respond here with advice
>about the circuit as apposed to the board. If you
>want people to comment on the circuit, you should post
>a schematic."
>
>beard.dialnsa.edu/~lewisa/blogs/DMSpring2005/PIC16F_5in-5out--SCHEMATIC.gif
>(I've been using this set up with various
>modifications for a year with no problems at all...)
>
>NEW PCB Layout with proper pin names:
>http://beard.dialnsa.edu/~lewisa/blogs/DMSpring2005/PIC16F_5in-5out--PCB.gif
Note that you've got the inputs all shorted together in both the
schematic and on the PCB.
>I tend to find it easier to set up a PCB than do a
>diagram because I can see the connections. It would be
>great if there was a program that made circuit
>diagrams from PCBs.
um, you say that it works fine but I think your
schematic has a problem with analog input. Do you
really want to tie the inputs to +5V?
Also, your 2 battery setup looks odd to me - I would
try to have at least 7V input to the 7805, more for
higher current applications.
Finally, its always a good idea to use a bypass cap
(.1uF) between the power and ground pins of the PIC -
it will improve noise immunity.
On your layout, r12 being so close to the resonator
could be a source of problems for RA4 input (though
with the current schematic, I bet its a solid +5V).
its always a good idea to keep your analog inputs away
from other signal sources. Here is one apnote that
discusses the layout issues. Its aimed at 12 bit ADCs
but the rules apply for 10 bit as well. http://ww1.microchip.com/downloads/en/AppNotes/00688b.pdf
> There were a lot of good things you all pointed out
> (like forgetting to lable 5V on the coin cell) and I
> made some updates.
>
> I use ExpressPCB to make the diagrams and circuits
> because its free and easy.
>
> "I've seen several people respond here with advice
> about the circuit as apposed to the board. If you
> want people to comment on the circuit, you should
> post
> a schematic."
>
>
beard.dialnsa.edu/~lewisa/blogs/DMSpring2005/PIC16F_5in-5out--SCHEMATIC.gif
> (I've been using this set up with various
> modifications for a year with no problems at all...)
>
> NEW PCB Layout with proper pin names:
>
beard.dialnsa.edu/~lewisa/blogs/DMSpring2005/PIC16F_5in-5out--PCB.gif {Quote hidden}
>
> ----------
> I tend to find it easier to set up a PCB than do a
> diagram because I can see the connections. It would
> be
> great if there was a program that made circuit
> diagrams from PCBs.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
Alison Lewis wrote:
> I tend to find it easier to set up a PCB than do a
> diagram because I can see the connections. It would be
> great if there was a program that made circuit
> diagrams from PCBs.
That's like writing in assembler and asking for a program to convert it to
C. Think of the schematic (I assmume that's what you mean by "diagram"?) as
the source code. It defines what is supposed to be connected to what in an
easily understandable language. The Gerber files are the compiled result
after you've added placement information. Proper packages like Eagle won't
let the routing deviate from the connections defined in the schematic. If
you want to "see" the connections, look at the schematic where they are a
lot more understandable.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
>> It would be great if there was a program that made circuit
>> diagrams from PCBs.
>>
Well, it's certainly possible to make yourself a parts library where the
schematics symbols for chips look like DIPs, for instance. You could
even
get away with just having one symbol per package size, although that
would
make it difficult to understand and nearly impossible to update to
different
pinouts of the same sort of logic circuit (going from 74240 to 74540,
for instance.)
1) inputs shorted to 5v.
2) no bypass caps
3) traces too narrow.
4) 6V input to vreg is too low
here are a couple more:
5) The "big" cap should be at the input end of the regulator, or you
risk reverse-biasing it during powerdown, which is a bad thing.
6) schematics shows pin13 unconnected, but PCB has it connected.
7) there's no need for this to be a two-sided PCB, I think.
I came up with something like this, assuming the input resistors are
supposed to be pullups. The connectors have moved, which might be bad.
> That's like writing in assembler and asking for a program to convert it to
> C. Think of the schematic (I assmume that's what you mean by "diagram"?) as
You are not going to believe this, but that is in fact done sometimes.
The C compiler later optmises the code and makes it portable. It is one
of the faster ways to port a piece of assembler afaik (using many macros
for the assembler instructions).
Dave Turner wrote:
> Well, not sure if it's just me, but aren't the inputs connected
> through a resistor to ground, and the actual input is connected to the
> chip?
>
Look at the schematic... even if the PCB is OK,the schematic is most
definitely messed up.
> Look at the schematic... even if the PCB is OK,the schematic is most
> definitely messed up.
>
Thus far, this has been an exercise in PCB design preferences and (to a
lesser
extent) schematic entry, and stuff like that. At least, that's how
I've been
treating it. It's been fun, but before Alison goes off and has some
boards
made up, it might be useful to go back and talk about the DESIGN and
what it
is supposed to accomplish.
For instance, the original email header mentioned analog inputs. But
they
apparently have pullup (or pulldown) resistors. Any number of people
have
noticed that at least some of the layouts had these connected
incorrectly
for pullup resistors, but no one has mentioned yet that it's pretty
uncommon
to have ANY pullup resistors on analog inputs in the first place.
Pulldowns
might be more common, but still not really likely, IMO. In my
"improved" PCB
design, I made assumptions without checking whether they were correct
for the
design (assuming that it was primarily a pcb design excercise...)
On the other hand, it's always easy to leave components OFF of a PCB.
Adding
components is messier...
On May 14, 2005, at 2:20 PM, William Chops Westfield wrote:
> For instance, the original email header mentioned analog inputs. But
> they
> apparently have pullup (or pulldown) resistors. Any number of people
> have
> noticed that at least some of the layouts had these connected
> incorrectly
> for pullup resistors, but no one has mentioned yet that it's pretty
> uncommon
> to have ANY pullup resistors on analog inputs in the first place.
> Pulldowns
> might be more common, but still not really likely, IMO.
Hmm. If the pullup resistors are replaced by a resistor SIP, the SIP is
easily reversed to provide either pullup or pulldown capability (or it
can be left off entirely.) And it's pretty easy to create a "SIP" from
discreet resistors, too...