ESP32 VCU

I have prepared a board with ESP32 chip for testing and VCU development.

Main caveat is this only has a single CAN.
While i develop the code i intend to add another CAN to SPI pins… this should make it a great board especially so since it has BT/WiFi functionality already integrated.

I managed to get the CAN bus code working YAY!
I have the I/Os working as well, though not in the way as i intended. I will simply replace that chip by series of 4 resistors and reverse the sensing. This will pull the signal lines to GND and effect signal change in ESP32 chip.
Buzzer coupled with signal on BMS pin is really loud. I had to tape it over for testing.

This board for now drives only one CAN transciever. I consider it enough for now. Later i will add another SPI if need be, but i see quite a lot of development to do that. For now the code itself is enough of a challenge 

I have already implemented PP and CP signalling. Board also has PWM duty sensing pin which can be used to correct power as required from the EVSE.

This version of VCU actually could also be used to run Leaf or Outlander inverter. It has the analog pins and correct inputs and outputs as well. I tested those analog inputs and they are a bit off as the digital signal value looks. It seems integrated analog inputs are not very accurate despite the high bit rate. I will probably have to use external AD chip on I2C lines.

I tested ESP32 12V signal however sensing on one of my analog inputs. Rather cubersome, using throttle input for that but it works. And i can use this signal to observe aux voltage and turn on DCDC if aux voltage goes down.

On the more important note i managed to setup watchdog function so it does not reset the chip every so often…
CAN bus signaling works within function now.

I used flags as conditionals do not work with yet undeclared parameters (can values).
VCU would read Mitsubishi charger/DCDC aux voltage from CAN and decide to start it up if it drops too low. On the charge side VCU would read HV voltage and stop charger from going too high. There are AC compressor and heater functions too.
Tesla DCDC CAN signal and Eltek charger commands i tested too.

Links to schematic and design are in github
https://github.com/arber333/ESP32-VCU

To be more precise; i published the VCU code which works with Mitsubishi, Eltek, Elcon and Tesla CAN commands. It can sense EVSE presence and react with running coolant pump and DCDC. Aux battery monitoring function is added to keep 12V system topped up. I set it up to use flag state within CAN functions. That way one can use single event for multiple functions in real time.

For now i use it with external relays since most of the outputs are open collector based.

Next on the list is the Wifi function. The idea is to use ESP32 wifi output to send serial data out and report on the several parameters the VCU can gather from CAN bus.

Leave a comment