Cloning The Trinket For A USB Volume Knob

A while back, [Rupert] wrote a blog post on using V-USB with the very small, 8-pin ATtiny85. Since then, the space of dev boards for 8-pin micros with USB has exploded, the most recent being Adafruit’s Trinket. [Rupert] liked what he saw with the Trinket bootloader and decided to clone the circuit into a useful package. Thus was born an awesome looking USB volume knob complete with a heavy aluminum knob, rotary encoder, and RGB LED strip.

[Rupert] got his V-USB/ATtiny85/rotary encoder circuit working, and at the expense of a ‘mute’ control, also added an awesome looking RGB LED ring powered by Adafruit’s Neopixels. The PCB [Rupert] fabbed is pretty well suited for being manufactured one-sided. If you’ve ever wanted an awesome volume knob for your computer, all the files are available form [Rupert]’s blog.

Just as an aside, [Rupert] has been working on getting the Trinket bootloader working on the ATtiny84, a very similar microcontroller to the ’85, but with eight analog pins. It’s a neat device that I’ve made a small V-USB breakout board for, but like [Rupert], I’m stuck on porting the bootloader. If anyone has the Trinket/Gemma firmware running on an ATtiny84, send that in. We’ll put it up.

Serial USB For Any AVR Microcontroller

If you’re using an AVR microcontroller and you’d like to add USB to a project, there are a lot of options out there for you. Both LUFA and V-USB add some USB functionality to just about every AVR micro, but if you’d like a native serial port, your only options are to look towards the USB-compatible Atmel micros.

[Ray] looked at the options for adding a USB serial port and didn’t like what he saw; seemingly, this was an impossible task without a second, more capable microcontroller. Then he had an idea: if the goal is only to transfer data back and forth between a computer and a microcontroller, why not write an HID-class USB serial port?

[Ray] based his project on The V-USB library and created a new HID descriptor to transfer data between a micro and a computer. While it won’t work with a proper terminal such as Putty, [Ray] managed to whip up a serial monitor program in Processing that’s compatible with Windows, Linux and OS X.

In the video below, you can see [Ray] using an ATmega328p with a standard V-USB setup. He’s transferring analog values from a photoresistor as a proof of concept, but just about everything that would work with a normal serial port will work with [Ray]’s library.

Continue reading “Serial USB For Any AVR Microcontroller”

Business Card Draws [ch00f]’s Logo

[ch00f] is at it again, expanding the horizons of the art of PCB business cards. This one draws his logo on any computer over a USB port.

The physical design of the card is heavily inspired by [Frank Zhao]’s card; both use an ATtiny85 and the V-USB package to handle the USB protocol and communications. Instead of typing words into a text editor like [Frank]’s, [ch00f]’s card draws the ch00ftech logo in MS Paint or other image editor.

There was a problem with simply emulating the mouse to draw a logo on the screen, though; because different computers have different mouse settings for acceleration, the ch00ftech logo was nearly always distorted. [ch00f] fixed that by emulating an absolute input device, basically turning his business card into a single-function pen tablet.

The logo was traced by hand and put into a few arrays in the firmware. Surprisingly, the logo didn’t take up much space – only 4k of the tiny85’s flash is used. There’s a lot more space for a more complicated drawing, but for now the simple ch00ftech logo (video after the break) will do.

Continue reading “Business Card Draws [ch00f]’s Logo”

MSP430 Bit Banged USB 1.1

msp430-usb-hardware

Here’s a rather exciting development for those who work with MSP430 microcontrollers. [M-atthias] worked out a way to implement USB 1.1 on a MSP430G2452. He’s bit banging the communications as this hardware normally doesn’t support the Universal Serial Bus. This is much like using the V-USB stack for AVR micros.

The test hardware seen above uses an 18Mhz crystal to get the timings just right. As this squeezes the most out of the chip it should come as no surprise that the firmware is written in assembly. This is still quite early on in development but the core features are mostly there, having been implemented and debugged over several versions already. Currently the base functionality can be loaded using under 2k of flash memory. You can download the Mecrisp package from [M-atthias’] sourceforge page. If you want to lend a hand testing or developing it would be greatly appreciated.

[via 43oh blog]

Bootloader Brings USB, Firmware Updating To The ATtiny85

[Jenna] sent in a very cool bootloader she thought people might like. It’s called Micronucleus and it turns the lowly ATtiny 85 into a chip with a USB interface capable of being upgraded via a ‘viral’ uploader program. Micronucleus weighs in at just over 2 kB, making it one of the smallest USB-compatible bootloaders currently available.

The USB support comes from V-USB, a project that puts a virtual USB port on a suite of AVR microcontrollers. With V-USB, it’s easy to turn a Tiny85 into a keyboard, custom joystick, data logger, or computer-attached LED display.

One very interesting feature of Micronucleus is the ‘viral updater’ feature. This feature takes a new piece of firmware, and writes it to a Tiny85, disabling the current bootloader. If you’re designing a project that should have a means of updating the firmware via USB instead of the usual AVR programmer, this might be the bootloader for you.

Not bad for a bootloader that emphasizes small code size. At just over 2 kB, it’s possible to use this bootloader on the similar, smaller, and somewhat cheaper ATtiny45.

USB Dongle For Unmodified NES Controllers

This USB dongle will let you use your unmodified NES controllers on a computer. That’s because it includes the same socket you’d find on the classic console.

The image above shows the prototype. Instead of etching the copper clad board, each trace was milled by hand (presumably with a rotary tool). To the left the black square is made of several layers of electrical tape that builds the substrate up enough to fit snugly in a USB port.

An ATtiny45 running the V-USB stack has no problem reading the controller data and formatting it for use as a USB device. This is actually the second iteration of the project. The first attempt used an ATtiny44 and a free-formed circuit housed inside the controller. It worked quite well, but required alterations to the circuit board, and you needed to replace the stock connector with a USB plug. This dongle allows the controller to go unaltered so it can be used with an NES console again in the future.

Use Your TV Remote As An HID Mouse

[Vinod’s] latest project lets him use a TV remote control as a mouse. It may not sound like much, but he did it with a minimum of hardware and packed in the maximum when it comes to features.

He’s using an ATmega8 to read the remote control signals and provide USB connectivity. With the V-USB stack he enumerates the device as an HID mouse. One note of warning, he used the PID/VID pair from the USBasp programmer project. If you use that programmer you’ll need to uninstall the drivers to get this to work (we think this is only necessary on a Windows box).

The cursor can be moved in eight directions using the number pad on the remote. The numeral five falls in the center of the directional buttons so [Vinod] mapped that to the left click, with the zero key serving as right click. He even included the scroll wheel by using the volume buttons. The firmware supports cursor acceleration. If you hold one direction the cursor will move slowly at first,then pick up speed. Fine adjustments can be made by single clicking the button. Check out his demonstration embedded after the break.

Continue reading “Use Your TV Remote As An HID Mouse”