My current idea is to build a 6 legged insect using 18 servos, 3 servos and one low end micro per leg. This micro would be on an I2C bus with the master controller to receive instructions about where to move its leg and also to monitor the current draw on each servo so that it could report on stalls and whether the servo is in motion or stationary. This would take a bit of research as the servos will use power to maintain their position but I'm assuming this current would spike when in motion.
The PIC16F88 or (the PIC16F913-I/SP) looks like a good choice for the leg controller. It can be an I2C slave and has multiple IO pins (possibly enough for one processor to manage two legs). They look to be around $NZ9 a piece. Using a 5 way switch could provide some useful feedback.
The master controller would talk USB (or maybe RS232 for starters) to a PC where I could write the 'personallity' in .net code. This code would just specify high level commands like 'left 15 degrees' or 'forward 5 steps'. It would be up to the master controller to pass specific instructions to each of the leg controllers and to report back to the PC any problems.
It would also be possible to use a servo as a directional control for a pair of ultrasonic sensors or light sensors or maybe even a simple CCD.
This is all way beyond my skill level at the moment but my approach would be something like this
- Program the master controller to accept simple, byte code commands from a USB (or RS232) connection. A program to control a few LEDs via USB would be sufficient. There would also need to be some feedback loop so maybe a push button or two that can be queried via the USB.
- Connect a leg controller to the master controller via the I2C bus and extend the above program to be able to report on the status of a pin on the leg controller and control an LED attached to the leg controller.
- Connect another leg controller to the master controller and extend the program to be able to control both leg controllers
- Extend the leg controllers to be able to control 3 (or 6? 2 legs) servos each.
- Worry about the feedback later
I am going to bail you up soon for some animatronic head servo software. I'll build the interface and you can write the servo control code.... That's after I push you around to convert my BMX start gate software for eprom installation.
ReplyDelete