VESC Telemetry Display (tweaked)

by CNCaddict in Circuits > Microcontrollers

112 Views, 2 Favorites, 0 Comments

VESC Telemetry Display (tweaked)

VESC Telemetry Display

I started with Lukas Janky's awesome work and personalized the code to make it more useful for my purposes. As a non coder I used Gemini 2.5 Pro for 100% of the changes, as of 4/22/25 this seems like the best software to use for this sort of embedded coding. I attempted to use OpenAI o3 but it removed a whole bunch of necessary things and totally broke the program. Gemini is good about not touching things that work and accidently breaking the code.

Features

  1. Shows all the important VESC data
  2. Super cheap and relatively easy to build from Amazon parts and a 3d printer.
  3. Most importantly shows VESC FET temp, Motor temp, Batt Voltage, etc so you don't run out of juice or fry something by being stupid without the hassle of connecting to your phones BT.
  4. tracks trip distance, efficiency, total distance (odometer). See video above for all the items displayed.
  5. Powered straight from the VESC over a hijacked USB-C connector.
  6. "Fancy" 3D printed case designed to fit 22mm handlebars

Changes from Lukas' design

  1. Screen now has colors. Red labels and units and white digits.
  2. During regen the power, motor current, and battery current labels and units now turn green.
  3. Lukas focused on speed for the data shown. I'm more concerned with battery state, motor currents, etc so I made lots of changes there.
  4. Dotted lines between rows for a little bit better readability
  5. Odometer saves to EEPROM when speed is < 2 and timer reaches 240s. Therefore, if you're on a long ride the EEPROM will only write after you slow down and the timer has exceeded 4mins, then the timer resets. I know this is likely overkill and it may miss a little distance here or there on very short rides but I hate wearing out the chip for no reason. Feel free to reduce the time if you'd like.
  6. Setting menu that allows for changing units (standard or metric), screen rotation, and resetting the odometer. All saved in EEPROM
  7. Screen times out and turns off if none of the values change to reduce screen burn in.
  8. Displays both FET and Motor max temps

Notes on this design

  1. The Screen sucks. I wish I had used a different one but this is the one Lukas used. Too small, easy to damage, seem to arrive broken from amazon, has relatively poor contrast, and gets a weird temporary burn in like an OLED..but it's def not an OLED. It is fairly bright though.
  2. There is a small amount of screen flicker I tried to resolve but failed. I'm sure someone who knows how to code could fix this, but me and Gemini couldn't do it.
  3. The button press is not very responsive. It sometimes misses clicks.
  4. Update rate sucks, I blame the slow Arduino Nano
  5. Case is not completely finished. There is room for a plastic or glass screen cover if you choose to add one.
  6. Lots of details are hacked together but it does work and should be reliable.

Ideas for future revisions

  1. Display average efficiency for all rides (based on odometer)
  2. Turn off screen with delay after speed reaches zero, to actually solve screen burn in issue.

Supplies

Parts List ::: $118.89 as of (4-23-2025) for two screens plus 3d print material. Lots of extra parts left over.

  1. 1pc Arduino Nano $15.99
  2. 1pc 1.3" ST7789 240x240 LCD Screen $13.99
  3. 1pc 6x6 Tactile Switch $7.99
  4. 1pc 60x40mm Perf Board $15.49
  5. 1pc USB C Circular Chassis Mount $11.99
  6. 1pc USB C Power Pigtail $9.49
  7. 1pc 6ft USB C-C cable $5.99 any cable will do
  8. 1pc Jumper Wire Kit $7.99
  9. 4pcs M5x40 SHCS $9.99
  10. 4pcs M5 locknuts $6.99
  11. 4pcs M3x12 SHCS $12.99
  12. Bits of foam tape for inside clamp and to keep screen board in place inside case.
  13. Some 3d print material

Electronics

IMG_0059.jpg
IMG_0060.jpg
IMG_0061.jpg
IMG_0058.jpg
IMG_0056.jpg

:: Warning :: Do not solder the screen to the header first. Half of my screens came defective. Solder the header down to the board, get everything working then (with power off) set the screen down over the header pins and tilt it up so they all make contact. Then power up the board. If the screen works go, ahead and solder it down. Also you need to put a bit of thick tape or a spacer behind the screen to support it when in the case.

Look at the pictures for my wire layout and lengths and be careful to position the Arduino headers exactly in the perf board holes shown or it won't fit in the case.

ST7789 connection Screen to Arduino nano:

  1. GND to GND
  2. VCC to 5V
  3. SCK to D13
  4. SDA to D11
  5. RES to D8
  6. DC to D9

Button to Arduino Nano

  1. one side to GND and other to D2

USB-C Chassis Mount to Arduino Nano:

  1. Red to VIN
  2. Black to GND
  3. Blue to TX1
  4. White to RX0

:: WARNING :: Do not heat shrink over the TX and RX lines until you test it. I forgot to document this so there's a 50% chance it's wrong.

Pigtail to VESC

  1. Red to 5V
  2. Black to GND
  3. White to TX1 (this maybe wrong..if so try RX0)
  4. Green to RX0 (this maybe wrong..if so try TX1)

:: WARNING :: Keep the UART line away from phase wires. I haven't had any problems but phase wires put out tons of EMF and aren't going to be kind to your bits.

Case

IMG_0098.jpg
  1. Print out all the parts
  2. Drill out any holes if they're too tight
  3. Tap the holes for the M5x40mm bolt
  4. Tap the holes for the M3 bolts
  5. Conformal coat the board and back of screen if you're worried about water. I used Acrylic
  6. Drop the board into the box and the USB C chassis mount
  7. Put some foam tape on the back of the Arduino (not over the button) to keep the screen pressed down solid in the case.

Software

Screenshot 2025-04-23 014019.jpg

Instructions

  1. Install the Arduino IDE
  2. Make sure to drop the SolidGeek VESC UART and Arduino ST7789 Fast libraries in your libraries folder C:\Users\ComputerName\Documents\Arduino\libraries
  3. You may need to add the SPI, EEPROM, and AdaFruit_GFX libraries but those should be included within the IDE install.
  4. Double click the VESCTelemetry_V1.38.ino file to open it in the Arduino IDE
  5. Adjust the values on lines 34-41 to match your EV. The display will give you garbage info if you don't set this up properly. See image
  6. Select Arduino Nano for the board type
  7. Plug in your Arduino Nano and click the little upload arrow at the top

:: WARNING ::

  1. Flashing to the display while connected to a running VESC probably won't work so make sure you unplug the VESC first.

How to Use

:: WARNING :: Do not plug anything other than a VESC into the USB-C port on the display. I'm guessing it won't blow up since they both should be 5V, but I used the USB-C connector because they kick ass, not for the standard.

  1. Press button to change screens
  2. Hold button down for 2s to enter setup menu
  3. Press button to change menu selection, once highlighted press button down for 2s to make the selection. Currently selected option will be underlined.
  4. Highlight "EXIT" and press button for 2s to leave the setup menu