Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Looking for critique on board layout

Looking for critique on board layout

2010-11-06 by Chuck Hackett

I know this is dangerous, but ... :-)

I'm looking for a critique of the board layout for my first significant project.

This board is designed to control signals for outdoor ride-on railroads (which I
think I've spoken about here before).  The board senses track voltages and drives
multiple 3-LED signal heads accordingly.  I have a previous, much larger setup using
a commercial "development board" with an ATMega16 and an "interface" board I made
for initial feasibility testing.  I'm now adding communications (pseudo-CAN) and
going to an ATMega32a (more program space for communications protocol, etc.).  There
were lots of design decisions that went into it that I won't go into here.  What I'm
looking for is feedback on the circuit design and board layout - be gentle :-)


Images:
	Schematic:
http://www.whitetrout.net/Chuck/temp/Signal_Interface_sch.pdf 
	Board:	http://www.whitetrout.net/Chuck/temp/Signal_Interface_brd.pdf 


Schematic:

- The power, track(rail) inputs, and data bus are protected (up to a point) against
lightning/surge by TVS diodes.  Low current, fast-blow fuses will be mounted on a
"base board" in the enclosure that the board plugs into.  No illusions about
successfully taking a close/direct hit.  My previous prototype survived several hits
with no problems other than blown fuses and one very close hit that took out about
$8 worth of parts across two boards.

- The data bus is pseudo-CAN.  I use a CAN driver but I'll be doing the
beginning-of-message bus arbitration by bit-banging (PD2, PD3) and then switch to
the USART for actual data transfer.  In the future I hope to switch to a AT90CAN128
(built-in CAN support) but I wanted to limit the initial hardware/software learning
curve so I could get the next version out faster.  I realize that this will severely
limit my speed/flexibility for now but it will allow me to test communications on
the long (1,000's of feet) bus, etc. and I have to walk before I run.  Switching to
true CAN later will allow me to take advantage of standard CAN I/O expanders, etc.

- I think I have addressed chip bypass issues - do I need more than one bypass cap
on the ATMega32a?

- Later the 7805 linear regulator will be replaced by a switching regulator to
reduce demand on the power bus (1,000's of feet long - I'm aware that there are lots
of issues here).  Again, I wanted to limit the introduction of too much new
technology in this go-around. 

- I will create a small "Diag" module that plugs onto the "Diag" header.  It will
have LCD screen, "joystick" menu, etc. - possibly based on the AVR Butterfly.  It
will use I2C (new to me) to communicate with the processor, monitor the CAN bus
(hence I brought out CANH/CANL), etc.  "Diag_Present" will be pulled low by the
module to notify the processor that the module is connected and wants to communicate
via the I2C bus (I considered periodic polling of the Diag I2C address but thought
this wasteful of processor time).  "Diag_Int" is there to allow the module to
interrupt the processor but I don't have a specific use at the moment.  Other
signals I should bring out to this header?

- The Railroad Signal Head LEDs (10mm, ~10 ma each) will be connected to the
TLC59116 outputs.  The LED commons will be connected to the unregulated V+ to reduce
demand on the regulator and noise on VCC. 

- I picked a 14.7456 MHz crystal so that I would have 0% USART bit rate error up to
230.4 Kbps.  At the moment, I have no idea what bus rate I'll be able to maintain on
the long cable.  One of the purposes of this board version is to investigate this.
At the moment I'm thinking that I'll be using a lower rate for arbitration (via PD2,
PD3) and then switch to a higher rate for data transfer via the (interrupt driven)
USART.

- Jumpers TB1-TB7 supply bias to the track.  In some cases the bias is supplied at
the distant end of the track section (to allow detection of a "broken rail") by a
board with a similar network.

- Unused processor pins were brought out to the connector to allow for as yet
unknown functionality - hey, I had extra pins :-) ...



Board:

- The board is 2.750" x 2.375" designed to fit into a standard PVC "single-gang"
switch box enclosure available at Lowes/Home Depot, etc.

- The holes in the corners of the board are to facilitate locating pins to
facilitate machining both sides of the prototype boards using "Isolation Milling"
(using pcb-gcode, MACH3 and a Sherline CNC mill).

- The TVS diodes are mounted on the bottom side of the board.  I attempted to keep
the traces short between the TVSs and the connector as well as ground.

- I couldn't seem to find (Mouser/Digikey) a socket for the crystal (FOXSLF/147-20)
so I'm using pin sockets from MillMax for the moment (can anyone point me to an
appropriate socket?).

- JP1 is on the bottom side.  It plugs into a connector on the "base board" within
the enclosure.  The holes at the ends of JP1 are to mount a handle on the top side
to facilitate insertion/removal of the board.

- Signal assignments to connector JP1 were chosen to make board layout/trace routing
easier.

- I know that the 7805 does not have a large heat sink pad but I don't think I'll be
drawing enough for that to be a problem (see also the next item).

- This board was auto-routed (I use Eagle).  The ground needs to be hand-routed but
I have been moving/changing things so much (ergo a lot of "ripup !; auto !;") that I
have stayed with auto-route for the moment.  I realize that this is a crutch and
"real men" don't use the autorouter :-)  This board is mostly to check functionality
and develop the software, I'll hand route GND/VCC/V+ on the next board.  I was also
having problems with the auto-router and GND/VCC planes (the board would auto-route
without them but not with them) so I eliminated them for the moment (I also tried
"FreeRouter" on the web).  I'll be re-addressing this issue when I hand-route the
next board.

Well, that should give you enough to shoot at.  I realize that there are a lot of
design considerations, application considerations, etc. that will cause you to ask
"why did you do it that way" but to describe all that would have required a lot more
reading (and me to remember all the considerations) so I beg your forgiveness on
that aspect.  If something really jumps out at you, feel free to ask ...
 
Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844 http://www.whitetrout.net/Chuck

Re: [AVR-Chat] Looking for critique on board layout

2010-11-06 by Geo

Chuck Hackett wrote:
> I know this is dangerous, but ... :-)
>
> I'm looking for a critique of the board layout for my first significant project.
>   
I have had a quick look - might be easier to post the actual board files 
as I could not switch off layers in the pdf to see things more clearly.
Two thoughts - I was looking initially at the autorouting (obvious) and 
the vias around the connector. When hand soldering thru-hole components 
it is /very/ easy to short to any vias which are too close. The one 
between pins 12 and 14 is particularly vulnerable against pin 11.

Looking  at the track from IC3 pin 6 to IC3 pin 2 (CANL) this has three 
unnecessary vias by JP1 when it could have continued directly to pin 18 
without changing layer at all.
I don't know /anything/ about CAN but given your schematic, would have 
kept CANL and CANL at one end of JP1 (moving IC3 to the right of IC7) 
and keeping the tracks with (say) double clearance from anything else 
since the bus does not enjoy the protection you have applied to other 
pins for external wiring.

I would also move any tracks *well* away from fixing holes bearing in 
mind the possible use of oversize screw heads/washers and slipping 
screwdrivers.

A minor point - I would bring out the tracks from pins 2, 3 and 5 of IC7 
(GND) slightly away from  the IC pads before joining them since a track 
across the pads could possibly rob solder from the pins.

Good luck with the project.

George Smith

Re: Looking for critique on board layout

2010-11-06 by n1ist

On the schematic:
- The 7805 wants a ceramic cap (100-330nF) on the input side to reduce the chance of oscillating
- The general rule of thumb is one 100nF bypass cap per power pin on each IC
- Aref should be connected to a 100nF cap to ground, not Vcc
- Stylistic note - you should not have any 4-way connections on the schematic (like either end of R3).  They make it hard to catch inadvertant connections or missing ones where nets cross
- I would add a 6-pin ISP header, just in case
- You may want to add a 120R resistor and jumper across the CAN bus for termination

On the board:

- Power and ground traces appear too thin.  You want them wider to reduce both resistance and inductance
- The TVS need a good ground return so any clamping current doesn't get sent through other parts
- There's a topside trace under IC5's tab.  It is too easy for that to short to the tab
- Place an obvious pin-1 indicator by the connectors so you don't have to keep flipping the board over to find the square pad
- Some board houses don't like having silk screen on solder pads

/mike

Re: [AVR-Chat] Looking for critique on board layout

2010-11-07 by David Kelly

On Nov 6, 2010, at 10:54 AM, Chuck Hackett wrote:

> I know this is dangerous, but ... :-)
> 
> I'm looking for a critique of the board layout for my first significant project.

In addition to the other excellent suggestions I'm concerned about how close you have placed traces to the top edge of the board. Perhaps they are 50 mils off, I can't really tell.

How are you mounting this board? I see what appear to be two holes to each side of a big connector. Two isn't enough, and those appear to be related to the connector.

As has already been suggested, add the ISP header. You have to have the ISP to put the chip in JTAG mode. You have to have the ISP to recover from certain goofs you can do  in JTAG mode.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Re: Looking for critique on board layout

2010-11-07 by ecros_technology

--- In AVR-Chat@yahoogroups.com, David Kelly <dkelly@...> wrote:

> ... You have to have the ISP to
> put the chip in JTAG mode.

This is not true.  The ATmega32A will program and debug at the JTAG interface as delivered by Atmel.  So will all the other JTAG-capable devices of which I am aware.  JTAG is not a "mode".

> ... You have to have the ISP to
> recover from certain goofs you
> can do in JTAG mode.

The only goof you can make that will lock you out of the JTAG port is to disable JTAG by clearing the JTAGEN fuse.  This is an easy goof to avoid, unlike the infamous clock fuse goofs.

Personally, I would not bother with an ISP connector.  You can do everything that you can do with ISP using JTAG, and more.  I would consider test points on the ISP signals, plus any un-used port pins, that in dire emergency could be wired to an ISP interface.

Also, there's no need to bother with an external power-on-reset chip.  The internal one works fine.

Graham.

Re: [AVR-Chat] Re: Looking for critique on board layout

2010-11-07 by David Kelly

On Nov 7, 2010, at 6:02 AM, ecros_technology wrote:

> --- In AVR-Chat@yahoogroups.com, David Kelly <dkelly@...> wrote:
> 
>> ... You have to have the ISP to
>> put the chip in JTAG mode.
> 
> This is not true.  The ATmega32A will program and debug at the JTAG interface as delivered by Atmel.  So will all the other JTAG-capable devices of which I am aware.  JTAG is not a "mode".
> 
>> ... You have to have the ISP to
>> recover from certain goofs you
>> can do in JTAG mode.
> 
> The only goof you can make that will lock you out of the JTAG port is to disable JTAG by clearing the JTAGEN fuse.  This is an easy goof to avoid, unlike the infamous clock fuse goofs.

Thats what I get for posting without recently checking the datasheets.

What I said is true for DebugWire, but the part in question isn't DW.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

RE: [AVR-Chat] Looking for critique on board layout

2010-11-08 by Dave McLaughlin

Hi Chuck,
 
You need to put 1 decoupling cap per VCC pin on the device, as close to each
pin as possible. I would also consider putting a small 0805 inductor between
the VCC and AVCC to reduce noise at this input. Also put a 0.1uF decoupling
at this pin too. AREF can be fed from the same point. I assume you ADC input
is not critical anyway, but these measures will give a cleaner output and
good practice. I use the same setup with an MCP3424 from Microchip which I
run at 16 bit and it is very quiet using this supply input.
 
As someone else suggested, you don't need the reset IC. This reduces your
cost as at AVR has a very good built in reset circuit. I have never had a
single issue with them using the internal reset.
 
Looking at the PCB, your power rails look a little on the light side. You
might want to setup the auto router (if it allows this) to use thicker
tracks for the power rails. GND is not a real issue if you can plan to lay
down a GND plane but the VCC needs to be a little thicker and depends on the
current draw at each point in the circuit. I don't know what the digital
outputs are capable of as this is likely to be the point to consider this.
 
You don't have any termination on the CAN bus. You need to consider adding a
link selectable 120R resistor for this.
 
I am not sure your arbitration will work well using the UART and remember
you will see the transmission on the receive side. The reason it may fail is
that your initial bit bang could be the same for 2 devices transmitting at
the same time prior to the UART stage. After the UART is started, any
difference will cause an arbitration on the bus and possible loss of the
message due to corruption and unless you read back the transmitted message
you won't see this! Interesting concept and I would be interested to seeing
how it works out for you. With the amount of work coding wise you need here
to support this, you could have used the CAN based micros and used the same
time to get them working. Not as hard is it seems by the way. The only
downside is that the devices are larger with more pins.
 
Have you considered manual routing. Ideally the CAN High and Low should be
routed as a differential pair but if your bus speed is low, you should be OK
with the way it is now.
 
Your 7805 based design should be OK but as you have no heat sink, just
ensure that you total circuit current is kept low to avoid this running hot
and starting to fail on the output. The National Semi switching regulators
are really easy to design with and their webench design environment makes
this even easier. I have never had a design not work using the webench.
 
Any reason why the switch S2 is spread all over the IO Pins? Could not you
connect direct to PORT B and move the other IO on Port B to the other pins
used by S2. This will make software much simpler.
 
One last thing, that is mainly just cosmetic. On your inputs at the bottom
of the schematic, the GND connections don't look the same as the other GND
connections.
 
Good luck with the project and keep us all updated. Good job so far and good
to see you having a real go at rolling your own. A good learning exercise
too.
 
Dave.
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Chuck Hackett
Sent: 06 November 2010 22:55
To: AVR-Chat
Subject: [AVR-Chat] Looking for critique on board layout
 
  
I know this is dangerous, but ... :-)

I'm looking for a critique of the board layout for my first significant
project.

This board is designed to control signals for outdoor ride-on railroads
(which I
think I've spoken about here before). The board senses track voltages and
drives
multiple 3-LED signal heads accordingly. I have a previous, much larger
setup using
a commercial "development board" with an ATMega16 and an "interface" board I
made
for initial feasibility testing. I'm now adding communications (pseudo-CAN)
and
going to an ATMega32a (more program space for communications protocol,
etc.). There
were lots of design decisions that went into it that I won't go into here.
What I'm
looking for is feedback on the circuit design and board layout - be gentle
:-)

Images:
Schematic:
http://www.whitetrout.net/Chuck/temp/Signal_Interface_sch.pdf 
Board: http://www.whitetrout.net/Chuck/temp/Signal_Interface_brd.pdf 

Schematic:

- The power, track(rail) inputs, and data bus are protected (up to a point)
against
lightning/surge by TVS diodes. Low current, fast-blow fuses will be mounted
on a
"base board" in the enclosure that the board plugs into. No illusions about
successfully taking a close/direct hit. My previous prototype survived
several hits
with no problems other than blown fuses and one very close hit that took out
about
$8 worth of parts across two boards.

