August 1st, 2007
If you followed my previous post on how to use the famous Eclipse IDE to program AVR microcontrollers, you may have noticed, that there are some shortcomings. Especially the creation of a new project is cumbersome, as you have to change the compiler settings from gcc to avr-gcc over and over again.
But there two small nifty plugins, called AVR Plugins for Eclipse, written by Matthew R. McDougal, to help us out.
Read the rest of this entry »
Posted in eclipse | 4 Comments »
July 28th, 2007
Two weeks ago I posted about how to interface an AVR microcontroller to a Telit GM862. You can read it here: Interfacing an AVR controller to a GPS Mobile Phone.
That post got listed on Hack-A-Day, Engadet and Makezine among many others! w00t! Thanks for posting and reading it, I really appreciate it.
This post will show you, how to use this equipement to send an SMS with your current position and how to display it in Google Maps.

Read the rest of this entry »
Posted in avr, gsm, gps | 38 Comments »
July 15th, 2007
I had some problems with the avrdude 5.3.1. It complains about reading the fuses properly.
Verify error - unable to read lfuse properly. Programmer may not be
reliable.
A workaround is to use the -u switch to override this check. As the new version with this bug fixed is not available for windows, I tried to compile it myself. I used MinGW and MSYS and it worked, at least for me. I can now even omit the -F switch, which I had to use before, as the device signature was not read properly. If you want to try it, here you go.
Download: avrdude 5.4 windows
Please note, that this comes without any warranty and is not completly tested or verified.
Posted in winavr | 4 Comments »
July 13th, 2007
Update: Part II Using Google Maps with a Mobile GPS Tracker is online.
My goal is to build a kind of a mobile tracker. There are many different use cases you can think of but one of the obvious is a device, that is able to report where it is. This device can be put in your car and it could trigger an alarm, if the car got stolen. Actually it could tell you where it is.
There are already mobile tracking devices out there, but they seemed to be too expensive and too closed for my needs. Another option is one of these new Nokia N95 which have built-in GPS. They are really nice, but about 600€, which is not a bargain. So I decided to do my own.

Read the rest of this entry »
Posted in avr, gsm, gps | 92 Comments »
June 16th, 2007
This post will give you a short example how to read and write EEPROM, and how to use flash memory as storage.
When you are jumping into programming microcontrollers many things are new and uncommon. At least to me as I used to develop in Java. This snippet may save you some time when you start playing with EEPROM and flash storage. Please note, that this is not a complete tutorial on this topic. You may find usefull links in the link section below.
Read the rest of this entry »
Posted in avr, winavr | No Comments »
June 3rd, 2007
This is a log of what I have done to get Eclipse running with WinAVR on Windows XP. Maybe it’s helpfull for others.
Prerequisites
- Download a Java Runtime JRE or JDK, if you do not have already. Anything greater 1.4.2 should be ok.
- Download Eclipse 3.2.2 here
- Download the CDT 3.1.2 plugin for Eclipse C/C++ development here
- Download WinAVR 20070525 here
Read the rest of this entry »
Posted in winavr, eclipse | 9 Comments »
May 20th, 2007
I searched the web for a cheap method to let the ATmega respond to sound. My knowledge in analog circuits is very limited, but what I do remember, is that you can not attach a electret mircophone to a controller pin. The signal of the microphone is just too small and has to be amplified. There is much of information out there, especially on diy amplifiers. I stumbled upon this little circuit here. It consists only of a handful of components:
- 2 resistors 10k
- 1 resistor 100k
- transistor 2N3904
- 2 capacitors 0.1u
- electret microphone
Prototyping the amplifier
Putting things together on a breadboard.

Actually I had no 2N3904 around, so I replaced it with a BC337. The circuit is a emitter circuit with voltage degeneration (I dont know if that exists in english). I dropped the couple capacitor and took the signal right away at the collector.
Prototyping with the ATmega
The sound sensing is done with the ADC of the ATmega. A simple program reads the analog value of the amplifier over and over. If the value (loudness) exeeds a specific level, an LED is lit.

The schematic for rebuilding.

The code can be found here mic_sensor.c. It is just hacked together and has lots of room for improvements.
Video
Here is a video that I made. Has lousy quality, for both, video and audio.

Click To Play
Conclusion
It was easy and worked pretty well. I enjoyed looking at the LED responding to the music. I haven’t recorded anything with this amplifier, it might sound awfull. Next steps could be playing the sound back or be able to analyze the sound (FFT). And (re-)learning more on analog circuit design.
Links
Posted in avr, sound, sensor | 25 Comments »
May 11th, 2007
I was always fascinated by the emergence of patterns. One I like most is the synchronization of hundreds or thousands of fireflies. First they flash randomly but after some time and influencing each other, they flash in sync.
The rule behind this is very simple. All fireflies have nearly the same frequency for their flashing, but their phase is shifted. If a firefly receives a flash of a neighbour firefly, it flashes slightly earlier.
This circuit simulates fireflies with small microcontrollers.
A single Firefly
The board consists of 25 fireflies. Every single firefly is self contained, there is no over-all controller. A single firefly consists of:
- ATtiny13 microcontroller, 1k SRAM, 64 bytes RAM
- Light Dependant Resistor (LDR)
- LED
- 2 resistors

The circuit is the same as for the Programmable LED.
The complete Board
Assembling 25 fireflies on a prototype board is easy. Harder is to get the right distance between all fireflies. It has to be close enough to let one firefly influence another, but not the whole group.
The LEDs I used emit the light mostly straight up. So a kind of reflector is needed. I used a piece of paper which is located 5 mm above the LEDs. For the next version I would take LEDs with a wider light emitting angle and use a kind of diffuser, as proposed by Tod for his Smart LED Prototypes.

Here is a video. It is a bit dark as my camera is not very suitable for this.

Click To Play
Links
Posted in avr, led, instructable, simulation | 13 Comments »
May 9th, 2007
Inspired by various LED Throwies, blinking LEDs and similar instructables I wanted to do my version of an LED controlled by a microcontroller.
The idea is to make the LED blinking sequence reprogrammable. This reprogramming can be done with light and shadow, e.g. you could use your flashlight.
How is it done?
It consists of an LDR, an LED and a tiny microcontroller. I used a ATtiny13v which is able to run with 1.8V. That makes it easy to power it with smallest batteries or even fruits.

Prototyping
All components can be easily used on a breadboard. Be aware, that you will need a separate programmer or an ISP adapter to program it.
The final version
The final version is powered by a CR2032 cell. It should have enough power for at least two weeks, depending on the light sequence it plays.
I have done a step-by-step instructable here.

Here are some responses to the instructable
Posted in avr, led, instructable | 9 Comments »
May 5th, 2007
So this is my approach of an LED clock. There are zillions of LED clocks out there. Mine is some kind of retro and minimalistic version. It consists of
- AVR ATmega8, 8 Kb, 4.096 MHz
- Everlight 2.3″, LED Matrix, 8×5 LEDs
- some resistors, capacitors and a quarz
- optional serial connection for configuration
The LED matrix is used in landscape mode, that means it uses a very tiny font. Most characters fit in 3×5 pixels. The font supports only uppercase characters. Because the display has only 8 columns the message has to scrolled.
The display has the following features at the moment:
- Displays a greeting message
- Displays the current time, hh:mm:ss
- Displays a custom message
- Messages and current time can be modified via serial port

Schematics
Here is the schematic of the LED clock. The Everlight 5*8 Dot Matrix was not available as part of the Eagle libraries, so I build the part on my own. It looks a bit clumsy as it is my first try to design components.

Here is a video of the LED Clock. You can see how it changes through different modes from telling the time to displaying a greetings message.

Click To Play
Posted in avr, led | 7 Comments »