Digital Pot Library

Has anyone generated a library for connecting a digital pot to an Arduino using XOD? There are two from Adafruit, see below.

I’m trying to control an analog temperature gauge with my Arduino. The sending unit for the gauge is a 10K thermistor. If I use the the digital pot in place of the thermistor I figure I should be able to manipulate the gauge.

Has anyone done something like this? Perhaps there is another way to achieve the same results without the use of a digital pot.

There’s a GitHub library for it, so it’s very doable…

You gotta wrap the arduino library inside XOD.

Next time I need an I2C library, my plan is to try to copy this one, and just change all the parameters for my device.

Couldn’t you generate a PWM to control that analog gauges readings ?

In that case, I’ve had a lot of good luck with the MCP4725, it gives a steady 0 to 5 V output… Perfect for controlling the dial, in that way. There’s a library, too. Using PWM will prove the concept, but I’ve not had good luck building filters to steady PWM. The MCP4725 is steady.

That sound promising. Are you suggesting using the MCP4725 to control a MOSFET? It’s a 12volt automotive gauge that I want to manipulate. I’ve used a N-channel MOSFET with PWM from the Arduino to control a DC motor. Could I use the MCP4725 digital to analog board to control a MOSFET that regulates 0 to 12 volts to the gauge. I have two gauges I would like to control. It look like I can use two MCP4725’s on the I2C bus. That’s a plus!

That sounds like it can work. Though, the MOSFET obviously has to be linear within that region, I guess the 0 to 5 V region. That’s the best I can offer without wrapping the library.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.