- The data bus is pseudo-CAN. I use a CAN driver but I'll be doing the
beginning-of-message bus arbitration by bit-banging (PD2, PD3) and then
switch to
the USART for actual data transfer. In the future I hope to switch to a
AT90CAN128
(built-in CAN support) but I wanted to limit the initial hardware/software
learning
curve so I could get the next version out faster. I realize that this will
severely
limit my speed/flexibility for now but it will allow me to test
communications on
the long (1,000's of feet) bus, etc. and I have to walk before I run.
Switching to
true CAN later will allow me to take advantage of standard CAN I/O
expanders, etc.

- I think I have addressed chip bypass issues - do I need more than one
bypass cap
on the ATMega32a?

- Later the 7805 linear regulator will be replaced by a switching regulator
to
reduce demand on the power bus (1,000's of feet long - I'm aware that there
are lots
of issues here). Again, I wanted to limit the introduction of too much new
technology in this go-around. 

- I will create a small "Diag" module that plugs onto the "Diag" header. It
will
have LCD screen, "joystick" menu, etc. - possibly based on the AVR
Butterfly. It
will use I2C (new to me) to communicate with the processor, monitor the CAN
bus
(hence I brought out CANH/CANL), etc. "Diag_Present" will be pulled low by
the
module to notify the processor that the module is connected and wants to
communicate
via the I2C bus (I considered periodic polling of the Diag I2C address but
thought
this wasteful of processor time). "Diag_Int" is there to allow the module to
interrupt the processor but I don't have a specific use at the moment. Other
signals I should bring out to this header?

- The Railroad Signal Head LEDs (10mm, ~10 ma each) will be connected to the
TLC59116 outputs. The LED commons will be connected to the unregulated V+ to
reduce
demand on the regulator and noise on VCC. 

- I picked a 14.7456 MHz crystal so that I would have 0% USART bit rate
error up to
230.4 Kbps. At the moment, I have no idea what bus rate I'll be able to
maintain on
the long cable. One of the purposes of this board version is to investigate
this.
At the moment I'm thinking that I'll be using a lower rate for arbitration
(via PD2,
PD3) and then switch to a higher rate for data transfer via the (interrupt
driven)
USART.

- Jumpers TB1-TB7 supply bias to the track. In some cases the bias is
supplied at
the distant end of the track section (to allow detection of a "broken rail")
by a
board with a similar network.

- Unused processor pins were brought out to the connector to allow for as
yet
unknown functionality - hey, I had extra pins :-) ...

Board:

- The board is 2.750" x 2.375" designed to fit into a standard PVC
"single-gang"
switch box enclosure available at Lowes/Home Depot, etc.

- The holes in the corners of the board are to facilitate locating pins to
facilitate machining both sides of the prototype boards using "Isolation
Milling"
(using pcb-gcode, MACH3 and a Sherline CNC mill).

- The TVS diodes are mounted on the bottom side of the board. I attempted to
keep
the traces short between the TVSs and the connector as well as ground.

- I couldn't seem to find (Mouser/Digikey) a socket for the crystal
(FOXSLF/147-20)
so I'm using pin sockets from MillMax for the moment (can anyone point me to
an
appropriate socket?).

- JP1 is on the bottom side. It plugs into a connector on the "base board"
within
the enclosure. The holes at the ends of JP1 are to mount a handle on the top
side
to facilitate insertion/removal of the board.

- Signal assignments to connector JP1 were chosen to make board layout/trace
routing
easier.

- I know that the 7805 does not have a large heat sink pad but I don't think
I'll be
drawing enough for that to be a problem (see also the next item).

- This board was auto-routed (I use Eagle). The ground needs to be
hand-routed but
I have been moving/changing things so much (ergo a lot of "ripup !; auto
!;") that I
have stayed with auto-route for the moment. I realize that this is a crutch
and
"real men" don't use the autorouter :-) This board is mostly to check
functionality
and develop the software, I'll hand route GND/VCC/V+ on the next board. I
was also
having problems with the auto-router and GND/VCC planes (the board would
auto-route
without them but not with them) so I eliminated them for the moment (I also
tried
"FreeRouter" on the web). I'll be re-addressing this issue when I hand-route
the
next board.

Well, that should give you enough to shoot at. I realize that there are a
lot of
design considerations, application considerations, etc. that will cause you
to ask
"why did you do it that way" but to describe all that would have required a
lot more
reading (and me to remember all the considerations) so I beg your
forgiveness on
that aspect. If something really jumps out at you, feel free to ask ...
 
Cheers,

Chuck Hackett




[Non-text portions of this message have been removed]

Re: [AVR-Chat] Looking for critique on board layout

2010-11-08 by Robert Adsett

On 11/6/2010 11:54 AM, Chuck Hackett wrote:
> I know this is dangerous, but ... :-)
>
> I'm looking for a critique of the board layout for my first significant project.
>

A few suggestions

   - Consider adding power and ground planes.  It frees up your 
available routing space considerably.  Also keeps supply impedances low. 
  That will likely mean not using milling but in my experience milling 
PCBs is overrated.
   - Use Eagles via restrict layer to keep layers from underneath 
connectors and chips.  Especially valuable when hand populating since it 
considerably reduces the chances of a short and since vias are now 
accessible the are available for adding test points or patches.  You may 
have to accept some vias in unfortunate places but I'd at least try to 
remove the issue. Auto-routers will relieve you of tedious work but they 
need a lot of guidance to work well.
   - I'd be worried about the size of the heat sink on the regulator. 
You won't need much of a voltage drop or current draw to overwhelm it. 
Consider more copper on multiple layers with thermal vias.
   - I don't trust crystals to sockets, I'd solder it to the board.
   - Unlike some other's I would keep the supply monitor but I'm paranoid :)
   - On silk screen less is more. Eagle's are overly ornate.  They do 
have it split into several layers as I recall.  All you really need and 
all the is actually useful is an extents indicator, a pin 1 or polarity 
indicator and an ID.
   - Add a silkscreen rectangle (or several) for notes in marker such as 
stuff date, version etc...
   - I normally put PCB part number and rev in copper (the stuffed board 
gets a part number and rev written by marker on silkscreen rectangles)
   - Samtec has a nice sealed connector with a pigtail to a board 
mounted socket that might work for your application, I can look up the 
part number if you like.
   - Don't be afraid to put components on the back of the board, 
particularly passives.  That can free up considerable room if you are 
using surface mount and if you are hand stuffing it's not usually harder 
to handle.

Robert

-- 
http://www.aeolusdevelopment.com/

  From the Divided by a Common Language File (Edited to protect the guilty)
ME - "I'd like to get Price and delivery for connector Part # XXXXX"
Dist./Rep - "$X.XX Lead time 37 days"
ME - "Anything we can do about lead time?  37 days seems a bit high."
Dist./Rep - "that is the lead time given because our stock is live....
we currently have stock."

RE: [AVR-Chat] Looking for critique on board layout

2010-11-08 by Dave McLaughlin

Hi Chuck,
 
Based on Roberts suggestion on vias, if you go for getting a professional
board made up, you can have it soldermasked and avoid the via shorting
issues, but you need to make sure the vias are tented (cover with
soldermask) so need to check how Eagle does this.
 
Professional boards are not that expensive with a number of companies
offering a 1 or 2 off service at a very competitive price. www.ezpcb.com is
one and then there is www.pcb123.com. You can then worry little about doing
through holes and make the via's smaller as you won't have to solder pins in
to join each side. Actually, you would need to make sure there were none
under your AVR if you are going to hand solder as the base of the IC only
has about 0.1mm of clearance with the board surface.
 
Robert has a good point about REV number etc on the PCB. This way you will
know at a glance which version this is, if you happen to make a few modified
versions over time.
 
Dave.
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Robert Adsett
Sent: 08 November 2010 12:14
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Looking for critique on board layout
 
  
On 11/6/2010 11:54 AM, Chuck Hackett wrote:
> I know this is dangerous, but ... :-)
>
> I'm looking for a critique of the board layout for my first significant
project.
>

A few suggestions

- Use Eagles via restrict layer to keep layers from underneath 
connectors and chips. Especially valuable when hand populating since it 
considerably reduces the chances of a short and since vias are now 
accessible the are available for adding test points or patches. You may 
have to accept some vias in unfortunate places but I'd at least try to 
remove the issue. Auto-routers will relieve you of tedious work but they 
need a lot of guidance to work well.
- Add a silkscreen rectangle (or several) for notes in marker such as 
stuff date, version etc...
- I normally put PCB part number and rev in copper (the stuffed board 
gets a part number and rev written by marker on silkscreen rectangles)

Robert




[Non-text portions of this message have been removed]

Re: [AVR-Chat] Looking for critique on board layout

2010-11-08 by David Kelly

On Nov 8, 2010, at 1:04 AM, Dave McLaughlin wrote:

> Professional boards are not that expensive with a number of companies
> offering a 1 or 2 off service at a very competitive price. www.ezpcb.com is
> one and then there is www.pcb123.com.

I have been pleased with PCBFabExpress.com. Can get 5 boards for about $100. Soldermask top and bottom, silk one side only, and plated through holes.

As for vias, I usually put soldermask over them.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

RE: [AVR-Chat] Looking for critique on board layout

2010-11-08 by Chuck Hackett

Gentlemen: 

Thank you very much for the feedback it has been very helpful.  I appreciate you
taking the time to comment.

I have waited a bit to reply so that I could digest the comments and combine replies
into this single message, see individual replies below.  (question: Do members
prefer this type of 'digest'(long) reply or multiple, shorter, individual replies?)

(For those that didn't pickup the original post, this is the board we're talking
about:
	Schematic: http://www.whitetrout.net/Chuck/temp/Signal_Interface_sch.pdf 
	Board: http://www.whitetrout.net/Chuck/temp/Signal_Interface_brd.pdf )

Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844 http://www.whitetrout.net/Chuck


> -----Original Message-----
> From: Geo
> 
> I have had a quick look - might be easier to post the actual board files
> as I could not switch off layers in the pdf to see things more clearly.

Yup, It would be lots easier to see some stuff with some of the layers off.  I
figured that anyone could see the PDF version but next time I'll put up PDF and
Eagle versions.

> Two thoughts - I was looking initially at the autorouting (obvious) and
> the vias around the connector. When hand soldering thru-hole components
> it is /very/ easy to short to any vias which are too close. The one
> between pins 12 and 14 is particularly vulnerable against pin 11.

Yea, I'll have to watch that for my (homemade) prototype boards but I expect it
would be ok for the production ones.

> Looking  at the track from IC3 pin 6 to IC3 pin 2 (CANL) this has three
> unnecessary vias by JP1 when it could have continued directly to pin 18
> without changing layer at all.

Yea, welcome to the Eagle Autorouter.  I have searched the web and posted on the
Yahoo Eagle group but so far I have been unable to turn up any documentation on how
the Autorouter "thinks" (i.e.: methodology & sequence of logic application) or much
documentation on the exact meaning and impact of a lot of the
DRC/Autorouter/Optimizer parameters.  Without this knowledge one can not make best
use of the Autorouter.  There may be lots of "gold" hidden within, but, without a
roadmap it's hard to find it which I think is why many give up on it.

Before I have the production boards made (maybe 50 of them?) I'll increase the size
of the power traces and take the time to do some hand routing to improve the
situation.

> I don't know /anything/ about CAN but given your schematic, would have
> kept CANL and CANL at one end of JP1 (moving IC3 to the right of IC7)
> and keeping the tracks with (say) double clearance from anything else
> since the bus does not enjoy the protection you have applied to other
> pins for external wiring.

The CAN bus does have a TVS protection network, it's IC4 in the schematic and in the
brd PDF it's the three-terminal SMD device located on the bottom side between the
ATMega32a and the 40-pin connector.

> I would also move any tracks *well* away from fixing holes bearing in
> mind the possible use of oversize screw heads/washers and slipping
> screwdrivers.

Point taken.   I think that the holes you are referring to are the large holes at
either end of the 40-pin connector.  These are to mount a top-side handle that will
be used to plug this board into a "base board" (tight fit in the enclosure).  The
base board will have the field wiring terminals as well as fuses on the TVS
protected lines to protect the TVSs and traces from high voltage (using appropriate
clearances on the field side of the fuses) and current in large surge situations
(again, I have no illusions of the board surviving a direct strike).

> A minor point - I would bring out the tracks from pins 2, 3 and 5 of IC7
> (GND) slightly away from  the IC pads before joining them since a track
> across the pads could possibly rob solder from the pins.

Given that the pins are so close (and thus not a lot of area to "suck solder") I
didn't think that this would be a problem but I'll watch for it.

> Good luck with the project.

Thanks, I'll post results down the road.


> -----Original Message-----
> From: n1ist
> 
> On the schematic:
> - The 7805 wants a ceramic cap (100-330nF) on the input side to reduce the
> chance of oscillating

Thanks, I'll add that.  I hadn't seen it used on the Olimex boards I was using as
one guideline.

> - The general rule of thumb is one 100nF bypass cap per power pin on each IC

So I'll need 3 more on the ATMega32A to cover VCC(5, 17, 38), AVCC(27), AREF(29)?
In other words, one on each of the four sides of the package.

> - Aref should be connected to a 100nF cap to ground, not Vcc

Ooops, god catch, I was thinking that I needed to connect this to the ref voltage I
wanted to use (VCC in my case) but forgot that it (can be) connected to AVCC
internally and that use this pin for noise rejection (cap).  I'll definitely make
that change.

> - Stylistic note - you should not have any 4-way connections on the schematic
> (like either end of R3).  They make it hard to catch inadvertent connections
> or missing ones where nets cross

This has me confused.  Can you describe how this should it be drawn?

> - I would add a 6-pin ISP header, just in case

I have always found JTAG to work well for everything I've done.  As far as I know,
the only "shoot your foot off" item is don't ever disable the JTAG fuse.

I guess the production boards wouldn't even need the JTAG header since I could
program the processors prior to mounting and they will have a bootloader for
firmware updates via the CAN bus - but at the moment I'm chicken and want to take my
security blanket with me :-)

> - You may want to add a 120R resistor and jumper across the CAN bus for
> termination

Yes, I thought of this too but decided to place the termination resistor on the
"base board" that this board mounts to.  This way the customer can swap out boards
without having to remember to check the termination setting.  The terminator is more
associated with the field wiring structure than the controller board itself.

> On the board:
> 
> - Power and ground traces appear too thin.  You want them wider to reduce both
> resistance and inductance

