AD5235 digital pot

Jaguarjoe

Senior Member
Has anyone interfaced a 'axe with an Analog Devices digital pot? I want to make a Wein bridge oscillator. It requires 2 identical caps and 2 identical resistances for setting the resonant frequency. To make it tunable I can either use a dual gang variable cap that's as big as a house or a dual gang pot. An old school dual gang pot is very expensive. The 10 bit AD5235 looks perfect for this but it is an SPI device. I never SPI'd before.
On a side note, is a 20X2 capable of becoming a 1Hz to 100kHz frequency meter?

Thank you!
 

premelec

Senior Member
JJ... as long as you don't have to change things very fast you can SPI ok... it's usually a bit of work to figure out just what the SPI device wants to work right - I've only bit banged SPI but the 20x2 has hspi.

You might need to divide the 100KHz end of your signal & use pulsin.

I've built Wein and twin T oscillators using LDRs with varying light to the LDRs - and you'd need some phase locking to keep it stable [using your measured signal would provide the control signal with PWMOUT].

Anyhow let us know how it works out and have fun!
 

westaust55

Moderator
JJ... as long as you don't have to change things very fast you can SPI ok... it's usually a bit of work to figure out just what the SPI device wants to work right - I've only bit banged SPI but the 20x2 has hspi.
X1 and X2 parts also have inbuilt functions for SHIFTIN and SHIFTOUT (programmed not hardware core) =which may be easier to get operations in the first instance
 

booski

Senior Member
i've bit banged a spi bus for a ds1802. I'm away from the computer right so can't share code, but its relatively simple. it was just a case of raising the rst pin high, showing bit 0 on the data pin and then pulsing the clock pin, repeating the same for the following bits, and then dropping the rst pin low to finish the sequence.

that's how the ds1802 works, would imagine it'll work the same for yours. hard to say without looking at data sheet though.
 

fernando_g

Senior Member
If you would like to stay with the tried and true I2C interface, then you may want to take a look at the AD5272....it is a single channel device so you would require two devices. However, since it supports the fast I2C mode, you can adjust both devices almost simultaneously
 

Jaguarjoe

Senior Member
I'm not too concerned about how fast any of this is, I just want equal resistances from both of them when they get where they're going and something simple enough for an old fart like me to understand.

Most of the single element jobbies have pretty slack end to end tolerances, like 20% :(

Some DCP's don't even need a uC, they have up/down push button commands but, along with poor tolerance you only 32 steps or so.

I think Intersil has a digital capacitor too but its only 7-14pf.
 

fernando_g

Senior Member
If you read the AD5272 datasheet it has a tolerance of 1%, plus 1024 steps, so that would give you lots of resolution and good tracking.
 
Top