CrazyTB's blog

Subscribe to RSS feed

Posts tagged with "atmega8"

USB HID absolute pointing device using ATmega8 and a magnetometer

, , , ...

During November I finally finished my college! Now I got a Bachelor's Degree in Computer Science by UFRJ (Universidade Federal do Rio de Janeiro).

And for my senior project (or final graduating project, or TCC - Trabalho de Conclusão de Curso, or PFC - Projeto Final de Curso) I chose to build a USB device that could control the mouse pointer, using an AVR ATmega8 microcontroller and a magnetometer.

A magnetometer is a digital compass, something that can measure the magnetic field (in three dimensions). The idea is that the user holds the magnetometer and moves it around (actually, only the rotation is considered). When the magnetometer orientation changes, the measured 3D vector of the magnetic field also changes. Based on this vector, the microcontroller applies some math and moves the mouse pointer to some position at the screen.

In a nutshell, the device behaves like a Wiimote, but using a completely different technology. You just point the device to some direction, and the mouse pointer is moved to that position.

Since the microcontroller implements the USB HID class (using V-USB firmware-only USB implementation, by OBJECTIVE DEVELOPMENT Software GmbH), it works straight away on any operating system without requiring any special driver. It has been successfully tested on Linux, Mac OS X and Windows. It was also tested on one Android device, but it did not support an absolute pointing device.

Links



Videos

Dispositivo apontador com interface USB usando magnetômetro (English subtitles available)


Moving the mouse pointer using head movements


USB Absolute Pointing Device implemented in ATmega8 using Magnetometer (work-in-progress video)


This project was challenging and very rewarding. It feels good to see it working after so many weeks staying awake during the night developing and debugging it.

Trivia: the idea for this project was inspired by Marcin Wichary speak/demonstration at Google I/O 2011: The Secrets of Google Pac-Man: A Game Show

Comparison between Microchip PIC and Atmel AVR microcontrollers

, , , ...

Earlier this year, I had contact with a PIC microcontroller as part of a college course. I'm documenting here everything I learned, and also making a comparison between PIC and AVR.

Read more...

First contact with ATmega8 microcontroller - part 2.1

, ,

Almost 4 years later, I started using AVR microcontrollers again. However, today it is difficult to find a computer that has a parallel port, and thus I need to revisit this topic of AVR programmers. And I end up building (and buying) the USBasp programmer.

Read more...

First contact with ATmega8 microcontroller - correction

, ,

At part 2 of this series of posts, I've posted the wrong pinout for 6-pin ISP connector.

Read more...

First contact with ATmega8 microcontroller - part 4

, ,

In this fourth part, I'm going to finally mount a circuit using the ATmega8 microcontroller and program it with the firmware we wrote.

Read more...

May 2013
S M T W T F S
April 2013June 2013
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31