Game controllers using USB host shield

[I-Bot] has put together some libraries that make it easy to use gaming controllers with an Arduino. They interface through the USB host shield. This means that PS3 controllers connect via USB through a cable or a dongle. With the Wii remote things get a little more interesting. A Bluetooth dongle is used to make the connection wirelessly. What we have here is a cheap and easy way to add Bluetooth connectivity to your projects either through the USB Host shield, or by building your own hardware with the schematics and code that are available from Circuits@Home. There are several pages that walk you through the protocols using as well as a demonstration video you can see after the break.

20 thoughts on “Game controllers using USB host shield

  1. i know all the Arduino haters out there
    are trying to come up with something.

    but i think this is actually pretty cool..

    it should be blinking a couple of
    blue leds though! ;)

  2. @Rune Kyndal
    Isn’t that the whole reason for connecting a wii remote? The four blue blinking LED’s at the bottom?

    Also, if you want my input as an ‘Arduino hater’ I’ll make the same comment as usual. The Arduino is a dev. platform and is fine when used as such, but should be replaced with a single AVR (or PIC) chip when a project is finalized. Otherwise it would be like leaving a breadboard in a project and saying it’s done!

  3. @Spork
    Hi, please explain, because this is what i have done in the past and would like more information.
    How do you replace an arduino with an ‘AVR’ when a project is finished?

  4. Spork has it right, if this is still an in development work, it’s fine, but leaving an arduino without further work is half-@55ed. Great dev tool, but further learning and practicality goes to the wayside due to the ease of use of just leaving it as is.

  5. “but should be replaced with a single AVR (or PIC) chip when a project is finalized.”

    well if you pull your head out of your ass, you would notice that arduino is a atmega + voltage regulator + ftdi chip, the only thing keeping anyone from removing it and sticking it on another board when your done, is effort

  6. @n00b – Spork and others seem to be saying you should strip off the non-essential components and pins, discard the easy to use bootloader and cobble your own wiring and solder to make the equivalent,… no, “necessary” circuit. I disagree. I’ve rolled my own from 1802s (1978?) to ARM9s and I enjoy the time saved and frustration avoided when I use an Arduino variant with a solid pcb. It is worth the extra $10 to gain 3 hours of “play”. I do more because of Arduino, not less. That said, you might want to try the minimalist approach at least once. Search Arduino circuit BBB and least parts or similar words and you will even find the 5 component AVR (caps,IC,resonator) and versions that do not need a board. Enjoy.

  7. @n00b there are (basically) 2 types of Wifi implementations out there. Dumb/cheap that use the PC to provide huge amounts of software support, and the Smart/expensive modules with an on-board processor with significant horsepower, memory, and software so all your embedded system has to do is talk simple serial. So, no, you can’t plug in a USB Wifi key and expect it to work. But you should be able to get two $30-60 modules to talk to each other in ad-hoc mode while your projects speak serial. Some overhead required.

  8. yep, its frustrating to see people flame because of the plug n play nature of arduino, but then whine that its not a completed project for them to flat out copy to impress their lamer friends

  9. Not saying it’s a bad thing to use one, that’s not the point, but at some point, it creates a possibility of laziness. Take for instance the youngsters who may wanna get into engineering may take it as something cool to use (which it is a great option for those who wanna get quick and dirty with it), but then overuse it to the point where they can’t produce something useful on another platform or without something pre-fabbed.

    On that note, a neat system is the Cypress PSoC line. Very powerful micros, and they are really just about everywhere if you look. They have a simplified code creation program called PSoC Express, but you also have the option of coding in full C.

  10. not even the professionals “roll their own”

    Pc manufactures don’t roll their own wireless cards they buy one from say broadcom, and simply plug it into their motherboards..
    Modems, graphics. just about anything is modular

    there are many stand alone SMPS /analog circuits you just buy and add to your designs, rather than rolling your own.

    i would compare that to migrating from the “proto” arduino boards to making an implemantion with a RBBB. soldered or plugged into a carrier board. (lets call that a “shield”)hehe

    Get rid of the bootloader?? WHY?
    do you really enjoy the in-circuit programming
    that much?
    unless you really need the extra little bit of speed or rom. i would keep it for the vast convenience it brings

    PCs still come with a BIOS too…

    i think an implementation using an arduino board
    with a custom shield. would be a finished product for any decent hobbyist project..

    mass production a custom board would be the way ofcourse.

    and yes i have rolled my own too. lots of wiresm a M68000 CPU, some flash,roms,serial chip, address area, chip select decoders and what have we!..

    using an ATMEGA is already using a finished module
    with the roms,rams,io, in one little neato package and thus cheating to start with..
    so just get over it! ;)

  11. @M68000, There’s a pretty big difference between a micro project, and a full blown PC for someone to build on their own. The PC was designed to be modular. You seem to be trying to blur the edges of IC and the old ways of making a full MCU out of a bunch of transistors as well. But, if you look at say a cell phone, which is something similar (but at a larger scale) to something someone may do with a micro. I don’t see them trying to pack an arduino in one of them. So saying “even the pros don’t roll their own” isn’t true. Yes, proprietary IC usage us required, or maybe a pre engineered lcd, but that’s usually the extent of which. It goes back to them using a micro, and building their own package to incorporate it and the surrounding IC’s to make it truely their own.

  12. course if one of us hit that level, we just use the smt version of our little dream and package it up like the pro’s

    micro controllers are in wide use in many devices, having a debate over having a bootloader installed or not is silly

  13. Very cool stuff. Two things I want to add about the BT chip used. It’s a BC4-CORE series chip from CSR, there are other variants of the same chip, most notably BC4-EXT which have an external flash chip, instead of maskrom, containing the firmware. These are flashable, go hunt for a black/red DBT-122 usb bluetooth dongle on google. Finding BC4-ROM chips is fairly easy, just order a bunch of $2-$5 dongles from DX. Note that a lot of the cheaper ones use chinese knock-offs that are a dollar cheaper but support the same protocols (and identify as CSR chips).

    Another thing is that BC4 chips have serial ports, for embedding them in other devices like mobile phones. The bluegiga modules use BC4-EXT and connect to the MCU via this serial port. I’ve cracked open a couple of DX dongles and found some testpads on the only one that used a genuine CSR chip, but I haven’t tested it yet. I believe BC4 chips are tested in the factory by sending a self test command via serial, so it might make sense to have them lead out.

    tl;dr the BT dongle in question might support serial connection, thus removing the need for a $~40 usb host shield.

  14. hello,
    i am trying to connect my Quantam QHMPL QHM7468 USB Vibration Game Pad Remote Joystick to arduino by the usb shild but it cant work out please help me . where i use code of ps3,ps4,game controller .

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s