So, the next requirement is to be able to programme the chip on the arduino diecimila board, then remove that chip, and place it on a breadboard that will be battery-powered and sit on the mount itself. The chip will receive instructions over bluetooth and then process them (eg turn the Altitude stepper motor 100 steps clockwise etc).
This means that I have to provide the minimum number of components necessary to support the arduino chip – an ATmega 168. For example, the chip needs regular power at 5 volts and it needs a way of measuring time (basically) which is provided by a 16 Mhz crystal. This ‘clock’ determines who quickly each instruction by the chip is undertaking, and sets the time intervals on the chip. So, if the chip’s instructions are to ‘delay 1000 milliseconds’ that is only a true second if the chip is wired to a 16 mhz crystal. A 20 mhz crystal will give you less than a 1 second delay.
Different timer / crystal
I should explain at this stage that I am considering using a different ‘timer’ (ie a different crystal), the reason for this is that the communication between the laptop and the chip (which is serial communication over bluetooth) works better at specific rates. In short, it is communicating at a certain rate (9600 bits per second) this means (I think) that the bits are transmitted at a certain ‘beat’ and therefore the chip which is receiving those bits needs to operate in synch with that beat. Therefore, the speed of the chip (which is determined by the ‘clock’ – ie the crystal) can be important.
Basically, 16 mhz (which is the usual arduino clock time) is OK but 14.7456 Mhz is better.
There are a few discussions of this out there. But I found this baudrate calculator by Rob Reilink very helpful.
There’s also a bit of discussion about arduino’s and the in-built 8mhz clock on the chip itself here.
So, after that intro, now it’s time to get some instructions on how to wire everything up, and then find the parts here in the UK.
Wiring instructions
The instructions for wiring are set out in detail (and they’re pretty straightforward) by Tom Igoe here.
There is also a different version here.
I followed TI’s tutorial, but the uC Hobby one also gives good background.
As I said, it wasn’t difficult to do. But the trickier bit was getting the parts.
The Parts
The 3 outlets I found for these parts were: Maplins, Rapid Electronics, and Digikey.
Digikey was my first choice because TI (who should have some sort of arduino medal of honour!) has provided a parts list with all the Digikey references. The only trick is that this is for the old ATMega8 chip that the Arduino used to ship with, and not the ATmega168 which the Arduino Diecimilla et al use.
I should also point out that there are two different ‘arduino on a breadboard’ configurations:
first, the easy one: here you use a chip that has the arduino ‘bootloader’ already on it. So it’s not a completely blank chip it has been ‘formatted’ with code by the arduino supplier. This means that you can program and re-program that chip on the arduino diecimilla, then remove it and put it on a breadboard. But you can only do the programming on the arduino diecimilla if you have a chip with the bootloader already on it. If you use a completely blank chip then you need to find a way of putting the ‘bootloader’ onto the chip first.
second, the difficulty way: this is where you can load onto a completely blank chip the bootloader programme first, then put the chip into the aruduino, programme it as per normal, and then remove it and put it back on the breadboard. I will (attempt) to do this in due course but for the time being I’m only interested in the ‘easy one’.
That bit is important, though, because it affects the parts list. I have listed below the components that I think are strictly necessary for route 1 – to be able to use a chip (which already has the bootloader on it) that has been programmed in the arduino diecimilla on a breadboard.
the easy method – components
So, for the easy configuration you need the following from TI’s part list:
2 x 08-00466 22PF 2.5MM PITCH CERAMIC CAPACITOR RC Avail £0.006
1 x 78-11507 SQUARE BUTTON 6X6MM TACT SWITCH (RC) Avail £0.12
1 x 90-108212 16.00MHZ HC49/S CRYSTAL +-20PPM (RC) Avail £0.20
1 x 11-293014 10UF 50V LOW IMPEDANCE ELECTROLYT CAP RC Avail £0.04
1 x 11-151816 5MM MICROMIN. 1UF 50V ELECTROLYTIC (RC) Avail £0.04
1 x 47-331318 7805 REGULATOR TO-220 (TRU) RC Avail £0.25
+ the resistors, which i had already.
I think I have the part quantities correct, but in any event I purchased about 10 of each.
That’s it (ie the minimum necessary) I think – however, I also purchased the following to try and do the trickier ‘bootloader’ programming if necessary later.
the tricky method – components
73-42761 ATMEGA168-20PU 8-BIT MICRO 16K DIL-28 RC Avail £2.20
73-426611 AVRISP2 IN-SYSTEM PROGRAMMER MK2 RC Avail £22.50
Another crystal
For the reasons above, I also purchased a different 14.7456 mhz crystal in case i wanted to try it later.
90-039019 14.7456MHZ HC-49/US (RC) Avail £0.20
Total order
Just for info, i have listed below my full order. you can see that i purchased a couple of alternative versions of the same things above. i’ve listed it here in part for my own sake – in case i need to remember which particular parts i actually got. you can also work out the quantity from the total at the end of each line.
so, the full list:
73-42761 ATMEGA168-20PU 8-BIT MICRO 16K DIL-28 RC Avail £2.20 = £11.00
08-00466 22PF 2.5MM PITCH CERAMIC CAPACITOR RC Avail £0.006 = £0.12
78-11507 SQUARE BUTTON 6X6MM TACT SWITCH (RC) Avail £0.12 = £0.12
78-06238 TACT SWIT 6X6MM HEIGHT 7.3MM SQ 2.4MM RC Avail £0.12 = £0.12
78-11369 SQUARE BUTTON SMD TACTILE SWITCH (RC) Avail £0.12 = £0.12
78-116710 TACT SWITCH 6X6MM SQ 160GF SMT(RC) Avail £0.12 = £0.12
73-426611 AVRISP2 IN-SYSTEM PROGRAMMER MK2 RC Avail £22.50 = £22.50
90-108212 16.00MHZ HC49/S CRYSTAL +-20PPM (RC) Avail £0.20 = £1.00
90-037013 16.0MHZ HC-49/S L/P CRYSTAL (RC) Avail £0.20 = £1.00
11-293014 10UF 50V LOW IMPEDANCE ELECTROLYT CAP RC Avail £0.04 = £0.20
11-155415 50V 10UF NRSZ 105DEG LONG LIFE CAP(RC) Avail £0.08 = £0.40
11-151816 5MM MICROMIN. 1UF 50V ELECTROLYTIC (RC) Avail £0.04 = £0.20
08-092517 22PF NPO DIELECT.CERAMIC CAP. (RC) Avail £0.07 = £0.70
47-331318 7805 REGULATOR TO-220 (TRU) RC Avail £0.25 = £1.50
90-039019 14.7456MHZ HC-49/US (RC) Avail £0.20 = £2.00
63-232420 220R 0.25W CARBON COMP RESISTOR RC Avail £0.17 = £1.70
63-232621 470R 0.25W CARBON COMP RESISTOR RC Avail £0.17 = £1.70
63-234422 10K 0.25W CARBON COMP RESISTOR RC Avail £0.17 = £1.70
63-233123 1K 0.25W CARBON COMP RESISTOR RC Avail £0.17 = £0.85
As they arrived…
Other distributors
As part of my research, I also found the following parts at Maplins that others may wish to use instead. I did all this research before I came across TI’s standalone parts list, so i’m not 100% sure that they are precisely the correct parts. However, just for somebody somewhere, here they are
Maplin parts
1 x 7805 Voltage regulator
150mA Ultra Low Dropout Positive Voltage Regulator
TS2950CT-5.0
Maplins: N69CA
£0.78
or
1A Positive Fixed Voltage Regulators
TS7805CZ
Maplins: QL31J
£0.63
1 x 10uF Capacitor
Maplins: AT98G
GenElect
10uF 16V
£0.16
1 x 1uF Capacitor
Maplins: VH16S
PC Elect
1uF 100V
£0.11
2 x 22 pF capacitors:
Metallised Ceramic Plate Capacitors,
Ceramic 22
Maplins: WX48C
£0.11
1 x 16Mhz crystal
General Purpose Crystals in U4 Style Case
Maplins: RR89W
Crystal 16MHz U4
Push Buttons x 4
One of these:
Switch 105 KR88V £0.89
Switch 105A KR89W £0.89
Switch 105B KR90X £0.89
Switch 105T KR91Y £0.89
1 x Breadboard
Silver-Plated Plugblock Type RH-32S
FD32K
£10.67
Enough.
T.
post a comment...
you must be logged in to post a comment.