The MCP4131-103E/P is a digital potentiometer manufactured by Microchip. It features 128 wiper steps, allowing for precise adjustment of resistance in electronic circuits through digital control. This component is commonly used in applications such as volume control, sensor calibration, and adjustable power supplies.
Parameter | Value |
---|---|
Resistance | 10 kΩ |
Wiper Steps | 128 |
Supply Voltage (VDD) | 2.7V to 5.5V |
Current (I_DD) | 1 µA (typical) |
Interface | SPI |
Operating Temp | -40°C to +125°C |
Package | PDIP-8 |
Pin No. | Pin Name | Description |
---|---|---|
1 | CS | Chip Select (Active Low) |
2 | SCK | Serial Clock Input |
3 | SI | Serial Data Input |
4 | VSS | Ground |
5 | PW0 | Terminal 0 of Potentiometer |
6 | PW1 | Terminal 1 of Potentiometer |
7 | P0A | Wiper Terminal |
8 | VDD | Positive Supply Voltage |
#include <SPI.h>
const int CS_PIN = 10; // Chip Select pin for MCP4131
void setup() {
pinMode(CS_PIN, OUTPUT);
digitalWrite(CS_PIN, HIGH); // Ensure CS is high
SPI.begin();
}
void loop() {
setPotentiometer(64); // Set wiper to mid position (64 out of 128)
delay(1000);
}
void setPotentiometer(byte value) {
digitalWrite(CS_PIN, LOW); // Select MCP4131
SPI.transfer(0x00); // Command byte for wiper position
SPI.transfer(value); // Wiper position value
digitalWrite(CS_PIN, HIGH); // Deselect MCP4131
}
No Response from MCP4131:
Incorrect Resistance:
Noise in Output:
Q1: Can I use the MCP4131 with a 3.3V microcontroller?
Q2: How do I reset the wiper position to default?
Q3: Can I use multiple MCP4131 devices on the same SPI bus?
This documentation provides a comprehensive guide to using the MCP4131-103E/P digital potentiometer. For further details, refer to the official datasheet provided by Microchip.