MCP41010: An easy to use digital
Potentiometer. If you need to digitally control a resistance this is the
chip to use. Use it to make programmable gain amplifiers or create
voltage references.
The MCP41010 is a digital potentiometer and allows you to insert a digitally controlled resistance into a circuit.
Although digitally controlled, it is a true potentiometer.
Can be used as either a potentiometer or variable resistance.
Can be used to create Programmable Gain Opamp Amplifiers.
The MCP41010 is not the same as the MCP4725
although they can both output a programmable reference voltage.
Whereas the MCP4725 splits the supply voltage for an output, this chip
provides a real potentiometer having has three analogue connections (the
same as a
potentiometer). The middle is the wiper, labelled PW0, and the other
ends of the divider are labelled PA0 and
PB0.
It means you can set up the MCP41010 as a controlled resistance or a voltage divider at any point in your circuit.
[1] For the 50kOhm Version BW is 280kHz, for the 100kOhm it is 145kHz. [2] For the 50kOhm Version Ts is 8us, for the 100kOhm it is 18us. [3] Has different part for operating to 125°C.
The same pinout is used for both PDIP and SOIC packages.
MCP41010: Digitally Controlled Potentiometer
MCP41010: Digitally Controlled Resistance
In this mode you can set the resistance to near zero Ohms
(52Ohms) with the wiper at position B, using code 00.
Warning: For Code zero (zero resistance), ensure the current is smaller than 1mA to avoid damage.
When the wiper is at position A the resistance will be 9985.94Ohms.
The resolution is : 10e3/pow(2,8) = 39.0625
Max value is (10e3/pow(2,8)) * 255) = 9960.9375
The above figures assume a 10k total resistance which may not be the case (see the specification table) - it can vary between devices.
MCP41010: Single Supply Application circuits
PGA Inverting Opamp
PGA Non-Inverting Opamp
PGA Differential Opamp
For this configuration use the dual device MCP42010 to keep the resistor
match within the chip. Also use only the same code in each POT for the
differential action to work.
Programmable Voltage reference
This provides a similar action to the MCP4275 but with less resolution although you can change the step size with R1 and R2.
Use R1 and R2 to increase or decrease the voltage step size.
MCP41010 SPI Control
The following diagrams show you how to control the MCP41010 - as you can
see it is very simple. Just output data with 16 clock cycles.
The control bits are as follows:
Example sketch for Arduino
The SPI interface for the MCP41010 is very simple and you really
don't need a library to get the data into the chip. All you do is hold
the chip select low, set 16 clocks with data.
#include <SPI.h>
// Pins for SPI comms
#define DATA 11 // SPI Data pin number
#define CLK 13 // SPI Clock pin number
#define CS_DIGIPOT 9 // MCP41010 chip select - digital potentiometer.
voidwrite_digipot(intval){
// // take the CS pin low to select the chip:
digitalWrite(CS_DIGIPOT,LOW);
// send in the address and value via SPI:
SPI.transfer(B00010001);
// write out the value
SPI.transfer(val);
// take the CS pin high to de-select the chip:
digitalWrite(CS_DIGIPOT,HIGH);
SPI.endTransaction();
}
voidsetup(){
pinMode(CS_DIGIPOT,OUTPUT);
SPI.begin();// Set pins as outputs for SPI hardware.
write_digipot(128);// Set MCP41010 to mid point.
}
voidloop(void){
}
[File:test_mcp41010]
Conclusions
The MCP41010 is a true digital potentiometer and you can use it as if
it were a real physical potentiometer. It has a bandwidth of 1MHz into a
30pF load. The only real limitation is it has reduced current
capability so keep the current below 1mA - in practice this allows
operation of most circuits very well.
Note: You can find an example using this chip on the AD9833 board.
You may also be interested in the MCP4725
which is a DAC voltage output device that has a high precision (12bit) and is capable
of more output current (15mA). It is however not a resistance or potentiometer -
it is a precision voltage output device.
A PIR sensor lets your Arduino sense movement without contact. This tutorial covers PIR sensor basics, connecting one to an Arduino board and coding a motion detector.
Arduino Hall Effect Sensor: Add magnetic sensing superpowers to your Arduino projects with an easy-to-use hall effect sensor. With full code and layout...
Get started with an Arduino humidity sensor using the DHT11, which reports both humidity and temperature. Complete guide with full code for using this sensor
Comments
Have your say about what you just read! Leave me a comment in the box below.
Don’t see the comments box? Log in to your Facebook account, give Facebook consent, then return to this page and refresh it.