USB-C to VESC CAN-forward adapter - cheap and DIY!

Made this very cheap and easy DIY adapter to connect to the VESC via CAN and USB-C. It features a ESP32-C3 (supermini) with TJA1050 and runs VESC-Express firmware. Its basically the VESC-Express, but without the GPS-module, populated header pins and micro-SD.


Buy both boards, connect them as show and flash VESC-Express via the VESC-Tool (ESP-Programmer → Connect → VESC Express → Flash using USB).

16 Likes

Also made this small 3D-printed case for it :slight_smile: It’s held together by a few drops of superglue.


8 Likes

Love it, I couldn’t get vesc express firmware to compile, kept getting errors.

Looks great

1 Like

You don’t need to compile it. Just flash using the VESC Tool. Maybe BETA is needed…

1 Like

Oh…I thought I needed the compiled bin file to flash it.

Forgive my ignorance, do you then have some usb-c stick plugged into the port to log data?

It’s not about logging. It’s about being able to add a USB c port to your vesc, through the can bus.
And adding bluetooth

I think :thinking:

2 Likes

Ahhh makes sense now

In some cases CAN is easier/faster than the common methods for programming VESCs. And yes it adds Bluetooth and WiFi. With VESC-Express from Trampa you can even add GPS and Datalogging.

3 Likes

What are the uses for the WiFi connection with your device?

Actually maybe it would be helpful to folks if you could describe the features/uses of this device in general? I feel like an idiot but I dont really understand.

2 Likes

Sure I’ll elaborate a little bit. :slight_smile: Wirelessly tuning your VESC via VESC Tool App. Changing parameters and verifying these changes or troubleshooting issues, by tracking data. For more info please read the description of the VESC Express: VESC EXPRESS It’s designed for this purpose…

However, my approach is for builders that want to get started with hardware, that’s available online for cheap. For example if you want to build a custom display, remote or any VESC-accessory, this is the development platform to get started. Instead of the supermini, you can also use the ESP32-C3-DevKitM-1, whose pins are better accessable of you want to connect stuff to it. The advantage of the supermini, I use in this build, is it’s small formfactor. Easier for integration in projects, but a little bit more tricky to solder :slight_smile:

Hope this helped!

6 Likes

Can i just use a regular esp32 ? Do I need any extra chip for the can connection?

1 Like

Nah ESPs don’t speak CAN. It’s a 5V differential signal that needs to output mirrored signals around a 2.5V neutral point. Even if you had a 5V supply on the micro you’d need something approaching a DAC to output intermediate values like 2.5, so the extra board is a CAN transceiver that can generate the voltages and do the conversion in hardware

1 Like

Needs to be the esp32 c3. I have the esp32 wroom 32d and it won’t flash in vesctool.

I’d happily buy the trampa version but with shipping it’s over aud$100.

Making this works out to be super cheap

1 Like

What do you want off it? Having a logger or GPS or just Bluetooth+WiFi?

If you want to replicate my project buy these boards off AliExpress or ebay:

Then you can even add the SD-Card module, a display or the GPS-Module yourself!

Currently only ESP32C3 is supported by the VESC-Express firmware. On the VESC-Discord some tried or asked about ESP32S2, but I don’t know the status.

4 Likes

Can you post the step file for this as well?

The VESC Express supports all sorts of OLED displays, see: https://github.com/vedderb/vesc_express/tree/main/main/display Just pick a supported one and start coding in Lisp :wink: The GPS module is a Beitian BN-280, which is connected over UART.
To connect a SD-Card simply buy one like this Waveshare 3947:

If you want mobile network (SIM), buy a module and start coding! Until now there is no implementation for LTE/GSM connectivity.

Here are the STL files. You can download the STEPs from https://grabcad.com/library.
Supermini - Body.stl (123.9 KB)
Supermini - Lid.stl (120.6 KB)

2 Likes

Where are you picking up voltage to power the esp32?

Via USB-C? Alternatively from the VESC, like the VESC-Express does, but you’d need to cut the powerline coming from USB-port to avoid ground loops, if you gonna want to use it simultaneously.

2 Likes