It is worth mentioning that powering an Arduino from a "PP3" battery - even an alkaline one - is a foolish thing. Thank you for all the answers I really appreciate it people. So, if you use a DMM and calibrate (adjust your formula) your readings should be accurate and reliable. The 1.1V reference isn't exact either, but it's very stable. Of course, you'll have to change your voltage divider to keep the voltage divider output below 1.1V, and you'll have to adjust your formula. The internal-optional 1.1V reference will remain constant even when Vcc drops down to around 3V. Voltage regulators are not perfect so Vcc isn't always exactly 5V, and if you use USB power, that's not always exactly 5V either so switching between the regulator and USB power can change your readings. If the reference and ADC input change exactly-together the ADC reading won't change. With lower Vcc (and a lower reference), the voltage reading/calculation goes up when the reference goes down. But when the power supply into the regulator gets close to 5V, the regulator drops-out of regulation. The default ADC reference is Vcc and that's find as long Vcc is 5V. Like Paul says, your problem is the ADC reference. Sorry had to spread your post out, keeping your writing in discrete sentences like this helps the readability and the number of forum members who try to read your post. No matter the limit the LED does not blink. I thought it would be pretty easy to detect a 0-5V change from the A0 pin, but the 10-bit value it is measuring after removing USB seems mysterious even though I wrote in the code if the voltage drops below a certain level it should start blinking an LED indicating low battery. The Nano brownout voltage is at 3.8V for me as at that voltage it stops working. Well, everything works fine until I disconnect the USB then the Nano seems like ignoring the voltage I am applying whether it is 10V or 5V or 3V. While the Nano is getting power from both the USB and the power supply I know it favors the USB but I can get the voltage drop form A0 using a voltage divider to read the voltage drop from 0-5V which would results a reading of 0-1023 on the Nano. I am taking the necessary precautions such as not using too much voltage or current which could damage the board however the problem here is everything seems to be working fine if the Nano is connected to the computer via USB plus getting 9V power through Vin. Now instead of waiting for the battery to deplete itself I am using a lab dc power supply which can output from 0-30V. I am using an Arduino Nano and want to make the project portable using a 9V PP3 battery. Apart from using the 9V battery I use DC power supply. I have attached the circuit I have followed as well. I thought it would be pretty easy to detect a 0-5V change from the A0 pin but the 10-bit value it is measuring after removing USB seems mysterious even though I wrote in the code if the voltage drops below a certain level it should start blinking an LED indicating low battery. Hello, I am having trouble in a mysterious way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |