I have a pc gamepad with usb output. Normally, the parts of the usb are V+,V-,D+,D- . But , is there any way to connect them to arduino and control it ? and How ?
With a USB Host shield.
Or open the gamepad up, cut the traces to the USB chip (or wires if they have that), and just use the buttons directly, like any other button. Could probably tuck a pro mini or something small like that into the controller.
I understood.but is there any way to use it without host shield ? and which pins do i have to use on arduino board . Thanks a lot..
forty69:
I understood.but is there any way to use it without host shield ? and which pins do i have to use on arduino board . Thanks a lot..
Only if you're willing to modify the controller. In that case, you would cut the connections between the buttons and the electronics, and instead connect wires directly to the buttons. Then, you can use it like you would any button our keypad
forty69:
I understood.but is there any way to use it without host shield ?
No.
forty69:
I understood.but is there any way to use it without host shield?
Well there is of course. Firstly, you clearly know that the Arduino cannot provide USB "host" functionality on its own - otherwise that would already be included on the Arduino board, wouldn’t it?
So you look into the design of the said host shield and find that to provide this function, you need a MAX3421E as well as a few other components (including a level converter chip, auxiliary 3.3V and 5V regulator - remember that a USB host is required to supply at least 500 mA of 5V power) - and a crystal, MOVs, etc). It's all in the schematic.
Now the MAX3421E is a SMD chip so unless you intend to have a PCB manufactured (inappropriate for just one), you want a "breakout" board for the chip which you then mount on perfboard or stripboard and wire it all up.
Frankly, I think it will be easier and cheaper to either hack into the controller itself as others have suggested, or just "bite the bullet" and go get a USB host shield rather that attempting to replicate it.
forty69:
and which pins do I have to use on Arduino board.
The MAX3421E uses the SPI interface with the standard MOSI, MISO and SCK pins as well as whatever you choose (if you wire it yourself and adjust the code to suit) for SS and RST. If you hack into the controller itself, you can choose the pins