Digital Pot Options
Bob Lawrence (VE1RLL)
Posts: 1,720
I did a search on digital POT's for the propeller chip but only found a driver for a MCP4141 which is acting a little weird( see note 1). Also there is mention of pull up resistor on the CS pin and I don't see it being used with any other micro, with that chip. Is it required for SPI? I do remember pull-ups being used on some SPI sd cards. I have to control a set of LED lights with 0 to 5VDC and I'll keep experimenting with the MCP4141 for now but would like other options in case I need it.. I'll re-test everything in the next few nights in case it was one of those late Saturday night things.
Note 1: if the wiper is tied to the same ground as the prop Pro Dev Board it won't move the wiper but if I keep the wiper ground tied to the MCP4141 ground but on the breadboard but separate form the Prop board ground it moves the wiper.
Note 2: Even though I can change the wiper value in the code I get erratic results testing with a volt meter .
Note 3: Pins 1 , 2, 3 look good on the Oscilloscope, however I did see some ringing.
I'm using the Propeller Professional Development Board
Pin 1 = CS(Chip select) to prop pin 16
Pin 2 = SCK (serial clock) prop pin 17
Pin 3 = SI (serial input) prop pin 18
Pin 4 = GND
Pin 5 = PA0 to GND
Pin 6 = PW0 - Output to volt meter
Pin 7 = PB0 to 3.3
Pin 8 = 3.3 volts
.
The test code is from here:
http://forums.parallax.com/showthread.php?101382-MCP41xxx-42xxx-digital-pot-meter-object
I see that someone else is having problems as well:
http://forums.parallax.com/showthread.php?141872-SPI-Digital-potentiometer-question
Note 1: if the wiper is tied to the same ground as the prop Pro Dev Board it won't move the wiper but if I keep the wiper ground tied to the MCP4141 ground but on the breadboard but separate form the Prop board ground it moves the wiper.
Note 2: Even though I can change the wiper value in the code I get erratic results testing with a volt meter .
Note 3: Pins 1 , 2, 3 look good on the Oscilloscope, however I did see some ringing.
I'm using the Propeller Professional Development Board
Pin 1 = CS(Chip select) to prop pin 16
Pin 2 = SCK (serial clock) prop pin 17
Pin 3 = SI (serial input) prop pin 18
Pin 4 = GND
Pin 5 = PA0 to GND
Pin 6 = PW0 - Output to volt meter
Pin 7 = PB0 to 3.3
Pin 8 = 3.3 volts
.
The test code is from here:
http://forums.parallax.com/showthread.php?101382-MCP41xxx-42xxx-digital-pot-meter-object
I see that someone else is having problems as well:
http://forums.parallax.com/showthread.php?141872-SPI-Digital-potentiometer-question
Comments
iirc theres 1 10 50 and 100 k versions. maxim will send u free samples
Every time I've considered a digital pot for a circuit, it seems like a better, simpler pot-less solution presents itself. What is unique about your requirements that makes a digital pot the best solution?
-Phil
thanks for the info.
@ Phil Pilgrim (PhiPi)
Thanks! for having a look Phil . I have to control the dimming via a serial terminal.AlI need is 0-5V Control loop to control a pin on a LED light . I thought that a digital pot would be a simple way to do it.
PS:
What kind of LED are you controlling? Typically, LED brightness is controlled via current, not voltage. But, assuming it's some kind of high-level brightness controller, here's a simple circuit that will produce 0-5V from a Prop's DUTY mode output:
The op-amp should either have rail-to-rail output or be powered from more than 5V.
-Phil
P.S. Oops! 'Goofed on the schematc. The cap should read 0.1uF, not 01.uF.
The MCP4141 uses a completely different message structure. It expects 4 address bits specifying a wiper, 2 bits specifying a command, then 10 bits for a position.
%0000_00_nnnnnnnnnn - set wiper 0 to position nnnnnnnnnn ... at least if I'm reading the datasheet right
%0001_01_xxxxxxxxxx - increments wiper 1 (x is don't care)
%0001_10_xxxxxxxxxx - decrements wiper 1
Also according to the datasheet, the MCP4141 has built-in pull ups, though for SPI I tend to drive the lines high and low.
It's a SeaLite Sphere from http://www.deepsea.com/led2.php . Thanks! for the schematic. I dug out the parts to breadboard it hopefully in the next few days. I always like to try a different way to accomplish something. Also, before the digital pot I tried a variable regulator and it worked as well.
@ ChrisGadd
Thanks! for the info. I came to the same conclusion that it was the library however, I' didn't see the pull up info in the spec sheet yet but I'll read it again. Also, I used a EMBED micro and got the pot working fine and could dim a single LED no problem. . I'll try it on the LED light next. I'll still try to get it working on the Prop as well because that's what I will eventually use..