Adafruit Protoplate for the Rasbperry Pi

As part of my Big Trak refurbishment (not going as well as I wanted it to), I decided to use the Adafruit Prototyping Pi Plate to mount the additional electronics on. If you’re not familiar with it, then this is it:

Adafruit Prototyping Pi Plate

Adafruit Prototyping Pi Plate

So it’s a double-sided PCB with a GPIO connector tracked to various pads round the outside of the board with space to solder in headers or screw-terminals (or both!), as well as having space in the middle to solder components to, supporting a standard DIL type layout, SOIC chip mounting pads and an open area.

An interesting feature is that it extends the GPIO pins through the board, giving the possibility for stacking – almost like an Arduino shield…

So for the Pi Trak, what I needed to do:

  • Power supply. Powering the Pi off batteries, I needed a regulator to feed a stable 5V supply into the Pi.
  • A motor controller. Essentially a dual H-bridge controller of some sort.
  • Interface from a wheel position sensor of some sort.
  • Interface to the keypad.

As I was running out of time to produce a prototype, I used a handy 7805 type regulator. This is great, but not too efficient – ie. it gets a bit hot when fed from 9v.

The keypad was originally going to be the Big Traks own keypad, but I substituted one I’d made earlier (some 25 years ago!) – it’s a simple 4×4 matrix and you can see 4 resistors on the protoboard. There is a 5th next to them which acts as a limiter for the LED that’s on one of the switches.

Keypad next to the Protoboard

Keypad next to the Protoboard

For the motor controller, I used the Pololu TB6612FNG unit which I bought locally via SKPang. (The Adafruit parts were supplied directly from the US, but note than SKPang now stock Adafruit components on the UK!)

The wheel position sensor was an interesting one – initially I thought I could use a Lego sensor (since the rest of the thing was going to be made out of Lego by that point), however it turns out the Lego rotation sensor is analog – and outputs 4 different voltages depending on the angle… So a Plan B was hatched and I re-cycled the sensor from the original Big Track – seen here under test using the Adafruit Cobler board:

Using the Adafruit Cobler to test the wheel sensor

Using the Adafruit Cobler to test the wheel sensor

The wheel rotation sensor is the board to the left – it’s nothing more than an infra-red LED pointing to an IR photo diode. With a suitable current limiting resistor on the LED, the photo diode can be connected directly to one of the Pi’s GPIO inputs.

I also used to to test the motor driver too. I was a very easy way to do some “rapid prototyping” before committing to solder!

The end results was this:

Raspberry Pi plus "PiTrak" Adafruit Protoboard

Raspberry Pi plus “PiTrak” Adafruit Protoboard

Closer view of the top of the PiTrak Controller

Closer view of the top of the PiTrak Controller

Solder Side of the PiTrak Controller

Solder Side of the PiTrak Controller

This was the first time I’d used a board like this – more often I’d build projects on a re-usable breadboard, or on stripboard, so it did pose a few issues which I’d never encountered – The DIL area where I mounted the voltage regulator and the motor controller seemed fairly straightforwards, but with hindsight, I’d have made some of the links to the +3.3v and 0v supplies under the motor controller! In the open area, I cheated and just bent the wires of the components over to touch the pins of the 8-way socket I’d soldered on. Is that cheating, or is it the way everyone else does it? (Sensible answers please!)

However, overall, the board was very easy to work with – and does look a lot more professional than just hacking together some stripboard, and combine the board with the Adafruit case as I’ve done here, and it does open up many more possibilities for Pi interfacing projects.


Lego PiTrak Mk.1

Lego PiTrak Mk.1

This is the Mk1 Lego PiTrak. Much room for improvement and I need to mount the keypad on it – also want to put on an LCD display, so watch this space as they say…


