Pages: [1]   Go Down
Author Topic: I want to move a knob to send input data to the digital pot, how do I do that?  (Read 1343 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure on how to feed data to a digital pot manually moving a knob like on an analog pot. What do I need for this?
« Last Edit: March 12, 2012, 11:42:56 pm by ElChiguete » Logged

New Zealand
Offline Offline
Full Member
***
Karma: 1
Posts: 105
Just this guy you know.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wouldn't that just be a switch?  Or are you thinking of connecting it via a PWN digital port?
Would be better I guess to connect it to Analogue as a knob is an analogue input device.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to be able to store 3 different positions for the digital pot but to figure out what those positions are I want to move a pot to the desire position instead of writing the code with the actual output position. It's for a simpler user interface.
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 You need to break the project down in to requirements.

1) read a potentiometer and then map the values to 0 - 255. Print the values for debugging.
2) learn how to use a digital Pot http://arduino.cc/en/Tutorial/SPIDigitalPot
3) Use manual pot to control digital pot.
4) Use program or eeprom to store values desired to work with digital pot.
5) continue improvement until satisfied.
Logged


Offline Offline
Sr. Member
****
Karma: 11
Posts: 331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You will need an analog potentiometer for this to work so what you need to do is plugin in both the analog and digital potentiometer so use analogread to read the value and my arduino uno outputs a 10bit value and lets just pretend that the digital potentiometer is a 7bit one so you need to divide it by the proper factor to get that what you need to do is this divided the max value of the adc by the max value of the potentiometer in the sample case this would be 1024/128=8 so I would need to  divided the return value of analogRead by 8 and then send it to the potentiometer like it says in the datasheet.
I just had one question why not just an analog potentiometer if all you want to do is feed the value into the digital one?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5581
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What would be better would be to use a rotary encoder, such that you can detect its rotation direction and pulses; then use that information to increase or decrease a variable, and pass that value on to the digital potentiometer. Doing it this way would give you the ability to rotate your knob freely and without end-stops.
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am not 100% sure what the benefits of using a pot to control the output of a digital pot would be  smiley-confuse
Logged


Pages: [1]   Go Up
Jump to: