Custom servo controller on NXT tractor
Posted: 17 Mar 2011, 22:10
I got 8063 for my birthday, and I wanted to use the large wheels for an NXT RC vehicle of some kind. So, I decided to make a tractor to begin with.
Here is a picture of the tractor with the trailer from the set. Sorry for the low quality. Around the same time, I was toying with the idea of using a PICAXE 20X2 as a servo interface for the NXT. I started working on some different concepts on a breadboard, and came up with satisfying results. I tweaked the code a little, and then soldered together the controller. If anyone is interested, I can post the (sloppy) code for the PICAXE and the NXT. I haven't drawn up a schematic yet, but it is just about as basic as it could be. The only external resistor I used was a 100k pulldown on the rx programming pin to keep it from floating. The I2C pullups are internal; all I had to do was add a line of code to enable them. I am not really sure how strong/weak the pullups are, but they seem to work well with the NXT. The PICAXE itself and the program support 6 servos, but due to my lack of header pins and perfboard, I only soldered it up for three servos. I only use one for this project anyhow.
To power the servo, I use a standard (new style) Lego 9v battery box. I am using rechargeable AA batteries, so the normal voltage would be around 7.2v. That is too high for the servo, so I modified a paper-clip to take the place of one of the batteries (and put it in the horribly tight AA space). I also have a bridge rectifier between the battery box and the servo controller, ensuring proper polarity (it also drops the voltage a little). In the end, I measure 6.1v at the servo pins.
Here is a picture of the servo controller. Here is a picture of what the tractor looks like now (other than a minor change to the blade).
Here is a picture of the tractor with the trailer from the set. Sorry for the low quality. Around the same time, I was toying with the idea of using a PICAXE 20X2 as a servo interface for the NXT. I started working on some different concepts on a breadboard, and came up with satisfying results. I tweaked the code a little, and then soldered together the controller. If anyone is interested, I can post the (sloppy) code for the PICAXE and the NXT. I haven't drawn up a schematic yet, but it is just about as basic as it could be. The only external resistor I used was a 100k pulldown on the rx programming pin to keep it from floating. The I2C pullups are internal; all I had to do was add a line of code to enable them. I am not really sure how strong/weak the pullups are, but they seem to work well with the NXT. The PICAXE itself and the program support 6 servos, but due to my lack of header pins and perfboard, I only soldered it up for three servos. I only use one for this project anyhow.
To power the servo, I use a standard (new style) Lego 9v battery box. I am using rechargeable AA batteries, so the normal voltage would be around 7.2v. That is too high for the servo, so I modified a paper-clip to take the place of one of the batteries (and put it in the horribly tight AA space). I also have a bridge rectifier between the battery box and the servo controller, ensuring proper polarity (it also drops the voltage a little). In the end, I measure 6.1v at the servo pins.
Here is a picture of the servo controller. Here is a picture of what the tractor looks like now (other than a minor change to the blade).