Noted, and on the final "some hand routing required" board, I'll do this.

> - The TVS need a good ground return so any clamping current doesn't get sent
> through other parts

That's why I attempted to place them as close to the connector as possible and
picked pins on the 40-pin connector so that there were not long traces from the TVS
to the pin (thus skipping some pins).

That's also why I placed the TVSs on the bottom of the board.  My plan is that, in
the final board, they will connect to a ground plane on the bottom or at least very
heavy traces (I have a separate net class (PROTECTION_PATH) for these.

> - There's a topside trace under IC5's tab.  It is too easy for that to short
> to the tab

I assume you mean the thin one under the two "legs"?  Yea, I'll have to watch that
one (another Autorouter thing).  If you mean the thicker one coming from the right,
that's GND which connects to the GND pour on the large tab of the 7805.

> - Place an obvious pin-1 indicator by the connectors so you don't have to keep
> flipping the board over to find the square pad

The 40-pin is polarized with a hood (besides, the enclosure is so tight you can't
insert it wrong) but, yes, the JTAG and DIAG headers should have clear pin-1
indicators.  I wanted to use polarized connectors but they take up a lot of extra
board real-estate.

> - Some board houses don't like having silk screen on solder pads

Yea, I ran into that in the Eagle DRC check and the file checker that Advanced
Circuits (4pcb) uses.  Lots of the parts in the Eagle libraries have this problem so
I guess, down the road, I'll move the parts I use to my own library and correct
them.  For now I have turned off the offending silkscreen items.


> -----Original Message-----
> From: David Kelly

> In addition to the other excellent suggestions I'm concerned about how close
> you have placed traces to the top edge of the board. Perhaps they are 50 mils
> off, I can't really tell.
> 
> How are you mounting this board? I see what appear to be two holes to each
> side of a big connector. Two isn't enough, and those appear to be related to
> the connector.

The board is mounted to a "base board" via the 40-pin connector on the bottom side
of the board (so this board is kind of like a "daughter" board.

These holes are to accept a top-side handle that will be used to plug this board
into a "base board" (tight fit in the enclosure).

The small holes in the corners of the board are only to facilitate my machining
(isolation routing) of the two sides of the board (maintaining registration).

> As has already been suggested, add the ISP header. You have to have the ISP to
> put the chip in JTAG mode. You have to have the ISP to recover from certain
> goofs you can do  in JTAG mode.

As mentioned above, I have always found JTAG to work well for everything I've done.
As far as I know, the only "shoot your foot off" item is don't ever disable the JTAG
fuse.  ... but then I'm fairly new to this, so ...


> -----Original Message-----
> From: ecros_technology
> 
> > ... You have to have the ISP to
> > put the chip in JTAG mode.
> 
> This is not true.  The ATmega32A will program and debug at the JTAG interface
> as delivered by Atmel.  So will all the other JTAG-capable devices of which I
> am aware.  JTAG is not a "mode".
> 
> > ... You have to have the ISP to
> > recover from certain goofs you
> > can do in JTAG mode.
> 
> The only goof you can make that will lock you out of the JTAG port is to
> disable JTAG by clearing the JTAGEN fuse.  This is an easy goof to avoid,
> unlike the infamous clock fuse goofs.

Ah, thanks for the confirmation Graham.

> Also, there's no need to bother with an external power-on-reset chip.  The
> internal one works fine.

Thanks for that one too.  I was wondering about that since the chip has brown-out
protection, etc.


> -----Original Message-----
> From: Dave McLaughlin
 
> You need to put 1 decoupling cap per VCC pin on the device, as close to each
> pin as possible. I would also consider putting a small 0805 inductor between
> the VCC and AVCC to reduce noise at this input. Also put a 0.1uF decoupling
> at this pin too. AREF can be fed from the same point. I assume you ADC input
> is not critical anyway, but these measures will give a cleaner output and
> good practice. I use the same setup with an MCP3424 from Microchip which I
> run at 16 bit and it is very quiet using this supply input.

Thanks for that ...
 
> ....
> Looking at the PCB, your power rails look a little on the light side. You
> might want to setup the auto router (if it allows this) to use thicker
> tracks for the power rails. GND is not a real issue if you can plan to lay
> down a GND plane but the VCC needs to be a little thicker and depends on the
> current draw at each point in the circuit.

Yup, on my list.

> ....
> You don't have any termination on the CAN bus. You need to consider adding a
> link selectable 120R resistor for this.

Termination resistor is mounted as part of the field wiring, see comments above.

> I am not sure your arbitration will work well using the UART and remember
> you will see the transmission on the receive side. The reason it may fail is
> that your initial bit bang could be the same for 2 devices transmitting at
> the same time prior to the UART stage. After the UART is started, any
> difference will cause an arbitration on the bus and possible loss of the
> message due to corruption and unless you read back the transmitted message
> you won't see this! 

My plan is to encode the preamble (transmitted in the arbitration phase via the
bit-banged pins) such that it is unique on the bus.  Once the preamble/arbitration
phase is complete there should be no one else sending, thus, no collision/corruption
(as I understand it, this is not true in the CAN standard).  One exception is at
power-up but I plan on having the board listen for bus activity before its initial
transmission.

> Interesting concept and I would be interested to seeing
> how it works out for you. With the amount of work coding wise you need here
> to support this, you could have used the CAN based micros and used the same
> time to get them working. Not as hard is it seems by the way. The only
> downside is that the devices are larger with more pins.

A couple of the reasons for not going with full CAN at first are:

- I already have a lot on my plate with this and didn't want to introduce an
additional learning curve (learn the ins/outs of the AT90CAN128 CAN driver, etc.).
In software development a large number of bugs, project overruns can be attributed
to the number of new (to the developer) technologies introduced in a single design.
I wanted to use the auto-arbitration/bus drive ability of CAN, test the physical
layer and retain the ability to upgrade to full CAN in a follow-on version.

- I can use equipment I have to monitor the bus as I'm debugging things

- I have written lots of UART/USART code so I'm on fairly firm ground there.

> Have you considered manual routing. Ideally the CAN High and Low should be
> routed as a differential pair but if your bus speed is low, you should be OK
> with the way it is now.

Yup, it's becoming obvious that I'll have to do at least some manual routing.

Bus length is more important than speed for me at the moment, hence my selection of
a slew-rate limited CAN bus driver.  Right now 56kb would probably be plenty with
something like 128kb being a future max requirement.  Bus speed/distance is one of
the things I'll be investigating in the field (scope and message testing) using this
board.

> Your 7805 based design should be OK but as you have no heat sink, just
> ensure that you total circuit current is kept low to avoid this running hot
> and starting to fail on the output. The National Semi switching regulators
> are really easy to design with and their webench design environment makes
> this even easier. I have never had a design not work using the webench.

I have used National's Workbench.  I think the last design I looked at only needed 5
external components.  I do want to migrate to a switching regulator (and 48vdc field
power bus due to wiring length) but, again, I wanted to limit the new (to me) things
I was introducing in this go-round.

> Any reason why the switch S2 is spread all over the IO Pins? Could not you
> connect direct to PORT B and move the other IO on Port B to the other pins
> used by S2. This will make software much simpler.

Very good point, I'll look at that more closely.  On a quick look it seems easy.

S2 was an afterthought.  I had pins left over and I thought that it would be nice
for configuration options, etc.

> One last thing, that is mainly just cosmetic. On your inputs at the bottom
> of the schematic, the GND connections don't look the same as the other GND
> connections.

Good point.  Originally I had tried to use separate GNDs for the TVS gnd returns and
rest but I ran into problems with Eagle trying to connect them electrically but be
able to control the single physical connection point (connector pins).  I'll
investigate this mre down the road.

> Good luck with the project and keep us all updated. Good job so far and good
> to see you having a real go at rolling your own. A good learning exercise
> too.

Thanks, I'll let you know how it turns out ... and how many traces I had to cut and
re-route :-)


> -----Original Message-----
> From: Robert Adsett

>    - Consider adding power and ground planes.  It frees up your
> available routing space considerably.  Also keeps supply impedances low.
>   That will likely mean not using milling but in my experience milling
> PCBs is overrated.

How do power and GND planes prevent using isolation routing (I use pcb-gcode)?

After doing some fine tuning on my mill I have found 10 mill traces/separation not a
problem.

In many cases I have increased the actual amount of copper that I remove (space
between traces shown by Eagle) so that soldering is easier since there is no solder
mask to prevent bridges (I wish I had steadier hands!)

>    - Use Eagles via restrict layer to keep layers from underneath
> connectors and chips.  Especially valuable when hand populating since it
> considerably reduces the chances of a short and since vias are now
> accessible the are available for adding test points or patches.  You may
> have to accept some vias in unfortunate places but I'd at least try to
> remove the issue. Auto-routers will relieve you of tedious work but they
> need a lot of guidance to work well.

Thanks for that ...

Anywhere you know of to get more detailed info on the Autorouter?

>    - I'd be worried about the size of the heat sink on the regulator.
> You won't need much of a voltage drop or current draw to overwhelm it.
> Consider more copper on multiple layers with thermal vias.

I don't think I'll be taxing the regulator at the moment but I'll watch that.

I also ran into a problem with the Autorouter where, without a GND pour it would
route the board 100% but with a GND pour (polygon covering the whole board) it would
not route 100% (the polygon fell apart in places).  Ideas?

>    - I don't trust crystals to sockets, I'd solder it to the board.

At the moment I wanted to use a socket because I was not absolutely positive that I
would stick with the 14.xxx Mhz Xtal, but, since customers will be handling these in
the field, I think I agree that it might be a good idea to solder them to protect
against one vibrating loose. 

>    - Unlike some other's I would keep the supply monitor but I'm paranoid :)

Who, me?, paranoid? ... :-)

>    - On silk screen less is more. Eagle's are overly ornate.  They do
> have it split into several layers as I recall.  All you really need and
> all the is actually useful is an extents indicator, a pin 1 or polarity
> indicator and an ID.

Yup, that's what I've cut it down to.

>    - Add a silkscreen rectangle (or several) for notes in marker such as
> stuff date, version etc...
>    - I normally put PCB part number and rev in copper (the stuffed board
> gets a part number and rev written by marker on silkscreen rectangles)

In the lower-left corner I have a Part number (BC002) and version date (2010-10-18)
in the silkscreen (top side).  Hadn't considered another additional info on the
copper side.  After all, they are usually together :-)

>    - Samtec has a nice sealed connector with a pigtail to a board
> mounted socket that might work for your application, I can look up the
> part number if you like.

Always looking for a better way - fire away ...

>    - Don't be afraid to put components on the back of the board,
> particularly passives.  That can free up considerable room if you are
> using surface mount and if you are hand stuffing it's not usually harder
> to handle.

The only negative I can think of is that, having SMDs on the back side rules out
"hot plate" soldering for one side.  I do have a hot air "pencil iron" size
soldering iron (~1/16" air discharge) that I use for individual parts - I'm a
beginner at this SMD stuff :-)

This, and a SMD re-work station (hot air head w/a dozen different heads, semi-auto
vacuum dismount, X-Y table, stereo scope, etc.) were lucky auction acquisitions when
GE-Healthcare closed their facility here in Tampa.


> -----Original Message-----
> From: Dave McLaughlin
> 
> Based on Roberts suggestion on vias, if you go for getting a professional
> board made up, you can have it soldermasked and avoid the via shorting
> issues, but you need to make sure the vias are tented (cover with
> soldermask) so need to check how Eagle does this.

I was planning on solder mask and I read about "tenting" on the SparkFun website.
In Eagle, you can tell it to place solder mask over all holes smaller than X so, as
I understand it, all I have to do is specify a size larger than the vias but smaller
than the through-hole component holes.

> Professional boards are not that expensive with a number of companies
> offering a 1 or 2 off service at a very competitive price. www.ezpcb.com is
> one and then there is www.pcb123.com. You can then worry little about doing
> through holes and make the via's smaller as you won't have to solder pins in
> to join each side. Actually, you would need to make sure there were none
> under your AVR if you are going to hand solder as the base of the IC only
> has about 0.1mm of clearance with the board surface.

I will be sending the design out to a board house after I verify basic functionality
with a prototype that I mill, stuff, and test.  I'd hate to pay $80-$100 for a
couple of prototype boards only to discover some dumb mistake.

> Robert has a good point about REV number etc on the PCB. This way you will
> know at a glance which version this is, if you happen to make a few modified
> versions over time.

Changes?  Why would I do that?  :-)


> -----Original Message-----
> From: David Kelly
 
> I have been pleased with PCBFabExpress.com. Can get 5 boards for about $100.
> Soldermask top and bottom, silk one side only, and plated through holes.
> 
> As for vias, I usually put soldermask over them.

Added them to my lest to check out ...

---------- That's it, finally :-) --------------------------------

Thanks again for all your input ...
 
Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844 http://www.whitetrout.net/Chuck

RE: [AVR-Chat] Looking for critique on board layout

2010-11-08 by Alex Shepherd

Hi Chuck,

> - The data bus is pseudo-CAN.  I use a CAN driver but I'll be doing the
> beginning-of-message bus arbitration by bit-banging (PD2, PD3) and then
> switch to the USART for actual data transfer.  In the future I hope to
switch
> to a AT90CAN128 (built-in CAN support) but I wanted to limit the initial
> hardware/software learning curve so I could get the next version out
faster.

I would strongly suggest you NOT do this. If you have any interest in CAN
then you should use proper CAN hardware.

I hadn't got into the detail of your project until today and now that I see
it is a Model Rail Road project I'm now quite interested. 

What you are suggesting in terms of bit-banging the data bus is what
Digitrax LocoNet does - which works but has limitations. I have done several
LocoNet projects over the years and they are available here:
http://embeddedloconet.sourceforge.net However the last few years of MRR
hobby time have been assisting a team of people to develop a new MRR Layout
Control Bus proposal called OpenLCB http://openlcb.org which in due course
may be adopted by the National Model Railroad Association as NMRAnet.

If you were interested in leveraging the OpenLCB codebase and assist in this
development we would certainly appreciate the assistance.

Regards

Alex Shepherd

Re: [AVR-Chat] Looking for critique on board layout

2010-11-09 by Robert Adsett

On 11/8/2010 11:30 AM, Chuck Hackett wrote:
>> -----Original Message-----
>> From: Geo
>>
>> I have had a quick look - might be easier to post the actual board files
>> as I could not switch off layers in the pdf to see things more clearly.
>
> Yup, It would be lots easier to see some stuff with some of the layers off.  I
> figured that anyone could see the PDF version but next time I'll put up PDF and
> Eagle versions.

