Profitieren Sie von unseren Schul-/Behörden Rabatten
Devantech SD21 - Servo control module up to 21 servos I2C Control interface on-board PIC18F2220

Item number: DEV-SD21

EAN: 4251326822708

Servo Controller for up to 21 Servos I2C control interface Optional Controllers: PICAXE-18x, BASIC STAMP2p, ATOM, BX-24 Servo power: seperate terminals for power Logic power, seperate terminal or from servo supply if 7.2V Expansion: 3* I2C connectors

Category: Servo Controllerboards


41,03 €

including 19% VAT. , plus shipping (Standard)

availability on request (delivery time usually 5-10 working days)


The SD21 is a 21 channel servo controller module. It will drive up to 21 RC servo's and maintain a 20mS refresh rate, regardless of the number of servo's used or their positions (pulse widths). It will control both position and speed of the servo's. It's controlled by sending commands to the on-board PIC18F2220 over the I2C bus. There are 3 I2C connectors on the board, any one of which can be used to connect to your controller. Alternatively, many controllers such as the Picaxe, BS2p, Atom, BX-24 etc. can be fitted directly to the module, making this a great animatronics controller.

Power
There are two ways to power the SD21. The first is to used a 5v supply for the processor section and a separate 6v-7.2v supply for the servo's. This is the recommend method, and the 4-way terminal block allows for this option. The logic and servo grounds are internally connected on the PCB. Not everyone wants to use two batteries, so we have allowed for the use of a single (typically 7.2v) battery to power the servo's and the module. To do this place a link on the two pin header below the terminal block. This routes servo power to a low drop 5v regulator which supplies the logic. The connections must be made to the servo terminals on the terminal block - NOT the logic ones. The SD21 monitors the servo battery voltage, which is available for reading from an internal register.

Servo's
The servo's are plugged directly onto the SD21, with the ground pin (black wire on a hitec servo) nearest the outside of the PCB.

Technical Documentation

See the SD21 controlling a
Lynxmotion EH2 Robot.

Video (5.85MB)

Example Code
This shows how to use a BS2p Stamp to control a servo. It sets up a simple loop which sends the servo between two positions


'{$STAMP BS2p}

SDA CON 0 ' SDA on pin0, SCL on pin1
SD21 CON $C2 ' SD21 I2C address
Servo1 CON 0 ' register address of servo1 speed reg (followed by pos low/pos high)
Speed CON 0 ' maximum speed
Servo1p CON 1800 ' Right position
Servo1n CON 1200 ' Left position

Servo VAR W0

Loop:
Servo = Servo1p
I2COUT SDA, SD21, Servo1, [Speed, Servo.LOWBYTE, Servo.HIGHBYTE]
PAUSE 300
Servo = Servo1n
I2COUT SDA, SD21, Servo1, [Speed, Servo.LOWBYTE, Servo.HIGHBYTE]
PAUSE 300
GOTO Loop

 

This does the same for the Picaxe controller using the alternative register set.


Servo1 = 63 ' servo 1 base register
Servo1p = 84 ' servo 1 positive offset register
Servo1n = 105 ' servo 1 negative offset register
Base = 128 ' centre position
Offset = 50 ' +/- 50 from centre position

ProgStart:
i2cslave $c2, i2cslow, i2cbyte ' setup i2c port for servo controller
writei2c Servo1, (Base)
Loop:
writei2c Servo1p, (Offset)
pause 300
writei2c Servo1n, (Offset)
pause 300
goto Loop


Shipping weight: 0,10 Kg
Contact