A Cloud Hardware-Software Innovation Project for a Solar Powers Distributor

About the Client

A leading provider of renewable energy solutions in Europe. They specialize in solar panel installations, battery storage, EV charging systems, and energy management services. Operating in several European countries, they have completed over 50,000 installations. Their focus is on making clean energy accessible and reducing dependence on fossil fuels by helping homes and businesses shift to solar power.
Customer
Location
EU
Industry
Solar Energy

Company’s Request

The client required a private-use electric vehicle charging station (EVSE) compatible with the SAE J1772 standard. The device needed to measure energy consumption, control charging sessions, and report the data to a cloud platform for monitoring via web dashboards or mobile apps. Additionally, BLE support was required for local control when cloud access was unavailable.

Technology Set

STM32 Microcontroller
Used on the Power Board to control power relays and measure energy consumption. It handles functions like current measurement and relay switching during charging sessions.
ESP32-WROOM-32D
A Wi-Fi and Bluetooth module that manages communication between the EVSE and the cloud, supporting Ethernet, BLE, and Wi-Fi connections.
FreeRTOS
A real-time operating system running on the ESP32 to manage multitasking and operations between communication, control, and data reporting tasks.
MQTT Protocol
A lightweight messaging protocol for secure, real-time communication between the EVSE and the AWS IoT Cloud for control and monitoring.
AWS IoT
Cloud infrastructure used to store data from the EVSE and provide remote access to control the device via a web dashboard and mobile app.
BLE (Bluetooth Low Energy)
Allows local control and configuration of the EVSE when cloud connectivity is unavailable.
Emoncms API
A cloud API for logging and monitoring energy data, ensuring compatibility with other EVSE systems that rely on similar data reporting structures.
SAE J1772
The industry-standard charging protocol guarantees that the EVSE can work with various electric vehicles.
NFC and RFID
To authenticate users and allow them to start or stop charging sessions using NFC tags.
LAN8742 Ethernet PHY
Provides Ethernet connectivity as a backup to Wi-Fi for reliable communication between the EVSE and the cloud.
RCD (Residual Current Device)
Circuitry designed for ground fault detection, providing user safety by cutting off power in case of electrical faults.
C
The core language for programming the STM32 and ESP32 microcontrollers.
Python
Used for scripting and automating cloud simulations and testing procedures during development and deployment.
JTAG Debugger
A hardware debugging tool used to troubleshoot and optimize the code running on the STM32 and ESP32.
Git
Used to manage the project codebase for collaborative work and secure backups for all software versions.
Postman
An API testing tool to verify the communication between the EVSE and the cloud services.

The project began with the clear goal of developing a reliable electric vehicle charging station (EVSE) for private use. It has to be compatible with the SAE J1772 standard and capable of reporting energy consumption to the cloud. The device also needed to offer local control through BLE when cloud connectivity was unavailable.

Power and Communication Board Development

We started by designing the two main components of the system: the Power Board and the Communication Board.

The Power Board, based on an STM32 microcontroller, was responsible for managing the relays that control charging and for measuring the energy consumed during the charging process. 

The board needed to accurately handle three-phase current measurement, which involved developing complex algorithms. The task required fine-tuning to make sure the board could accurately capture and report energy data while maintaining safety standards, especially during periods of high current load.

The ESP32-based Communication Board was the bridge between the EVSE and the cloud. 

This board handled data transmission via Wi-Fi and Ethernet, allowing users to monitor and control the EVSE remotely through the cloud. The board was also tasked with sending regular status updates and energy consumption data to the cloud using the MQTT protocol.

Initially, synchronizing the communication between the Power Board and the Communication Board proved challenging. The boards communicated using a UART interface, but timing led to synchronization issues, which disrupted data transmission. After identifying the problem, we adjusted the communication protocol and added error-checking mechanisms.

Cloud Integration and BLE Support

Once the basic functionality of the Power and Communication Boards was established, we moved on to connecting the device to the AWS IoT cloud. This involved setting up secure MQTT communication so the EVSE could send data like energy usage, device status, and charging information to the cloud in real time.

Using MQTT, the EVSE sent regular updates to the cloud every 60 seconds. These updates included data on current consumption, the total energy used during the charging session, and the device’s operating temperature. Users could access this data via a web dashboard or a mobile app, which allowed full remote control and monitoring of the charging station.

One problem we encountered was making sure the device could communicate with the cloud reliably, especially in areas with weak Wi-Fi. The device needed both Wi-Fi and Ethernet as backup options. During testing, switching between these connections caused delays and data loss. We fixed this by setting up the board to keep a stable connection no matter the method used, discreetly switching between Wi-Fi and Ethernet.

Besides cloud communication, we implemented Bluetooth Low Energy (BLE) support. This allowed users to control the charging station locally if the cloud connection was unavailable. BLE was important for initial configuration, where users could set up the network and access basic EVSE parameters directly from their mobile devices.

Initially, we encountered security issues with the BLE pairing process. The BLE system required pairing to establish a secure connection between the user’s device and the EVSE, but the initial pairing mechanism lacked sufficient security measures. The solution involved implementing a passkey system to enforce secure connections.

Web Interface

To make the setup simple, we added a basic web interface on the Communication Board. This interface lets users easily set up network settings like Wi-Fi credentials and check important EVSE status information. It also provided options for those needing more control to adjust the charging current and view diagnostic data.

NFC Support

The final key feature was adding NFC and RFID tag support. This allowed users to start or stop charging sessions by tapping an NFC tag. It was necessary for user authentication and added convenience for people who may not always have access to their phones or the cloud.

The integration of NFC tags had several issues that we needed to fix. At first, the NFC antenna wasn’t strong enough to reliably read some tags. To solve this, we improved the antenna design by following the PN7150 development kit guidelines, which boosted the signal and fixed the detection problem.

Safety and Compliance

We also faced challenges in making sure the EVSE met all safety and certification standards. We needed to pass tests like electrical safety, electromagnetic compatibility (EMC), and functional safety checks. These tests were required to confirm the product was safe and reliable for users. We also developed fault-detection systems to spot problems like ground faults or overheating. 

These safety features were tested thoroughly to meet the highest standards.

Value Delivered

Greater control and flexibility
End-users can manage the EVSE remotely via a cloud dashboard or locally through BLE when cloud access is down. This gives customers multiple control options, making the product more reliable and adaptable in different situations.
Improved user experience
The easy-to-use web interface and mobile app give users clear access to their charging data and control options. This means users can manage their charging process quickly and efficiently, providing more convenience and peace of mind.
Cost savings
By choosing STM32 and ESP32, we kept the design simple but functional, including features like Wi-Fi, BLE, and cloud integration. This lowered production costs, which is a big benefit when scaling the solution to the market.
Meeting industry standards
The EVSE system meets the international SAE J1772 standard, making it compatible with many electric vehicles worldwide. This increases marketability, as customers can trust the system to work with a wide range of EVs.
Scalable and future-ready
With AWS IoT integration and a modular design, the EVSE can easily be upgraded or expanded with new features. This allows the client to quickly adapt to future market trends and customer needs, making it a smart long-term investment.