PJD’s Robot Control Board

When I was building P21 I promised myself that I would not build another circuit on stripboard.  As a result, I started designing PJD’s control board in KiCAD.  But then I realised that large amounts of the circuit were untested, and I wondered if I might design a lovely shinny new PCB that wouldn’t work because the circuit design was wrong before I started.

So, once again I have built a robot control circuit on stripboard:

Messy but functional.

It’s not my tidiest work, but it is the most densely populated piece of stripboard circuitry I have ever built.

The board has the following features:

  • A Teensy 4 as its core controller.
  • A connection to the Raspberry Pi.  This has a full-duplex serial link, two GPIO connections (for shutting the RPi down, more on this later), and the power supply to the Pi.
  • Two 10A H-bridges for the drive motors.  I had to use different MOSFETs since the ones I usually use were on back order until April!  There are two motor connectors too.
  • An I2C interface for the front time-of-flight sensor.
  • A “game implement” connector.  This is the same design as the one in P21, so hopefully any of the old implements will at least be electrically compatible with PJD.
  • An interface for Robotis Dynamixel AX12-A servos.  These are old (from a robot I bought in 2006 I think), but they are high torque and I have always liked that they can be connected together via a serial bus.  I like to re-use old parts wherever possible.  On PJD a pair are used to lift the front loader.
  • An SBUS connection so that a radio control receiver can be plugged into the board.  This is really useful for testing the mechanical aspects of the build.
  • A BNO055 inertial measurement unit (IMU).  This is largely used to calibrate turns on our robots, but it’s also fun that the robot can detect its pitch and roll angles too.
  • A LiPo protection circuit.  In the event that the supply voltage dips below 3.2v per cell (i.e. 9.6v), the circuit is able to switch off power to the whole robot, after closing down the Raspberry Pi.  The Pi interface has a serial link for sending and receiving control messages, but it also has two GPIO line connections.  One line is asserted by the RPi when it boots so that this circuit knows it is connected.  The second connection can be used by the robot controller to indicate that the supply is critically low, this causes the Pi to shut down in an orderly fashion.  As it closes, the first GPIO connection goes low indicating that the Pi has closed.  At this time the controller board is safe to chop the supply from the battery.  This is an important circuit; overly discharged LiPos are a fire hazard!
  • A DC-DC converter module.  This converts the battery voltage to 5v for the Raspberry Pi and some other components.
  • A servo connection.  Our Doofus has a servo to turn his head.
  • A supply for the exhaust shaker.  This is on a PWM output so that the speed can be varied.
  • Finally, a connection for the robot’s tail lights.  Again, a PWM output is used so that various flashing sequences and brightnesses can be achieved.

That’s a fair amount on one board, and thankfully it all works.  It turns out I could have gone straight to a PCB after all!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: