Skip to content

maxipetro/bobby-car-firmware

 
 

Repository files navigation

Bobby Car Firmware FOC

Firmware for all wheel drive bobby car with four hoverboard motors and two hoverboard motorcontrollers. The hoverboard mainboards are controlled via ADC (XBox 360 triggers with potis) and UART through an esp32 microcontroller. The esp32 is connected via SPI to an 3.5 inch touch screen (ILI9488) with an XPT2046 touch controller.

====

Default Wiring

All Pin assignments can be changed in motorcontroller/platformio.ini and hoverboard-mainboard/main.cpp

Touch screen

The touchscreen is wired to the GPIO pins of the esp32 as follows:

SDO(MISO): Pin 19

SDI(MOSI): Pin 23

SCLK: Pin 18

CS: Pin 5

DC/RS: Pin 17

RESET: Pin 16

T_CS: Pin 4

T_CLK is wired parallel to SCLK, T_DO parallel to SDI(MOSI), and T_DIN parallel to SDO(MISO). VCC and LED are connected to 3.3V - 5V of a voltage converter and GND to the ground of the esp32.

Motor controllers

The two hoverboard motorcontrollers are connected to the esp32 as follows:

Front controller:

Right sensor cables: The black (GND) cable goes to GND, the blue (TX) to Pin 13, and the green (RX) to Pin 12

Rear controller:

Right sensor cables: The black (GND) cable goes to GND, the blue (TX) to Pin 35, and the green (RX) to Pin 34

Build and flash

Build and flash the esp32 firmware:

cd microcontroler

platformio run -t upload

OTA flashing is also supported by adding --upload-port=IP as option where IP is the ip adress of the esp32.

Build and flash hoverboard controllers:

cd hoverboard-mainboard

make flash

For more details about flashing the motorcontrollers the first time see the README.md in the hoverboard-mainboard directory.

About

with Field Oriented Control (FOC)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 97.4%
  • Assembly 2.2%
  • C++ 0.2%
  • MATLAB 0.2%
  • JavaScript 0.0%
  • Makefile 0.0%