SD21 Servo Mid Position

Yessir

Member
I am having a problem with the SD21 servo control board. When I power it up all the connected servos appear to default to their mid position. This is fine except two servos which I want to default to an end position. On power up these two servos move to their mid position first and then return to their programmed end position some time later.

I thought this was due to writing to the i2c base register (mid position) at the start of my code followed by writing the i2c positive / negative register position some time later in the code. I tried fixing this by writing to the positive / negative register on the line of code immediately after writing to the servo base register but this still does not work.

As a second fix I tried setting the base register value at one end of the servo travel and just using a positive or negative offset to control the servo position. Once again this did not solve the problem.

Does anybody else have any suggestions of what I can try?:confused:
 

Technical

Technical Support
Staff member
Upon powerup of the SD21 it sets all 21 servos to the central position by default. We don't know of anyway around this default behaviour, apart from issuing a move command from the PICAXE as soon as possible after powerup.

See update below.
 
Last edited:

slurp

Senior Member
Sounds like you need to write to Devantech Ltd and ask them for a modification for future products... and ability to store alternative positions for power-up.

It might not fix your current problem but it may get you a better product in the future!

regards,
Colin
 

Yessir

Member
I had another thought:-

Use the Picaxe to control a normally open relay which intercepts the signal wire between SD21 & servo. MY idea is that the relay has normally open contacts, when the SD21 is powered up it sends its normal mid position default signal, but the servo never receives it. I then i2c the positive or negative register followed by a direct output from the Picaxe to close the relay contacts.

How does a servo behave when it has +ve and -ve but no signal wire connected? Am I better intercepting the +ve lead to the servo so that it has a signal but no power for it to move?
 

Marcwolf

Senior Member
Default Position of Servos

Hi There
I am faced with a similar situation.
What I have ended up doing (and you have to hack your Servo board to do this) is to put in a MosFet between the negative of the Servos pins and the main terminal block.

Then hook this MosFet upto your 18X PicAxe on board.

When the Picaxe starts this pin will be low and all the servo's will be unpowered. You can then set the default servo positions and then make the Mosfet pin HIGH to apply power to the servo's thus they will at their default position.

This can also work if you are monitoring the Servo battery - when it gets below a certain point you can power down the servo's thus keeping the power for other purposes.

Hopes this helps
Dave
 

Technical

Technical Support
Staff member
We are pleased to announce that we have worked with Devantech to produce an updated firmware for the SD21 (part AXE031) 21 channel servo driver with an updated command to save all the current servo position values as the default power up positions.

So bascially you set up all servos to their desired power up position and then issue the special command

- writei2c 126,(90)

This saves the current values as the default power up values. This saving takes about 200ms to do, during which time the servos will not be driven and so may 'twitch' once.

For this command you require firmware version 7 or later. You can check the firmware value by reading register 64.

- readi2c 64,(b1)
- debug

All new units will now be sold with this firmware upgrade. If you have an old firmware version we are offering a 'chocolate bar' upgrade.

Post us your old SD21 (to the Bath Business Park address) with a chocolate bar and your return address and we we will reprogram the SD21 and return (minus the chocolate bar, which will naturally be eaten by the person doing the reprogramming!).
 

Marcwolf

Senior Member
Hi Technical

I spoke with Devontech about this some time back. It would be nice to do that however (ahem) my SD21 board has been heavily modified with MOSFET, SD Card Reader and other assorted changes.

So - do you just update the firmware or do just do a swap. (It be really nice for users to do the upgrade themselves - there are 5 holes on the SD21 that look like they were used for something after manufacture)

Take Care
Dave

p.s. - Just a chocolate bar.. No specs re size weight, flavor, quality of said chocolate bar?
 

papaof2

Senior Member
I suspect that priority might be given to Godiva Dark Chocolate versus run-of-the-mill bars ;-)

John
 

Technical

Technical Support
Staff member
Any chocolate bar, ideally your own country brand so we get a bit of variety here!

We reprogram your original board. So no problem if modifications / wires etc are attached, as long as the 5 ICSP pads in the centre of the board are untouched. Due to licensing / copyright / IP issues we do not give out the hex file for users to reburn themselves.
 

Marcwolf

Senior Member
Hi Technical

So that I understand - this mod to the SD21 is so that one can pre-program in the default position of the servo. Nothing else.

There is no way that one can instruct the controller chip to power down a servo.

At the moment (and it does work) I have a MOSFET on the SD21 board controlled by one of the PicAXE outputs to I can load the controller chip with the defaul positions and then power up the servo's - meaning that the servos will generally aready be in the acceptable range from their last use.

I am also monitoring the battery voltage from the controller chip so I can power down the servo's to keep other essential functins running.

Since this is in a costume and heat stress (living in Australia) is a real isue - the wearer's health is paramont at all time. By powering down the servo (or letting the 20ms housekeeping pulse stop) I can ensure that is worst comes to worst the cooling and ventilation fans will be the last to shut down.

Take Care
Dave

p.s. Picture of my modified SD21.

4D-Systems card reader mounted on top of controller chip. 18X PicAxe in socket, and bottom right MOSFET for controlling ground on Servo's.
 

Attachments

magicjohn

New Member
I stumbled across this thread by accident and it will probably solve a similar problem that I have been having.

It's a pity that the "writei2c 126,(90)" command doesn't seem to be documented anywhere! (Except here.) The only documentation I can find also refers to "firmware version 3" so things have obviously moved on since then!

Also, does "writei2c 126,(90)" only work with the SD21's supplied by techsupplies?
 
Last edited:

Technical

Technical Support
Staff member
Devantech added as a standard feature, so as long as the module is fairly new it should have that feature by default.
 
Top