phi-T Control

phi-T Control is a foot controller, that sends out MIDI Control Change Messages via USB. The project is based on V-USB-MIDI, adapted to my requirements.

I’m using an AVR ATmega8 with 5 potentiometers, foot switches and LEDs. One of these is used for a foot pedal. Unlike in the V-USB-MIDI project, I’m doing the level conversion with zener diodes, as it is explained here. Furthermore, I had to rewrite the source code at different places. The case is made of 1 mm stainless steel. I’ve created the DXF files with Pro/Engineer, and have had them laser cut by my father’s company.

The whole circuit is built on a stripboard. All in all, there aren’t many electronic components necessary:

  • 5 x 10 k linear potentiometers
  • 5 x foot switches
  • 5 x LEDs
  • 12 MHz crystal resonator
  • Reset: 10 k to Vcc and 100 n to GND
  • USB jack with zener diodes
  • Bulk capacitors (4μ7 and 100 n) between Vcc and GND

I’ve built the project in AVR-Studio 5. The project files, a ready to burn HEX file and the DXF files for the case can be downloaded here:

AVR is a registered trademark of Atmel Corporation
Pro/Engineer is a registered trademark of Parametric Technology Corporation


14 responses to “phi-T Control

  1. Hello,
    I’m going to build similar project on Arduino, but your project is simpler. How to open your project .avrsln? Is the same IDE environment like for Arduino?


  2. Buenas tardes señor lo felicito por su proyecto y compartir la información para realización del mismo tengo pregunta en cuanto a los diriver y sistemas operativos en los que trabaja, podría indicar en cual trabaja correctamente y en donde adquirir los driver.
    agradecer su respuesta.

  3. Hi,

    I found your project very interesting and i liked it a lot!
    I’m building a similar project, but i’m using ATmega16a microcontroller because i need 8 potentiometers and 8 keys.

    i thought that it could be something like this :

    // Buttons on PORTB1…B5 (inputs and internal pull-up)
    DDRB &= ~(1<<DDB1); PORTB |= (1<<PB1);
    DDRB &= ~(1<<DDB2); PORTB |= (1<<PB2);
    DDRB &= ~(1<<DDB3); PORTB |= (1<<PB3);
    DDRB &= ~(1<<DDB4); PORTB |= (1<<PB4);
    DDRB &= ~(1<<DDB5); PORTB |= (1<<PB5);
    DDRB &= ~(1<<DDB6); PORTB |= (1<<PB6); <—
    DDRB &= ~(1<<DDB7); PORTB |= (1<<PB7); <—
    DDRB &= ~(1<<DDB8); PORTB |= (1<<PB8); <—

    if i understood it right, those are only the buttons, and i have no clue how to add more potentiometers…

    I'm new to microcontrollers so could you please tell me how to do that and if my guess was correct?

    P.s i'm going to change the pins to suit my controller

    • Hi,

      yes, that’s the point where you must add additional buttons. But be careful, the ports are numbered from 0..7, so you must add Pins 0, 6 and 7.

      The potentiometers are selected in the main-loop:
      if (channel > 4) channel = 0;
      So you must replace 4 by 8.

      Do you have programming skills in C? Otherwise it might be difficult to adapt my code to ATmega16.

      Best regards,

      • Thank you for the fast reply!

        Unfortunately, i don’t have any skills in C programming.

        I will try today to figure out how to do that, but it will be a huge help for me if you will agree to check my changes in the code.
        From everything i found your project is the best and your help is greatly appreciated !

        Did you changed something in the V-USB-Midi doc files(usbdrv.c,usbdrv.h,usbportability…) or they are the same ?

    • Hi! Oh, it’s been quite a while since I’ve been working on this project… I’m afraid I can’t tell you by heart… But there’s lots of information on the internet of how to set the fuses properly.

  4. Hi Philipp,

    Nice job and thanks for sharing.
    Can you tell me which AVR you are using ? With a 328p, the circuit is still valid right ?
    And can you tell me more details about how you programm the AVR ? The processus is still obscure for me and all the other sites are loosing me…

    Thanks !


    • Hi Arno,

      thanks for your comment, I’m glad you like the project. As mentioned in the article, I’m using an ATmega8. I don’t know the 328p, so I can’t tell you anything about this. Programming a microcontroller is not really rocket science. Connect the correct pins of the controller to your ISP (I’m using the AVRISP mkII) and press the right button within your IDE (e.g. AVR Studio). There are lots of sites that explain this procedure, I’m sure you’ll find a good one.

      Best regards,

  5. Pingback: work in progress » accelerometed expressive pedal

  6. I like this project very much and want to build a similar one. Which switches did you use and where did you get them?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s