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

PCB Contest

Participated in the
PCB Contest

Be the First to Share


    • Pets Challenge

      Pets Challenge
    • Build a Tool Contest

      Build a Tool Contest
    • Make It Modular: Student Design Challenge

      Make It Modular: Student Design Challenge



    3 years ago

    Ohhh. I forgot to tell about the cover. I've done lots of covers with many different approaches during them decades, and have came to this solution that have showed for me to be the "best" what it becomes to the look.
    I just print the face on a "sticker paper", that is it has the glue surface on the back. Then use a wery usual transparent film for e.g. for to cover your school books, (availeably in ewery bookstrore the world around). They come out in differrently outlets. Of course after that you have "punch" them holes for eg. leds. If you want the cover to be "kind" of a waterproof, (them leds concidered here), do the punching before applying the transparent film and them LEDS will be under the transparent film. More about this concept: make a contact: kimmo.selin@pp.inet.fi


    3 years ago

    Happy New Year to you!

    As you were confused about the purpose of my Varmint Detector instructable, I was equally confused about the point of yours. I think some of the confusion is due to the translation to English. The first two times I looked at your project I didn’t make it past the first few paragraphs (like you with mine, I just lost interest.) I kept coming back to it because I’ve designed several boards that use the ATtiny84A and 85.

    Things I found confusing:

    - why you would use an ATtiny84A if you needed so many I/O pins? Why not use a different mcu such as the common ATmega328p? An ATmega328p doesn’t cost much more and if you really didn’t care about timing accuracy you could even use the internal resonator and eliminate the need for an external crystal.

    - how do you download code onto your board? I didn’t see something that looked like an ICSP connector.

    - why use an 74HC595 when you’re essentially implementing a bus expander? (or is that your point?) A bus expander such as the common I2C controlled PCF7584 would be easy to add, only taking two pins on the ATtiny. You can hang several of these off of the I2C bus and they even make a 16bit version which is handy for creating keypads. Both versions have an interrupt line so the ATtiny doesn’t have to poll to see if something has changed. (and they make DIP versions of these chips too)

    - I also noticed that you don’t consistently use decoupling capacitors. Is that because the PCB traces you use are so wide you don’t need them?

    I really like the ATtiny84A though. If you have never played with sleep and the other interrupts you should check them out. They’re quite useful for battery powered devices. For example I use pin change interrupts to implement the remote control for the Varmint Detector. The ATtiny only wakes up when someone presses a button. You can debounce the buttons in software pretty easily, no extra hardware needed (you don’t even need pull up resistors.)

    Off topic: How did you print the cover of your project?, it looks really professional.