Welcome
J1772 EVSE firmware for ESP32 based devices.
What it does~
An EVSE (Electric Vehicle Supply Equipment) is the equipment between the AC mains and an electric vehicle – what most people call the "charger". For AC charging the conversion to DC happens in the vehicle's onboard charger; the EVSE's job is to supervise and control the supply safely: confirm a vehicle is properly connected, tell it how much current it may draw, switch the mains on and off through a contactor, and shut down on a fault.
This project is firmware that turns an ESP32-based board into a fully featured AC EVSE following the SAE J1772 / IEC 61851-1 standard. On top of the core charging control it adds the features expected of a modern wallbox – energy metering, charging limits, access control, a responsive web interface, over-the-air updates, and a range of integration interfaces (Modbus, Lua scripting, Nextion HMI, AT commands, REST). See the full list under Key features.
Many users who built the unit confirmed it working with a number of vehicles.
It supports integration with popular platforms like EVCC and Home Assistant in multiple ways.
How it works~
The charger and the vehicle communicate over two signalling lines defined by the standard:
- The Control Pilot carries a 1 kHz ±12 V signal. Its duty cycle tells the vehicle how much current it may draw, and the vehicle answers by changing the voltage to signal that it is connected, ready, or charging.
- The Proximity Pilot codes the current rating of a detachable cable, so the charger never offers more current than the cable can carry.
A state machine sits on top of these signals. It reads the Control Pilot, decides when charging is permitted, closes the AC contactor to energize the vehicle, supervises energy metering and protections (residual current, temperature, socket lock), and returns to a safe state on any fault. Optional limits and gates – consumption, time, authorization, tariff enable – let it match a real installation.
The firmware is written in ESP-IDF and is not tied to any particular board: all the hardware details live in a separate configuration file, so the same binary runs on many designs. The Architecture page describes how the pieces fit together, and the Device definition method below explains the configuration approach.
Key features~
- Hardware abstraction for device design
- Responsive web-interface
- OTA update
- Integrated energy meter
- Modbus (RTU and TCP)
- LUA scripting (allowing local automations and further integration with MQTT)
- Nextion HMI
- AT commands (third party HMI or systems integration)
- REST API / WebDAV
- Scheduler
Web installer~
Easy initial installation of esp32-evse firmware can be performed using a browser.
Device definition method~
One firmware to rule them all. Not really :-) one per device platform (ESP32, ESP32-S2...).
There is no need to compile the firmware for your EVSE design. Source code ist not hardcoded to GPIOs or other hardware design features. All code is written in ESP-IDF without additional wrapping layer like Arduino.
All configuration is specified separately form the firmware binary in a configuration file named board.yaml stored on a dedicated partition.
For example, the following schematic is a minimal EVSE circuit with ESP32 devkit:

For this circuit board.yaml, has to contain only this:
deviceName: ESP32 minimal EVSE
button:
gpio: 0
pilot:
gpio: 33
adcChannel: 7
levels: [2410, 2104, 1797, 1491, 265]
acRelay:
gpios: [32]
For more information's see YAML schema.
Web interface~
Fully responsive web interface is accessible local network IP address on port 80.
Dashboard page
Settings page

Mobile dashboard page

Check out the build examples page to see some hardware in action.
Donations~
ESP32 EVSE firmware is free, but costs money to develop harware and time to develop software. This gift to the developer would demonstrate your appreciation of this software & hardware and help its future development.