Espressif not understanding what semantic versioning is, or how it works, is a never-ending frustration.
Just put this together and connected it all up. Pulled 5v from the vesc but I am not getting anything connecting through Canbus. When I scan canbus while connected to the ESP board. Canbus only shows the Express T module. When I connect to the vesc through USB serial it only shows the vesc in the lower left after scanning. Am Iâm I missing something?
I had some bad canbus modules, only about 35% of them worked and showed up in VESC tool. Mustâve been a bad batch, AliExpress is great for that.
Ok, Iâll try another board.
Sooooo yeah.
SD Card works, GPS I havenât gotten to yet. Im kinda annoyed at the whole project for a verity of reasons and Iâm sure its just me being tired.
My issues thus far:
- Using the logging QML App to send data from a FW6+ ESC to the DIY express does not work (for me anyways) which would have made things soo much fucking easier.
- Modifying the LispBM script/program used by the logging QML App to populate the logs and send data to the logger on the can network to sanity check literally anything, didnt work for shit.
- I was able to run CAN commands on the DIY Express to retrieve data from the connected device but for some reason sending data from the connected device was not working. I have zero clue what the fuck thats all about.
- If youâre doing literally anything beside using the C3-Mini as a USB-to-CAN interface these things get actually quite warm. So I question their stability/reliability in the field when actually having to do work (logging/reading GPS).
Some thoughts:
- Maybe part of the reason why I wasnât able to send CAN messages to the logger can-bus was because I was powering the DIY Express via USB and just running CAN-H and CAN-L to the transceiver so no common ground reference. I have zero clue if thats likely the issue since as mentioned I was able to retrieve ESC details over CAN (and modify settings, and all that jazz) from the DIY Express.
- If youâre not running FW6+ on the ESC retrieving data using LispBM presumably isnt going to work? I have anecdotal evidence to suggest this is true - I was getting goose-eggs from a functional board when running
(canget-vin dev1)wheredev1was defined as either of the two ESCâs that were in fact getting 45v at the time. Furthermore, the same command on an ESC running FW6 returned the correct voltage. So its a presumption. How Metr gets this information from FW5 ESCs is a mystery to me, I assume some significantly more annoying integration with UART or something to that effect.
Maybe all of my issues are the whole no-common ground reference thing and Iâve burned waaaay to much time on such a simple issue lol. When Iâm no longer annoyed at the project (since the board I want to use it on would seemingly be incompatible anyways (fw5)) Iâll make sure to power the ESP from the ESC and see where things go.
Another option for those interested:
https://www.aliexpress.com/item/1005008357057646.html
Although I was able to solder a DIY version, I found it to be a bit tedious (I hate soldering small stuff) and I was one of the unlucky ones who got a bad batch of ESP32-C3s and had connectivity issues when all said and done.
For $35 (CAD) for the Express, SD card, and GPS, itâs not a bad deal.
Salvation for bad RF:
And:
I bought one of these and the wireless reception is quite bad
Oki doki, got this sorted out on my side - I have some stuff to do yet to verify how well it works but bench testing shows:
- GNSS (GPS) is working and seems to be fairly accurate).
- Writing the SD Card is functional
- Date-time/Timestamps are functional when using GNSS
- Logging from an ESC to the âDIY VEXPâ over CANBUS and thus to the SD Card is working.
So here are the things I am unsure about:
- How easily sharing the logs will be, metr/minne for all the issues I have with it (specifically metr pro and my being a cheapskate) is by far and away a much cleaner and nicer experience than the baked in VESC logs.
- I know there is another app thats similar floating around but I dont recall the name nor if its designed to parse standard VESC logs or not.
- Performance in the longer term with some of these C3-Minis. As mentioned they can get really warm. That could pose reliability concerns.
- Speaking of reliability naturally SD/TF Cards and Vibrations == Not amazing so if you were to build something like this Iâd opt for something with a proper card-latch or a bit of hotglue/tape to keep things from wiggling out.
So what all did I end up buying to get this squared away? Everything is from amazon cause⌠convenient.
- ESP32-C3 Mini | $20 | 5pc | $4 ea
- TF-Card to SPI Breakout | $9 | 10pc | $0.9 ea
- CAN Transceiver SN65HVD230 | $8 | 3pc | $2.67 ea
- GPS Module GT-U7 | $19 | 2pc | $9.5 ea
All up, weâre looking at 56-60 bucks which is rather expensive when you consider it. Looking at a per-device cost its more around the $17.00 area which is much more palatable.
Compared to the âall upâ price a legit express probably wont run you that much more; A Minnie on the other hand is twice the price (though again their App presumably (Iâve never used voyager) is potentially worth the difference). If you had 2-3 or more boards that you wanted logging on and didnt want to upgrade your old metr proâs for something that can run without a phone needing external GPS or data-storage then this might be worth it.
Very Quick Low Effort Tutorial:
First and foremost, I expect anyone thats going to follow this, to have some clue of what theyâre doing and if not, are capable of critical thinking - donât expect such a nice, generous, humble guy like myself to try and troubleshoot/triage why your shits not working.
Also FWIW I dont want this to sound like I did any real heavy lifting, I didnt. I was able to figure things out and leverage QML/LISPBM app already designed for this task. While I did write my own LISPBM app to learn how things were working, the Logger UI app is significantly more fleshed out than my dogshit âim learning lispbmâ app.
The firmware configuration is pretty straight forward:
- I cloned the repo and made direct changes to the
hw_xp_t.hfile because, im hella lazy Ill refer to this as the âHW Fileâ. - ESP32-C3 Mini â TFCard = Pins 4,5,6,7 (SPI).
- These need to be adjusted in the HW File to correctly align to the pinout on the C3 Mini for MOSI, MISO, SCLK, SS/CS.
- Yes its neato that the pins used are the same, yes they are out of order in this HW File if youâre using the C3 Mini. The reason for this is obvious to many im sure, but not everyone. The reason itself is irrelevant.
- ESP32-C3 Mini â GPS = Pins 20,21 (UART)
- This should already be set correctly so you shouldnât need changes here.
- ESP32-C3 Mini â CANBUS Transceiver = Pins 0,1
- This should already be set correctly so you shouldnât need changes here.
- Follow the steps outlined in the github (VESC Express) to grab the correct Espressif IDF Build and compile the firmware. (make sure youâre using 5.2.2 (see my post above))
Off to the firmware flashing side of things:
- Connect the ESP32-C3 Mini to your laptop
- Open VESC Tool
- Connect via USB Serial
- ESP Programmer â Custom and locate the following files (created after compiling the firmware). The path should be similar unless you cant help yourself and fuck with things
vesc_express/build/bootloader/bootloader.binvesc_express/build/partition_table/partition-table.binvesc_express/build/vesc_express.bin
- Once files are selected, click on âFlash with USBâ or âFlash with Bootloaderâ (if i recall correctly if no express firmware is on the device USB is required for the first time).
- It should be quite obvious when this is finished, it should (if i recall correctly) power cycle after finished and youâll see vesc express in the USB connection list of VESC Tool.
Software Side of things (and getting things working):
- The SD Card youâre using needs to be formatted in FAT32 else it wont work.
- Connect to the DIY VEXP
- Click on âVESC Packagesâ â Click on âLog UIâ â Click Install
- Go back to âWelcome & Wizardsâ â App UI on the right side should show.
- Click âTest SD Cardâ This should return successfully if your SD Card is detected and writable. If its not setting anything else up at this point is pointless. Figure out why your SD Card isnt working before moving on.
- If you have GPS you can check âGNSSâ if you donât having this enabled will break the logging functionality.
- You can Log Local Values Though I have mine disabled.
- Check âCAN Valuesâ and if you have CAN enabled BMS âBMS Valuesâ as well.
- Set the Logger ID to -2
- Log rate 10hz (10/s) is plenty AFAIK.
- Check âStart Log at Bootâ because⌠duh.
- Click Save Settings
This should be all you need to do to get this running, by setting âCheck CAN Valuesâ youâre telling the logging app to scan and retrieve CANBUS attached ESC values.
Where do I plan on going from here (cause everyone asked /s):
I will be running this setup in my 4wd board âsoonishâ and as a result will be working on a case for all the parts - naturally this means instead of bread-boarding Ill need to sort out soldering everything in a nice package. Alas, some additional stuff from me that might/maybe/probably show up(eventually):
- When I have the case sorted out and the assembly process reasonably frame-worked, ill update and provide another low effort guide and STL files.
- Iâll consider the idea of properly updating a hardware target file and adding it to the official repo (which means also precompiled firmware). â This is less likely but something Iâd like to do never-the-less.
This was a fun project for me and helps me learn a few things that I may want to take into a different project. If you have questions/comments/concerns LMK, obviously if youâre having troubles feel free to ask but dont hold your breath that ill fall over myself to help.
To visualize the logs you could use this site: Vetr.at About
It is run by a guy that uses it for efoil vesc logs.
Good callout, the one I think I was thinking about was âYours Trulyâ but a more in depth glance than a cursory look suggests this is long since been abandoned.
Can anyone upload the design file for SolidWorks, fusion360 link doesnât work anymore
I donât know why F360 decided to kill my link. Maybe only valid for 1y?! Anyways, here is the new link: https://a360.co/43I2jyl Additionally I attached the files as STEP and F3Z:
USB-C to VESC-CAN v2.f3z (673.1 KB)
USB-C to VESC-CAN v2.step (2.9 MB)