Recently some electric bikes caught fire due to the failure of the battery management system because of poor battery design. Unfortunately, proper thermal management is not there in most electric vehicles at present. So, here is a project to monitor the battery temperature and smoke detection to alert the EV user and stop the EV well in time to avoid further damage. The authors’ prototype of the thermal management system is shown in Fig. 1 and its block diagram is shown in Fig. 2.
Lithium-ion battery has a specified operational temperature of -20°C to +60°C. It will provide the longest service life if its temperature is always kept within approximately 10°C to 40°C.
The proposed system, powered by a 12V battery, is built around ESP32 board (U1), temperature sensor DS18B20 (U2), smoke sensor MQ135 (U3), 16×2 LCD display (U4), 5V regulator LM7805 (U5), and a few other components. The SPDT switch and potentiometer are connected to input of ESP32 controller while I2C, 16×2 LCD display, buzzer, relay, and Arduino Blue Control application are connected to its output. SPDT switch S1 is for mode selection to display the current temperature or to configure the threshold.
The Arduio IDE is not ready to program ESP board by default, so go to Board Manager and install it. Install the latest Arduino IDE library for the software. Later install the libraries needed for interfacing the sensor. Here DallasTemperature and LiquidCrystal are used for interfacing the sensor and display, so open Library Manager and install these libraries.
Download the code for this project and select the port and board in Arduino IDE. Connect the ESP32 to your laptop and press the Boot button to bring the ESP32 board in program uploading mode and then upload the code to ESP32 board. The code can be download using the link.
Fig. 3: Circuit diagram of thermal management system
Construction and testing
After uploading the source code tms.ino into ESP32 board, connect the components as per circuit diagram in Fig. 3. In place of the voltage regulator circuit a 5V battery or 5V DC adaptor can be used to power the device. Relay connection prototype is shown in Fig. 5.
Fig. 4: Code snippet
Fig. 5: Relay connection prototype
Fig. 6: Testing the device in an EV
Fig. 7: Connecting Bluetooth
Fig. 8: Setting alarm
For installing the circuit into an electric vehicle refer Fig. 6. For testing the project refer Fig. 6 through Fig. 9. A Bluetooth terminal app is required to monitor the battery temperature and smoke data on phone. So, you may install the Arduino Blue Control app in your phone.
Fig. 9: App display
Power the device and connect the app with Bluetooth. You would now be able to see the temperature of battery in app. Whenever the temperature rises above the threshold set, or any smoke is detected by sensor, the app gives an alert and cuts off power supply to the vehicle’s battery through the relay.
E.Venkatesan and M.Dinesh, Both E. Venkatesan (left) and M. Dinesh (right) work as a Product Application Team Lead in Qmax Test Equipment Pvt Ltd and are interested in the areas of IoT, BMS, wireless technologies, and embedded systems.