Main Content

I designed and built my own EVSE EV Charging station from scratch because I wanted 2 stations with each 22kW support (3 phase, 400V, 32A) and “real-time” current & voltage measurements on all phases - in order to be able to do dynamic load sharing between the stations. E.g. if car-1 only uses 13A, the remaining 19A are allowed on the second station.

It was a real full stack project, reaching from hardware/electronics design all the way to the frontend webapp written in TypeScript.

Building your own charging stations is fun and gives you full control over the charging (assuming you like to code). It is also cheaper (see BOM below).

For example, you might only want to allow charging at those hours during the day when energy prices are low enough (our enery prices change on hourly basis) or when your solar system produces enough energy. Or you could want to throttle the charging speed dynamically to allow sharing of the line capacity with multiple charging stations when needed. Dynamically adjusting the charging speed to match the fluctuating output of your solar system is also possible.

The system architecture consist of the following 4 layers and their respective features:


- ability to tell the car at which charging speed (0 means off) it can charge via the Pilot Control signal
- switch on/off the main contactor
- read back the car’s charging state from the Pilot Control signal
- detect type of cable plugged in via Proximity Pilot signal
- measure actual current draw for all three phases
- measure voltage on all three phases
- uses a Arduino nano 33 IoT because it has the required 8 analog inputs and WiFi
- (there is no ground fault detection, use an external Type-B GFCI)


- Arduino based - easy to program
- over-the-air (OTA) firmware updates - FTW. No need to open the enclosure each time
- use IP/TCP to connect to the server via WiFi and keep connection alive (re-connect if timeout)
- listen for events from the car and the server simultaneously
- upon state change from the EV, push notification to the server immediately
- all logging is buffered locally in RAM first, and then transferred to the server for long-term storage / debugging
- handle the following types of requests from the server:
- get all data
- install new firmware: over-the-air firmware upgrades
- switch on/off contactor
- set max allowed charge rate on Control Pilot at any give point in time. This can be adjusted fluently (even during ongoing charging), and the EV will follow as commanded. This is key to implement flexible load sharing in order to balance power between multiple charging stations.

Server software which controls everything

- accept new TCP connections from charging stations
- fetch all data parameters from the charging stations regularly and log everything to InfluxDB
- listen for push notifications from the charging stations and react upon them
- Load sharing: calculate maximum charging rate for each station sharing the same power line
- evaluate the charging logic state machine and send back updates (max charging rate + contactor on/off) to the charging station

A frontend webapp

- uses Websockets to listen for real-time updates
- show power consumption for all three phases
- 3 modes:
- On - allows charging whenever the EV is ready
- Off - does not allow charging at all
- Low-cost - allows charging only during hours with low energy prices
- influence load sharing preferences by setting a priority”

Link to article