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 Loading...
and Loading...
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?
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.
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.
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.
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.
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.
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.
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.
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.
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.
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?