"Dashboard" for converted minibike...

stevenwm

1 mW
Joined
Apr 18, 2023
Messages
13
Location
IN
Long time lurker, first time poster.

Thought I would show off a project I started working on a few weeks ago...

Last year I restored and converted an old 70s/80s minibike to electric. (No thread on that yet, will get one up soon!). In this build I used an Ant BMS and a VESC motor controller. I tired of using my phone and the VESC & BMS app as a "dashboard". I figured making my own couldn't be "that" hard.. so I did just that.

Progress so far:
Image_20250223_2302442334215265197320412.jpg
(displayed data is not real obviously)


Hardware is a cheap 4" LCD touchscreen from Amazon, being run by a ESP32 clone dev board.

Developing it using VSCode/PlatformIO with Arduino framework. LCD is being handled by the LVGL library with the tft_eSPI library acting as the driver. It reads the data directly from both the BMS and the VESC motor controller over TTL serial. Thankfully there are already libraries out there for communicating with both the AntBMS and the VESC, so at least I didn't have to implement that part!

It started out as just showing speed from the VESC and % battery from the BMS. But feature creep has set in and I keep adding things. Implemented an odometer, since my 3Shul VESC controller doesn't. And also a clock using a DS3231 module.

LVGL is a bit of a slog to work with, but its the only library I found that provides a decent framework for GUI stuff. 70% of the code in this project is LVGL/GUI stuff easily. Never done anything much beyond making some lights blink on an original Arduino Uno before, so this has been a learning experience for sure.

Still need to flesh out the rest of the data display with things like temps, motor RPM, BMS amps, etc.. And eventually would like to add a settings screen, but that will require implementing the touchscreen. I might actually have this usable by the time it gets warm enough to ride again.
 
Cool project. I'm at a similar stage with my custom display, but I deliberately went with a very simple 64x8 led matrix display. I'll be keeping an eye on yours to steal some ideas ;) I'm also not sure if my screen size isn't too much of a compromise as far as the ability to show more stuff goes

One thing that definitely is making my life easier is switching from C++ to Rust. Embassy just makes everything work so much smoother and in a logical way. I haven't missed Arduino or any of the complicated PlatformIO setup for a second.
 
@stevenwm

Do you have a github?

BTW, you may want to look over here, too:
 
Cool project. I'm at a similar stage with my custom display, but I deliberately went with a very simple 64x8 led matrix display. I'll be keeping an eye on yours to steal some ideas ;) I'm also not sure if my screen size isn't too much of a compromise as far as the ability to show more stuff goes

One thing that definitely is making my life easier is switching from C++ to Rust. Embassy just makes everything work so much smoother and in a logical way. I haven't missed Arduino or any of the complicated PlatformIO setup for a second.

What hardware are you running yours on? I specifically wanted something that would boot instantly. And all the examples I seen pointed out there where already multiple Arduino compatible libraries out there for VESC and the BMS. So ESP32 is the route I went. Granted I am not really up to date on what small embedded platforms are out there these days.

I had started this project in the Arduino IDE, but its a poor IDE for any remotely complicated project. I've found VSCode/PlatformIO much easier to work with.

I've heard of RUST, but not familiar at all with it.
 
@stevenwm

Do you have a github?

BTW, you may want to look over here, too:

I do not have a GitHub... but I'll look into setting one up and getting my project up.

That very thread is one that spurred me to start this project! I stumbled on it while searching for VESC display examples.
 
What hardware are you running yours on? I specifically wanted something that would boot instantly. And all the examples I seen pointed out there where already multiple Arduino compatible libraries out there for VESC and the BMS. So ESP32 is the route I went. Granted I am not really up to date on what small embedded platforms are out there these days.

I had started this project in the Arduino IDE, but its a poor IDE for any remotely complicated project. I've found VSCode/PlatformIO much easier to work with.

I've heard of RUST, but not familiar at all with it.
Yeah, PlatformIO is a good choice, don't get me wrong. Arduino IDE is only really suitable to very small projects.

I'm using STM F103C8. It boots up in milliseconds and costs about $3 for a dev board (it's a variant of a popular "blue pill").

