This shows you the differences between two versions of the page.
iothings:proiecte:2025sric:smartcar [2025/05/29 09:54] andrei.tulpan [Hardware] |
iothings:proiecte:2025sric:smartcar [2025/05/29 10:12] (current) andrei.tulpan [Prototype] |
||
---|---|---|---|
Line 7: | Line 7: | ||
====== Introduction ====== | ====== Introduction ====== | ||
- | SmartCar is an innovative hardware-software solution designed to bring modern vehicle intelligence to any car, especially the old ones. By plugging a compact, futuristic OBD-II device into the car’s diagnostic port, SmartCar captures real-time data from the vehicle’s CAN network and integrates WIFI connectivity to transmit insights to a secure cloud-based backend. The companion mobile app gives users instant access to detailed insights about their car’s health, fuel consumption, driving habits, trip history, and more-all in an intuitive interface. | + | **SmartCar** is an innovative hardware-software solution designed to bring modern vehicle intelligence to any car, especially the old ones. By plugging a compact, futuristic OBD-II device into the car’s diagnostic port, SmartCar captures real-time data from the vehicle’s CAN network and integrates WIFI connectivity to transmit insights to a secure cloud-based backend. The companion mobile app gives users instant access to detailed insights about their car’s health, fuel consumption, driving habits, trip history, and more-all in an intuitive interface. |
+ | |||
+ | 🔗 **[Frontend Demo]** (https://smartcar.thezion.one) | ||
+ | |||
+ | 💻 **[GitHub Repository]** (https://github.com/andreitulpan/smart-car_esp32) | ||
====== Context ====== | ====== Context ====== | ||
A smart car telemetry and diagnostics system for ESP32, featuring CAN bus data acquisition, BLE and WiFi connectivity, OTA updates, and Firebase integration. | A smart car telemetry and diagnostics system for ESP32, featuring CAN bus data acquisition, BLE and WiFi connectivity, OTA updates, and Firebase integration. | ||
- | **Features** | + | ✨**Features** |
* **CAN Bus Support:** Reads vehicle data via MCP2515 CAN controller. | * **CAN Bus Support:** Reads vehicle data via MCP2515 CAN controller. | ||
* **BLE Communication:** Allows configuration and commands via Bluetooth Low Energy. | * **BLE Communication:** Allows configuration and commands via Bluetooth Low Energy. | ||
Line 21: | Line 25: | ||
* **Logging:** Flexible logging system with optional Firebase upload. | * **Logging:** Flexible logging system with optional Firebase upload. | ||
- | **Usage** | + | ⚙️**Usage** |
* On first boot, use BLE to send WiFi credentials (`WIFI,<SSID>,<PASSWORD>`). | * On first boot, use BLE to send WiFi credentials (`WIFI,<SSID>,<PASSWORD>`). | ||
* The device will connect to WiFi, sync time via NTP, and start sending CAN data to Firebase. | * The device will connect to WiFi, sync time via NTP, and start sending CAN data to Firebase. | ||
* For further configuration hold the button for 3 seconds to enable BLE. | * For further configuration hold the button for 3 seconds to enable BLE. | ||
- | **Commands (via BLE)** | + | 📲**Commands (via BLE)** |
* **`WIFI,<SSID>,<PASSWORD>`**: Set WiFi credentials. | * **`WIFI,<SSID>,<PASSWORD>`**: Set WiFi credentials. | ||
* **`CLEAR_EEPROM`**: Clear stored credentials. | * **`CLEAR_EEPROM`**: Clear stored credentials. | ||
* **`DISABLE_BLE`**: Disable BLE interface. | * **`DISABLE_BLE`**: Disable BLE interface. | ||
- | **Customization (via UI)** | + | 🛠️**Customization (via UI)** |
* **CAN PIDs:** Configure supported PIDs. | * **CAN PIDs:** Configure supported PIDs. | ||
* **REQUEST INTERVAL:** Configure the request interval for CAN network. | * **REQUEST INTERVAL:** Configure the request interval for CAN network. | ||
Line 40: | Line 44: | ||
====== Hardware ====== | ====== Hardware ====== | ||
- | **Components** | + | 🧩 **Components** |
* ESP32 development board | * ESP32 development board | ||
* MCP2515 CAN bus module | * MCP2515 CAN bus module | ||
Line 47: | Line 51: | ||
* OBD II Port | * OBD II Port | ||
* Power Switch | * Power Switch | ||
+ | * Hi-Link (9-36V to 5V) | ||
| Function | ESP32 Pin | Description | | | Function | ESP32 Pin | Description | | ||
Line 78: | Line 83: | ||
Developed using the **Arduino Framework**, with the following libraries: | Developed using the **Arduino Framework**, with the following libraries: | ||
- | * **[`jandrassy/TelnetStream@^1.3.0`]**(https://github.com/jandrassy/TelnetStream) – Telnet-based debugging and serial stream | + | * **jandrassy/TelnetStream@^1.3.0** – Telnet-based debugging and serial stream |
- | * **[`mobizt/Firebase Arduino Client Library for ESP8266 and ESP32@^4.4.17`]**(https://github.com/mobizt/Firebase-ESP-Client) – Interface for Firebase Realtime Database | + | * **mobizt/Firebase Arduino Client Library for ESP8266 and ESP32@^4.4.17** – Interface for Firebase Realtime Database |
- | * **[`mobizt/FirebaseJson@^3.0.9`]**(https://github.com/mobizt/FirebaseJson) – Lightweight JSON handler for embedded devices | + | * **mobizt/FirebaseJson@^3.0.9** – Lightweight JSON handler for embedded devices |
- | * **[`coryjfowler/mcp_can@^1.5.1`]**(https://github.com/coryjfowler/MCP_CAN_lib) – MCP2515 CAN bus interface library for OBD-II data access | + | * **coryjfowler/mcp_can@^1.5.1** – MCP2515 CAN bus interface library for OBD-II data access |
====== Challenges ====== | ====== Challenges ====== | ||
- | ====== References ====== | + | Integrating all the advanced features into a single ESP32 board pushed the microcontroller to its **operational limits**. When all major systems are active — including **WiFi**, **Firebase communication**, **Bluetooth Low Energy (BLE)**, and **real-time logging** — the ESP32 begins to exhibit **instability**, such as **random exceptions** and **core dumps**. |
+ | These issues are likely caused by **limited RAM and processing capacity**, making resource optimization and careful task scheduling essential for reliable performance. | ||
+ | |||
+ | ====== Prototype ====== | ||
+ | |||
+ | {{:iothings:proiecte:2025sric:smartcar_prototype.jpg?800 |}} | ||
+ | ====== References ====== | ||
+ | * [[https://ocw.cs.pub.ro/courses/iothings/laboratoare/2022/lab4]] | ||
+ | * [[https://ocw.cs.pub.ro/courses/iothings/laboratoare/2022/lab5]] | ||
+ | * [[https://randomnerdtutorials.com/esp32-firebase-realtime-database/]] | ||
+ | * [[https://github.com/coryjfowler/MCP_CAN_lib]] | ||
+ | * [[https://github.com/mobizt/FirebaseJson]] | ||
+ | * [[https://github.com/mobizt/Firebase-ESP-Client]] | ||
+ | * [[https://github.com/jandrassy/TelnetStream]] |