Print each layer to a separate page pdf separately (as well as a page 
with all layers on).  Makes it easier for those without Eagle to view.

>> - There's a topside trace under IC5's tab.  It is too easy for that to short
>> to the tab
>
> I assume you mean the thin one under the two "legs"?  Yea, I'll have to watch that
> one (another Autorouter thing).  If you mean the thicker one coming from the right,
> that's GND which connects to the GND pour on the large tab of the 7805.

Another place to use Eagles restrict layers.  There is a layer to mark 
areas where vias should not be placed, one to mark where component side 
copper traces should not be routed and one to mark where solder side 
copper should not be routed.  More notes on autorouting later.

>>     - Consider adding power and ground planes.  It frees up your
>> available routing space considerably.  Also keeps supply impedances low.
>>    That will likely mean not using milling but in my experience milling
>> PCBs is overrated.
>
> How do power and GND planes prevent using isolation routing (I use pcb-gcode)?

Well, you could glue boards together after routing them to produce a 
four layer board.  I know it can be done but I've never been tempted to 
try. The usual technique, I understand, is to route the inner planes 
(usually power and ground) first on a double sided board and then route 
the signal layers on single sided boards before glueing the whole thing 
together.  I don't recall how connections were made to the inner layers.

Me, I let a board house take care of it, they have proper plating 
equipment to plate the vias to connect to the inner layers.

Proper power and ground planes do help routing a lot.  Since power 
traces are never very long, just long enough to drop a via to the plane, 
your signals never need to crawl all over the place to weave in amongst 
power and ground traces.

I really recommend you at least try routing with separate power and 
ground planes (IE a four layer board) and see how it frees things up for 
you.

> After doing some fine tuning on my mill I have found 10 mill traces/separation not a
> problem.
>
> In many cases I have increased the actual amount of copper that I remove (space
> between traces shown by Eagle) so that soldering is easier since there is no solder
> mask to prevent bridges (I wish I had steadier hands!)
>
>>     - Use Eagles via restrict layer to keep layers from underneath
>> connectors and chips.  Especially valuable when hand populating since it
>> considerably reduces the chances of a short and since vias are now
>> accessible the are available for adding test points or patches.  You may
>> have to accept some vias in unfortunate places but I'd at least try to
>> remove the issue. Auto-routers will relieve you of tedious work but they
>> need a lot of guidance to work well.
>
> Thanks for that ...
>
> Anywhere you know of to get more detailed info on the Autorouter?

Years ago on Eagle's support forums there was a few comments from one of 
Eagle's developers.  Mostly commenting on an autorouter control file 
submitted by a user that produced better results.  I still have that 
around and use variations on it since I'm using the oder version.  It 
might be worth tracking that commentary down but I don't remember there 
being a lot of meat to sink your teeth into.

A few suggestions for making optimal use of the autorouter.  Eagle's is 
not state of the art but it is useful for those of us who can't route 
1000 signal an hour on a 10,000 signal board.

    - First use it to help optimize part placement. By rough placing 
parts and doing an autoroute some changes to placement that would be 
easier to route become obvious that are not obvious when everything is 
obscured by the ratsnest.  Sometimes a couple of cycles of autoroute, 
ripup, move can make quite a difference.

    - Second hand route critical traces. Those that you want just so. 
Sometimes you can get a reasonable first pass on those by autorouting 
just the critical signals and then hand optimizing.  Save this as an 
intermediate file so you can use it as a base for further autorouting. 
Rather than ripping up the whole board, or tediously selecting what to 
rip-up yo simply start with a previously saved version that has what you 
want to keep constant as you work on other routing.

    - Make use of keep outs and restricts.  One useful technique when 
routing a number of parallel lines is rather than rely on the autorouter 
to get is correct when considering everything is to create a routing 
channel with restrict areas to hem in the traces.  Then route just the 
signals that are running parallel.

    - after everything is routed, review the result for obvious 
optimizations to do by hand.

All of this is more work than just letting the autorouter do whatever it 
wants but less than doing everything by hand.  The results are likewise 
intermediate.  Generally, however, only a few areas are critical enough 
to require hand attention.

Myself I find Eagle's biggest lack not the old autorouter but the fact 
it doesn't have hierarchical schematics.



>
>>     - I'd be worried about the size of the heat sink on the regulator.
>> You won't need much of a voltage drop or current draw to overwhelm it.
>> Consider more copper on multiple layers with thermal vias.
>
> I don't think I'll be taxing the regulator at the moment but I'll watch that.
>
> I also ran into a problem with the Autorouter where, without a GND pour it would
> route the board 100% but with a GND pour (polygon covering the whole board) it would
> not route 100% (the polygon fell apart in places).  Ideas?

Yep, only flood fill after routing.  It's another reason to use power 
and ground planes instead of flood fill.

>
>>     - I don't trust crystals to sockets, I'd solder it to the board.
>
> At the moment I wanted to use a socket because I was not absolutely positive that I
> would stick with the 14.xxx Mhz Xtal, but, since customers will be handling these in
> the field, I think I agree that it might be a good idea to solder them to protect
> against one vibrating loose.

Unless you expect the customers to replace the crystal I wouldn't even 
consider socketing it for an embedded device.

>>     - Add a silkscreen rectangle (or several) for notes in marker such as
>> stuff date, version etc...
>>     - I normally put PCB part number and rev in copper (the stuffed board
>> gets a part number and rev written by marker on silkscreen rectangles)
>
> In the lower-left corner I have a Part number (BC002) and version date (2010-10-18)
> in the silkscreen (top side).  Hadn't considered another additional info on the
> copper side.  After all, they are usually together :-)

I use the copper for PCB part and rev info and a write on silkscreen 
section for the stuffed board part number and rev.  On occasion there's 
not enough room in the copper to put board info and I have to move it to 
the silkscreen.

A also usually put a layer indicator in each copper layer so I might 
have one copper layer labelled Component, one labelled solder, one 
labelled Power and one labelled Ground.  I've also seen them labelled 0, 
1, 2, 3.  Mostly a holdover from manual tape and photo days but still 
occaisionally useful, if nothing else it's a nice paranoid double check. 
  There's that word again. :)

>
>>     - Samtec has a nice sealed connector with a pigtail to a board
>> mounted socket that might work for your application, I can look up the
>> part number if you like.
>
> Always looking for a better way - fire away ...

Take a look at the SCP/SCR series.   I used the SCP2/SCR2 series on a 
recent project.  A nice sealed plug at the case and a simple dual header 
style plug on the PCB with a prewired connection between them.  ANd from 
Samtec you can get them in small quantities for a reasonable price

http://www.samtec.com/Search/Search.aspx?q=scp#Results

>
>>     - Don't be afraid to put components on the back of the board,
>> particularly passives.  That can free up considerable room if you are
>> using surface mount and if you are hand stuffing it's not usually harder
>> to handle.
>
> The only negative I can think of is that, having SMDs on the back side rules out
> "hot plate" soldering for one side.  I do have a hot air "pencil iron" size
> soldering iron (~1/16" air discharge) that I use for individual parts - I'm a
> beginner at this SMD stuff :-)

You can leave them until you've done all the fine pitch components with 
the fancy gear.  Standard 0805 and larger passives are straightforward 
to do with an ordinary iron.

