OpenSourceEBike.github.io

DIY EScooter board

The DIY EScooter board task is to run the EScooter software application. This software is high level Pyhton (easy and fast to develop) and we can edit/program the Pyhton software text files wirelessly, using our phone or computer.

The EScooter application reads the throttle, maps the throttle value to a motor speed, and finally send this value to VESC motor controller, that will make the motor rotate with this specific speed. It also sends and receives data to the display: receives the brake sensor position and on/off button state. Sends various data as the speed, front light state, etc. Also controls the rear light state.

There are 2 outputs on Xiaomi M365 Pro 2 to be controlled:

There are 3 inputs on Xiaomi M365 Pro 2 to be readed:

The digital communication between the EScooter board and the Dashboard is digital UART but 1 wire communication.

The digital communication between the EScooter board and VESC is digital UART.

This is the EScooter board schematic, that is very easy to build due to easy to solder boards and connectors:

The main component is the ESP32-S3-DevKitC-1 N8R2 board. This is the microcontroller board, that runs the high level Pyhton software, has Wifi and Bluetooth.

The connection to VESC is by the 4 wires: 2 wires for UART TX and UART RX that provides the comunication. The other 2 wires and GND and +5V, as the power to the EScooter board comes from the VESC.

The connection to Dashboard is by the 4 wires:

The rear lamp signal need to be connected to that 5 pins of the ESP32, so it can drive enought current to enable the lamp.

You can buy all the boards, components, connectors and even wires, on Aliexpress. Note that the connectors I used were PHB connector 2.0mm 2x11P and PHB connector 2.0mm 3x11P.
The Dashboard connector is similar but not equal to this ones, but it works anyway.
The connector for VESC and rear lamp, I simple did cut the original connectors and used this ones instead.

Pictures with details

First I isolated the ESP32-S3-DevKitC-1 N8R2 board with yellow kapton tape. Then I glued with the perforated board with a double sided tape, to the back of the ESP32 board.

I put all the connector in onse side of the board. I used SMD resistors and diode (0805 size) but through hole components can also be used.

I used flexible wires:

Top side view of the board, that is also the top side view of ESP32 board: