X9C103P Basic Operation

25,633

23

6

Introduction: X9C103P Basic Operation

Introduction

The Intersil X9C103P is a 10kΩ digitally controlled potentiometer offering 100 wiper taps and non-volatile storage of a tap point for subsequent power-on events.

Thanks to the timely response by QKits Electronicsand BuyaPi.ca, I find myself immersed in the Arduino world of sensors, blinking LEDs and other devices. I claim no particular strength in electronics or the skills associated with constructing neat things. Perhaps it is the enduring struggle to comprehend the simplest of RTL circuitry that led to this digitally controlled potentiometers.

I found no Instructable for the X9C103P however these 8-pins seemed within my scope and I cobbled together the project I will describe below.

After completing my tinkering I discovered the topic in this Arduino forum. There an author includes a library for this IC.

In addition a Google search revealed an Instructable’s answer, however to coax the same results from a search on Instructables.com is a challenge.

Intention

The ambitions for this project were to examine the device as a voltage divider and contemplate its applications in my simple or wilder Arduino schemes.

The optional LED is not meant to show how to fade a LED, rather to indicate/confirm the 0Ω fixed terminal. A resistor of lower impedance can be used but the easy correlation of ADC sampling with the potentiometer’s wiper position would be sacrificed.

The following is my addition to the X9C103P story.

Step 1: Material

1) Arduino Board (UNO).

2) Arduino Prototyping Shield c/w mini-breadboard.

3) Dupont M-M connectors

4) 3mm Red LED (optional)

5) Resistor 3K3 (optional)

6) Digital Potentiometer X9C103P

No tools are required.

Specification sheet for X9C103P here.

Step 2: Connections

The fritzing diagram shows a board with 830 tie points for clarity. The prototyping shield has convenient +5V and GND rails and Arduino pins are brought to the top level but would add some confusion when diagrammed.

The pins of the X9C103P are quite simple.

1. The 'signal' connections made and coded are:

  • · UNO digital pin 8 - IC pin 2 (U/D)
  • · UNO digital pin 9 - IC pin 1 (INC)
  • · UNO digital pin 10 - IC pin 7 (CS)

2. The connections made electrically are:

  • · UNO GND - IC pin 4 (VSS)
  • · UNO +5V - IC Pin 8 (VCC)

3. The connections made functionally are:

  • · UNO +5V - IC pin 3 (VH)
  • · UNO GND - IC pin 6 (VL)
  • · UNO analog Pin A1 - IC pin 5 (VW - wiper)

4. Optionally - IC pin 5 to LED via 3K3 resistor:

  • · If the datasheet was correctly interpreted the wiper current should be less than 4.4mA. This gives a wide range for the LED/resistor. 3K3 and a 3mm red LED should only draw ~1mA.
  • · If used, a LED/resistor combo from pin 5 will affect the ADC sampling for wiper voltage.

Note: Refer to the datasheet for an explanation of VH and VL that are "in relation to wiper movement direction selected by the U/D input and not the voltage potential on the terminal".

Step 3: Basic Code

The purpose of my first coding was to achieve the simple movement of the wiper and confirm this 'working' with some visual output. Since there is little benefit to this primitive code, the included sketch is the subsequent rendition that includes a simple user control interface. The sketch requires no library.

The basis of the sketch follows from a description of the X9C103P where the salient point is “the counter does not wrap around when clocked to either extreme.” If the wiper counter is therefore incremented or decremented by at least the maximum number of the device’s wiper tap points, the wiper must be at one of the fixed terminals. For the X9C103P the wiper movement count needed is 100 and the nominal resistance will be 0Ω or 10kΩ when completed.

Of three devices tested, all started with the wiper at the 10kΩ fixed terminal. Decrementing the wiper counter for the first iteration is chosen to illustrate the “does not wrap” characteristic assumed in the sketch. The second iteration will show the wiper tap point that is synchronized with the assigned tap number/resistance. For the sketch the tap number is simple assigned as zero at the 0Ω fixed terminal.

The comments in the sketch listing should provide an inkling of the purpose. The code has been kept quite simple and there is no claim that the values used for delays are well founded. It could be noted that the code makes special mention of avoiding the use of non-volatile storage. It seems the more ‘obvious’ coding would result in the non-volatile storage of each wiper movement. It is however equally possible the X9C103P specification sheet has been misread.

The storage of a desired wiper position in non-volatile memory is not in the scope of this Instructable.

The basic sketch however could be readily extended for this possibility.

Step 4: Example Results

The screen captures show the results that would be expected. On the left is what could be expected from a new unused IC and the wiper position was decremented/incremented from the 10kΩ fixed terminal. The listing on the right shows the result if the non-volatile memory had been written with the wiper position 50 and the Arduino powered off then on.

Step 5: Summary