Adafruit Protoplate for the Rasbperry Pi — 11 Comments

    • The Ciseco stuff looks OK and I’ve used their XRF/URF stuff in the past, but frankly their ordering system is all over the place. I’m initially re-directed to some site half way round the world (Austrailia!) and then it sends me to PayPal. I just won’t use PayPal to buy stuff and that’s the biggest stumbling block for me.


  1. Absolutely useful. Brilliant. I am also building a big Trak which expected to do all on RPi. But i have a bigTrak Jr. instead of Lego.

    As i read bigTrak Jr. uses magnetic encoders instead of optic ones so i will also build an encoder myself.

    My plan for PiTrak has these functionalities :

    1) Listen to direction commands by serial port – which i plan to attach a ETRX2 Zigbee module (just to demonstrate usage of zigbee on a robot) – sent by a host PC

    2) Count the wheel encoders; so i need an interrupt handler as you say

    3) Detects obstacles by a Digital Sharp Sensor

    4) Simply fills a grid map with obstacle information by combining obstacle and encoder pulses

    Sure it will use wiringPi libraries 🙂

    So, would you mind sharing the code and/or schematic so i can check to get a notion?

    Anyway, thanks for the great lecture like note,


    • My ideas are mostly the same – I may have to make or get another Big Trak though as I’d still ultimately want to put it inside a “real” one… I was going to use the xrf/urf modules though (from ciseco) – 2 urf modules basically form a wireless rs232 bridge between USB ports… However I saw one at the Bristol RasbberryJam event that had a video camera built in, using wifi in ad-hoc mode to beam images back…

      I’m not using an interrupt handler right now – however the speed is somewhat glacial in Lego ….

      The schematic… Well, I can jot something down – it was sort of made up as I went along 🙂 It’s not hard to interface to those Pololu motor controllers though – the tricky part was making the original Big Trak wheel rotation senson work, but in the end, it’s just connected between a GPIO pin and 0v with the Pin being set to input mode with the internal pull-up resistor enabled.

      I’ll push the code up to my GIT server – shortly, but right now, it’s nothing special!


  2. Gordon, BigTraks are available on Amazon for £15. They are reprints of the original design with slightly newer electronics (less discrete components).
    The RaspberryTortoise project has several of these and is integrating a RPi. So far sucessfully demo’d open loop control at Bristol’s recent Jam.
    Our design uses a web interface to send commands to the Pi and of course we’re using your WiringPi libraries. The next stage is to wire the encoders to an input as interupt and measure speed of rotation.
    I’m looking forward to using the newly added interupt detection to estimate speed.
    BTW, Thanks for brief mention during your jam talk it certainly brought people over to see project.

    • Ah you’re that chap! I didn’t have time to find you again. Fantastic! I might just buy myself a new one then 🙂

      My original idea was to re-use the keyboard, and I have decoded it, but didn’t use it in the end as I had one I wanted to recycle anyway. Did I read that the new ones don’t have the wheel rotation sensor?

      Looks like a lot of good stuff over on your website too:


  3. The new ones have 2 encoders, one for each drive wheel.
    We’ve got them wired in to the Pi but just not worked out how to make use of them yet.
    We dropped the keyboard as it used too many IO to link to the Pi. Other option required more components and our original design was to re-use as much of the BT as possible. shows some of the details. Although we couldn’t work out how the BT microcontroller was driving the pwm’s.
    So far we use the single channel PWM from the pi and switch to the required o/p using simple logic.

    • I do not think the original controller was using PWM at all – just on/off. Also note that it used 3V centre tapped from the 4 x D cells, so 2 of them would be depleted faster than the other 2 unless you drove it backwards a lot… My solution needs 2 GPIOs per motor. The original had just one encoder and used a magnetic coupling to keep both motors synchronised, but if the new one has 2 then it does open up more possibilities!


  4. The excellent reverse enginering done by RobotRoom was our starting point until we opened our more modern respin of the BigTrak and found that it runs off 3xD cells, and drives the motors using PWM although it retains the same H-bridge configuration. Additional dual encoders replace the discrete LED and photodiode from the original rotation sensing. The Tortoise wiki has details of the new board and the cuircuit we managed to figure out.
    We didn’t do the Keypad, so if you’ve got that written down I’d welcome the opportunity to include it.
    We want to use the Pi as much as possible so cut out (literally) the microprocessor from the BT and added drive via PWM into the motors.
    The current plan is move to 4 channels to give differential speed control and hook in the encoders for feedback.
    Two cheap webcams (<£5ea) will replace the single HD webcam currently fed to the operator with an autonomous collision avoidance (with a bit of work!!).

    • Interesting – I’ll have a better look at your wiki then and dig-out the keypad stuff. I’m presuming it’s got the same ugly connector as the old BT – I was going to see if I could put it on some stripboard to interface it – but it’s a 5×4 keypad, so 9 GPIOs… Add to that another 4 for the motors (13), that leaves 4 for other purposes, a “photon cannon”, 2 rotation sensors and maybe a bumper sensor…. I originally wanted to put an LCD display on mine too, but I can double that up with the keypad pins and 2 other GPIO’s…

      You can do PWM in software – it’s good enough to drive a motor… If you want some hints, find my LED display driver article 😉

      So – off to buy a new one then!