|
|
But the Availabot is obviously only a push puppet with a servo. So it's easy to make a similar device with a push puppet of your liking.
You can download complete instructions and software to make this cute toy yourself and use it with Xchat or Gaim here: push_puppet_toy-0.0.5.tar.gz
You will also need a servo : it should be strong enough to push the base of the push puppet. Mine's a Protech B112, which provides a torque of 2.5kg.cm and doesn't cost too much. The spring in my push puppet pushes about 2kg and the button needs to move about 1cm, so the B112 is about right, although it does tend to strain a bit.
You will also need the following components to make the servo control circuit:
The 16F628A is a PIC microcontroller from Microchip. It requires a PIC programmer to burn the program into it. If you already have one, chances are you already know about PICs. If you don't, add one to your shopping list or make your own from one of the numerous plans out there on the internet and discover the fun of PIC programming. I personally use the Velleman K8048 (http://www.vellemanusa.com/us/enu/product/view/?id=500373) which is cheap, good quality, provides an ICSP (in-circuit) programming socket, and happens to work okay with Linux. All the other components are standard and easy to find. Here is the schematic for the controller circuit:
Finally, you will want a sturdy box that looks good on the outside to serve as a base for the push puppet, that will contain the circuit board, and the servo mechanism. For the mechanism, you're on your own, it depends on your box and your abilities with a hacksaw and a Dremel. My mechanism is housed in a 115mmx90mmx55mm polished aluminum box, and is basically a large piece of pipe that goes through the entire box, that the servo pushes up by pulling the base of with a simple linkage. The push puppet is fixed on the top cover of the box and the pipe pushes the button up when the servo rotates 180 degrees.
Check out the video and photos of my mechanism:
To build them, type "make". You will need the GNU PIC Utilities to build the firmware (http://gputils.sourceforge.net/), and the Gaim or Pidgin development files (or package if your Linux distribution has it, like Debian) to build either the Gaim or Pidgin plugin. If you have Gaim installed, the Gaim version of the plugin is built. If you have Pidgin installed, the Pidgin version is built instead.
To tell the plugin(s) which serial port your puppet is connected to, create a configuration file in your home directory called ~/.ppwrc containing a single line with the name of the serial device (for example "/dev/ttyS0"). Finally, start (or restart) Xchat, Gaim or Pidgin to enable the corresponding plugin.
If the programming operation doesn't seem to work, you can type make verify to compare the content of the PIC's flash memory with the firmware file.
If you want to take a peek at the firmware code without downloading the tarball, here is is: pushpuppet.asm. It can be easily adapted to be a generic servo controller: it is fully interrupt-driven and has an internal servo calibration menu.
(P)WM period: 0x4E20 <--
(U)p position duty cycle: 0x0148
(D)own position duty cycle: 0x080C
+/- to adjust
(S)ave
(Q)uit
From there you can modify the servo control signal's PWM period and duty cycles from both the "up" and "down" positions. You shouldn't need to modify the PWM period, it's normally 20ms (20000us == 0x4E20). Pressing U or D puts the servo in "up" or "down" position respectively, and you can then use + or - to lengthen or shorten the control pulse, effectively adjusting the selected position. Once you have adjusted the servo to have full throw (180 degrees) between "up" and "down" without going off scale (you will quickly know if a position is off limit: the servo will make worrying noises as it tries to maintain a position it can never reach), hit S to save the settings into EEPROM and either hit Q to quit or cycle the power. You can touch up the settings by re-entering the setup menu with ENTER later if you need to.
During normal operation, the board simply waits for "U" or "D" to be sent to the serial port. When it receives "U", it puts the puppet up. Similarly, when it receives "D", it puts the puppet down. When it's done, it sends back "OK".
Note that if you don't have a free serial port, it's perfectly possible to connect the puppet to a USB port with the help of a USB-to-RS232 dongle that's supported by Linux: the serial device is then usually called "/dev/ttyUSB?".
Then enable the puppet by typing "/ppw on". the plugin will check if these nicks are is the specified channels, watch them join or leave the channels, track nick changes, disconnects, etc... when at least one nick is present in the specified channel, the puppet rises up. When all the nicks in the nick list part their respective channels, or aren't available to talk to for any other reason, the puppet goes back down.
To disable the puppet, simply type "/ppw off". Note that even when the puppet is disabled, the plugin keeps tracking the nicks in the list, so the puppet finds itself in the correct state should you decide to re-enable it.
You can link several buddies to the puppet: if you do, the puppet rises as soon as at least one of them is signed on, and drops when all of them are signed off.
![]() |
![]() |