AD5206 killing my arduino

I’m using a AD5206BN10 to control the 5 pots on a guitar pedal that runs off 9v.

I’ve attached the schematic along with which pins I’m using on it. As for the rest of the wiring it resembles this example. (except in the image it shows pins 10, 12, and 13 but in the code its 10, 11, and 13. And a 100k pot from 5v → ground with the wiper to analogPin0 for adjustment.

I got the LED example to work fine, and I’m still able to test one of the channels and IT works fine. But when I hook up my 9v battery, my arduino will act fine for a bit(anywhere from a few seconds to close to a minute) then shut off. If I unplug the USB the power LED stays dimly lit. And when i unplug everything and put the USB back in, my code is wiped. I have to re-upload and usually on a different com port. In the attached photo, the batter would be connected to the top rails. This is the only time I have the problem. It is disconnected in the photo.

I’ve checked my wiring, especially to make sure the 9v and 5v don’t cross and I don’t see the problem. Also, I’ve measured this circuit before when I was using real pots and it never pulled more than 20mA.

Here’s my code:

  Digital Pot Control
  This example controls an Analog Devices AD5206 digital potentiometer.
  The AD5206 has 6 potentiometer channels. Each channel's pins are labeled
  A - connect this to voltage
  W - this is the pot's wiper, which changes when you set it
  B - connect this to ground.
 The AD5206 is SPI-compatible,and to command it, you send two bytes,
 one with the channel number (0 - 5) and one with the resistance value for the
 channel (0 - 255).  
 The circuit:
  * All A pins  of AD5206 connected to +5V
  * All B pins of AD5206 connected to ground
  * An LED and a 220-ohm resisor in series connected from each W pin to ground
  * CS - to digital pin 10  (SS pin)
  * SDI - to digital pin 11 (MOSI pin)
  * CLK - to digital pin 13 (SCK pin)
 created 10 Aug 2010
 by Tom Igoe
 Thanks to Heather Dewey-Hagborg for the original tutorial, 2005

// inslude the SPI library:
#include <SPI.h>

// set pin 10 as the slave select for the digital pot:
const int slaveSelectPin = 10;

void setup() {
  // set the slaveSelectPin as an output:
  pinMode (slaveSelectPin, OUTPUT);
  // initialize SPI:

void loop() {
int k10 = map(analogRead(0),0,1023,0,255); //set value for 10k channels
int k5 = k10 / 2; //set value for 5k channels

digitalPotWrite(0, k10); //Drive - 10k
digitalPotWrite(1, k10); //Comp - 10k
digitalPotWrite(2, k10); //Gate - 10k
digitalPotWrite(3, k5); //Stab - 5k
digitalPotWrite(4, k5); //Volume - 5k
digitalPotWrite(5, k5); //no conenction, multimeter test

Serial.print(" - ");

int digitalPotWrite(int address, int value) {
  // take the SS pin low to select the chip:
  //  send in the address and value via SPI:
  // take the SS pin high to de-select the chip:

My project simply not working at this point is one thing, but I’ve got no clue why this 9v would be interfering with the arduino. What could possibly be my issue?


. As for the rest of the wiring it resembles this example.

That doesn't cut it here we need to see what you have actually done.

At a guess I would say you are powering the AD5206 from 5V but yet you are trying to control a voltage of 9V, you can't do this. All the signals on the pots have to be within the range of the supply. Please read the data sheet.

Doh, I wasn't aware of that. The data sheet seems to have a max of 7v operating and normal of 5v, does that mean that there's no way of controlling this 9v circuit with this chip? That sortof screws up all my plans. I wasn't aware there was a limit other than the 20mA. Do I have any options or do I need to find something new?

you can use a voltage regulator like 7805 to lower the voltage from 9V to 5V or maybe a voltage divider on output would fix it :)

Would the sound of a guitar pedal not reply on it's voltage?

probably if you power your circuit with 5v im not sure if i will still work properly

You can use the AD5293, that can operate on 9V.

I need at least 5 channels though and from what I understand the Arduino will only do two single channel digital pots at a time. And I can’t find a higher voltage six channel… Am I completely out of luck?

and from what I understand the Arduino will only do two single channel digital pots at a time.

What makes you think that? You are wrong.

That's what it says here just before the schematic:

With that particular digital pot, yes, you only have 2 unique addresses. Either use a part with more address selection pins, or use an I2C Mux chip so you can control more of them.

I can't find in the AD5206 data sheet where it says what the max voltage is, where do I find that? I need to search for something other than the AD5293, it's a bit more expensive than I can afford for needing 5 for this project.

The page where it says Absolute Maximum Ratings. Va, Vb, Vw to GND - rating Vss, Vdd

This means don't take those pot pins outside the voltage rails you use to drive the device.

This applies to virtually all electronic chips, the signal levels have to be within the supply voltages.