- BoardESP32 dev board
- FirmwareC++ on the Arduino core
- InterfacesButton, 2 LEDs, 16×2 LCD, Wi-Fi
- LicenceMIT, open source
How it works
The station is a five-state machine. A push button hidden under the plug moves it from one state to the next, and every state has its own light pattern and display text. While charging, the energy counter rises by 0.01 kWh every half second, and the cost follows from the price per kWh.
The same controls are available in the browser: the ESP32 opens its own Wi-Fi network and serves a dashboard with live values, settings and a session history.
| State | Green light | Red light | Energy and cost |
|---|---|---|---|
| Idle | On | Off | 0 |
| Ready! | Off | Blinking | 0 |
| Charging… | Off | On | Counting up |
| Charging stopped | Blinking | Off | Frozen where you stopped |
| Charging complete | Blinking | Off | Frozen at the limit |
Build your own
You need no soldering. Everything sits on a breadboard, and the housing is whatever bricks you have at home.
What you need
- An ESP32 dev board (a standard 38-pin board) and a USB cable
- A 16×2 I2C LCD that works with the
LCD_ST7032library - One red and one green LED, each with a current-limiting resistor
- A small push button
- A breadboard and jumper wires
- Building bricks for the station, plus a toy car
Wiring
| Part | Connection |
|---|---|
| Power rails | ESP32 GND to the ground rail, ESP32 3V3 to the 3.3 V rail |
| Push button | GPIO18 → button → GND (the internal pull-up is used, so no resistor is needed) |
| Red LED | GPIO23 → resistor → LED → GND |
| Green LED | GPIO4 → resistor → LED → GND |
| LCD | SDA → GPIO21, SCL → GPIO22, GND → GND, VCC → 5 V or 3.3 V depending on your module |
Flash the firmware
- Install the Arduino IDE.
- Add ESP32 support: open Boards Manager, search for esp32 and install the package by Espressif Systems.
- Open Library Manager and install
LCD_ST7032. Wi-Fi, the web server and flash storage come with the ESP32 package. - Download the code from GitHub and open
firmware/mini-ev-charger/mini-ev-charger.ino. The IDE loads the other files in that folder automatically. - Connect the board, choose ESP32 Dev Module and its port, then click Upload.
- Optional: open the Serial Monitor at 115200 baud. It confirms that the Wi-Fi network has started and prints the station's address.
Use it
With the button
- Park the car at the station. It starts in Idle with the green light on.
- Press the hidden button to “plug in”. The station is Ready! and the red light blinks.
- Press again to start charging. The red light stays on, and energy, cost and the timer count up on the display.
- Press again to stop. The green light blinks and the numbers freeze.
- Press once more to return to Idle for the next car.
If the charge limit or the cost cap is reached first, the station switches to Charging complete on its own.
With the web dashboard
- On a phone, tablet or laptop, join the Wi-Fi network
EV-Chargerwith the password12345678. - Open
http://192.168.4.1in the browser. - The dashboard offers only the actions that fit the current state, such as Ready, Start charging, Stop charging or Back to Idle. Values refresh every second.
- A stopped session can be resumed: energy and the timer carry on where they paused.
- Open Session history to see the last five sessions with energy, cost and duration. They are kept in flash, so they survive a power cut.
Settings
In Idle, the dashboard shows a settings panel.
| Setting | Default | What it does |
|---|---|---|
| Charge limit | 1.0 kWh | Charging completes when this much energy is delivered. At the default, a full session takes about 50 seconds. |
| Price per kWh | €0.35 | Used to calculate the cost shown on the display and dashboard. |
| Cost cap | Off | Optionally stop charging once the cost reaches this amount. Set it to 0 to switch it off. |
For tinkerers
GET /api/status returns the current state, energy, cost and duration as JSON, which is handy for connecting another screen or app.
Safety: this is a simulator and a toy. It does not charge anything. Never connect it to a real vehicle, a charging cable or any battery-charging circuit.