So i have a variable resistor fuel sensor that ranges from 0-190ohm. I want to be able to read the output inside home assistant and convert it to a percentage/volume. I have a voltage divider setup however im getting really low voltage 0.00v to 0.04v. im using a 4.7kohm resistor as i dont have any others kicking about. do i need a smaller resistor or is there another way?
You could. But it will be equivalent to doing digital zoom on an image.
Your data won’t be better and you will probably not get any good data.
The ADC can only sense in a certain resolution and most likely all your values will be in the very lowest range so you will get very few steps.
What you want is your native voltage to span as much as possible of the readable range.
So using 470 Ohm you go from 0.069 volt (I notice I wrote Ohm in the previous post) to 0.95 volt. That should give you good readings.
i have trialled it with the multiply and it is accurate enough for my use. not sure how to convert to percentage so i ve used calibrate linear to change the numbers seems to work bit janky but hey
You can add unit_of_measurement: "%"
You could also multiply by the total volume of tank to get actual gallons. However without using the correct resistor the value will likely bounce up and down. You should really consider changing it.