battery status

Hello

In my project i am using NRF24L01 to transfer data from one Arduino to another.

Transmitter side i will be using external 9v battery to power up arduino. now at receiver side i want to know the battery status what is the voltage.

I saw that we cannot give more than 5v to arduino analog or digital pins. so how can i check the voltage status of 9v battery at receiver side?

can someone please give me ideas how to do.

Thank you in advance

This page may help. Use measured Vref for more accurate results.

More can be found with a search for "arduino measure battery voltage".

Thank you, understood that i have to use 1M and 100K resistor for input at sender.

what will be the situation at receiver side can i directly check the voltage at analog out pin or do i need to make any changes?

understood that i have to use 1M and 100K resistor for input at sender.

The voltage divider in the linked page is for measuring up to 50V, way to high for your use. You could use different values to get more resolution for your battery measurement. A voltage divider of 2 100k resistors would make more sense. With that voltage divider, 9V input will give 4.5 volts output. Since the values of the resistors are kind of high (greater than 10K) a 0.1uf cap from ground to the analog input pin will result in more accurate readings. For best accuracy, perform the calibration steps as shown on the page.

what will be the situation at receiver side can i directly check the voltage at analog out pin or do i need to make any changes?

I don't quite understand what that means. You would send the voltage as a number in a message to the receiver.

My situation is transmitter side i have give battery voltage as input and check the what is transmitter input voltage at receiver side.

here we have another condition imagine if we are giving 9v input at transmitter side and we will read same voltage at receiver side and i want make some alert at receiver side when voltage goes below 7V.

how this can be done. if you have any similar example can you please share.

Why can't you just send a transmission from the master (transmitter) to the slave (receiver) containing, say, the ADC counts the transmitter read from the battery?

What are you transmitting? Can you post your code (using code tags...)?