Programming AD5241?

Does anyone have any experience with programming the digital potentiometer AD5241?

It seems the protocol is a bit different than in the sample for AD5171, but I cannot figure out how it should be changed...

Anyway, if I use the sample without changes, the pot outputs constantly 0.

http://www.analog.com/en/digital-to-analog-converters/digital-potentiometers/ad5241/products/product.html

I2C ... do you have 4k7 pull ups on the lines?

Do you have an URL of that same code , or better the sampel code itself?

Hmm, I don't see a facepalm icon.

I was so preoccupied with the pot side of the diagram, that I overlooked the pull-up resistors! Too bad I'm stuck anyway - no chance to get that specific resistors where I live... I guess it's Internet then, although I will be three times the postage than the price for the resistors.

Would 4.4K be enough? I've got a couple 2.2 lying around...

Code and diagram are here:

http://arduino.cc/en/Tutorial/DigitalPotentiometer

Seems, after all, that the code should work the same.

give it a try as it can only get better. It is needed to get a steeper squarewave == better signal

I am willing to try, as long as it does not fry my board ;) I will report later on.

The datasheet probably states 4k7 pullup to the Arduino +5Volt [NOT the Vin !! as this might be higher]

  • if you are afraid of your board (understandable) than you might start with 6K6 or more. But imho 4K4 should work fine.

Well, the old pots are just 2.2, not 2.2k... I will get the proper ones, then. By the way, pull-ups are only described on the Arduino site - the datasheet for the digipot does not mention them at all.

Thank you for your patience for my ignorance - the project is probably out of my league after all... One more question, if I may - can I test the operation of the chip (i.e. resistance between wiper and ground) with a multimeter (powered by a 9V battery)? The voltage of the chip is rated at 0.2 to 7 V, but I have no idea what voltage the meter actually outputs for resistance measurement.

the project is probably out of my league after all.

Not at all, doing things never done before is fun. And yes sometimes the hill is steeper than other times but at the top the view is allways a suprise!

can I test the operation of the chip (i.e. resistance between wiper and ground) with a multimeter (powered by a 9V battery)? The voltage of the chip is rated at 0.2 to 7 V, but I have no idea what voltage the meter actually outputs for resistance measurement.

Don't know.

Success!

Didn't read the datasheet carefully enough...

This chip has an additional pin (SHDN). Even though I did not use it, it should be tied to Vdd. When I did it, it finally began to work.

It's not working perfect - there are occasional spikes (e.g. when going from 255 to 0, at, say, 145 the resistance might jump to 155 and then fall back to 144), but I suppose this might be cured with proper pull-up resistors.

Thank you for your help, the project certainly seems viable now!

It's not working perfect - there are occasional spikes (e.g. when going from 255 to 0, at, say, 145 the resistance might jump to 155 and then fall back to 144), but I suppose this might be cured with proper pull-up resistors.

Can also be "bad" connectors in the breadboard not making a 100% contact.