Arduino Forum

Forum 2005-2010 (read only) => Hardware => Development => Topic started by: nobikes on Jun 29, 2010, 05:57 am

Title: Simple 10 - 12 LED Display
Post by: nobikes on Jun 29, 2010, 05:57 am
I have recently purchased a class set of the Arduino Boards for my High School Engineering class. The programing is very simple for the students to understand. My end game is to use the chips for simple robotics. But before that i want to make a simple 10 LED display that the students can take home for cheap.

The Idea is that students program the chip then remove it and plug it in to their light display. Has any one done this before?

If not, I need to know a few basics.

Which pins hook up to the timing crystal?

What is the spec on the crystal?

Can the Arduino run on 9V? (Simple battery clips make 9V perfect)

Any way, i probably have more questions, But any input at this point would be great.  8-)
Title: Re: Simple 10 - 12 LED Display
Post by: artjumble on Jun 29, 2010, 06:30 am
Quote
Which pins hook up to the timing crystal?

What is the spec on the crystal?

Not sure if this is exactly what you need, but take a look at this http://www.uchobby.com/index.php/2007/07/01/ardunio-breadboard/ for a minimum setup.

Or you could buy one of these http://www.moderndevice.com/products/rbbb-kit and then duplicate the setup.

Quote
Can the Arduino run on 9V? (Simple battery clips make 9V perfect)

Yes. Look around here, I think there is a very recent thread talking about 9V hookup.
Title: Re: Simple 10 - 12 LED Display
Post by: donkahones on Jun 29, 2010, 06:39 am
What you basically want to do is create a dedicated arduino just for driving LEDS?

I think a more efficient path would be to purchase/build/design an LED shield.  That way you can still use the chip with oscillator and voltage regulator for other projects.

If you still want the dedicated circuit then there are a ton of examples online for building your own.  look up HACKDUINO
http://www.instructables.com/id/Perfboard-Hackduino-Arduino-compatible-circuit/

you will need a voltage regulator as the atmega 168/328 chip  needs between 1.8 and 5.5 volts....7805 http://www.datasheetcatalog.org/datasheets/228/390068_DS.pdf

The usual timing crystal used is http://www.vishay.com/docs/35014/xt49s.pdf
between pins 9 and 10.

there are a few other things necessary to just plug in the chip, but they are all well documented in the many arduino schematics floating around.

I would recommend just building the shield or using bread boards.  In addition breadboard wiring is always a learning experience, especially when trouble shooting your rats nest  ;D


Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Jun 29, 2010, 06:44 am
Thank you, that gets me closer.

I have also been looking at the pin configuration of the ATMEGA 328 chip, I am a little confused on which pins on he chip correspond to pins in the Arduino Software.

A basic schematic for how to hook up the Atmega chip in to a simple circuit would be ideal.  
Title: Re: Simple 10 - 12 LED Display
Post by: donkahones on Jun 29, 2010, 06:50 am
assuming you have the duemilanove cross reference this:

http://arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf

with this:

http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf

Quote
A basic schematic for how to hook up the Atmega chip in to a simple circuit would be ideal.


see above, Hackduino or the duemilanove schematic
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Jun 29, 2010, 06:50 am
Thank you Again. That instructable is perfect. I will draw up a schematic tomorrow.
Title: Re: Simple 10 - 12 LED Display
Post by: jluciani on Jun 29, 2010, 01:56 pm
The specification for the crystal depends on the input voltage.
For a 5V system most people use a 16MHz. For my 12V boards I use
12MHz. The ATmel specification recommends loading capacitance
of 22pF or less.

The 9V battery can power a 5V system but it is not very efficient.
Most systems use a linear regulator which wastes 4/9 of the capacity.

I make a low-cost ($12) Arduino compatible board (PICO1TR) and a matching
LED matrix. You can check out the schematics which are in the datasheets.
I "charlie-plex" the LEDs which minimizes the number of lines required.
For 10 LEDs you would only need 4 lines.
See the datasheets at http://wiblocks.luciani.org/PICO/PICO1TR-index.html
and http://wiblocks.luciani.org/PICO/PICO1TR-LED-L-index.html

