online lostsh.github.io explorob | 2020-07-01 rfc 3514: evil bit not set
post 04 2020-07-01 c99 | arduino 2 builds

exploRob

c99 | arduino atmega328p

exploRob is a tracked robot with a gripper on it, built for exploring: driving somewhere I would rather not walk, picking something up when it gets there, and reporting what the air is like on the way. There have been two of them: an early build on a Makeblock chassis with a boom arm bolted to it, and a lower second one that gave up the arm for a real battery pack and better electronics.

Both are driven by hand. Neither navigates on its own and neither knows where it is; there is a camera on the front and a person at the other end of a radio link. The part worth writing about is the electronics, so that is what this is.

The first robot

Rubber tracks, an aluminium chassis, and a boom arm. The main gripper hangs off the end of the boom on a 1:144 gearmotor. Slow, and with enough torque that whatever it picks up stays picked up. The secondary gripper is built out of 9 g servos: it moves on more axes than the main one, so it is the better of the two for fiddly work, and it will not lift more than about 9 g. That is the whole trade, and it is a fair one.

Photograph of the first robot on a dark floor: a blue aluminium Makeblock chassis on rubber tracks, a tall boom arm raised at an angle with a black gripper at its top end, a geared DC motor, small purple servos, a four-digit seven-segment display and a bundle of wiring across the deck.
The first robot. Boom arm up, gripper open, everything bolted to everything

The rest of what it carries:

Electronics

The second build is where the wiring got tidier, and it is the one the notes below describe.

Close-up photograph of the second robot's deck: a stack of Arduino boards including a motor shield with a blue screw terminal block, a small module in a clear plastic case, all strapped down with purple rubber bands, next to a black holder of four green lithium-ion cells wired to a red connector, mounted on a blue aluminium chassis between two rubber tracks.
The second deck: board stack, motor shield, lithium pack, rubber bands

The 9 V block, and why it left

Version 0.3 ran off a 9 V block battery. The voltage was never the problem. The current was: a 9 V block gives 9 V and nowhere near enough amperage for two DC motors and a handful of servos that all decide to move at the same instant.

It came out and two lithium cells in series went in: 7.4 V nominal, and an amperage that is actually adequate. There is a short film shot from the robot itself, from back when it was still on the 9 V pack: exploRob, on YouTube.

The transmitter

The remote is a sheet of cardboard cut to the outline of a game controller. The outline was drawn on it in pencil first and the pencil lines are still there. One thumb joystick, two buttons, a small OLED for the menu, and a rubber band holding the whole thing shut.

Photograph of the hand-made transmitter: a cardboard shell cut to the outline of a game controller with the design still drawn on it in pencil, a black thumb joystick pushed through a hole on the left, two small white buttons in the middle, a lit blue OLED screen showing two icons, and a purple rubber band stretched over the case.
The transmitter. The pencil lines are the plan

Inside: an Arduino with a prototyping shield, a mini breadboard, four tactile buttons wired into it, the joystick module on jumper leads, a Bluetooth module on a breakout, and the OLED. It was assembled on the component inventory sheet of the starter kit most of it came out of, which is visible under the wiring and is the most honest thing in the photograph.

Photograph of the transmitter's internals laid out on a printed component inventory sheet: an Arduino board with a prototyping shield and mini breadboard carrying four tactile buttons, a black thumb joystick module on coloured jumper leads, a small blue OLED display, a Bluetooth module on a pin-header breakout in a clear case, and a yellow USB cable.
Inside the transmitter, on the kit inventory sheet it was built from

It is cardboard and I would build it out of cardboard again. The shell is the cheapest part of a remote to get wrong and the most expensive to get right, and cardboard lets you cut the hole in the wrong place twice.

The link, in the last version

Every photograph on this page is of an earlier revision. The last revision dropped the Bluetooth module and ran the same 2.4 GHz link and the same protocol I had written for the boat: a packed C struct with an explicit field layout, an integrity field with a standard error-handling scheme over it, a session handshake, and a lightweight cipher on the command traffic.

The Open Boat post covers the frame format and why the struct is packed. Two things about it read differently on a tracked robot than they do on a boat.

Not built

This is the part that stayed on paper.

None of it exists. The robot in the photographs is driven by hand, over Bluetooth, from a cardboard controller with a rubber band around it.