Page 1 of 1

Digital pot interface.

Posted: 05 Jan 2010 22:29
by Cyberzim
Hello, I'm making a volumecontrol for my sound system.
Since it is stereo, i'm using 2 digital potentiometers that uses the U/D protocol.
CS and U/D pins are connected together and then to the microcontroller.
My problem is, that one of them are working great, but the other one doesn't.
I got low volume on the one of them and a bit crunchy sound also, but the other one got good volume control.
The bad one only works good when the volume is turned 100%.
The digipot is MCP4011. http://ww1.microchip.com/downloads/en/D ... 21978c.pdf

So my question is: Can you control them both with the same pins on the microcontroller or do they need to be seperated? Can't seem to find it written anywhere in datasheets.

Note:
It's not the chip itself that are something wrong with, I have tested that.

Regards,

Simon H.A.

Posted: 05 Jan 2010 23:55
by Cyberzim
Alright, problem is solved.
You can have both digipots controlled with the same I/O.
I took some breakout boards I had made and then tested it on breadboard and it works.
It must be my board then, probably because my layout is very very tiny as you can see on the picture, and therefore there could be an error.
Image

Regards,

Simon H.A.

Posted: 05 Jan 2010 23:56
by Cyberzim
Hmm.. image didn't work, you can just get url then.

http://imageshack.dk//viewimage.php?fil ... Y32058.jpg

Posted: 07 Jan 2010 13:56
by Mince-n-Tatties
Hi Simon,

you will need to provide more data for greatest level of help.

1. How is the volume control applied?

this is to say what drive mothod does the resistor take within your circuit, is it used as op-amp gain control, is it used bias control to class A small signal front end, does the audio signal pass through the device etc. Schematic would be the best answer.

2. what current is being passed through the resistor.

3. do you conform well inside the timing specs for U/D control.

4. is there any filtering on the power supplies at the 2 devices, 100nF.

5. both circuit layouts are not the same! a quick example would be that i can see the CS track takes different routes around the pins.

6. at all costs try to avoid tracking under the device, especially if you have the audio signal passing through the internal resistor.

7. keep the ground as large and as complete as possible

8. is the MCU being put to sleep after the volume is set, this will greatly reduce electrical noise.

9. make sure all external connections are clean and tight.

how did you test each device to be able to say "the device is not defective". are you able to swap the devices over in circuit to see if the noise stays on the same channel or if it follows the device?

without having the circuit diagram and an idea of full usage its difficult to offer any further advice.

Posted: 07 Jan 2010 15:44
by Cyberzim
Hi Mince-n-Tatties,
Well, I use it as a passive volume control for my class-D ampifier.
I have the output from the digipot grounded with a 2K7 ohm resistor to provide almost none output when the volume is 0%. Also there is a 1st order low-pass filter at 230Hz to provide extra bass, since I use full-tone speakers.
This circuit works perfectly now, after have made 2 breakout boards for the digipot(SOIC to DIP) and it's right now on breadboard.
The recent for the bad layout for the first board I think was most because I used the autoruter in EAGLE to make the connections from schematic to PCB.
The next board will be made by myself to provide good pcblayout, so that should solve all problems.

Regards,

Simon H.A.