![]() IoT Based Battery Status Monitoring System using ESP8266.The server displays the battery voltage, load voltage, current, and power, providing a comprehensive overview of the battery’s condition in both charging and discharging states.Ĭheck our previous similar project for 3.7V Lithium-Ion/Lithium-Polymer Batteries: This allows users to monitor the battery status remotely from anywhere in the world via their smartphones or computer dashboards. The ThingSpeak server, an open-source Internet of Things (IoT) application and API, is used to collect and store sensor data in the cloud and develop IoT applications. The ESP8266, a low-cost Wi-Fi microchip with full TCP/IP stack and microcontroller capability, is used to send this data to the ThingSpeak server. These readings are crucial for maintaining the health and efficiency of the battery. In this setup, we are using the INA226 sensor, a high-precision current and power monitor, to provide accurate readings of the battery’s voltage, load voltage, current, and power. The primary goal of this system is to ensure the optimal performance and longevity of the battery by preventing overcharging or excessive discharging, which can lead to battery damage or system failure. This system is specifically designed for monitoring lead-acid batteries, which are widely used in automotive, solar, and other high-capacity applications. Serial.println(adc_value) // lets assumeĪdc_voltage = (adc_value * ref_voltage) / 4096.In this project, we will build an IoT-based 12V Battery Monitoring System using ESP8266 and INA226 DC Current Sensor. Serial.println("The device started, now you can pair it with bluetooth!") ![]() SerialBT.begin("Boat") //Bluetooth device name String ssid="BTBHub6-36JX" // your network SSID (name) #error Bluetooth is not enabled! Please run make menuconfig to and enable itĬonst char * myWriteAPIKey = "9U3QMIMX97S6QCUE" #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) Hello everyone please can you take a look at this coding which is reading two 12 volt car batteries as the end readings showing on the serial monitor are not as accurate as the voltage reading i am getting from my voltmeter, thanks ![]() Voltage Divider Calculator <<< Use 10K for R2, 3.3V for the output V's. log_i( "fReadBattery %d", uxTaskGetStackHighWaterMark( NULL ) ) VTaskDelayUntil( &xLastWakeTime, xFrequency ) TimePastKalman = esp_timer_get_time() // time of update complete XSemaphoreGive( sema_CalculatedVoltage ) XSemaphoreTake( sema_CalculatedVoltage, portMAX_DELAY ) KF_ADC_b.setProcessNoise( (esp_timer_get_time() - TimePastKalman) / 1000000.0f ) //get time, in microsecods, since last readingsĪdcValue = KF_ADC_b.updateEstimate( adcValue ) // apply simple Kalman filter ![]() TickType_t xLastWakeTime = xTaskGetTickCount() Ĭonst TickType_t xFrequency = 1000 //delay for mSĪdc1_get_raw(ADC1_CHANNEL_0) //read and discardĪdcValue = float( adc1_get_raw(ADC1_CHANNEL_0) ) //take a raw ADC reading Uint64_t TimePastKalman = esp_timer_get_time() // used by the Kalman filter UpdateProcessNoise, time since last kalman calculation I use the following code to read 12V battery V's with a ESP32. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |