Teensy LC / 3.2 USB HID

Teensy LC / 3.2 USB HID

thingiverse

<h2>If you like what you see here, consider leaving a tip.<br></h2> <b>This is not a USB mass storage device!</b> It's a modified <a href="https://www.pjrc.com/teensy/teensyLC.html">Teensy LC</a> or <a href="https://www.pjrc.com/teensy/teensy31.html">Teensy 3.2</a> microcontroller that can be used to send keystrokes to a computer/phone/tablet at around 6000 words per minute as though it were a USB keyboard. Of course, that's not all it can do! <b>Modifying The board:</b> I have cut the board width down to ~14.85mm by cutting and filing the portions of the board where the through holes were. If you do this, be careful not to cut the traces that go from the USB 5v input to pin 26 and the rest of the board. I filed a little too much off and had to bridge the traces with some solder. The ground pin has a similar problem where the pin has traces on both the top and bottom sides of the board. If the bridge between them is cut, you can just solder a ground wire from the outer case of the USB A connector to the case of the USB mini connector. The nice thing about the Teensy LC is the "LC" - Low Cost. I bought three of them at $10 each, so I wasn't too concerned about wrecking one to learn "what not to do". <b>Adding a Male USB A Connector:</b> The male USB A connector I used was sourced from an old Kingston USB thumb drive, so I can't be sure that any others will fit this case without some modification. My best guess would be <a href="https://www.sparkfun.com/products/437">this USB A connector</a> from Sparkfun. It seems to have the right dimensions, but the solder pads are further to the rear of the connector. Some heat shrink tubing should be enough to insulate them from shorting out on the micro USB connector, or you could try desoldering the micro USB connector from the board before soldering the wires from the USB A connector to the pads on the under side of the board. You could also try cutting the insulation away from the shell of the USB A connector, further exposing the connector pins. Note that I have soldered the wrong wire colours to the USB A connector. I soldered the black to +5V (should be red), white to D+ (should be green), green to D- (should be white), and red to ground (should be black). It's not like the electrons know what colour the insulation is. <b>Programming the Teensy:</b> PJRC has built an add-on to the Arduino IDE that includes software libraries, example code, and the ability to upload compiled code to the Teensy LC through their <a href="https://www.pjrc.com/teensy/loader.html">Teensy Loader</a>. I have included a Windows example code file that will wait one second, open Notepad and type out a message, then fade the on board light on and off to let you know the program has finished running. To upload new code to the Teensy, open the .ino file in the Arduino IDE, or create your own script. Click on "Tools" and make sure that the "Board" is set to the correct board (Teensy LC or 3.2). Click on "Tools" again and set "USB Type" to "Keyboard", then hit the upload button. When the source code is done compiling, the Teensy Loader will open automatically. Click the "Automatic" button to turn it off. This will prevent the Teensy from running the program immediately after it has been uploaded. Hold down the programming button on the Teensy board as you insert the device in to a USB slot on your computer, then release the button. This will prevent any code on the Teensy from executing, and make it ready to receive new programming. The Teensy Loader should recognise the Teensy board and now you can click on the "Program" button. When it is done sending the binary file to the Teensy, a message will appear that says "Download Complete". You can now remove the Teensy from the USB port and plug it back in without holding the program button, and the Teensy board will automatically run the code. Enjoy your new keyboard!

Download Model from thingiverse

With this file you will be able to print Teensy LC / 3.2 USB HID with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Teensy LC / 3.2 USB HID.