Do You Know What You’re Doing When Integrating PC-side Apps With USB Microcontrollers?

The advent of integrated USB peripherals in microprocessors (PIC, AVR, etc.) has certainly taken a lot of the work out of developing USB devices, not to mention reducing the silicon parts in these designs. But do you know what you’re doing when it comes to controlling them with user-friendly applications? [Simon Inns] is lending a hand with this in his recent tutorial. He shows how to use USB capable AVR chips along with your own Windows applications.

After the break you can see the video from which the above screenshot was captured. That’s a development board of his own making which hosts an ATmega32U4, as well as a USB-B port, LEDs, potentiometer, and a few switches. Taking a closer look, we love the breadboard friendly headers he used on the bottom of the board to break out all of the pins.

His demo shows the Windows app turning LEDs on the board on and off, as well as ADC data displaying the current potentiometer position with the onscreen dial. His code package includes the hardware design, firmware, and app software needed to follow along with what he’s doing.


20 thoughts on “Do You Know What You’re Doing When Integrating PC-side Apps With USB Microcontrollers?

  1. Astonished that there’s not yet much reaction to this, Biomed points out that this leads to USB interfaced AVR devices of ANY sort. Weather stations, robots, test bench equipment, you name it. Here we have the keys to the Kingdom of Interfacing ANYTHING Directly to a PC with code on the AVR and Code on the PC. Whatever you want! And doing it with user-level APPS on the pc side. The only explanation I can find for such a lack of immediate enthusiastic response is that you’ve all dug deep into your parts bins and are busy implementing it all right now!

    1. The C# framework breaks interfacing with an arduino down to a few lines of code, so this post is about as exciting as posting a blinking led project. Creating some sort of protocol on top of the framework is interesting, but again not something that takes an extraordinary amount of brain power.

      And with all of the wireless interfaces available, usb communication is not as interesting or useful. All of the things you mentioned would be much more effectively implemented with bluetooth.

      1. I agree. The only nice thing about USB HID is that you don’t need to mess with COM port name changing when you plug the connector on a different port but actually if you use FTDI D2XX libs you don’t need either.

  2. @Biomed

    The Arduino Leonardo that’s coming out very soon uses the 32u4 and there’s already one example of HID programming in Arduino 1.0 so I’m sure it’s only a matter of time until more people catch on.

    Otherwise it really depends on what you’re doing. Granted, I haven’t made a lot of things but out of all of them only one was something that had to be connected to a computer as part of its purpose.

  3. “For the USB connector I used a full-size type B socket which is a lot more sturdy than the micro and mini B connectors (since the cable gets plugged in and out a lot on a development board).”
    The USB Micro connectors are extremely durable. Sure, the larger USB Standard B connector could withstand more force in the worst case, but either type will be more than adequate if properly installed.

    “The newer Micro-USB receptacles are designed for up to 10,000 cycles of insertion and removal between the receptacle and plug, compared to 1,500 for the standard USB and 5,000 for the Mini-USB receptacle.” (WP:USB#Durability)

    Durability: 5000 mating cycles for USB Standard connectors; 10,000 mating cycles for USB Micro connectors (Digi-Key USB 3.0 Product Training Module).

  4. I thought HAD had changed it commenting policy? Anyway…

    It’s worth mentioning that USB HID and Serial over USB are not ‘as good as’ each other. HID has automatic device detection and the ability to form composite devices (say USB MIDI for music and USB HID for complex control surface through the same plug). Also, unlike bluetooth, you can also power the device.

    The library saves lots of work dealing with unmanaged API calls in Windows and also gives you an out-of-the-box solution to start with.

    This project is not really focused on the firmware (the hard work there is done by the LUFA stack), it’s more focused on providing a simple API from C# to make it easy to talk to your USB driven creations.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.