Hello group,
I am trying to simulate a logaritmic trimpot in software on a small microcontroller.
We have some industrial controllers where some parameters (i.e. max running time) is set via potmeters on the front. And one of the potmeters are logaritmic to give a finer change in the lower area and a more coarse change in the high area.
My idea is to use a linear trimpot (which we have stocked) to replace a logaritmic pot (which we have not stocked). The pot wiper is connected directly to the micros internal AD converter and to GND/AVCC of the microcontroller. By turning the pot I can now measure 0-1023 (10-bit AD) on the micro, that is just fine.
I need to convert this 0-1023 value to a value between 10 and 54000 logaritmic. I think a mathematical function or a table lookup is the way to go, but I actually cannot figure out how. I think mainly due to my lack of knowledge about how such a pot actually works.
So any help is gladly appreciated.
Thanking you all in advance.
Best regards Henrik