Hi,
I am using a voltage divider so I can monitor the voltage a 3cell lipo.
The problem is that the SerialRead gives 1023 (max) even when the voltage is at 2.19V across Arduino Gnd and Arduino A0
So I am dropping the voltage from ~10 to 2.19 but the arduino reads 5V (ie 1023)
I have attached a schematic of my setup.
I suppose the problem might be that I need a reference voltage, as maybe one from the board the 5V? In that case how would I need to wire it to correct the serialRead.
Here is my code as well:
const int analogPin=A0;
int val=0.0;
void setup(){
Serial.begin(9600);
}
void loop(){
val=analogRead(analogPin);
Serial.println(val);
}
What I am trying to do is use the mini to monitor voltage of a lipo and then will hook up a relay to switch off the circuit if the voltage drops below a certain value. I am using the mini so I can save as much weight as possible. Not sure if there is another board that could do the same thing with less weight maybe?
Thanks, and I think this is my first post in this forum too