Author Topic: V-regulator or v-reference for battery powered voltage ladder?  (Read 567 times)

0 Members and 1 Guest are viewing this topic.

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
  • Country: no
V-regulator or v-reference for battery powered voltage ladder?
« on: November 23, 2024, 09:01:16 pm »
I'm using a voltage ladder to determine the position of a rotary switch, which is read by a ESP32 (max 2.5V input on the ADC). (It also switches on/off the gadget, that's why I connect it this way).
In a first attempt, i just fed the divider directly from the LiIon battery, but the values would greatly differ depending on the battery level, and sometimes overlap if battery is very low, or fully charged. If I carefully choose resistor values, the voltage won't overlap.
A better choice would probably be to feed it with a known voltage. I'm looking at both a 2.5V LDO and the TL431.
The v-reg is easy to implement, but how would I go about using a TL431?

And which would be my best choice, considering power usage? The regulator/reference would always be connected to the battery.
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5159
  • Country: au
    • send complaints here
Re: V-regulator or v-reference for battery powered voltage ladder?
« Reply #1 on: November 23, 2024, 09:23:37 pm »
Cute way to do "off".

99% of the time people solve the ratio problem by either:
feeding the ADC reference with a ratio coming from the same source
or
reading another ADC channel with a ratio from the same source
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
  • Country: no
Re: V-regulator or v-reference for battery powered voltage ladder?
« Reply #2 on: November 23, 2024, 09:56:39 pm »
Cute way to do "off".

99% of the time people solve the ratio problem by either:
feeding the ADC reference with a ratio coming from the same source
or
reading another ADC channel with a ratio from the same source

Good advice. I already read the battery voltage from another ADC channel. So I can correct it :)

Any good technique to manipulate the voltage or readings? Battery will probably never go under 2.8V and not above 4.3V, but the ADC is 0 - 2.5V.
I don't need high precision (it's just sending the battery voltage as a percentage over bluetooth every 5 minutes).
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 15172
  • Country: de
Re: V-regulator or v-reference for battery powered voltage ladder?
« Reply #3 on: November 24, 2024, 05:20:20 pm »
The L431 may be a bit cheaper than a votlage regulator, but it is also more power hungry.  I would go for a low power LDO, like MCP1702 or similar, that could also power the ESP32. For the different resistor settings one may get away with a chain of mostly equal resistors and this way less resistor values. Some 4 or 5 switch settings is still easy and no real need to read the 2.5 V seprate.
 
The following users thanked this post: Someone


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf