Last updated: December 2019
Language: German, English
E-Bobby Car Controller
By this time the bobbycar went two years old and works reliably, apart from one broken wire.
The throttle lever ist connected to the adc of both boards, such that all four wheels are driven the same.
For a long time I had in mind to have a smarter way of controlling the vehicle in order to implement some sort of driver assistance systems like ESP or ABS.
Another sensible thing would be a wheelie prevention system for a new driver.
In order to not having to flash two MCU's every time this controller needs to be separate.
It will be connected to both hoverboard mainboards via USART and thus controlling the individual wheels.
Furthermore I am using a hoverboard-firmware-hack fork by Emanuel Feru
. There control via USART is implemented in a safer way.
The controller will be implemented on a STM32F103C, better known as Bluepill. The devboard doesn't really cost anything and has three hardware USART builtin .. and is compatible with Arduino.
I found these instructions useful for the integration into the Arduino IDE: STM32bluepillarduinoguide(1).pdf
The hardware files (Step 1) are better obtained from Github: github.com/rogerclarkmelbourne/Arduino_STM32
Before modifying the working bobbycar I tested the bluepill on my Hoverbrett
. A stepdown converter supplies a 3.3V linear regulator with 5V from the battery voltage.
On the hoverbrett I conntected the stepdown converter to the mainbaord right behind the latching circuit. This way the mainboard poweres the bluepill and turns it off.
With the bobbycar I didn't want to have one of the mainboards to be responsible for the voltage supply of the new controller.
So I rebuild the latching part from the Hoverboard schematic
on a separate pcb.
Below the plan of action. Without it I would be lost very soon.
After soldering the two new Buttons, the latch together with the LM2596HVS Stepdown and some connectors to the STM32 board it was time to test it on the bobbycar.
Some bug fixing later the wheels spin again.
The controller will be powered by a new "Engine Start" button behind the steering rod.
Pressing it again it will activate two relais which are there to simulate the press of the powerbutton of each of the hoverboard mainboards.
This could be done much neater but this seemed to be the safest way in my eyes. And it makes nice clicky sounds :)
The buttons for powering the hovarbods on or off are connected in parallel to the relais, just in case the controller locks up.
After excessive driving on the 35C3 Teststrecke a wire from the throttle broke. This time I won't squeeze it inside the aluminium tube.
Also two pieces of pneumatic hose are a good way to prevent the red anodized aluminium tube from moving.
The "Engine Start" button has a red backlight, the push switch under the fuel tank cap has a red/green duo LED. All are controllable via software.
Bobbycar Git: repos.ctdo.de/interfisch/bobbycar/tree/master