Adding USB functionality to your Arduino projects used to be a pain, but thankfully, the V-USB project came along and gave your ATMEGA328 the ability to control the USB lines directly and mimic simple (low-speed) USB peripherals. [Ray] shows an implementation of the V-USB project by logging the status of the Arduino’s I/O pins to an open Excel spreadsheet
V-USB (Virtual USB) is especially useful for those of us who build standalone Arduino projects with the ATMEGA328. Unlike the Arduino Leonardo and its ATMEGA32U4, the ATMEGA328 does not have a built-in USB controller. The circuit required to tie into the USB lines is made up of just a few basic components, and [Ray] provides a reference schematic and BOM to get you started. The Arduino is programmed to mimic a keyboard, so the datalogging is achieved by allowing the Arduino to ‘type’ the data into an open Excel spreadsheet. In this example, the status of 8 digital pins and all 6 Analog Input pins are logged.
For those of you who prefer the PIC microcontroller and are in a similar position of not having a built-in USB controller, there is the 16FUSB project to help you out.
Awesome! Now you can log state of your toilet doors with a simple ATmega. Great hack!
Okay, having the pinout on top of the chip is genius, if you ask me
I think you can find the sticker as a printable file “on the net”.
I found this (as the top hit for my search): http://makezine.com/2011/01/12/free-print-and-stick-pinout-label-f/
(do notice a couple of possible gotchas mentioned in the comments)
Yep! Those are my labels. You can find the original files on my blog (svg and ai). (and some other cool stuff) http://www.digitalunderpants.com/arduino-breadboard-labels/
You can also buy them at adafruit: http://www.adafruit.com/products/554
BTW – cool project. I’ll have to see how you got the values into excel.
Just in case there is any confusion; I have nothing to do with this project.
Thanks for expanding on my info. I just did a quick search, so the link i got was pretty “random”. Always better to get it directly from the horse’s mouth (no offense ;-)
No offense taken! And I’ve been called worse! :) Hehehehe!
Not to hijack the thread – but there have been other cool labels. Such as this script to generate labels for any kind of chip.
http://hackaday.com/2013/03/15/script-makes-custom-pinout-labels-for-your-chips/
never been able to get v-usb to work. though i think it was more window’s fault than anything.
I used V-USB for a couple of projects with my own code from scratch (i.e. No Arduino etc) and they work fine. I am using Win7 X64+libusb and use Vendor Specific commands only. I am using external crystal with ATmega8.
Win7 X64 is strict about non-complaint stuff like bulk transfer at Low Speed, so CDC won’t work without mucking around with unsigned drivers.
And the other problem is that the code was written for a release of the Arduino IDE that has been superseded. That’s right it wants 15 or 16 of the product, and most of us have gone ahead and installed release 1 and later ones.
I’ve also had problems getting V-USB to work with more modern releases of the Arduino IDE, but it is possible. I’ve written two blog posts that should get you started
First up we have the Caffeine Button (http://englishjavadrinker.blogspot.co.uk/2013/10/the-caffeine-button.html) which is very similar to the example in this post, ni that it simulates a USB keyboard to send data back to the PC. While this works, personally I don’t think it’s particularly useful as you need to essentially leave the PC alone while the device is running otherwise the key strokes go to the wrong place.
A better alternative is to implement a lower level protocol for passing data backwards and forwards. In the example I blogged about (http://englishjavadrinker.blogspot.co.uk/2013/11/serializing-to-human-interface-device.html) this essentially gives you a bidrectional channel (a bit like the standard Serial lib) for communicating with the device.
The examples circuits in the above actually show it in use with a full Arduino UNO which is probably a bit silly (given that it has Serial support), but you can definately use the same circuits and sketches in a circuit with a standalone ATmega328P, and I describe how to program one of those in another of my posts: http://englishjavadrinker.blogspot.co.uk/2012/12/double-speed-for-just-35p.html
Hopefully you’ll find that lot interesting/useful
So using someone elses library in its intended use is now a hack? Whats next, a article on someone writing a Hello World project for a Arduino?
Using someone elses electronic parts for their intended purpose to build a working device is now a hack?…
I think the “what is a hack” has been covered enough before. do you have to keep asking? Search the archives. And let newcomers to the arduino have a recent post about V-USB to Excel over USB logging.
There might even end up being good info in the comments on more advanced subjects to move on with.
You can also skip articles when you see the title and think its beneath you.
Well said @MH. In fact I pulled a couple of links that I had forgotten about just in the comment section alone!
“in fact” usually means “i just made this up” ;-) But thanks for your support.
It is like when people complain that a hack is too simple or “everyone knows this”. as if there are never new people joining or different levels of skills, or even value in an alternative explanations of the concepts (i personally do not like video-posts, but i understand many people really enjoy them. other people might not enjoy my prefered way which is reading long detailed (boring?) texts). I think we have all tried looking for a solution to some problem and every guide on the subject out there except one hard-to-find one is omitting the one detail we needed – often because it is “obvious”.
“It is like when people complain that a hack is too simple or “everyone knows this”. as if there are never new people joining or different levels of skills, or even value in an alternative explanations of the concepts”
It’s like a quarrel between an old timer who got used to film photography, and a kid who calls himself a photographer for having a DSLR camera.
@tacticalNinja:
What? you and your subject do not have the patience for a handpainting? Kids these days! :)
Hi, why there is no 1k5 pull-up resistor at your D-