I have a bit more of a general question on the Arduino's hardware, and I hope this will be the appropriate spot.
I basically want to "future proof" a self-built Arduino by giving it USB functionality. For example, I would have a small PCB board (not the one the official Arduino comes on) that is just collecting some data, say temperature and barometric pressure, for a specific location. Then I want to plug a computer in via USB and download the Arduino's collected data (and perhaps upload some data from the computer to the Arduino) (I know of which the software is probably beyond the scope of this post). From the little I know about USB, it is +5V, TX, RX, and GND. Now I don't believe that I could simply attach the ATMega's +5V, GND, RX and TX pins to the ends of a USB cable, plug it into a computer and expect it to work.
So, what is the hardware requirement to accomplish this? I know there is the ATmegaXXU# that is used for USB communication, but is this the necessary IC? What else is there I need to know and/or am I missing something?
I'm not sure I perfectly understand your question, but I'll give it a try.
You are correct that it is not simply a matter of connecting the four USB lines. This won't work.
The usual and simplest way of adding USB to a non-USB arduino clone is to use an external adapter like this one: https://www.sparkfun.com/products/9716 that has a USB-to-serial chip on board. You can use one of these with multiple arduinos. It has a six-pin interface that allows the Arduino to be reset for reprogramming.
If you just want to use the processor on its own without a USB interface chip, you can use V-USB.
Note: this method is slow and you have to modify a few software settings for programming an Arduino, so program the Arduino using the normal (Usb interface) method to install V-usb and your other software.
Edit: ok, I give up, url format is not showing youtube previews today...
I think the simplest and easiest way to have USB support in an AVR is to buy a Teensy board: http://www.pjrc.com/teensy/
Much smaller than an Arduino board and they "just work".
Paul has done an enormous amount of work to make libraries work on his hardware
and has done many enhancements to the core code to make it much faster than the
standard official arduino boards including Leonardo.
Even if you are building your own h/w it is often hard to beat the pricing of the
teensy for one off designs unless you happen to have a bunch of the components laying around.
Thanks for all the replies, and I understand if what I was asking was a bit vague. I also did not want to misuse or use an incorrect term.
BR - As far as the FTDI Basic, I wasn't sure if it would be suitable. I thought it was more for (re-)programming a microcontroller, or to program the IC on a breadboard. I did not think of using it to add USB functionality to the ATMega. The other thing would be that the FTDI would be directly soldered into the PCB with the IC. The end user would then just plug a USB cable into the data collector and computer, and then be able to retrieve the stored data on the data logger. Also what is the difference between something like that, and something like this: SparkFun USB to Serial Breakout - FT232RL - BOB-12731 - SparkFun Electronics. I'm also looking into these FTDI chips themselves to be implemented into the project, the two I was looking at were:
FT232RL USB to UART Bridge - FT232RL - COM-00650 - SparkFun Electronics
FT245RL USB to FIFO Bridge - FT245RL - COM-00787 - SparkFun Electronics
Which, again I am not 100% sure of the difference in, and I will be looking further into.
I know the MAX232 is used for RS-232, because of the different signals, and of which I won't be using.
I'm also thinking something like the ATMega16U2 (or '32U4 for that matter), mostly because this allows the host computer to "see" the device as a device, and I do not know if the others do this... Or if any of these are what I'm looking for. The '16U2 also seems to have GPIO. Looking at something like this as well ATMEGA8U2 Breakout - DEV-10277 - SparkFun Electronics.
Lakes - thanks for informing me on V-USB. I did not consider a software option, but I am currently more interested in the hardware aspect of Arduino-USB communication.
DC42 - I don't have any real objections (or good reason not to) in using a SMD. Would building a Leo clone be "simple"? The same way as using the '328P can be done in a minimal way (Vcc, GND, 16MHz, etc.)?
Bill - I did not consider something like the Teensy. I am still new to Arduino (and practicing electronics in general) so my knowledge is not extensive. Unfortunately, most of my development for my projects have already been developed around the Arduino.
Hoefully, that gives a better understanding of what I'm looking for and eventually do.
Osiris:
Bill - I did not consider something like the Teensy. I am still new to Arduino (and practicing electronics in general) so my knowledge is not extensive. Unfortunately, most of my development for my projects have already been developed around the Arduino.
You can use Arduino on Teensy. That is one of the things that is so nice about it.
Same IDE, just load pauls teensyduino add-on package.
Osiris:
DC42 - I don't have any real objections (or good reason not to) in using a SMD. Would building a Leo clone be "simple"? The same way as using the '328P can be done in a minimal way (Vcc, GND, 16MHz, etc.)?
I had come across this item, called EasyUSB. From looking at it, it seems to be what I'm looking for. A way to get my Arduino clone to talk to a computer host, where I can download the acquired data from. I also like the idea that I can store data on it, as my alternative would be to use the Microchip 24LC256 I2C EEPROM, although I don't know how much data will be collected between "downloads", however, I can't expect it to become very large. Perhaps I could use some other USB-to-UART product?.
I did also come across the USB3318, but I'm not that familiar with USB protocol (is that what I can call it?) and may require more developing than I can do right now.
Again the Teensy looks good, however, I may want to turn around and use something smaller not needing as many I/O pins, such as the Atiny.
Sorry if this seems redundant. I'm also using this thread to collect my thoughts, see my options and get feedback on them, so feed back is still welcomed.