Sunday 15 May 2011

Loads of servos!

After nearly twelve days of waiting, the micro 9g servos finally arrived from eBay! We originally ordered six but two of them didn't work properly (lots of chattering no matter what position they were moved to) so here's a quick video showing an animation of 4 x new and 2 x old servos.



For anyone interested, here's the full script of the animation being played out:

label 900,1
servo 1000,8,150
servo 1000,9,150
servo 1000,10,150
servo 1000,11,150
servo 1000,12,150
servo 1000,13,150

servo 2000,8,60
servo 2000,9,200
servo 2000,10,60
servo 2000,11,200
servo 2000,12,60
servo 2000,13,200

servo 3000,8,150
servo 3000,9,150
servo 3000,10,150
servo 3000,11,150
servo 3000,12,150
servo 3000,13,150

servo 4000,8,60
servo 4000,9,60
servo 4000,10,60
servo 4000,11,60
servo 4000,12,60
servo 4000,13,60

servo 5000,8,200
servo 5000,9,200
servo 5000,10,200
servo 5000,11,200
servo 5000,12,200
servo 5000,13,200

servo 6000,8,150
servo 6000,9,150
servo 6000,10,150
servo 6000,11,150
servo 6000,12,150
servo 6000,13,150

servo 7500,8,60
servo 7000,9,60
servo 7100,10,60
servo 7200,11,60
servo 7300,12,60
servo 7400,13,60

servo 8000,13,150
servo 8100,12,150
servo 8200,11,150
servo 8300,10,150
servo 8400,9,150
servo 8500,8,150

tloop 8600,1 'goto label 1
end 15000

Monday 9 May 2011

USB servo board with multiple playback points

This is looking like the final version of the servo board and includes a number of cool enhancements. They were really just one enhancement idea that lead onto another, but have made for a pretty impressive final product.

As a few eagle-eyed viewers spotted, the earlier video showed simple playback but did not include looping (although it was mentioned in the write-up). This video not only shows the initial animation looping, but demonstrates the two new looping methods: not really loops, more like GOTO commands.

At any point in the script, the user can place a label.
This is marker point from where you can play back sections of an animation.
Users can place GOTO commands in the script, such as "goto 1500ms" (the animation jumps to the point 1.5 seconds into the animation) or "goto label 4". It is this second GOTO command that makes the servo board so useful:



We've updated the firmware so that one or more of the servo pins can be used as input triggers. Simply tell the board how many input pins you want to use (0-8) and when the appropriate input pin is pulled low, the animation playback jumps to that label number.

For example, pull the first input pin (normally servo 20) low and playback immediately jumps to label 1. Pull the second input pin low (normally servo 19) and playback jumps to label 2. Because our servo pins have ground on the outside and signal on the inner (the middle pin is always 5v) the button in the video simply bridges the two outer pins, to pull the input pin low.

Here's the full script, as used in the video above:

'this is the first animation
'it can also be triggered by sending PORTB.7 low

label 500,1
servo 1000,9,50
servo 1000,10,50
servo 2000,9,220
servo 2000,10,220
servo 3000,9,50
servo 4000,10,50
servo 5000,10,220
servo 6000,9,220
tloop 7000,1000 'go to time point 1000

'this is the second animation loop
'triggered when PORTB.6 goes low

label 10000,2
servo 10000,9,150
servo 10000,10,150
servo 11000,9,220
servo 11000,10,50
lloop 12000,2 'go to label 2

end 15000

Sunday 8 May 2011

USB servo board playback

A quick demonstration showing the usb servo controller board playing back a simple pre-programmed sequence. A description of the animation can be found at http://nerdclub-uk.blogspot.com/2011/05/usb-servo-board-animation-playback-edit.html

The USB connection is used purely to provide a 5V power supply, all controlling is done on the servo board, reading data from the onboard eeprom chip. Final version includes a 5V regulator, allowing a battery supply to be used and no PC connection required.

Playback is initiated by pressing a button.
Playback call also be started by sending data from a PC via USB, or from another device, by serial communications.