Skip to main content
added 8 characters in body
Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24

I am trying to display the battery levelvoltage as it is being used to power the Arduino.

I have tried powering the Arduino through the USB and the battery voltage is read accurately when compared to the multimeter reading.

But when the battery is powering the Arduino and being read, it keeps displaying 5.00 V, whenwhich it should not be.

Just wondering what might be happening and how I can go about resolving this issue.

I have been trying to research some answers, and came across something about an 1.1 V reference voltage, but I'm not entirely sure what they mean.

Here is my code for reference:

#include <SoftwareSerial.h> SoftwareSerial BTserial(10,11); int battPin = A1; void setup() { pinMode(battPin, INPUT); BTserial.begin(9600); Serial.begin(9600); } void loop() { int voltReading = analogRead(battPin); float volts = (voltReading/204.6); BTserial.print(volts); BTserial.print(";"); Serial.println(volts); } 

I am using a 3.7 V LipoLi-po battery. It is connected to A1 and also to Vin.

I am trying to display the battery level as it is being used to power the Arduino.

I have tried powering the Arduino through the USB and the battery voltage is read accurately when compared to the multimeter reading.

But when the battery is powering the Arduino and being read, it keeps displaying 5.00 V, when it should not be.

Just wondering what might be happening and how I can go about resolving this issue.

I have been trying to research some answers, and came across something about an 1.1 V reference voltage, but not entirely sure what they mean.

Here is my code for reference:

#include <SoftwareSerial.h> SoftwareSerial BTserial(10,11); int battPin = A1; void setup() { pinMode(battPin, INPUT); BTserial.begin(9600); Serial.begin(9600); } void loop() { int voltReading = analogRead(battPin); float volts = (voltReading/204.6); BTserial.print(volts); BTserial.print(";"); Serial.println(volts); } 

I am using a 3.7 V Lipo battery. It is connected to A1 and also to Vin.

I am trying to display the battery voltage as it is being used to power the Arduino.

I have tried powering the Arduino through the USB and the battery voltage is read accurately when compared to the multimeter reading.

But when the battery is powering the Arduino and being read, it keeps displaying 5.00 V, which it should not be.

Just wondering what might be happening and how I can go about resolving this issue.

I have been trying to research some answers, and came across something about an 1.1 V reference voltage, but I'm not entirely sure what they mean.

Here is my code for reference:

#include <SoftwareSerial.h> SoftwareSerial BTserial(10,11); int battPin = A1; void setup() { pinMode(battPin, INPUT); BTserial.begin(9600); Serial.begin(9600); } void loop() { int voltReading = analogRead(battPin); float volts = (voltReading/204.6); BTserial.print(volts); BTserial.print(";"); Serial.println(volts); } 

I am using a 3.7 V Li-po battery. It is connected to A1 and also to Vin.

added 6 characters in body; edited tags
Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24

I am trying to display the battery level as it is being used to power the arduinoArduino.

I have tried powering the Arduino through the USB and the battery voltage is read accurately when compared to the multimeter reading.

But when the battery is powering the arduinoArduino and being read, it keeps displaying 5.00 V, when it should not be.

Just wondering what might be happening and how I can go about resolving this issue.

I have been trying to research some answers, and came across something about an 1.1 V reference voltage, but not entirely sure what they mean.

Here is my code for reference:

#include <SoftwareSerial.h> SoftwareSerial BTserial(10,11); int battPin = A1; void setup() { pinMode(battPin, INPUT); BTserial.begin(9600); Serial.begin(9600); } void loop() { int voltReading = analogRead(battPin); float volts = (voltReading/204.6); BTserial.print(volts); BTserial.print(";"); Serial.println(volts); } 
#include <SoftwareSerial.h> SoftwareSerial BTserial(10,11); int battPin = A1; void setup() { pinMode(battPin, INPUT); BTserial.begin(9600); Serial.begin(9600); } void loop() { int voltReading = analogRead(battPin); float volts = (voltReading/204.6); BTserial.print(volts); BTserial.print(";"); Serial.println(volts); } 

I am using a 3.7 V Lipo battery. It is connected to A1 and also to Vin.

I am trying to display the battery level as it is being used to power the arduino.

I have tried powering the Arduino through the USB and the battery voltage is read accurately when compared to the multimeter reading.

But when the battery is powering the arduino and being read, it keeps displaying 5.00 V, when it should not be.

Just wondering what might be happening and how I can go about resolving this issue.

I have been trying to research some answers, and came across something about an 1.1 V reference voltage, but not entirely sure what they mean.

Here is my code for reference:

#include <SoftwareSerial.h> SoftwareSerial BTserial(10,11); int battPin = A1; void setup() { pinMode(battPin, INPUT); BTserial.begin(9600); Serial.begin(9600); } void loop() { int voltReading = analogRead(battPin); float volts = (voltReading/204.6); BTserial.print(volts); BTserial.print(";"); Serial.println(volts); } 

I am using a 3.7 V Lipo battery. It is connected to A1 and also Vin.

I am trying to display the battery level as it is being used to power the Arduino.

I have tried powering the Arduino through the USB and the battery voltage is read accurately when compared to the multimeter reading.

But when the battery is powering the Arduino and being read, it keeps displaying 5.00 V, when it should not be.

Just wondering what might be happening and how I can go about resolving this issue.

I have been trying to research some answers, and came across something about an 1.1 V reference voltage, but not entirely sure what they mean.

Here is my code for reference:

#include <SoftwareSerial.h> SoftwareSerial BTserial(10,11); int battPin = A1; void setup() { pinMode(battPin, INPUT); BTserial.begin(9600); Serial.begin(9600); } void loop() { int voltReading = analogRead(battPin); float volts = (voltReading/204.6); BTserial.print(volts); BTserial.print(";"); Serial.println(volts); } 

I am using a 3.7 V Lipo battery. It is connected to A1 and also to Vin.

edited tags
Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24
deleted 34 characters in body
Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24
Loading
added 69 characters in body
Source Link
acho
  • 43
  • 4
Loading
Source Link
acho
  • 43
  • 4
Loading