Thanks for sharing, I made a variant that fits a 4 Pin PH2.0 connector. This way it can be powered with 5V over the can connector.
Only connect power either over usb or from VESC, not from both sides at the same time!
If you need both connections, cut the 5V from VESC.
If you order the esp32, be aware that there are some faulty boards sold, I just got a bunch and wondered why my second adapter did not work correctly (lost connection all the time).
The left one is a working one, the one on the right has the oscillator too close to the antenna.
For more information see here: Some stores are selling broken ESP32-C3 Super Mini's - RoryHay.es
I had to bend the pins of the 90degrees ph2.0 so the connector can be moved to be in front of the PCB. The GND and 5V (pin 1 and 4) go through the fixing holes of the serial to can board. Hot glue also helps to keep things in place…
Got some new ones, these do work: US $1.68 | 1/5PCS ESP32-C3 Super Mini Development Board ESP32-C3 Module Mini Wifi BT Bluetooth Module RISC-V 32-Bit Single-Core Processor https://a.aliexpress.com/_ExaypJW
I wish I saw this earlier. The ones I just got in the mail have the oscillator/antenna issue. Soldered one up anyway and yeah, the connectivity is ass.
Hello,
I am quite surprised.
You are using a 5V CAN transceiver (TJA1050) in direct connection with an ESP32C3.
However, according to the datasheet, the ESP32C3 inputs are not 5V tolerant (at all). As stated in the TJA1050 AN00020 document chapter 3.4, the RXD output pin is push pull based (to 5V) and there is even a pull up resistor to 5V on the TXD input.
For a reliable system, you are better of using a 3.3V transceiver (from TI) or one with a VIO pin (mcp2562).
Thanks for the heads up…! I picked the TJA1050 board because it was small, cheap and had a good form to fit on the back. Totally oversaw, that it has a 5V logic level. It’s strange that it worked like this until now and nobody noticed… However, I also had certain issues, which might be related to this.
I’ll change the design from the typical TJA1050 (1122mm) this SN65HVD230 (1416mm).
Im actively working on. The pre-compiled BIN as best I can tell is using hw_xp_t designated C/H files (assumption based on the fact these are the ones active in the conf_general.h file in the github).
When you look at the hw_xp_t.h file you’ll see the pinout which for the C3 Mini isnt correct for SPI. CAN and UART are fine, but SPI not so much.
Adjusting those and rebuilding the firmware is easy enough as long as you install the exact same esp-idf version as described in the github (5.2.2). Many of the driver/libs are removed/deprecated into 5.2.5 and beyond.
This is where I am at currently, LispBM is something im still working on but it shouldn’t be difficult to get my head around. Once I have SD card working, Ill try to get UART GPS running as well.
Edit: Quick update because I dont want to just make whole new reply. Recompiling the firmware, and installing the latest VESC Tool. the LispBM commands for sd-card functionality are working. I was able to format (externally) the sd card to FAT and was able to connect, read and create a new directory on the SD Card via the C3-Mini. At this point its just a matter of writing the code to collect relevant data from canbus and write it to the SD Card.
Side note, anyone know of a way to either generate bunk can-data for debugging/dev or if there is a way to save the canbus data and replay it as an emulated device? Would make this process significantly easier for me but if not it is what it is.