Autonomous Control Board
My Purdue Electric Racing onboarding challenge: a control board that lets the PER26 race car work its own brake, steering, and throttle.
The challenge
New members of the Low Voltage team get a design challenge. Mine was to help the mechanical team retrofit the PER26 car to drive itself. A pneumatic piston would press the brake, a motor commanded over CAN would turn the steering wheel, and how to control the throttle was up to me. I chose to send the throttle over CAN too.
I designed the board in between: a schematic and PCB layout in Altium around an STM32G474 microcontroller.
Braking with air
The brake piston runs on compressed air. One MOSFET (PMPB14XNX) switches the 24 V compressor through XT60 connectors, and a second (AO3400A) switches the four 5 V solenoid valve outputs together from one microcontroller pin. The compressor’s signal line comes back through a 30 kΩ / 10 kΩ divider into an ADC so the firmware can see it.
Steering and throttle over CAN
Both the steering motor and the throttle are commanded over CAN, so one bus carries everything but the brake. The STM32’s FDCAN peripheral talks to the bus through a TJA1057GT transceiver, with ESD protection on both CAN lines where they leave the board.
Reading the pedals
The throttle and brake pedal signals arrive on the same connector as the CAN bus. Each passes through a 10 kΩ / 100 nF low-pass filter, about a 160 Hz cutoff, and an op-amp buffer. A divider then scales the 5 V throttle signal into the microcontroller’s 3.3 V ADC range.
The brake signal goes to a comparator instead, which gives a clean “brake pressed” input once it crosses about 1.5 V.
Catching a broken sensor
A pedal sensor that comes unplugged or shorts tends to sit at one rail. Two more comparators watch the brake signal for that: one trips below 0.3 V, the other above 4.7 V, and an OR gate combines them into a single “brake error” input. The firmware can stop trusting the brake reading the moment either happens.