Arduino framework is a bit more robust than its IDE, but it also has its limitations. Particularly libraries build on top of it tend to be very limited by the HAL. Embassy has a steeper learning curve but having real async on top of what's effectively a microkernel runtime is amazing once you start wanting to have multiple things happen at the same time.
 
Subbed!
Yeah, Arduino IDE is what it is, I have a Todo list on Github to migrate to a PlatformIO/VScode/Make based compilation
 
I tired of using my phone and the VESC & BMS app as a "dashboard".

Easy solution: don't.

I figured making my own couldn't be "that" hard.. so I did just that.

Since the only really useful datum is voltage, you could cut the nonsense and extra equipment/effort and just install a voltmeter. Or maybe you "need" information you don't need.
 
Easy solution: don't.



Since the only really useful datum is voltage, you could cut the nonsense and extra equipment/effort and just install a voltmeter. Or maybe you "need" information you don't need.
Or maybe OP wants to try it as a fun project, likes having the extra info, and enjoys the challenge of developing his own display, for the fun of it. That's more than acceptable.
 
Or maybe OP wants to try it as a fun project, likes having the extra info, and enjoys the challenge of developing his own display, for the fun of it. That's more than acceptable.
Acceptable, sure. But a bike isn't a smartphone, and there's no need for it to function as one. Maybe he needs a camera for his helmet or an icemaker for his skateboard. These too are acceptable.
 
Acceptable, sure. But a bike isn't a smartphone, and there's no need for it to function as one. Maybe he needs a camera for his helmet or an icemaker for his skateboard. These too are acceptable.
Well I bet you are fun at parties......

Do I absolutely need the information? No.. But I appreciate being able to see all the data, especially when I am tweaking settings. And I enjoy coding and making things, so why not?

And I do already have a basic volt meter thank you very much...
 
Do I absolutely need the information? No.. But I appreciate being able to see all the data, especially when I am tweaking settings. And I enjoy coding and making things, so why not?
I like the idea of having the data I’m interested in, on display all the time, rather than cycling through screens. I don’t care if it’s pretty; and having certain data appear larger/smaller would help. I have my Cycle Analyst main screen set to display motor temp, but it toggles between temp and other data, so not always visible. Customizing stuff like that would be great.
 
Do I absolutely need the information? No.

Less is more. That's the bicycle founding principle. Stray too far and you wind up in a car, just sayin.
 
Less is more. That's the bicycle founding principle. Stray too far and you wind up in a car, just sayin.
..... This is a vehicle built for pleasure riding, not transportation. I am not out to further some grand bicycle agenda. I just want to get nerdy info while riding my nerdbike.
 
And while we're at it, controller, motor and battery temperature values are also quite important besides voltage.

If you have a resettable tripmeter function, then realtime current allows for integrating it into amp-hours for a much more precise SoC than voltage itself (most importantly, immune to sags and monotonic), and controller errors can be decoded and shown directly on the bike.

So yeah, lots of value opportunity.
 
Yeah... I plan on adding motor temp, controller temp. And an average of the 4 pack temp sensors. Odometer, and also trip meter. The VESC provides a lot of data over the serial connection.. It already calculates real time consumption figures. It also gives range estimates, but those are based entirely on voltage alone so not accurate at all.
 
Well... damn... It all my excitement of getting this working, I just realized the UART/serial pins on my motor controller are shared with the cruise control pins, which I use. So I won't be able to get data over that while on the bike... I'll have to use CAN or Bluetooth LE instead. Thankfully there is already a library available for CAN comms which returns identical data, so it should be a relatively simple drop in. Just need to get the CAN transceiver.
 
I'll have to use CAN or Bluetooth LE instead. Thankfully there is already a library available for CAN comms which returns identical data, so it should be a relatively simple drop in. Just need to get the CAN transceiver.
You probably already know this, but for anything even moderately advanced, I highly recommend using a VESC-Express(ESP32-C3 w/ can-transceiver)
You can make one yourself:
ex2.jpeg
ex1.jpeg

or buy one from Trampa: vesc-express
or buy one from avaspark: vesc-express

If you are hard up for cash, I would be willing to send you one.

If you make you own, make sure to not get the ESP32-C3 super mini with poor RF layout:
Some stores are selling broken ESP32-C3 Super Mini's
 
Back
Top