USB to Arduino Help!

Hi, I know there are already USB to arduino adapters, but I think 9 dlls are a bit too much to spend on just an adapter. I have a USB RFID reader that sends data to computer via USB and I want to be able to read it in my arduino. I already tried connecting directly to usb port, but arduino does not power it up because it is a Device, not a host (I knew that but I wanted to try :P)
So, I read the USB pinouts and there is a +5, GND, and +D and -D,
Can I connect it directly to my Arduino Rx, Tx pins? If not, does anyone know what is a one and what is a zero to arduino and to USB? I've been looking around, but I could not find any info.

Thanks!

Even a USB to TTL adapter is not going to help you much. What you are trying to do does not sound like it can work without writing a driver for the RFID device on the Arduino. My guess is, even if you can get the information you need to do that, there will not be enough memory in a regular Arduino to get the job done. Maybe an Arduino Mega??

Is the RFID device powered by the USB port too? That would be another little hurdle to jump.

Can I connect it directly to my Arduino Rx, Tx pins?

If you already have the RF reader device driver installed on your computer and its working then in that case its communicating to the computer successfully and as such take the TX from your RF device to RX of Arduino and RX of RF device to TX of Arduino, also connect the Grounds of both the Arduino and RF reader ,then open any Serial Terminal programme like the Serial Monitor in the Arduino IDE and if you type anything there must be getting into Arduino or if you make any Serial prints then it should show on the Serial Monitor or any other serial terminal programme.

Ahhh, it's a USB device. What RX and TX???

USB to arduino adapters

OP actually means USB to TTL interfacing board most probably with a FTDi serial converted chip or a PL2303 Serial converter chip board used with ATmega's bootloaded to get programmed.

it's a USB device. What RX and TX???

USB's are mainly all about RX/TX only , atlast they are made for transferring information to and fro.

OkOk, I understand now. they are two different types of interfaces, USB and TTL. Would it work if I savage a USB cable and connect +D & -D to the arduino's USB port, and the +5 & GND to arduino's +5 and GND pins in order to power the device?

the +5 & GND to arduino's +5 and GND pins in order to power the device?

Yes you can power this way your Arduino.

Would it work if I savage a USB cable and connect +D & -D to the arduino's USB port

No, there has to be a chip in between the USB connection and the Arduino to convert serial to TTL level and then from there the information/code flows to the Arduino.

If you have a PC then you can use the Serial RS-232 jack behined the pc and you do not need any USB to TTL chip to convert, just a simple circuit to programme your chips.

I'm not sure I explained my self correctly. I do not want to connect my PC to my arduino, I can already do that by connecting it via USB (My Arduino UNO has a USB addapter integrated already).

What I want to do is connect an RFID reader that I bought (that has a USB port to connect to PC) and connect it to my arduino instead. Now, I know that I cannot connect it directly since USB and TTL interfaces are different (I know this thanks to you guys, I appreciate it :slight_smile: ), and the USB port on my arduino won't power up the device, so my idea is to savage the USB cable and connect +D & -D of the RFID reader to +D & -D of the USB port on my arduino so they can communicate, and get the power cables of the USB cable and connect them to +5 and GND on my arduino to power up the RFID reader.

Now, I do not want to savage the cable if this is not possible, so I wonder if anyone has tried this approach or if anybody knows this will work.

I'm not sure I explained my self correctly.

It happens no problem :slight_smile:

Ok so if now i understand you correctly you want to connect your Arduino to the RF tag reader ,DO you have the datasheet?, The datasheet about the product spec's is supplied by the vendor who sells you these items?
follow that to connect it!(and use this instructable >> http://www.instructables.com/id/Arduino-and-RFID-from-seeedstudio/)
post that Datasheet here as an attachment?

Folks,

USB is not a symmetrical protocol. You need at least one host and one device to get things communicating. What you have here is 2 devices and no host. You will need to configure the Arduino to be a host. I honestly do not think it has the resources to do that.

Also, while there are two data lines, D+ and D-, they are not transmit and receive. They are a differentially driven pair, so when one goes high, the other goes low, except at the end of a packet when I think they both go high.

The data transmitted is not just 'data' either. A USB packet is constructed kind of like a TCP/IP packet. It has address information, data type information, commands, EDC, ECC, etc... You will need some considerable intelligence built into your program to administer all this.

Finally, the RFID device is not just going to start spitting out ID numbers. It needs to be initialized, configured and told when and what to do.

Now, the Arduino Mega ADK has USB host capability, but it might be restricted to certain USB devices categories (yes Mildred, devices are not all the same). Also, I had read somewhere about someone working on a USB host shield (maybe Sparkfun??). No idea how far they got or whether it would be applicable to this situation. You could look it up.

What all this boils down to is, no, you cannot just hook your USB D+ D- pins to the Arduino RX and TX pins.

Here, found one, but as suspected, not all device classes are supported. You have some research to do, but it might be possible.

http://www.circuitsathome.com/arduino_usb_host_shield_projects

Agh... that sucks... I wonder if I could get TTL data from inside the circuitry of the RFID reader before it is transformed to USB.

If anyone has details about this RFID reader please help me out. I could not get a name or a brand, but this is it: http://www.amazon.com/NEEWER®-125KHz-EM4100-Proximity-Reader/dp/B005JWGU6C/ref=sr_1_1?ie=UTF8&qid=1333144364&sr=8-1 I got it from amazon.com. Thanks