loading

Step 9: Explaination of the Code


The code uses V-USB to create a USB keyboard. V-USB is a software package that allows you to make USB devices out of AVR microcontrollers.

Instead of explaining using text, I have a video tutorial about how to build a USB keyboard:

http://www.frank-zhao.com/index.php?page=usnoobie_rfid_keyboard

Please note that this two part video is over 15 minutes in total. I've put an incredible amount of effort into the video. Please watch it in 720p full screen so you can read all the text.

I also have another Instructable that will explain more USB and V-USB stuff to you: https://www.instructables.com/id/USB-Wii-Classic-Controller/

The differences between the RFID USB Keyboard and this USB PCB Business Card is that the ATtiny85 is used instead, and the text comes from internal flash memory instead of a serial port. One important aspect to note is the fact that the ATtiny85 uses an internal PLL to generate the clock speed that V-USB requires.

Also read my other USB instructable involving creating more USB devices, where I explain the USB bus, descriptors, and other aspects in more detail.
<p>nice job, here is my card, if you need PCB,you can go to www.syspcb.com</p>
<p>can you make one of these for me??? i am interested as to having something like this for our entire staff as business cards and looking for the right person that can do it????</p>
<p>Finally i made it, also added led's in it......thanks a ton for guiding FRANK!!</p>
<p>Hello!</p><p>Have you used any compiler optimizations?</p>
can you just use a regular flash drive or sd card?<br>
Very nice Instructable and a very nice product - although I would never plug an USB device given to me by a stranger into my computer (neither private nor at work).<br><br>But at an interview, the idea and the quality of execution alone would mean something.
People are afraid that it'll do &quot;rm -f /&quot;<br><br>I could also (in theory) open up a web browser using a multimedia key and then visit any URL
<p>ah this was what I was looking for... would you be able to elaborate on this? I'm looking to build one so that it opens a browser.</p><p>Thanks</p>
Give them a regular card with a URL on it. If they say that they don't have internet or their internet's down, give them one of these.
<p>i really like the idea of using the chip to hide the two hidden pins from the front while also allowing that to make it more compact (as far as the actual circuit goes).</p>
<p>Thanks for this Instructable! Made it and will use it for my applications!</p>
<p>That is a great and impressive idea but I have a v1.1 idea.<br>You could cut a rectangle on the PCB to the place where the IC sits and solder the IC dead-bug style so that it doesn't stick out that much. Of course the rails would need to be adjusted a bit to match the new layout.</p>
<p>Hello There, this looks great and I want to make something similar but cant find the eagle pcb file. Am I missing something here?</p>
<p>Can I program the attiny with an arduino?</p>
<p>This link explains how:</p><p>https://www.instructables.com/id/Programming-an-Atmel-AtTiny85-using-Arduino-IDE-an/</p>
Very cool idea. Just one quick question please, is it possible to make a custom flash drive like this instead of using a microcontroller?
<p>Of course, it is possible, but iIt would be much harder, depending on your requirements. </p><p>In this project, the micro is acting as a HID keyboard, which is very simple once you have the right library (V-USB). But to make it act as a USB drive, you would of course need something much different. </p><p>The easiest way to achieve this would to find an open source schematic of a USB flash drive and redo the layout into the form of a business card. It would be much more complex.</p>
Can you please fix your schematic as it took me over 10 tries to finally realize that the pin #s are wrong. Other than that great project.
and what is the correct one? was the schematic fixed? thanks
<p>This is more then Awesome!!!</p>
Just a question. Could ou do the same with this but make it hold down a key for the time its plugged in? and how small could you make it?
I can make it hold down a key, but it will keep being held down even if you unplug it, or at least in Windows it will do that, I'm not sure about Mac or Linux.<br><br>Size has nothing to do with this.
Your circuit and you description of the circuit are different. Could you please add a corrected version of the circuit to your instructable. I like the idea and want to try it but I can't get it to work.
I'm amazed that nobody has asked, but can you please elaborate on the use of the vibrator on the soldering iron? Being a teenage lad, it isn't really the kind of thing I just have lying around in a cupboard or whatever!
it's a joke, the joke is that SMD soldering is so easy, you can even do it while holding a vibrator
Ahhh! Right, that makes sense now! I was thinking it was something about making the iron bounce off of the board for a split second so not to over heat anything! Great instructable though! I might have to try it!! <br>
Frank,<br> <br> frankly, this is an awesome project. The ideas to (1) use an HID profile, and to (2) use capslock to &quot;talk&quot; to the card are just terrific.<br> <br> I'm sure you impressed your card recipients.<br> <br> You totally deserved your 1st prize in the <a href="https://www.instructables.com/contest/usb2011/?show=WINNERS">USB contest</a>. Did you get your HP TouchPad? What will you do with it? hack it?<br> <br> &nbsp; Pascal<br>
Hi Pascal<br><br>Thanks for the kind words.<br><br>I didn't get the HP Touchpad because it was being discontinued, I received a prize of equivalent value instead.<br><br>On a somewhat related subject (since now people are hacking the HP Touchpad with Android), I did recently get my first ever smartphone, a Samsung Galaxy Infuse 4G, running Android 2.3. I also got a Micropendous. So I am completely ready to start hacking with Android ADK.
Did you end up hacking the ADK??
I really appreciate your effort to show how easy it is to solder 0603 SMT ... honestly I do. Great job! However... it's still wrong on so many levels ;-) Great Instructable!
Hey there! Pardon me if i missed it, but what is the cost of these per (1) assembled at home. And what would it cost to have these manufactured?
Very cool !! thank's a lot for sharing
Very awesome! ... .. Vibrator... #$*%ing PRO!
What happened to the picture of the USB connector? It was cool to see the details on the pcb layout. Perhaps I am missing something. It looks like you can download the files to do the project yourself but I cannot find the file for the pcb.
Thanks for bring this to my attention, I've formatted my Instructables in HTML and they seem to have disappeared, causing most of my pictures to be missing.<br><br>see:<br><br>https://www.instructables.com/community/All-my-HTML-disappeared/<br><br>I'll add the PCB file soon.
im not that good with computers.. is there a way i can do that with a flash drive??
Nobody answered my question so i went searching.. the answer is yes you can do it with a flash drive. its actually pretty neat and u don't have to be a genius to do it.
how does one get his hands on one of these? its awesome!!
Wow, thats pretty slick but people might shy away and think that you are controlling their computer... Ive done things like this and some of the more computer illiterate freak out and shout &quot;VIRUS&quot; great design though
woah<br>
I can't help but do a double post here...Using this for handing out a resume is an instant job offer in my opinion.
WOW!!! Never thought of that... but I just found this so it's too late for me.
That is godly bro, +1000 internets to you.
Felicitaciones un excelente proyecto, Congratulations, one excelent project
Nice job, I like it a lot!!
I sincerely hope this wins first prize. You deserve it!
Can you please supply the full specifications on the diodes (Forward voltage, etc) or a product code.<br>Kthxbye
look for 1N5227B
I'm disappointed that my second entry into the contest did not become a finalist (or even get featured...)<br><br>https://www.instructables.com/id/USB-Wii-Classic-Controller/<br><br>I actually think it is far more educational about USB than this Instructable, which focused on &quot;art&quot; more<br><br>Anyways, check it out if you are interested in how USB mouse/keyboard/gamepad works

About This Instructable

114,293views

653favorites

License:

Bio: I am an electrical engineer. I graduated from U of Waterloo. I used to work for Adafruit Industries as an EE. Now I work for ... More »
More by frank26080115:LED Pocket Watch Easy Cord Wrapping Around Power Bricks Using SMD Components on Breadboards 
Add instructable to: