I just got the M500 second hand motor, it was fast, thanks to Thomas H.
First thing I did were to remove the cover and original motor controller, and cut the motor wires on the original controller and solder to VESC. Took me only 1 minute to get the motor running:
As you can see, I only needed to connect the 3 phase wires and it is running sensorless.
See also that there is a generous space where the original motor controller was, meaning the DIY EBike control board can probably be installed there and the only external board will be the VESC controller. The wires will need to be:
- 3 thick motor phase wires, as seen on the video
- 2 thin UART wires, for communication with VESC
- 2 thin wires, 5V and GND, from VESC to power the DIY EBike control board
I did draw the schematic for the DIY version I plan to implement - all that was already tested on previous projects. The power to this board will be provided by the 5V output from VESC.
As can be seen, mostly is only wires. There are only 3 basic resistors + the CAN module (to communicate with the torque sensor) + the NRF52840 board. This board is connected by USB to PC, to be programmed with the (CircuitPython) Python application of EBike, yet to be developed. The debug of this python EBike application is done by serial port that is implemented on top of the USB connection.
The various sensors connections are really basic.
The communication for the display will also be UART and the power to the display will be the dame 5V from VESC.
And here is the schematic for the Easy DIY display - really basic:
For now, I have a very simple Python code that is sending data to UART1, to be connected to VESC. My plan for next days is to make a code that reads the throttle value and setup a motor speed and current based on the throttle values. It needs to read the throttle ADC as also to read and send by UART commands to the VESC -- here is the Github repository with current code and schematics:
First thing I did were to remove the cover and original motor controller, and cut the motor wires on the original controller and solder to VESC. Took me only 1 minute to get the motor running:
As you can see, I only needed to connect the 3 phase wires and it is running sensorless.
See also that there is a generous space where the original motor controller was, meaning the DIY EBike control board can probably be installed there and the only external board will be the VESC controller. The wires will need to be:
- 3 thick motor phase wires, as seen on the video
- 2 thin UART wires, for communication with VESC
- 2 thin wires, 5V and GND, from VESC to power the DIY EBike control board
I did draw the schematic for the DIY version I plan to implement - all that was already tested on previous projects. The power to this board will be provided by the 5V output from VESC.
As can be seen, mostly is only wires. There are only 3 basic resistors + the CAN module (to communicate with the torque sensor) + the NRF52840 board. This board is connected by USB to PC, to be programmed with the (CircuitPython) Python application of EBike, yet to be developed. The debug of this python EBike application is done by serial port that is implemented on top of the USB connection.
The various sensors connections are really basic.
The communication for the display will also be UART and the power to the display will be the dame 5V from VESC.
And here is the schematic for the Easy DIY display - really basic:
For now, I have a very simple Python code that is sending data to UART1, to be connected to VESC. My plan for next days is to make a code that reads the throttle value and setup a motor speed and current based on the throttle values. It needs to read the throttle ADC as also to read and send by UART commands to the VESC -- here is the Github repository with current code and schematics:
EBike_EScooter_app_pyhton/code.py at main · OpenSourceEBike/EBike_EScooter_app_pyhton
EBike and EScooter app developed in CircuitPython, to output control commands to the VESC motor controller and read various input sensors as throttle and torque sensors - EBike_EScooter_app_pyhton/...
github.com