Tuesday, 23 August 2011

Stepper motor controller with jog function

This is a PIC18F4550 and a ULN2803A darlington relay controlling a stepper motor.
The PIC provides a USB interface to the host PC, allowing you to send a specific number of steps and a rotation direction. The motor can also be turned using the "forwards" and "backwards" jog buttons.

The noise in the video is not rowing neighbours, as suggested by some viewers, but a Radio4 play and my partner on a sewing machine in the other room!


In this example, I'm using a 1.8 degree stepper motor. I'm driving it using half-step rotation, so one rotation = (360/1.8)*2 = 400 steps. You can see this value being entered into the USB/HID app on the laptop - 400 as two bytes is 1(HB) and 145(LB)
Working this back, 1*255 + 145 = 400

When the "send data" button is pushed, the stepper completes one single, full rotation.

Friday, 19 August 2011

Miniature playable synth

While it's been a while since we posted a video here, we've have been busy making cool stuff and trying out new ideas (just check out the main blog for details).
Anyway, here's the latest development: it's part of our miniature instruments range - a tiny 17-key, fully playable, fully-polyphonic, USB synthesizer.

Friday, 1 July 2011

CNC machine working!

After nearly two weeks of messing about, trying to learn five different types of CNC controlling software, we eventually gave up trying to be different and fell into line with most other CNC users and installed MACH3.

Tom from almostobsolete is our resident G-Code guru and hand crafted some code, off the top of his head, to create a drawing. After pressing go, it wasn't long before we could answer his "can you tell what it is yet?" Rolf Harris style impression.



The video was taken on Robot Steve's Android phone but for some reason the video clarity is nowhere near as good as in his previously uploaded video...

What's pretty exciting about getting the CNC machine to actually work is that we've already a whole load of PCB layouts designed, waiting to be etched. The idea is to pre-drill the copper boards, then use press-n-peel to create the etching mask. That way, we don't have to worry about boards being skewed or starting off the drilling in the wrong place and knackering up an entire A4 sheet of pre-etched copper board!

Laser cutting boxes

Here's a quick video showing the laser cutter at BuildBrighton in action.
It's cutting out a box, designed using BoxMaker, from http://rahulbotics.com/personal-projects/boxmaker/?boxmaker.
The video was uploaded from Robot Steve's Android phone no less.

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.