Tuesday, February 22, 2011

Arduino - First Project

So I recently got an Arduino, and I am pleasantly surprised! For those of you who don't know, the Arduino is a cheap ($30) open source microcontroller based on the ATMEGA328 chip. It has several digital and analog pins, which can act as input and output, and even supports pulse width modulation on a few of the digital pins. Add ons called 'shields' can be purchased or made to add even more features.




Needless to say, the first thing I did was order a shield, specifically a Real Time Clock shield based on the DS1307 chip. Since the microcontroller doesn't keep track of time over longer than a few minutes very well, I figured it would come in handy.

Then next thing I did was plot my first project, an Arduino controlled aquarium lighting system. Basically, it uses the Arduino to pulse width modulate the power that a string of LEDs in parallel. This allows the Arduino to dim and brighten the LEDs.

Here's the code (in C) for the sketch for those interested, and here is a circuit schematic:

0 comments:

Post a Comment

Please leave a comment