Digital Potentiometer with Particle Photon

I am a novice at programming and circuit design so I appreciate patience from anyone that reads this post. My project requires replacing a potentiometer on a DC motor controller with something controlled by a Photon. A friend suggested a digital potentiometer so I purchased this one from Amazon:

I am open to purchasing an alternative if it would simplify the project. I have been unable to find a library that works with this option nor am I skilled enough to port one made for different devices like Arduino. What is my best option?

@bradtreadwell1900 can you provide more details on the DC motor controller you plan on modifying (brand, voltage, motor type, etc.)? As for the potentiometer, what resistance does the one you want to replace have? Porting of the Arduino library for this chip is straight forward.

As for suitability, there is this board from Adafruit which uses I2C and has an easy library to port. In addition, the analog voltage range and the number of divider steps exceed those of the X9C103S.

Both the X9C103 and the DS3502 have 10K total resistance. This will need to match that of the pot you are replacing paying attention to the voltage across the pot. It must not exceed the ratings of the digital pots.

1 Like

I checked the potentiometer on the controller and it looks to be 0-100k. Here is a link to what I bought. Is there some way to wire my digital pot with some additional resistors to make it work or is there an easier option?

https://www.amazon.com/dp/B081XQLN46/ref=cm_sw_r_cp_apa_glt_fabc_X1GV9PHVYJNPKTPJ4Q5G?_encoding=UTF8&psc=1

@bradtreadwell1900, it’s difficult to know what the current rating on that potentiometer is and what voltage presents itself across it. Can you be more specific on the motor voltage and current that you intend to control?

Not sure on current but the voltage will be max of 24v.

Did a quick search and looks like current is around 20a.

Brad

@bradtreadwell1900, you still haven’t specified the motor you intend to control. Robotshop.com (or any robot parts supplier) has a variety of controllers, some with serial or I2C control.

There are 100K digital pot ICs available but not knowing the voltage being applied across the pot makes it difficult to specify.

Forgive my ignorance. This is for modifying a power wheels car. These appear to be the same motors I’ll be using.
https://www.amazon.com/dp/B075WZ21JW/ref=cm_sw_r_cp_apa_glt_fabc_3SAMTPPXY67TJRXWCX5K?_encoding=UTF8&psc=1

Brad

@bradtreadwell1900, so you want to control the motor with a Photon? You could try replacing the pot with this:

However, the voltage across the potentiometer cannot exceed 5.5v.

So that is essentially what I bought but has a range up to 100k? Given my inexperience, how would I program this with a photon?

Brad

@bradtreadwell1900, this unit is the same but 100K. The absolute max voltage across the pot is 10V. No guarantee that it will work on the PWM controller so you will need to test it.

As for controlling with the Photon, you will need to connect four GPIO to the board along with power (Vin) and GND. There is an article that provides an arduino library which could be easily adapted for the Photon:

I believe you can disconnect the existing pot on the PWM unit and wire in the digital pot instead.

This is good information. I hope to begin testing this week.

Brad