RC Driver HAT

This documentation includes hardware info, installation guidelines and sample code for your hardware.

Overall Info

RC Driver HAT is a Raspberry Pi interface board for autonomous RC vehicles.



  • Serial Port: Provides UART connectivity with 'RX', 'TX', '3.3V' and 'GND' pins. This port is Grove System compatible and 3.3V tolerant.

  • I2C Port: Provides I2C connectivity with 'SCL', 'SDA', '3.3V' and 'GND' pins. This port is Grove System compatible and 3.3V tolerant.

  • Tach Port: Two channel tachometer input.

    • Left channel: Provides 'GND' and 'L' pins. When shorted together, it counts a left wheel revolution.

    • Right channel: Provides 'GND' and 'R' pins. When shorted together, it counts a right wheel revolution.

  • Sensors Port: Analog input for sensors.

    • Top row: 0V to 5V analog inputs, CH 1 to CH 4 from left to right.

    • Middle row: +5V Supply for sensors.

    • Bottom row: GND for sensors.

  • Receiver Port: RC Remote receiver port for PWM decoding.

    • Top row: 5V Tolerant PWM inputs, 'Steering', 'Throttle', 'Aux 3', 'Aux 4' from left to right.

    • Middle row: +5V Supply for RC remote receiver.

    • Bottom row: GND for RC remote receiver.

  • Control Port: PWM Output for RC servo, ESC and compatible equipment.

    • Top row: 5V PWM pulses, 'Steering', 'Throttle', 'Aux 3', 'Aux 4' from left to right.

    • Middle row: Power connectivity. This row is tied together. Since ESC supplies power to control port, this row is not connected to the internal power line.

    • Bottom row: GND for sensors.

  • Power In Port: Battery input. 7V to 26V (absolute max) input range, 2S to 6S LiPo compatible. When there is power in this port, it also powers the Raspberry Pi. (System uses Raspberry Pi's power if no power is connected to this port.)

  • Left, Right, Front, Stop, Rear Ports: 5V LED drivers for RC vehicle lighting. 100mA per channel is max. Connect a resistor between port's 5V output and anode of the LED.

  • ICSP Port: Programming port for the onboard MCU. TinyISP compatible.

  • Stackable Raspberry Pi Connector: Connects the board to the Raspberry Pi. The connector is stackable, so you can attach other boards on top or bottom. RC Driver HAT uses I2C0, I2C1, UART, SPI, CS0, GPIO 22 and 27 pins.

Sample Connections Scheme

Connectors and Wires

Port / Cable


Model Number


Power Port



Power Wire



Serial, I2C Ports



LED Ports



Serial, I2C, LED Wires



Sensor, Receiver, Control Ports

(RC Servo extension cables)




  • 4Ch PWM output for RC servo or ESC.

  • 4Ch analog input for distance sensors.

  • 4Ch PWM decoder for manual remote control.

  • 5Ch MOSFETs for LED lighting.

  • 3D Accelerometer and gyroscope.

  • 2Ch tachometer input for measuring speed and direction.

  • Onboard fan for cooling the Raspberry Pi's CPU.

  • 2-6 Cell Li-Po compatible battery monitoring.

  • High-efficiency switching power supply for back-powering the Raspberry Pi.

  • Grove compatible I2C and UART ports.

  • ID EEPROM for Raspberry Pi HAT specification compliance.


RC Driver HAT's specifications are as follows:

ST LSM6DS33 3D Accelerometer and 3D Gyroscope

Measures 3D acceleration, pitch, roll, yaw and internal temperature.

  • Acceleration Range: Up to +/-16 g full scale.

  • Angular Rate Range: Up to +/- 2000 dps full scale.

  • Buffer: 8 kbyte smart FIFO.

  • Data Rate: Up to 1.6 kHz

The sensor uses CS0 over the SPI bus.

NXP PCA9685 PWM Driver

This driver produces pulses for 4 CH RC control, 5 CH LED driver and CPU fan speed.

  • PWM Frequency: Set to 60 Hz, suitable for RC vehicle equipment.

  • Control Port Pulses: 4 Ch, 1000us to 2000us pulse generation, 257 steps.

    • -128: 1000us, 0: 1500us, +128: 2000us

  • LED Driver Pulses: 5 Ch, 0% to 100% duty cycle, 4096 steps.

  • CPU Fan Driver Pulses: 0% to 100% duty cycle, 100 steps.

The device uses 0x40 address over the I2C bus.

TI INA219 Voltage Monitor

This device measures battery power from the 'Power In' port.

  • Voltage Range: 0 to 26 V.

  • Resolution: 0.004 V.

  • Sampling: 128 Samples.

The sensor uses 0x41 address over the I2C bus.

ATmega328PB Microcontroller

The MCU decodes 4 Ch PWM pulses from RC remote receiver, reads 4 Ch analog inputs and counts RPM from the 2 Ch tachometers.

ATmega328PB is the new generation of the microcontrollers found on the Arduino Pro boards. As it is Arduino IDE compatible, user can modify the firmware to customize RC Driver HAT.

  • PWM Decoding: 4Ch, 500us to 2500us pulse range, 4us resolution.

  • Analog Inputs: 4Ch, 0V to 5V, 10-bits, 1024 steps.

  • Tachometer Inputs: 2Ch, 10000rpm max.

The microcontroller uses 0x42 address over the I2C bus. 100kHz bus speed is recommended.

I/O Ports

RC Driver HAT has 2 Grove System compatible ports.

  • Serial Port: Provides RX, TX, 3.3V and GND pins for UART (serial) communication. Useful for adding GPS or GSM devices.

  • I2C Port: Provides SCL, SDA, 3.3V and GND pins for I2C and SMBus communications. Useful for adding more sensors or motor drivers.


To get maximum performance from your hardware, please make sure you'll meet the following requirements.


We designed RC Driver HAT to work with Raspberry Pi. Alternatively, you may wish to use any Raspberry Pi pin compatible device as an host.

Operating System

You can use RC Driver HAT with any operating system that supports I2C communication and GPIO access. We officially support Raspbian operating system.

Development Environment

RC Driver HAT's Raspbian library supports Python. You can write Python code in any text editor. We recommend using Visual Studio Code as an editor.


Select your operating system for set-up and programming guidelines.

pageRaspberry Pi OS

Last updated