On Saturday I decided to build my MotorPiTX, by Jason ‘boeeerb’ Barnett. It was a straightforward build. The only difficult part was the optional micro-USB power connector. Overall it took me about an hour to build. I took my time over it – knowing that I was going to photograph it and that you lot would be scrutinising every blemish. ;)
About 20 minutes of that time was spent trying to ensure that I didn’t bridge two connections on the micro USB connector. I rarely use desoldering braid, but on this occasion I did. I made a little bit of a mess of one end, but the other is OK. These are really fine pitch, and a teeny amount of solder is needed. Click to see full size. Note that the middle three connectors are unsoldered, as only the outer two are needed for power. (This works fine.)
Everything else was easy though. The supplied instructions were good.
Jason provided enough male and female headers that you could choose which to use for the connections. In the end, I went with male for all of them except the 4×2 power block. That was provided as female, quite sensibly, as it will help to avoid shorting those pins.
A walk around MotorPiTX
MotorPiTX has an ATX-like power supply, which is controlled by an ATtiny chip, a relay and a voltage regulator, which takes the input voltage from the barrel connector and gives out 5V for the Pi.
When powered up, if you press the button and hold it down for 3 seconds, it will kill the power after 1 minute. The button also acts as an on-switch if you connect power while the board is sitting on top of the Pi. You can also use the button to initiate a shutdown in software (example script provided).
Apart from that, you have 2 leds. Red for power on and green is programmable (GPIO7).
The L293D motor controller chip allows connection of 2 motors with bidirectional speed control. In the Kickstarter kit I bought, there were two geared, brushed motors and wheels to go with them.
There are two servo connections. The software uses a clever servoblaster daemon, which gets round the difficulties of having to install a new kernel to get decent software servo control.
Aside from that you have 2 digital input ports and 2 digital output ports available (but these can be PWMed in software).
After that, it was time to test it. I don’t think the instructions page is quite finished yet, but being a curious type, I dug around on Github and found boeeerb’s “repo” https://github.com/Boeeerb/MotorPiTX
It’s quite important to read the instructions, which I did, and then promptly forgot several things. The servos and motors get their power directly from the barrel connector. My 5V servo wasn’t too happy that I was pumping 8 Volts into it, but it survived to tell the tale. I’ve now soldered up a switching regulator to provide a 6V supply for the MotorPiTX with any battery up to 35V.
The other thing I messed up on was trying to test the servo without first running the
sudo ./servod program.
I went through the test programs and it all worked just as it should, apart from the motor test program which threw an error at me until I changed 500 to 100 in line 8.
I was going to do a little video, but my main (video editing) laptop seems to have died, so it’ll have to wait. So hopefully this photo of it on my Chi Pi will suffice until I can get sorted out.
MotorPiTX is a great little board if you want to build yourself a little robot. It’s got 2 of everything…
- 2 inputs
- 2 outputs
- 2 motor controllers (hardware with soft PWM)
- 2 servo controllers (software)
…and an ATX-like power supply as well. If my PC hadn’t given up on me, I’d have built a little robot already. (I’m using my wife’s pc to copy the data from its hard drive to the network drive to ensure no data gets lost, while I type this on my Linux laptop, which I normally reserve for Jams.)
Fortunately, I took these and processed and uploaded them yesterday…
You can click any of them to enlarge