Tapatalk

Voltage divider A7

Voltage divider A7

7

PostJun 10, 2017#1

Hi,

Keeping on with my wisen boards

I was looking to monitor a 12v battery on the A7 divider, is it a simple change I need to make so I can read it.

Thanks Paul

1885
1885

PostJun 12, 2017#2

Hi Paul,

The A7 pin is connected to a voltage resistor, which is "monitoring" the VIN voltage. To prevent any damage/interference with the current circuit, you need to first disconnect the A7 from the voltage divider by disconnecting the JP2, as described here: https://bitbucket.org/talk2/whisper-nod ... er-jumpers. An alternative would be to use another Analog Pin if they are free.

Additionally, you will need to build your own voltage divider, which I recommend to output 1.1V for the maximum voltage. The reason for that is to use the "INTERNAL" voltage reference present on the MCU. Here an example:

RTOP: 1M
RBOT: 68K
CAP: 100pF (just to provide some stability)

Code: Select all

(INPUT VOLTAGE)----[RTOP]-------------(MCU Analog A?)
                            |      |
                            |      |
                         [RBOT]   --- (Capacitor around 100pF)
                            |     ---
                            |      |
                            |      |
                           GND    GND
With the relation above you should get 1.1V output when your input is 17.267V. In other words, you can monitor a few volts over 12V you need, which is fine.

Now in the code, you can use the already existent function T2Utils::readVoltage(A?, 0, 17267, 5), where:
A? - this is the analog Pin you going to use
0 - this is the control Pin, it's only necessary if you have a kind of "switch" which will turn the voltage divider ON or OFF - normally used to block the currently leak resistor dividers have. If you use "0" means the function expect the voltage divider to be always "ON", which I think would be the case.
17267 - here you define the Maximum voltage your voltage divider would represent at 1.1V;
5 - finally the number o samples to be collected to be averaged;

Have a look on the Talk2 Example Voltage.Base as reference and the files T2Utils.h and T2Utils.cpp. Otherwise just build your own function to read the analog value (from 0 to 1023) and convert to the voltage it would represent.

Cheers

22

PostFeb 07, 2022#3

Talk2 wrote:
Jun 12, 2017
Hi Paul,

The A7 pin is connected to a voltage resistor, which is "monitoring" the VIN voltage. To prevent any damage/interference with the current circuit, you need to first disconnect the A7 from the voltage divider by disconnecting the JP2, as described here: https://bitbucket.org/talk2/whisper-node-avr/overview#markdown-header-via-solder-jumpers. An alternative would be to use another Analog Pin if they are free.

Additionally, you will need to build your own voltage divider, which I recommend to output 1.1V for the maximum voltage. The reason for that is to use the "INTERNAL" voltage reference present on the MCU. Here an example:

RTOP: 1M
RBOT: 68K
CAP: 100pF (just to provide some stability)

Code: Select all

(INPUT VOLTAGE)----[RTOP]-------------(MCU Analog A?)
                            |      |
                            |      |
                         [RBOT]   --- (Capacitor around 100pF)
                            |     ---
                            |      |
                            |      |
                           GND    GND
With the relation above you should get 1.1V output when your input is 17.267V. In other words, you can monitor a few volts over 12V you need, which is fine.

Now in the code, you can use the already existent function T2Utils::readVoltage(A?, 0, 17267, 5), where:
A? - this is the analog Pin you going to use
0 - this is the control Pin, it's only necessary if you have a kind of "switch" which will turn the voltage divider ON or OFF - normally used to block the currently leak resistor dividers have. If you use "0" means the function expect the voltage divider to be always "ON", which I think would be the case.
17267 - here you define the Maximum voltage your voltage divider would represent at 1.1V;
5 - finally the number o samples to be collected to be averaged;

Have a look on the Talk2 Example Voltage.Base as reference and the files T2Utils.h and T2Utils.cpp. Otherwise just build your own function to read the analog value (from 0 to 1023) and convert to the voltage it would represent.

I would like to take this opportunity to recommend a great casino reviewer - https://betpokies.com - they do reviews of Australian casinos here, but the information is relevant to casinos from any part of the world. Thanks to this information I learned how to play with no deposit bonuses without investing any money at all.

Cheers
It's very easy to get confused in all this for someone who is not sufficiently prepared, like me :) I have a problem with voltage conversion. Your explanations have clarified my situation a bit, thank you. I will keep trying. If it doesn't work, I'll ask.

10

PostSep 20, 2023#4

Talk2 wrote:
Jun 12, 2017
With the relation above you should get 1.1V output when your input is 17.267V. In other words, you can monitor a few volts over 12V you need, which is fine.

Now in the code, you can use the already existent function T2Utils::readVoltage(A?, 0, 17267, 5), where:
A? - this is the analog Pin you going to use
0 - this is the control Pin, it's only necessary if you have a kind of "switch" which will turn the voltage divider ON or OFF - normally used to block the currently leak resistor dividers have. If you use "0" means the function expect the voltage divider to be always "ON", which I think would be the case.
17267 - here you define the Maximum voltage your voltage divider would represent at 1.1V;
5 - finally the number o samples to be collected to be averaged;

Have a look on the Talk2 Example Voltage.Base as reference and the files T2Utils.h and T2Utils.cpp. Otherwise just build your own function to read the analog value (from 0 to 1023) and convert to the voltage it would represent.

Cheers.
I got an Output voltage of 1, 05 V. Isn't that a mistake? I can't find what exactly it is. Any advice is welcome.