(* jcl *)
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Sep 13, 2010, 12:08 am
Okay, i think i know what i am doing. a few more questions though.
Is the pin configuration on The Atmega 168 the same as the 328?
The price of the 168 is cheaper then the 328, will the 168 work if i plug it in to my Duemilanove board? Do
I need a voltage regulator if i run 4.5volts from a pack of 3 AA batteries?
I have attached a Schematic of what i think will work. does any one see a problem with it?

Thank you for all the help

http://sites.google.com/a/theprojectinventory.com/envertech/_/rsrc/1284329142030/enver-creek-engineering/engineering-level-2/arduino/arduino-4/light%20display.jpg
Title: Re: Simple 10 - 12 LED Display
Post by: Osgeld on Sep 13, 2010, 12:26 am
Quote
Is the pin configuration on The Atmega 168 the same as the 328?


yes

Quote
The price of the 168 is cheaper then the 328


usually the same. the 168 might be nominally cheaper

Quote
will the 168 work if i plug it in to my Duemilanove board


yes

Quote
Do I need a voltage regulator if i run 4.5volts from a pack of 3 AA batteries?


no (though that does not leave a lot of wiggle room with discharging batteries and the voltage vs speed ratio)

Quote
I have attached a Schematic of what i think will work. does any one see a problem with it?


not off hand
Title: Re: Simple 10 - 12 LED Display
Post by: mpeuser on Sep 13, 2010, 12:35 am
Quote
does any one see a problem with it?

You should have a ground connection to pin 8..
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Sep 13, 2010, 12:42 am
Okay, I have added the ground off of pin 8. does this look appropriate?

(http://sites.google.com/a/theprojectinventory.com/envertech/enver-creek-engineering/engineering-level-2/arduino/arduino-4/light%20display.jpg?attredirects=0)
Title: Re: Simple 10 - 12 LED Display
Post by: Grumpy_Mike on Sep 13, 2010, 10:42 am
Quote
will the 168 work if i plug it in to my Duemilanove board


Yes but change the board type in the tools menu.
Remember you have to have a boot loader in the chip before you plug it in the board. Chips can either be bought with a boot loader ready loaded otherwise you are going to have to burn one in yourself with a programmer.
Title: Re: Simple 10 - 12 LED Display
Post by: Grumpy_Mike on Sep 13, 2010, 11:48 am
Just been looking at your circuit again.

assuming 1.7V drop across each LED the across the resistor you have 5 - 1.7 = 3.3 volts
across a 220R resistor gives you 15mA per LED.
With 14 LEDs you have a total source current of:-
14 * 15mA = 210mA

Now the absolute limit for the current taken along the arduino supply pins is 200mA. Given it takes about 20mA to power the chip you are 30mA over the current where damage would be done.
So best bet is just to up the resistors a tad say to 270R.
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Sep 13, 2010, 05:44 pm
Easy enough fix.

Thank you
Title: Re: Simple 10 - 12 LED Display
Post by: mpeuser on Sep 14, 2010, 03:47 pm
Or just have some green LEDs among them ...
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Sep 18, 2010, 05:04 pm
Okay, I put the circuit together this week with no luck. Can any one see a problem with this schematic? (http://sites.google.com/a/theprojectinventory.com/envertech/_/rsrc/1284822107257/enver-creek-engineering/engineering-level-2/arduino/arduino-4/Circut.bmp.jpg)

All of your help is greatly appreciated!
Title: Re: Simple 10 - 12 LED Display
Post by: jluciani on Sep 18, 2010, 05:40 pm
Pins 22 should be connected to gnd.
There is no junction for the Vcc connection.
It may not be a good idea to connect AREF to Vcc since the reference
can be programmed to a voltage other than Vcc.  I would
just put a 0.1uF decoupling cap on the pin.
I would change the 1K reset pull-up to 10K.

I also like to add a couple of things --
protection diode for the reset pin and ADC filtering.
For a schematic see the datasheet at
http://wiblocks.luciani.org/PICO/PICO1TRC-index.html

(* jcl *)

http://www.wiblocks.com
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Sep 18, 2010, 05:58 pm
okay, i made those changes. i am a little confused about the AREF capacitor, is this what you mean?  i also added the 9Volt battery clip, makes laying out the board easier. (http://sites.google.com/a/theprojectinventory.com/envertech/_/rsrc/1284825287003/enver-creek-engineering/engineering-level-2/arduino/arduino-4/1%20Schematic%20-%20CUsersBurroughsDocumentseaglearduino%20lightsArduino%20light%20display.sch%20-%20EAGLE%205.10.0%20Light%2018092010%2085331%20AM.bmp.jpg)
Title: Re: Simple 10 - 12 LED Display
Post by: jluciani on Sep 18, 2010, 06:23 pm
The AREF cap goes from AREF to GND (not VCC).

A couple of style suggestions --

Since crossing wires are not necessarily connected it is
a good idea to only have three lines connected at one point
(versus the cross you have for Vcc). When you are checking
your schematic it is easier to find omissions.

Use the GND and Vcc symbol more. This eliminates
a lot of wires and makes the schematic more readable.
I would use the GND symbol for C2, C3 and ground on IC1.

I am not sure why you have all the unnecessary junctions in this
schematic versus your original. I would eliminate them.

(* jcl *)

http://www.wiblocks.com
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Sep 18, 2010, 07:23 pm
sorry about the clutter, I am using eagle to route the board and if i don't put those junctions in it doesn't seem to make the connections. Okay, i fixed the Aref to ground and cleaned it up. (http://sites.google.com/a/theprojectinventory.com/envertech/_/rsrc/1284830447031/enver-creek-engineering/engineering-level-2/arduino/arduino-4/1%20Schematic%20-%20CUsersBurroughsDocumentseaglearduino%20lightsArduino%20light%20display.sch%20-%20EAGLE%205.10.0%20Light%2018092010%20101919%20AM.bmp.jpg)
Title: Re: Simple 10 - 12 LED Display
Post by: jluciani on Sep 18, 2010, 07:55 pm
Looks much better.

You may want to ask a separate question about Eagle and junctions.

(* jcl *)
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Sep 18, 2010, 08:09 pm
thank you, I think i have it now. Here is an image of the circuit board. I know the leads are a little close together, but i am trying to keep things simple for my students. The thicker leads tend to have less troubles after the etching tank. (http://sites.google.com/a/theprojectinventory.com/envertech/_/rsrc/1284833334875/enver-creek-engineering/engineering-level-2/arduino/arduino-4/2%20Board%20-%20CUsersBurroughsDocumentseaglearduino%20lightsArduino%20light%20display.brd%20-%20EAGLE%205.10.0%20Light%2018092010%20110441%20AM.bmp.jpg)
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Jan 14, 2011, 05:11 am
feel kinda bad for not posting my finished results. I had to remove two LEDs from the board, just couldn't get them working. But my students were very excited about doing it with 12 LED. We made 10 of them and they all worked well.

Attached is my finished Eagle file. feel free to use it. If any one comes up with some simple mods let me know. I do not want to get to complicated, this is my introduction to electronics project.
Board:
https://sites.google.com/a/theprojectinventory.com/envertech/enver-creek-engineering/scamatics/Arduinolightdisplay.brd?attredirects=0&d=1
Schematic
https://sites.google.com/a/theprojectinventory.com/envertech/enver-creek-engineering/scamatics/Arduinolightdisplay.sch?attredirects=0&d=1
Title: Re: Simple 10 - 12 LED Display
Post by: graymalkin on Jan 15, 2011, 02:13 am
Should you do this again, things would have been far cheaper with an 8 pin ATtiny and a shift register with 8 LEDs, setting them isn't hard with one SR, the parts are more easily (and cheaply) replaced.. Etc

Depending on the final use (driving 2 motors on a robot based on two inputs, for example) the ATTinys are ideal, and they can be programmed by an Arduino, ref ArduinoICSP. Code could even be written in the arduino IDE (with some tinkering).

That said many props for using Arduino in general, more people need to be making things involving micro controllers, if nothing else it creates a sense of appreciation for how advanced computers truly are.
Title: Re: Simple 10 - 12 LED Display
Post by: nobikes on Jan 15, 2011, 07:16 am
The Attiny sounds interesting especially if it can cut down on cost. We are doing a line following robot with arduino as well so the course cost a fare bit of money for the students.

Is there a good thread on using the Attiny on an Arduino Duemilanove? I am very interested in checking it out?