This project uses an ATTiny461, but should work with other AVR:s as the Tiny45 or 25. One pin on the CPU is used as a A/D, and to this pin a potentiometer is connected. The PC software uses libusb and amixer. It reads the potentiometer value from the AVR continuously and adjust the systems volume according to it's position.
This device is powered from USB, no external powersource is used.

V-USB on Windows

1 - Install libusb-Win32, Device Driver. http://libusb-win32.sourceforge.net/#downloads
2 - Unpack (with for example 7zip). Connect the V-USB device and start "inf-wizard.exe" in the bin-directory.
3 - Create and save the inf-file.
4 - Open the device manager, select the v-usbdevice and "reinstall driver". Let the program search in the directory where the inf-file is stored. The driver then begins to install, but soon needs to find "libusb0.sys". This can be found in libusb-win32's bin-directory (where inf-wizard.exe was found).

For using the device with Python:

V-USB with ATTiny461

This MCU works great, but I've just used it with a crystal (12MHz) yet. The construction I've used uses zenerdiodes on the D+ and D- lines. I choose this design to secure the frequency, if using two 1N4148's on the +5V-line we're way out of specifikations for the MCU. This goes for the ATTiny25/45/85 as well, but it works most of the times.

As usual I use AVR Studio to set the fuses when hooking up a new MCU. The fuse settings doesn't change when updating the firmware later, so this just has to be done one time.
The fuse settings I use:
Extended: 0xFF
High: 0xD8
Low: 0xFF

USB-connected media control panel

In planning stage.
MCU: Tiny2313 or 461.
-A few buttons for controlling the PC's mediaplayer.
-Volume control, a variable resistor to an A/D-input.
-LCD which shows songinfo.

-First step completed. I now have a Tiny461 with a potentiometer connected to the computer. I also have created a daemon which talks to the Tiny and sets the systems master volume according to the potentiometer wiper position. So I turn the pot, and the computer's volume changes. Pretty cool :)



In planning stage.
Three leds connected via 2N3904 transistors to a ATTiny25. The PC software send values between 0-255, which sets the PWM values of the three outputs. A 0 means power off, 255 fully on. This way we can either have a PWM-regulated output or a on/off output, al regulated from the PC.

Completed with a Tiny461 and a RGB-led, no transistors. The PC code sends three values between 0 and 255 to the device, which then changes the red, green or blue color accordingly. By sending the right values the Led can be lit in nearly any color.

Simplest USB-device possible

This project's goal is to build a device that connects to the PC's USB-port. It doesn't do anything, it just tells the computer it's there. The purpose is to learn about V-USB and to have a starting point for new projects. Both the hardware and the software is kept simple.

Based on a ATTiny25. Two 1N4148 in the USB power line, 100n and 10-47u capacitors over plus and ground.
68 ohm resistors on D+ and D-, 1k5 pull-up on D-.
This device is powered from USB, no external powersource is used.

USB-connected ATTiny 's

My projects based on V-USB, a software implementation of USB v1.1 that lets you build really simple and cheap USB-devices.

To compile and burn the code, the following command is used (AVR-ISP mkII programmer is used, change the -p argument):
make && sudo avrdude -p t461 -P usb -c avrispmkII -v -U flash:w:main.hex

Also see "Linux and Atmel processors"


1-wire controlled RGB-led

This projects goal is to controll the color of a RGB-led from a computer. This can be done in a lot of ways, but as I have a 1-wire network I choose to use this. The cable can be long, the problem is that it makes things a bit complicated. It is possible to create code to let the Pic act as a 1-wire slave, but that is hard and violates the 1-wire license. My solution is instead to use a DS2405 1-wire switch. It has an open collector output that is attached to a resistor to Vdd and to a pin och the Pic. The Pic is by the way a surface mounted 12F510.

Removing Blue cast with Gimp

-Click on Colors-Levels.
-Use the pipette for choosing a white point.
-Click on something in the image that's supposed to be white.



Targus presenter as volume control

This is a little project to make use of a Targus wireless presenter. Its model is PAUM35 and it uses radio for transmitting data to the computer. (http://www.epinions.com/reviews/Furniture-Ergonomics-All-Targus_PAUM30U_WIRELESS_REMOTE_PRESENTER)
In this device there is a laser pointer, a four way button that moves the mouse pointer and two buttons (mouse left & right). There is also a button to switch mode of the device.

Syndicate content