Wishful Coding

Didn't you ever wish your
computer understood you?

DIY Servo Controller

This is another advanced home-made device, It took me weeks to do it. I was looking at the Mindsensors servo controller, when Matt Allen casually mentioned you could make them yourself. Once I set out to make one, I wanted it to do a little bit more.

I thought it would be nice if it could read input from an RC receiver as well. The final design has 2 readable inputs and 3 switchable ones, so you can directly control the servos.

Starting in the top-left corner, going clockwise, there is the PICAXE programmer header, 3 servo outputs, the servo battery connector, the NXT connector, 2 readable inputs and finally 3 switchable inputs. The PICAXE can directly control the outputs, or route them straight to the 3 non-readable inputs, for remote control.

If you know what you’re doing, this is the stripboard layout I designed. Use wisely, and at your own risk.

The code, more or less compatible with the Mindsensors quick mode.

#picaxe20x2
#no_data
'#define switching
setfreq m32

init:
table 0x00, ("V0.1")
table 0x08, ("pepijn")
table 0x10, ("servo")

for b20 = 0 to 0x17
	readtable b20, @ptrinc
next b20

symbol servin1 = w0
symbol servin2 = w1
symbol servpos = b4
symbol servpin = b5
symbol incontrol = b6

servo B.2,150
servo B.3,150
servo B.4,150
pullup %10100000
hi2csetup i2cslave, 0x02
setintflags %01000000,%01000000

main:
pulsin b.1, 1, servin1
pulsin b.0, 1, servin2
put 0x42, word servin1
put 0x44, word servin2

#ifdef switching
if servin1 < 1200 then
	incontrol = 1
	high C.4
	high C.3
	high C.2
else
	incontrol = 0
	low C.4
	low C.3
	low C.2
endif
#else
incontrol = 1
high C.4
high C.3
high C.2
#endif

goto main

interrupt:
setintflags %01000000,%01000000
hi2cflag = 0
if incontrol = 1 then
	get hi2clast, servpos
	let b20 = hi2clast - 0x5A
	lookup b20,(B.2,B.3,B.4),servpin
	servopos servpin,servpos
endif
return
Published on

Compressor Module

If you want to do anything with pneumatics, you need something to generate air pressure. This is the most simple, compact and efficient solution I could think of, using just one pump.

If you think I’m working on something that involves pneumatic parts, you’d be right.

If you want to use more pumps, maybe Sariel has something for you.

Download Building Instructions

DIY servo controlled pneumatic switches

Unless you have the materials and the skills, this is not for you. I will use this in a robot I’m working on, but Mindsensors sells pre-made versions of the same concept.

What this allows you to do is, using either a RC receiver or a NXT servo controller, make pneumatic robots!

These things are relatively easy to make. Materials:

  • A drilling machine
  • A drill of the same size as LEGO pins.
  • A small drill for the servo screws.
  • A jigsaw
  • A pen
  • Misc. LEGO parts.
  • A small servo with horn and screws.
  • Plywood.
Instructions:
  1. Saw a rectangle big enough for the switch and the servo.
  2. Draw a line around the servo, and a dot through the pinholes of the switch.
  3. Drill out the pinholes, and make an extra hole on the servo outline.
  4. Open the jigsaw, and put the blade through the hole on the line.
  5. Close the saw and saw out the servo hole.
  6. Drill small holes for the servo screws.
  7. Attach the servo and the switch to the wood with any LEGO at hand.
  8. Bend a piece of iron wire around the switch and the servo horn.
Published on