Last update: 2023-04-10
I started to create a PCB to control my heatpump via CAN-bus, basically for this ESPHome project.
After seeing many posts regarding how to properly connect hardware (and of course doing this with jumper wires), I decided to go more public with my design - maybe it will help others.
While drawing the schematics, I realized, that the design is not limited to heatpumps. The design can be used for controlling / monitoring every / generic CAN-attached device.
Current state of development is here: GitHub - mkaiser/ESP32-CAN: PCB with ESP32 and CAN bus. For controlling CAN-devices like heatpumps via ESPHome or Matter
I have a professional background in electrical engineering, but I mostly research FPGA at work. So there may be some mistakes in the schematics. While drawing the schematics I tried to comment my design decisions. If you see any errors or possible pitfalls, please tell me or ask me why
So, if there is enough interest, I would think about ordering more than 5 and putting the PCB on tindie.com - depends your feedback
Features
- ESP C3 Wroom 2-N4
- ESP Home support
- hardware also supports the upcoming Matter protocol (over WIFI)
USB Type C for programming (CH340C for USB to UART)- 2x USB Type C (providing two ways in the prototype: one as backup)
– for direct ESP programming
– programming and UART via CH340C - Power Supply:
- Wide range 5…30V switched input via Mornsun K78L03-500R3 (omitting the standard 3V3 LDO, so it should be very energy-efficient!)
- Short and Reverse input protection
- resettable input fuse
- made sure that every component has decoupling capacitors (I was terrified, seeing that most evaluation kits don’t have them)
- CAN Bus:
- Input (CAN high/Low, VCC, GND) via screw terminal
- 3V3 CAN transceiver TI SN65HVD230, compatible with 5V CAN Bus systems very technical link
- well known and supported MCP2515 CAN Controller (integrated in ESP Home)
- options to bypass the CAN controller via 0Ohm resistors
- 4 LEDs (Power, RX, TX and ESP LED)
- Optional:
– There are additional spring clamps and one 10p 2mm pin header on the board - I need them for other projects
– I added one I2C-attached IC to realise 2 analog output ports with 0…10V DC output. In combination with a potential free relay, I can control my ventilation system (Tecalor TVZ 170 E Plus).
Current status
-
Files (Schematic as pdf, BOM as xls and case-drawing) are available here: GitHub - mkaiser/ESP32-CAN: PCB with ESP32 and CAN bus. For controlling CAN-devices like heatpumps via ESPHome or Matter
-
Schematics: done
-
First routing done (silkscreen needs more love)
-
I am used to Altium designer, for this project I tried EasyCAD for the first time. For the schematics it was okay-ish, but I am missing assembly options / variants. Routing was not so easy compared to Altium.
-
Housings to determine the PCB dimensions. I have a sample of a Phoenix Contact UCS 145-125, which is really robust, but with around 25€ it costs would be more than the PCB… Any ideas? It is also possible to do a cheap 3D printed housing includind a strain relief for the CAN-input-wires, but I don’t have a 3D printer and certainly would need help with that. -
Housing: Designed the PCB to fit a "SONOFF IP66 waterproof Junction Box” from aliexpress.
Measuring the housing was a bit tricky. I hope it works
Currently looks like this:
2D layout:
3D layout:
Waiting for your feedback
~Martin