>> Robert has a good point about REV number etc on the PCB. This way you will
>> know at a glance which version this is, if you happen to make a few modified
>> versions over time.
>
> Changes?  Why would I do that?  :-)

Nah, never happen. :) I forgot to mention another use for those 
silkscreen rectangles is as a place to write a S/N

Enjoy

Robert

-- 
http://www.aeolusdevelopment.com/

  From the Divided by a Common Language File (Edited to protect the guilty)
ME - "I'd like to get Price and delivery for connector Part # XXXXX"
Dist./Rep - "$X.XX Lead time 37 days"
ME - "Anything we can do about lead time?  37 days seems a bit high."
Dist./Rep - "that is the lead time given because our stock is live....
we currently have stock."

RE: [AVR-Chat] Looking for critique on board layout

2010-11-09 by Dave McLaughlin

Don't even try to attempt gluing boards together as this is far more hassle
than having a board house do 4 layer board for you. There is also the hassle
of trying to do this in your software. You effectively have 3 PCB designs.
As I said, not recommended.
 
Looking at the website, Eagle supports multiple layers and most places offer
4 layers for about 2-3 times a 2 layer board which is a pretty reasonable
price for small runs and as Robert says, connecting VCC and GND is a lot
easier than trying to route tracks all over the board. You can also have
other power rails in the power planes using SPLIT PLANE technology but best
left out if you have not done this before.
 
I am now moving all my current and future designs to 4 layer because the
cost now is considerably less than it used to be.
 
Dave.
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Robert Adsett
Sent: 09 November 2010 09:56
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Looking for critique on board layout
 
  
> How do power and GND planes prevent using isolation routing (I use
pcb-gcode)?

Well, you could glue boards together after routing them to produce a 
four layer board. I know it can be done but I've never been tempted to 
try. The usual technique, I understand, is to route the inner planes 
(usually power and ground) first on a double sided board and then route 
the signal layers on single sided boards before glueing the whole thing 
together. I don't recall how connections were made to the inner layers.

Me, I let a board house take care of it, they have proper plating 
equipment to plate the vias to connect to the inner layers.

Proper power and ground planes do help routing a lot. Since power 
traces are never very long, just long enough to drop a via to the plane, 
your signals never need to crawl all over the place to weave in amongst 
power and ground traces.

I really recommend you at least try routing with separate power and 
ground planes (IE a four layer board) and see how it frees things up for 
you.




[Non-text portions of this message have been removed]

RE: [AVR-Chat] Looking for critique on board layout

2010-11-10 by Chuck Hackett

> From: Alex Shepherd
> 
> Hi Chuck,
> 
> > - The data bus is pseudo-CAN.  I use a CAN driver but I'll be doing the
> > beginning-of-message bus arbitration by bit-banging (PD2, PD3) and then
> > switch to the USART for actual data transfer.  In the future I hope to
> switch
> > to a AT90CAN128 (built-in CAN support) but I wanted to limit the initial
> > hardware/software learning curve so I could get the next version out
> faster.
> 
> I would strongly suggest you NOT do this. If you have any interest in CAN
> then you should use proper CAN hardware.

I am using a proper CAN physical layer (cable infrastructure, and bus drivers).  I
am also using the same arbitration methodology but I am just simplifying the upper
levels because I need to get the next development version of my controller out in
the field for testing.  

I agree that that I want to get to full CAN eventually but I don't have the time
required to become familiar with the ins and outs of full CAN, develop/purchase CAN
monitoring hardware/software (including the upper most level message formats that
are unique to my application) and there are other features in this version that don
not need CAN/Datacom.  In addition, my test site needs to implement more blocks, and
I don't want to build any more of the current (now obsolete) block controllers.

> I hadn't got into the detail of your project until today and now that I see
> it is a Model Rail Road project I'm now quite interested.

Well, if you call this a "model" locomotive: http://www.whitetrout.net/Chuck/844

> What you are suggesting in terms of bit-banging the data bus is what
> Digitrax LocoNet does - which works but has limitations. 

I'm willing to live with the limitations for the short term ...

> I have done several
> LocoNet projects over the years and they are available here:
> http://embeddedloconet.sourceforge.net However the last few years of MRR
> hobby time have been assisting a team of people to develop a new MRR Layout
> Control Bus proposal called OpenLCB http://openlcb.org which in due course
> may be adopted by the National Model Railroad Association as NMRAnet.
> 
> If you were interested in leveraging the OpenLCB codebase and assist in this
> development we would certainly appreciate the assistance.

My application is similar, except:
- The cable infrastructure is 1,000's of feet and outdoors
- The signals must still be able to function if they become isolated from any
central PC, etc. (or are isolated by design, i.e.: a long ways away).
- There is no control of locomotives (the on-board engineer is in control of that)
- I can't guarantee that a locomotive stops for a red signal (go figure) ...
- ... yada, yada ...

But, there are also many similarities.  I have looked at interfacing (probably via a
protocol bridge) with JMRI at some future date to implement CTC mode control of
signals (in addition to the normal ABS mode with some flow control added), track
displays, etc.

I took a quick look at the web sites you mentioned but it was unclear to me what the
relationship was between them and JMRI (which is mentioned on several pages).

Can you clarify this?  (probably directly to me off-list as we are now away from the
AVR aspects of the project).

(BTW: I also do my own plastic injection molding of the 18th scale signal heads from
ABS plastic.)
 
Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844 http://www.whitetrout.net/Chuck

RE: [AVR-Chat] Looking for critique on board layout

2010-11-10 by Dave McLaughlin

Hi Chuck,
 
Actually, if you can work out the registers and what you need to get CAN
working on the likes of the AT90CAN devices, you don't have to worry about
the arbitration or any message handling other than sticking bytes in the
transmit registers and initiating the transmission. The CAN controller will
take care of all the rest for you, including retransmitting messages that
have clashed on the bus or errored etc. For reception you simply setup ID
masks to detect only messages you are interested in or read all of them and
then decode based on the ID.
 
You have quite a bit of work in your own code just to hand all this yourself
so considering the work you have ahead of you, would it not be wise to jump
straight to CAN itself?
 
The free library from Atmel is built using AVR GCC and I have ported this to
Codevision and I am currently working on a project just now using it and I
can help you get going if you like, as I am sure others here will offer help
too.
 
I can tell you this, once you have a working CAN bus system, you will be
glad to took the time to do it.
 
Dave.
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Chuck Hackett
Sent: 10 November 2010 07:35
To: AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] Looking for critique on board layout
 
I agree that that I want to get to full CAN eventually but I don't have the
time
required to become familiar with the ins and outs of full CAN,
develop/purchase CAN
monitoring hardware/software (including the upper most level message formats
that
are unique to my application) and there are other features in this version
that don
not need CAN/Datacom. In addition, my test site needs to implement more
blocks, and
I don't want to build any more of the current (now obsolete) block
controllers.





[Non-text portions of this message have been removed]

Re: Looking for critique on board layout

2010-11-10 by Eugene

Hi!

Your board looks like auto-routed :)
As people said before:
  1. your components are too near the borders
  2. if it's possible try another placing of components: place all the connectors by sides of the board.
  3. As I said before the routing seems to be not optimal. If you'll try another components placement may be the tracks routing there will be more facilities of optimization.
  4. Use decoupling capacitors with every power supply pins pairs. Try to put the capacitors on one side with the MCU.
  5. You wrote about lightening protection. Use more wide power and protection nets tracks.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.