last updated: 14/03/20
CLEVER stands for Creative-Lab Electric Vehicle Energy Reloader ;) and is a charging station for electric cars (Electric Vehicle Charging Station EVCS
).
This page exists for the moment only to help the students in their project. Later on it will describe the station in detail.
Solar energy is becoming more and more important in the power grid and will supply more energy than necessary around midday in the foreseeable future. Solar energy is only available during daytime and has to be stored. Electric vehicles need solar energy and own the needed storage capacity.
During the day, most cars are at work where there is no charging infrastructure. Current charging stations are often expensive and try to allow fast charging. This also requires a considerable expansion of the grid. This is not necessary at the workplace because the owner charges at home and the car is still partially charged. Slow charging at the workplace uses solar energy, preserves the battery, and makes it possible to continue to use and build electric cars with lower battery capacity (e. g. second car). Plug-in hybrids can also increase their electric range and drive almost exclusively with renewable electric energy.
Link to German version (pdf)
Presentation in Luxembourgish
The station is based on the following project: https://www.openevse.com/
TIA-485 is a standard and defines the electrical characteristics of balanced signaling drivers and receivers in serial communications systems. They can cover long distances (typical: 35 Mbit/s at 12 m and 100 kbit/s at 1200 m) even in electrically noisy environments and allow multiple receivers (32 loads per bus) on a linear, multidrop bus. TIA-485 is often used in an industrial environment. TIA-485 does not define a protocol but only the electrical characteristics, so even similar devices from different manufacturers are not compatible due to a proprietary protocols. IC's like the MAX485 make it easy to implement TIA-485. TIA-485 is sometimes combined with the protocol of TIA-232 to get a serial connection with greater distances than TIA-232.
Communication with the EVSE is done via the serial interface (TIA232) over a TIA485 bus. We use the chip Max487
with half-duplex. Each EVCS has an address (00-99, first digit = bus, 2 digit is number on bus). The protocol is TIA232
250000 bit/s 8N1.
Each command begins with a dollar sign, followed by the address (2 digit), the command itself (2 character), the parameter of the command and must end with a linefeed (LF, 0x0A). Example of a command asking the time from the RTC (GT get time, bus 1, station 2):
$12GT␊
The 2 character commands are split up in:
+ F
unction commands Fx
,
+ S
et parameter commands Sx
and
+ G
et parameter commands Gx
.
There is also one asynchronous message: $ST state␊
(e.g. $ST 01␊
)
EVSE state transition - sent whenever EVSE state changes. We see the following 3 main states:
The response format is an $OK
or a Not OK $NK
+ optional parameters + linefeed.
Here is a list with examples of all the commands (ID = 11). The effects produced by the simulator (look below) are always shown in the serial monitor (SM):
command | meaning | EVCS returns | effect in simulator |
---|---|---|---|
$11FA␊ | allow charging | $11OK␊ | SM |
$11FC␊ | cancel charging | $11OK␊ | SM |
$11FD␊ | disable EVSE | $11OK␊ | LED on |
$11FE␊ | enable EVSE | $11OK␊ | LED off |
$11FP x y text␊ | print text on lcd display at x,y | $11OK␊ | SM |
$11FR␊ | reset EVSE | $11OK␊ | LED short blink |
$11FS␊ | sleep EVSE | $11OK␊ | LED slow blink |
----- | ----- | ----- | ----- |
$11S1 20 05 02 11 22 00␊ | set clock (RTC) yr (2-digit) mo day hr min sec |
$11OK␊ | SM |
$11S3 3␊ | set charge time limit (x*15 min, 0=disable, max=255) |
$11OK␊ | SM |
$11SC 10␊ | set current capacity (if a < min or > max, set to min or max) |
$11OK␊ ($11NK SM |
|
$11SD 1␊ | disable (0) / enable (1) diode check | $11OK␊ | SM |
$11SG 1␊ | disable (0) / enable (1) ground check | $11OK␊ | SM |
$11SH 100␊ | set cHarge limit to kWh | $11OK␊ | SM |
$11SO 0␊ | set Overtemperature threshold (10ths of a degree) |
$11OK␊ | SM |
$11SR 1␊ | disable (0) / enable (1) stuck relay check | $11OK␊ | SM |
$11ST 10 10 12 20␊ | set timer (starthr startmin endhr endmin) $11ST 0 0 0 0␊ to cancel timer |
$11OK␊ | SM |
----- | ----- | ----- | ----- |
$11G3␊ | get time limit (0 = no limit) | $11OK 15␊ | SM |
$11GC␊ | get current capacity range | $11OK 6 32␊ | SM |
$11GE␊ | get settings (amps(decimal) flags(hex)) | $11OK 16 001a␊ | SM |
$11GF␊ | get get fault counters (3*hex) | $11OK 0 1 1␊ | SM |
$11GG␊ | get charging current and voltage (mA, mV) | $11OK 12458 234125␊ | SM |
$11GH␊ | get cHarge limit | $11OK 12␊ | SM |
$11GO␊ | GO get Overtemperature thresholds | $11OK 300␊ | SM |
$11GP␊ | get temPerature | $11OK 245␊ | SM |
$11GS␊ | get state and elapsed charge time | $11OK 3 85␊ | SM |
$11GT␊ | get clock (RTC) | $11OK 20 5 2 11 22 5␊ | SM |
$11GU␊ | get energy usage (WS kWh) | $11OK 710118 432␊ | SM |
$11GV␊ | get version | $11OK SIM 0.2 14/05/20 CL 0.3␊ | SM |
Due to COVID-19 we need a simulator to be able to continue the project. The simulator uses a Teensy 2.0.
Write a program that is capable of receiving min. 3 commands from a serial interface (TIA232) and publish them with MQTT. Use a serial/USB adapter, a terminal program (e.g. Cutecom, CleverTerm) the mqtt.eclipse.org
broker and MQTT.fx
or MQTT-explorer
to test.
Deadline: 12/04/20
Write a program on your ESP32 that talks via serial TIA232 (Serial2 on GPIO 16 and 17) to the simulator (!! Use a voltage divider for RxD!, don't forget to connect GND and to cross the data lines). Flash the newest firmware version on the simulator. Use the serial monitor to send the commands and to show the answers!
Deadline: 24/05/20
Enhance the program, so that parallel to the serial monitor a communication via MQTT is possible (one sent an one receive topic!). The answers to the Get commands should be meaningful and in a JSON format. Don't use spaces. Example:
Write your documentation of CREPO2 (first draft).
Deadline: 07/06/20
In the next step we add a webserver to the ESP32. For this we use the STA+AP mode meaning the ESP32 uses the station mode to connect to the broker and creates an access point (AP) for the webserver. The homepage should show the state of the EVCS and have the possibility to set the time and to get the time and the version of the EVCS (see commands).
Deadline: 07/06/20
Enhance the program. so that we see all information and commands on 3 different pages (Function page, Set page and Get Page).
Deadline: 14/06/20