Sie sind auf Seite 1von 5

The Spider robot controllers were designed for robots requiring a large numbers of servos

such as humanoid and hexapod style robots. Using an ATmega12! "#U this controller is
fully compatible with the Arduino $ega %12!&.
This controller includes a 'A switch mode power supply and is capable of driving up to (
micro servos directly from the #"). All of the processors *! +,- pins are terminated as
both a female header and a servo compatible 'pin male header.
Features:
ATmega12! 1.$/0 "#U
121 23AS/4 1 S5A$ and (1 66#5-$
US) interface and +S# soc7et
)uilt in 'A switch mode power supply %*8 9 '!8 input&
*! +,- pins with male and female headers
Support for up to ( servos
1.x 1!bit analog inputs
1:x bit #;$ outputs
1x +2"
.x 6xternal interrupt pins
(x Serial communication
"omes with Arduino boot<loader installed
Programming the Spider controller:
The Spider controller has been designed to be 1!!= compatible with the Arduino $ega
and comes with the Arduino boot loader installed. The boot loader allows programs written
in the Arduino +>6 to be uploaded via the US) interface. $ore information about Arduino
can be found here? http?,,arduino.cc,en,@uide,+ntroduction
This manual assumes use of Arduino !!22 or later4 which can be downloaded from here?
http?,,arduino.cc,en,$ain,Software.
A full list of commands can be found here? http?,,arduino.cc,en,5eference,/ome#age
Communications:
The Spider controller has (x serial ports and 1x +A" interface. Serial interface ! is used by
the US) interface. Serial ports 142 and ' are available for use with devices such as serial
interface 3">Bs4 Cbee4 )lue Tooth and ;i2i modules or even other processors.
+nstructions on how to use these serial interfaces can be found here?
http?,,arduino.cc,en,5eference,Serial
The +A" interface %S>A pin 2!4 S"3 pin 21& allows the controller to communicate with
devices such as external memory4 real time cloc7 %5T"&4 >" motor controllers and more.
2or the +A" interface to function properly pullup resistors must be used. Some devices will
include these resistors. +f necessary you can enable the internal pullup resistors on pins 2!
and 21. +nstructions on how to use the +A" interface can be found here?
http?,,www.arduino.cc,en,5eference,;ire
Digital I/O pins:
All *! of the Spiders +,- pins can be used for simple digital inputs or outputs. )y default4 all
pins except digital pin 1' have their mode set to input. ;hen a pin is in input mode it is in a
high impedance state %effectively open circuit&. >igital pin 1' is set to output by the boot
loader and has an 36> attached. Although >1' can be used as an input the 36> may
interfere.
Use the pin$ode%& command to change a pins mode between input and output. Use
digital5ead%& and digital;rite%& commands to read and write to these pins. Note: Analog
pins A! < A1: are digital pins >:( 9 >.D.
;riting a E1F to a digital pin while it is configured as an output will connect that pin to
8cc%G:8&. ;riting a E!F to a digital pin while it is configured as an output will connect that
pin to ground %!8&. 6ach pin is capable of sin7ing or sourcing up to (!mA maximum but
care must be ta7en to limit the total current to 2!!mA. +f you wish to drive large numbers of
36>s or other devices then the output pins should be buffered.
;riting a E1F to a digital pin while it is set as an input will enable that pins internal pullup
resistor. ;hen enabled4 an internal 2!1 resistor is connected between that pin and 8cc
%G:8&. ;riting a E!F to that pin while configured as an input will disable the pullup resistor.
Analog pins:
#ins A! to A1: are by default analog inputs. 6ach analog input has 1!bit resolution and
can measure the voltage on its pin. +nput voltage should not exceed the analog reference
voltage %default value is G:8&.
The input voltage is measured using the analog5ead%& command. The reference voltage is
8cc%G:8& by default. The reference voltage can be changed using the analog5eference%&
command.
PWM outputs:
The Spider controller is capable of generating bit resolution pulse width modulated
outputs on digital pins >2 9 >1' and >(( 9 >(.. The output of a #;$ pin is driven high
and then low repeatedly with the duty cycle being adHusted to synthesi0e an analog output.
)y adding a simple 5" filter to a #;$ output a true analog output can be generated.
#;$ outputs are generated using the analog;rite%& command. As the internal timers of
the processor are used to generate these outputs they may be disabled by other
commands using the same timer. #in assignments should be planned to avoid conflicts.
Eternal interrupts:
The Spider has . interrupt pins. +nterrupts allow functions to be called only when an
external event occurs. These pins are useful for monitoring devices such as encoders. The
interrupts and their pins are?
+nterrupt ! 9 >2
+nterrupt 1 9 >1
+nterrupt 2 9 >21
+nterrupt ' 9 >2!
+nterrupt ( 9 >1D
+nterrupt : 9 >1
$ore information on the interrupt library can be found here?
http?,,arduino.cc,en,5eference,+nterrupts
!sing the EEP"OM memor#:
The SpiderBs Atmega12! includes (1 of 66#5-$ memory that can be used to store
information while the power is off. $ore information on using the 66#5-$ library can be
found here? http?,,www.arduino.cc,en,5eference,66#5-$
!sing ser$os:
All *! +,- pins have a servo compatible ' pin male header. The pin closest to the outer
edge of the #") is ground4 the center pin is G:8 and the inner most pin is the signal. This
pin arrangement is also useful for powering sensors.
$ost miniature and standard servos require between (.8 and .8 and will wor7 happily
directly from the #"). /igh<powered servos requiring .8 or more should be powered via
an external power source or directly from the battery.
The Spider can drive up to ( servos simultaneously using the Servo library?
http?,,www.arduino.cc,en,5eference,Servo
The Servo command uses a timer for each 12 servos used starting with Timer :. As these
timers are also used for commands li7e #;$ you need to plan your pin assignments to
avoid conflicts.
1 to 12 servos use timer : disabling #;$ on pins ((4(: and (..
1' to 2( servos use timers 1I: disabling #;$ on pins 114124((4(: and (..
2: to '. servos use timers 14(I: disabling #;$ on pins .4*44114124((4(: and (..
'* to ( servos use timers 14'4(I: disabling #;$ on pins 24'4:4.4*44114124((4(: and (..
Servos can be assigned to any digital pin from >! < >:'.
Analog pins A! < AD %>:( 9 >.'& can also be used if required.
A short tutorial including sample code for driving ( servos can be found here?
http?,,letsma7erobots.com,node,2:D2'
Shields:
The female headers on the Spider controller are spaced so that a shield can be easily
made from standard prototype #"). Shields allow you add custom circuitry to your
controller.
Alternati$e programming methods:
6xperienced users may choose to use ;inA85 or A85 studio to program their controller
directly via the +S# soc7et. The bootloader can be removed which will fee up an additional
(1 of memory.
WinA%": http?,,winavr.sourceforge.net,
A%" Studio &: http?,,www.atmel.com,microsite,avrJstudioJ:,

Das könnte Ihnen auch gefallen