Tattoo Push to Talk Foot Switch

I am an avid gamer and run a Teamspeak VOIP server to chat with my friends while playing World of Warcraft.  One of the short falls of using this application is that a push-to-talk switch is required to use it.  There is an option to use voice activated mode but that will transmit when ever a loud sound is present in the room, which in my case happens every time my dog squeeks his ball.

I was thinking about a solution to this problem that would leave both of my hands free to press keys that I need for playing the game and thought about a foot switch.  I have a friend who is a tattoo artist and asked him if he had any broken foot switches and he had one that he was no longer using.  The switch that he provided me with was a Linemaster 491-S available from Allied Electronics.

With the help of some folks at Milwaukee Makerspace, I found the USB development board called the Teensy from http://www.pjrc.com/teensy/.  This board can act as a keyboard and with the use of the teensyduino I was able to program the board using a simple arduino sketch.  The best part of using the teensy board is that it is very small and fit right inside the case of the foot peddle.

This project is barely scratching the surface of what the teensy and teensyduino are capable of but it is my first hardware hacking project.  I am glad that I started with something simple.

Build Log:

The original foot switch.

 

The foot switched disassembled and ready for hacking.

 

I desoldered the cable and attached the Teensy with two small sections of wire.  In my case I used pin 10 and the GND.

 

Another view of the Teensy attached to the switch terminals.

 

Here the Teensy is press-fit into the foot switch case.  I had to modify the original cord retainer by sanding it down quite a bit to get the board to fit inside the case.

 

Another view of the Teensy fit into the case.

 

The modified cord retainer is used to hold the Teensy in place.

A view of the USB connector.

 

Finished product.

 

 

Arduino Code:

I based the code off of Pete Prodehl’s Photobooth button but had to change the keypress to the control button and also clear the keypress when the peddle is released.

void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
delay(4000);
}

void loop() {
if (digitalRead(10) == HIGH) {
Keyboard.set_modifier(0);  // clear keypress
delay(10);
} else {
Keyboard.set_modifier(MODIFIERKEY_CTRL);  // hold control key down
Keyboard.send_now();
}
delay(10);
}

 

11 thoughts on “Tattoo Push to Talk Foot Switch

  1. Hey Patrick, great idea. This inspired me to try my hand at the same thing, but slightly different materials. Mine was under $1.00 US, but is not quite as refined as yours. I posted my details here: http://www.norcalclan.com along with a few pics of the pedal I used. I am an avid thrift store junkie, so I was limited to what I can get there in parts. Thanks for the idea and documenting it!

    Bruce

  2. Hi,
    I love your project, so I am trying to recreate this.
    Yesterday I got my Teensy by mail, still waiting for the foot pedal.

    So I thought, well lets try it out with a simple switch.
    Connected the 10 and the ground with the switch.
    Started the Arduino program and my teensy program.
    Copied and paste the whole thing in Arduino. (the whole thing is the code which you described on this page)
    Uploaded it to my io board.
    Rebooted Teensy.

    After that I start teamspeak, went to options and when i pushed the button it didn’t recognized the switch.
    But my keyboard lost all his functions lol.
    It appears to be that the ctrl button is pushed, and that the only thing working on my keyboard is space esc and enter. lol

    I can only get my keyboard back to work when I disconnect the usb cable with teensy, Exit the teensy program. And press ctrl.

    Hate to ask for help, but I am also total new to programming and electronics.
    So I can’t look at the code to see what is wrong for my situation.

    I mean I am so noob, that by the 2nd try, smoke was coming up from my teensy, the ground and the 10 accidentally touched each other. lmao.
    Think it still works….

    Thank you very much in advance.

  3. hmmm, when I look at the code, it makes sense for what I am experiencing.

    No key press and hold ctrl down. In the code comment section //

    But I don’t know how to change it, don’t know jack about the syntaxes. Don’t even know what kind of language it is, let alone where I can find it.
    (don’t want to be lazy at all)

  4. Patrick,

    What is actually missing is the release part. Teensy sends the key then doesn’t stop until it is reset. In the code above the modifier is set back to 0 but it is never sent. It should read:

    void setup() {
    Serial.begin(9600);
    pinMode(10, INPUT_PULLUP);
    delay(4000);
    }

    void loop() {
    if (digitalRead(10) == HIGH) {
    Keyboard.set_modifier(0); // clear keypress
    Keyboard.send_now();
    delay(10);
    } else {
    Keyboard.set_modifier(MODIFIERKEY_CTRL); // hold control key down
    Keyboard.send_now();
    }
    delay(10);
    }

    Excellent post though Pat, where did you get your pedal from?

    • I got the pedal from a friend of mine. He had it laying around. I did find a company selling similar pedals here Linemaster 491-S available from Allied Electronics.

      I will have to look through my code now that people seem to have found this post again. I wrote it, compiled it, and flashed it on to the board and then pretty much forgot about it. I still use the thing all the time and it works great.

      Thanks for posting the edits.

  5. Awesome guys, I got the teensy to work !!!!!

    Yes the problem was in the coding, I tried your code Jason, and it is working, I am also able to set the foot pedal as key in teamspeak. So it is also working over there.
    So thank you very much.

    I also ordered the foot pedal from this article and if you ask me, its worth your bucks. Very steady and solid.

    Now I am waiting for my flux to arrive so I can solder it all together.

    In the last couple of weeks I learned a lot, got the arduino uno, and I am very enthusiastic about electronics and programming.
    Thanks Pat for doing this article, I also ordered the badge, and I will wear it with pride!
    (Teensy is still working even after I smoked it lol, you can even see the damage on the printing)

    Have a great new year, and thank you all again!

    • Glad to hear it is working out so well. Make sure that you send me some pics when it is done and I will post them. It is really nice to see someone else like what I made enough to make it themselves.

      Best of Luck.

  6. sorry to dig up such an old post, I just wanted to say that there’s an easier, more flexible way of doing this. if your foot pedal sends keyboard input (CTRL key in this case) that means that your game will react to whatever action is set to that key, so you will always have to remember to unbind the CTRL key in your game’s options menu and there will be those games that do not support unbinding keys. the solution IMHO is to either make the teensy act as a usb gamepad, or just use an old usb gamepad like i did, and solder the wires to one of its buttons. no programming needed, just plug it in and define your foot pedal as a PTT key in teamspeak.

Leave a Reply

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