So having decided to create a new board layout I fired up
Eagle and produced a logical schematic and then a physical board layout. This
isn’t an Eagle tutorial so I wont give any more info on how I did that.
The attached ZIP file contains the Eagle Shematic, Eagle Board and a standalone PDF I used to manufacture the board.
I also
produced an Eagle 3D picture of the board so for all of you non-Eagle users out
there then you can see what we are making:-
So lets break the image down:-
The
micro-controller is either an ATMega8 or ATMega168 – as per the $50
Tutorial. In fact the only difference between this and the $50 Robot is
the number of header pins, the header pins dedicated to the UART, and an
optional power switch. Otherwise the $50 Robot Tutorial will tell you what
all the other components are and where to get them.
You
will see that there are two parallel rows of 3 x header pins on the left
of the controller and on the bottom right of the controller. There is some
duplication here but it makes the layout easy to understand. Each 3 pin
header is connected to one micro-processor I/O pin. The pin closest to the
micro-controller is the ‘signal’ from the controller. The pin furthest
away from the controller is ‘Ground’, ‘0V’, or ‘Earth’ – depending on your
favoured terminology – I will call it ‘Ground’. The middle pin is the
‘power. For the group of header pins closest to the controller the middle
pin is connected to the +5v TTL supply and is intended for connection to
sensors and anything else that doesn’t require lots of power. For the
outer set of 3 pins the middle pin is connected to the motor supply and so
is meant to control servos, motors etc. So if you have a lead from a
sensor then connect it to the inner set of headers but connect your
servo/motors to the outer set of headers. Needless to say:- you can only
choose one – ie you cannot use the inner and outer headers for the same
pin to do different things!
The
set of pins on the top right of the micro-controller are for ADC inputs.
There is only an inner set of pins (ie +5v).
See
those white plugs at the top of the board – they are the power connectors.
One for the TTL supply (a 9v battery that goes into the regulator and
supplies +5v to all the chips), and the other for the motor/servo supply.
I’ve used connectors that prevent you from connecting a battery the wrong
way around.
Top
right of the board – that’s the voltage regulator and supply capacitor.
Top
left – you will see the red LED and a small resistor. These are connected
to the same I/O pin as in the $50 Robot. Make sure you solder the LED the
correct way round.
Top
left – just below the red LED you will see a 4 pin header. Well that’s for
the UART or ‘serial interface’.In
common with the other headers the pin furthest from the controller is the
ground. The next pins are +5v, transmit and then receive (closest to the
controller). More often than not we use a serial interface to transmit
data to a PC (via a MAX232 interface say) or to a serial LCD display. In
which case a standard 3-way cable (as used by sensors) can be used to
connect the left three pins to the output device.
See
that big ‘hole’ at the top middle of the board? Well that’s for an on/off
power switch. I’ve used a two-pole switch so that we turn on/off BOTH of
the power supplies. But a word of warning. Since the switch controls the
motor/servo supply then make sure that the switch is capable of handling
the total power (watts) that your motor will need – that’s why I don’t
show a picture of what the switch looks like.If in doubt then you can get rid of the switch by shorting
out the top row of 3 holes, and then separately shorting out the bottom
row of 3 holes. Doing this will mean that there is no switch on the board.
The
bottom middle of the board has 2 rows of 3 pins which are the ISP header
for connecting to your computer to program ‘the chip’.
Half
way down the right hand side of the micro-controller you will see a small
red thing – this is the ceramic capacitor used to reduce noise on the ADC
inputs.