Line 6 pedal board: Programming the expression pedals

The expression pedal board contains two analog circuits for the two pedals, a simple switch and a LED. The connector has one pin for each, plus a ground and Vcc pin.

The pedals use an infrared LED and photo-transistor that is slightly amplified by a transistor. They produce a weak analog value. I have not been able to get reliable readings on the pins. I suspect that the unit has to be embedded into its casing to prevent stray light from reaching the receptor.UPDATE: By measuring voltage at a different point on the pedal circuits, I was able to get full readings, from 0 to approximately 5 volts. I Guess that transistor is not used as an amplifier but as a switching transistor. I will replace the connections on the socket. I will just bypass the transistors.

The LED on the left (led9) will be addressed directly with a digital pin from the Arduino. The switch is activated by pressing firmly on the pedal, to engage the WAH function on the effects board. It will be read directly with a digital or analog pin.

 

/*
  
 */
int led9=9;
int express=1;
int wah=2;

void setup() {
  Serial.begin(9600);
  pinMode(led9, OUTPUT);

}

void loop() {
//Read analog signals from both pedals
  int pedValue1 = analogRead(express);
  int pedValue2 = analogRead(wah);
  Serial.print(pedValue1);
  Serial.print(" ");
  Serial.println(pedValue2);
//read sw9 from the pedal sub-board
  int switch9 = analogRead(A3);
  if (switch9 != 0)
    digitalWrite(led9,LOW);
    else
    digitalWrite(led9,HIGH);

}

Comments

2 responses to “Line 6 pedal board: Programming the expression pedals”

  1. mrmarcyj Avatar
    mrmarcyj

    hi there,

    i have followed this project and have it orking with mainstage through the midi dongle hack like yourself, my only question is that the expression pedal on the inside (left of the two) only shows and sends midi from 74-126 and therefore lose the from 0-74.
    can you help?

    this has been a great project to follow and would recommend anyone give it a go.

    cheers

    marcy j

    1. You Will have to calibrate the pedal. If you borrowed the code from this site, the calibration was for MY pedals and varies a lot from set to set. The trick is to write a small code snippet that will display the lowest value, when the pedal is in the heel position, and another that will display the highest value when the pedal is in the toe position. Something like this:

      //lowest value
      If (analogRead(pedalPin) < lowValue) lowValue = analogRead(pedalPin); //highest value If (analogRead(pedalPin) > highValue)
      HighValue = analogRead(pedalPin);
      Serial.print(lowValue);
      Serial.print(” “);
      Serial.println(highValue);

Leave a Reply

Your email address will not be published. Required fields are marked *