Techno Monk Experience the world as a techno monk

Techno Monk
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);
}

 

10 Responses to Tattoo Push to Talk Foot Switch

  1. Well done! I love how seamlessly the Teensy goes in there, so you can’t even tell you modified the thing.

  2. 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

  3. Patrick says:

    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.

  4. Patrick says:

    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)

  5. Jason says:

    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?

    • Pat Norton says:

      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.

  6. Gary Nelson says:

    O my! This idea was really cool. I love this project. Me and my brother Todd will surely recreate this. The materials you used were really easy to find. Thanks dude for sharing.

  7. Patrick says:

    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!

    • Pat Norton says:

      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.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>