The X9C103P performs quite well as a potentiometer. The accuracy/repeatability of the Arduino ADC aside, the performance was very uniform. The nominal 101Ω of the resistive elements may not provide the ‘sweet spot’ some claim possible with a mechanical POT but makes it possible to repeat a trim setting accurately and easily. Also the real estate required for the digital potentiometer is comparable to most mechanical pieces, still recognizing a mechanical POT has many variations in size and orientation that may suit a particular situation.

The suitable application of the X9C109P as a variable component of some circuitry is not obvious to me. Two fundamental features of the Arduino and the X9C103P are encountered in this project that suggest the X9C103P is not a general purpose substitute for the mechanical POT nor an alternate for the I2C/SPI digital potentiometers in the DIY area.

First a significant characteristic of the device is the programmable, non-volatile wiper position; this value cannot be communicated to the micro controller.

Second, the wiper position can be altered (adjusted) without storage and this value is retained while the IC is powered. An Arduino reset does not recall the non-volatile wiper position.

A further complication is the Arduino’s setup()/loop() organization that does not provide a method to distinguish between a reset and a power-up.

Hence, my conclusion is that the Intersil X9C103P is not an obvious choice for circuits and applications based on micro controllers such as the Arduino.

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    6 Discussions

    1
    PedroM318
    PedroM318

    1 year ago

    if I use a X9102P for (1k) the code is the same?
    .

    0
    pedromonteiroev
    pedromonteiroev

    Reply 10 months ago

    Me to and try this and gives a lot of zeros...
    Wiper Direction DOWN
    Tap = 99 ADC = 966Voltage = 4.721 Tap Ohm = 11000 Law = 944
    Tap = 98 ADC = 57Voltage = 0.279 Tap Ohm = 10888 Law = 56
    Tap = 97 ADC = 0Voltage = 0.000 Tap Ohm = 10777 Law = 0
    Tap = 96 ADC = 0Voltage = 0.000 Tap Ohm = 10666 Law = 0
    Tap = 95 ADC = 839Voltage = 4.101 Tap Ohm = 10555 Law = 820
    Tap = 94 ADC = 785Voltage = 3.837 Tap Ohm = 10444 Law = 767
    Tap = 93 ADC = 7Voltage = 0.034 Tap Ohm = 10333 Law = 7
    Tap = 92 ADC = 525Voltage = 2.566 Tap Ohm = 10222 Law = 513
    Tap = 91 ADC = 31Voltage = 0.152 Tap Ohm = 10111 Law = 30
    Tap = 90 ADC = 393Voltage = 1.921 Tap Ohm = 10000 Law = 384
    Tap = 89 ADC = 0Voltage = 0.000 Tap Ohm = 9888 Law = 0
    Tap = 88 ADC = 151Voltage = 0.738 Tap Ohm = 9777 Law = 148
    Tap = 87 ADC = 1023Voltage = 5.000 Tap Ohm = 9666 Law = 1000
    Tap = 86 ADC = 0Voltage = 0.000 Tap Ohm = 9555 Law = 0
    Tap = 85 ADC = 1023Voltage = 5.000 Tap Ohm = 9444 Law = 1000
    Tap = 84 ADC = 27Voltage = 0.132 Tap Ohm = 9333 Law = 26
    Tap = 83 ADC = 0Voltage = 0.000 Tap Ohm = 9222 Law = 0
    Tap = 82 ADC = 0Voltage = 0.000 Tap Ohm = 9111 Law = 0
    Tap = 81 ADC = 806Voltage = 3.939 Tap Ohm = 9000 Law = 788
    Tap = 80 ADC = 971Voltage = 4.746 Tap Ohm = 8888 Law = 949
    Tap = 79 ADC = 0Voltage = 0.000 Tap Ohm = 8777 Law = 0
    Tap = 78 ADC = 362Voltage = 1.769 Tap Ohm = 8666 Law = 354
    Tap = 77 ADC = 132Voltage = 0.645 Tap Ohm = 8555 Law = 129
    Tap = 76 ADC = 19Voltage = 0.093 Tap Ohm = 8444 Law = 19
    Tap = 75 ADC = 0Voltage = 0.000 Tap Ohm = 8333 Law = 0

    0
    justinhv22
    justinhv22

    Question 1 year ago

    your program gives the error of redefinition of void setup(), do you know what is it? Could you help me?

    0
    VictorP171
    VictorP171

    2 years ago

    Thank you very much for the tutorial. The code is perfect for a start example, and the explanation is also great. greetings! Victor

    0
    SoakedinVancouver
    SoakedinVancouver

    4 years ago

    Good work, great summary! Much appreciated knowledge. please keep posting your experiments.

    0
    DIY Hacks and How Tos

    Cool! I can think of a lot of projects that could use a digital potentiometer.