Introduction: UNIVERSAL PCB FOR ATtiny-84

This Instr. is one of my own projects to make a UNIVERSAL PCB-SETUP for the Attiny –84 only, (the one in ATMEGA family with 14-pin/ 12 I/O’s).

I have tryed to develope it as flexible- and multipurposal unit as possible, for my own needs.

I’ve broken it down to 3 specific sections: TOP, MAIN and BOT, with each on separate PCB.

Them electrical schemas have a extention of *.ISS or the expression *ISS in it’s name, (the *ISS comes from my PCB-program CADPAK, that creates them files with that ext.).

I’ll attach all of them files hereby, the electrical schema; them gerber files for them PCB’s etc. I got them PCB’s from my manufacturor I-Tead, wery happy with their products (have had many orders from them, Im NOT promoted by them). Iif you are going to use them PCB’s hereby, please contact me to get them corrected details from kimmo.selin@pp.inet.fi

In my instr. here I use a ”proto” product with the name of ”GULL”, (the bird often seen in harbours, specially with them having them fishing boats near by, wasteland places etc.).
The idea here is to have a ”PIR” sensor, (Passive Infra Red- AKA motion sensor, to sence them ”gulls” and then play a certain ”LOUD” noice, via the sound-IC ISD2590 via the TDA amplifer to the loudspeaker to scare them Gulls away?. Not tested yet, (that is: with them ”gulls”), but with AUDIO yes, works ni…..ce. The ”scare-away” sound could be any of your choise to be used, (download any sound from your PC to the ISD25xx core.

Step 1: The Usage of the Pins

With the Attiny 84 I have 12 I/O pins for my usage now.
I substract the reset pin so, now I have 11 pins left for my usage. In my solution I use 2 data gateways, from the MAIN-board with the ATtiny using 3 pins each for them 2 gateways for the 74HC595 SIPO’s, dedicated in the setup: DATA; CLOCK and LATCH, (strobe, enable, sce… why do they use so many different names for the one and same thing?)

1.) Gateway 1 to the Top, for them switches and led's, this takes 3 lines of the ATtiny

2.) Gateway 2 to the Audio ISD25xx and to the Bot, this takes 3 lines of the ATtiny

So far 6 pins used, 5 left?? OK. For ”Top” and ”Bot” I use as a ”return path's” called RET1 and RET2 .

These are the inputs for the multiplexed info, (via them diods, see schema). Now 3 pins left!! 2 of these I use here for them inputs PIR1 and PIR2, (could be just any kind of input with a logical level).

The remaining 1 I use to Analog ”IN” , the potentiometer from the ”Top”.

Out of pins now, except for the reset, that ”could” be allso used as a I/O.

Step 2: Multiplex Them "outputs" to Get Them to Be "inputs"

Why do I call them all the time for I/O’s, thus the ”595” is a OUTPUT ONLY?
Tadaa…. I use a multiplexing of them outputs for some, and read them as RET1, and RET2 signals, respectievely, (refer to the schema). I’ll run this on a ”bit level” not on ”byte” level. e.g. I do:

new_swb = 0 ; // Clear the whole register

scan_swb = 0 ; // Clear the whole register

bitWrite (scan_swb,0,1); // ”Maskbit”, BIT=0 LSB

for (int cl=0; cl<8;cl++) { ; // Loop

digitalWrite (latch_1, LOW); // "Just for to be sure"

shiftOut (data_1,clock_1,MSBFIRST,scan_swb) ; // The function shiftOut(clockPin,MSBFIRST,register)

// is allready in the command liberary, you may name the clockPin to be whatsoewer

// There's allso the alternative LSBFIRST, I recommend you not to use that, because 99,9% of programs use the MSBFIRST function

//----------- LATCH ------------------------------

digitalWrite (latch_1, HIGH); //

digitalWrite (latch_1, LOW); //

//------------- Read the Data ---------------------------------

scan_swb = scan_swb <<1 ; // ”Mask” the next BIT1 to be active

data_ret1 = digitalRead (return_1);

if (data_ret1 == HIGH ) { // Actice BIT is "ON"

bitWrite (new_swb,0,1); // The new_swb is the register

}else{ // to hold the data temporary

bitWrite (new_swb,0,0);} //

new_swb = new_swb <<1 ; // Prepare next bit to hold

} data_swb = new_swb ; // The data_swb is now the actual data

// in the program you are running

MARK!: them bits are now in a order => LSB (bit7) to MSB (bit0) in the register, (no problems there as long as you keep that in your mind).

Make the 7 loop. Now you got them all 8 bits in a ”hold register” data_swb, actually it makes 7 iterations because the first bit (0) is allready "set" at the start.

Step 3: Usage of the ULN2803 Driver

To have them ”595” as outputs, some targets do need some more ”current”, therefore
I use them ULN2803 drivers, (the data says: up to 300mA) So now it’s time to start work on the bases of that data in the data_swb register. The same goes allso for the BOT, there I allso get a multiplexed input with: RET2

Sum Sumarum In my example of the ”Gull”, I’m NOT explaining the function of the unit, but rather giving you hints of how you can approach the benefits of using them 74HC595 SIPO, serial IN paralllel OUT, in a way to apply it to your own systems

In my example I use on the MAIN board a Voice recording IC ISD2590, but you can replace the one with your own design. Yet, the TOP and BOT can be used ”as is” in many other apps.

Attached them Gerber files for the PCB’s, (you may use them as you like, no claim’s here):

G_TOP.zip G_BOT.zip G_MAIN.zip

I don’t know if you have any use of them without having a program running it? I just hope you got some ”hint’s” for your own purposes anyway 

If you wish, i’ll send you the whole program allso, but the comment’s are in finnish

Gee…. ,again, there’s so much more to tell about this built. You can feel free to contact me with questions for more details: kimmo.selin@pp.inet.fi or go to my web www.teksel.net and get some more info about me 

Step 4: Them PCB's

You rather open them ZIP-files with some PCB-wiewer like GC-Prevue, wich is free.

Anyway, here they are