What I built Link to section: What I built

The bicycle in the photo is the assembled result of three connected pieces of work: fitting a belt-driven motor to the frame, making the mounts and pulley, and giving the electronics a readable display. I designed the mechanical assembly in Fusion 360, a computer-aided design (CAD) tool, and printed parts to fit the bike.

An ESP32, a small programmable computer, runs the dashboard. It reads the VESC motor controller over UART, a serial data connection, and shows battery voltage, power, speed, and distance.

The bike is assembled; the dashboard is still prototype firmware (the software running on the ESP32). The public build files include the editable CAD, printable parts, code, and build photos.

Mechanical assembly Link to section: Mechanical assembly

I used Fusion 360 to fit the motor, pulleys, and mounts around the bicycle frame and rear wheel. A belt connects the motor to a large rear pulley, with the electronics mounted on the frame.

Printable parts Link to section: Printable parts

The printable parts include:

  • The motor mount.
  • The rear pulley.
  • Two seat-tube clamp halves.

The CAD files also include a 180-tooth pulley revision. The editable assembly is useful for checking clearances or adapting the mounts to another frame.

Electronics and live readings Link to section: Electronics and live readings

An ESP32 communicates with the VESC motor controller over UART. The display sketch (the program running on the ESP32) uses three code libraries:

  • VescUart reads controller data.
  • TFT_eSPI drives the TFT, a thin-film-transistor display.
  • FastLED controls addressable lighting, where each light can be set separately.

Measurements and lighting Link to section: Measurements and lighting

The display presents battery voltage, estimated electrical power, speed, distance, and amp-hours (a measure of electric charge used).

Power is calculated from input voltage and current. Speed and distance are calculated from controller RPM (revolutions per minute) and tachometer readings that track rotation using constants in the sketch.

The same firmware cycles colors on an eleven-pixel WS2812 LED strip while polling telemetry (regularly reading controller data) and updating the dashboard.

Dashboard implementation notes Link to section: Dashboard implementation notes

The sketch communicates with the controller at 115,200 baud, the serial connection’s signaling rate. It updates individual regions of the TFT as the readings change.

Checking the conversions Link to section: Checking the conversions

The telemetry conversions are specific to this build. Motor pole count (the number of magnetic poles), wheel diameter, and pulley ratio (the relative sizes of the drive pulleys) affect the meaning of the reported RPM and distance.

The code includes hard-coded conversion factors (fixed numbers in the program), and some nearby comments describe different example values. Those constants need to be checked against the actual drivetrain before reusing the sketch.

Build files Link to section: Build files

Folder Contents
CAD/Fusion360 Editable components and the full bicycle assembly
CAD/STL Motor mount, rear pulley, and seat-tube clamp exports in STL, a 3D-printable mesh format
Code/VESCOM Dashboard sketch and display assets
Pictures Assembled bike, CAD assembly, pulley, and dashboard photographs

The CAD, printable parts, dashboard code, and build photos are in the public repository.

Status and reuse Link to section: Status and reuse

The bicycle is assembled, and the dashboard remains prototype firmware. To adapt the build, start with the editable CAD and check the frame fit, belt alignment, mount strength, and telemetry constants for your components.

FAQ

How is the motor connected to the bike?

A belt connects the motor to a large rear pulley. The motor mount, rear pulley, and two seat-tube clamp halves are 3D-printed parts designed in Fusion 360.

What does the e-bike dashboard show?

Battery voltage, estimated electrical power, speed, distance, and amp-hours. An ESP32 reads the VESC motor controller over UART at 115,200 baud and draws the readings on a TFT display.

Are the build files available?

Yes. The public repository includes the editable Fusion 360 assembly, STL exports of the printed parts, the dashboard code, and build photos.

Can I adapt the build to another bike?

Start with the editable CAD and check frame fit, belt alignment, and mount strength. The dashboard is prototype firmware, and its telemetry constants must be checked against your motor, wheel, and pulley ratio.

Build stories

One bike, three kinds of making

The mechanical parts, embedded electronics, and little dashboard behind my electric bicycle conversion.

Read the story