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.

Continue reading “Do you know what you’re doing when integrating PC-side apps with USB microcontrollers?”

Plug and Prey: Malicious USB devices

This very informative talk given at Shmoocon 2011 has been posted over at IronGeek. Covering all kinds of angles that a person could attack someones computer through the USB port, this should be read by anyone who is security minded at all. No matter which side of the port you tend to be on, this article has great information. They cover some common attack methods such as keyloggers and fake keyboards as well as some common methods of securing your system against them. We’ve actually seen this in the news a bit lately as people have been using the keyboard emulation method in conjunction with android phones to hack into systems.

 

[thanks Adrian]

NES controller to USB gamepad

Regular Hackaday reader [Osgeld] is at it again with this USB conversion for an NES controller. This is a ubiquitous hack that we started seeing very early on, sometimes involving an adapter kit, and other times including things like a thumb drive and USB hub. But this time around is truly a bare-bones version. He’s using an Arduino but it’s really just an AVR ATmega168 running the bootloader. We’d wager this can be done with an ATmega8 just as easily. Grab a couple of diodes (we never seem to have the 3.6v zener diodes around when we need them), a couple caps and resistors, a crystal and you’re in business. The hack wires each button to a pin and implements a keyboard HID that can be mapped for any purpose you desire.

Working with the AT90USBKey

The Genearic HID tool is meant as an easy way to create your own human interface devices. The project has the added benefit of showing us how to hack the hardware on the AT90USBKey developement board. The AVR-based device, which we saw used to make an SNES cartridge reader, comes in at just over $30 but with a few caveats. First, the breakout pads for the pins are not 0.1″ pitch and require some creative soldering to get at them easily. But the walk through also covers converting the board to run at 5v when in USB host mode, and altering the populated components to reclaim pins on the AT90USB1287 chip. The fun isn’t limited to this board, there’s also a home brew alternative based around the same chip.

[Thanks Juan]

HID crafting with a PIC and a joystick

[Amr Bekhit] converted his gameport joystick to use as a USB joystick. Much like a universal USB joystick interface, this uses an additional microcontroller to talk to the serial bus while monitoring the controls on the stick. [Amr’s] discussion about creating HID descriptors is clear and easy to understand. What he’s laid out can be translated to any custom HID your heart desires. Give it a try with that old peripheral that’s been gathering dust in the corner.

USB VU-meter

WaitingForFriday’s [Simon Inns] is quite possibly the USB interface and PIC master. This week he let us know about his VU-meter repurposed as a computer performance monitor using a PIC18F2550 and his open source USB Generic HID communication class. With PWM the meter’s needles and RGB LED can be accurately set and even dampened for CPU usage, network usage, HDD utilization, and even memory usage. Oddly enough, in his software we didn’t find the ability to use the device as a VU-meter – go figure.

PIC USB host shortcuts

[Simon Inns] is still hard at work making USB connectivity for PIC microcontrollers easier for the hobbiest. He’s released a framework for PIC based USB devices under Windows. It includes the firmware needed for USB compatible 18F PIC chips as well as a C# class library and example programs for the Windows side of things. This goes quite a bit further than his PIC-USB tutorial but with little added effort on your end of things.

We do our USB prototyping on a breadboard just like [Simon] did in this example. He’s got a nice little USB-B connector breakout that is easy to plug into the breadboard. If you prefer to have a more stable development area, check out the one he designed. It’s a single-sided PCB made for through-hole components with just a handful of jumper wires.