Schematic finally finished - A few questions.....

As far as I could make out, and according to Philba’s post I only need the decouple the pins if I am using an analogue input…

Am i wrong?

Whether or not you use the ADC is irrelevant, you should always decouple each supply pin. Did you look at any of the references I gave you?

Leon

I looked at the references…

I think the 10uf capacitor connected to GND and +5v is intended to be the decoupling capacitor, are you saying I need another one or is this one in the wrong place?

Sorry to sound so thick, just want to make sure everything is 100% before I go ahead and make the board…

No, you also need a smaller capacitor (I use 100nF) for each supply pin. They should be as close to the pins as possible, with wide tracks.

Leon

Just for reference - the reason you need both is because the 0.1uf cap has a much smaller ESL [equivalent series inductance], than the larger cap. A smaller ESL means that the cap can provide power more quickly. [This is a bit of a simplification, but it will suffice.]

Cheers,

–David Carne

On decoupling - here’s an exercise you might find highly informative on decoupling capacitors.

Make a simple 555 timer astable multivibrator, running at perhaps 30-odd kHz. Have something drawing significant current driven off the output. A simple buck converter circuit (i.e. a small power transistor, inductor, diode, capacitor) will do the job well for this demonstration.

Connect an oscilloscope to the 555’s output and look at the wave form.

Then start adding decoupling capacitors and watch what happens to the wave form as you put more capacitors across Vcc to gnd - particularly the edges, when the output goes from low to high or high to low.

Then swap the array of small capacitors in parallel with one larger capacitor of the same value - compare the waveform when using one big capacitor compared to lots of smaller ones in parallel.

While you may be able to get away without decoupling capacitors for many circuits, this demo shows why it’s probably not a good idea even if you can get away with it.

Right, so if I add decoupling caps to both pin 7 (VCC) pin 20 (AVCC) and 21 (AREF) that should do it?

Managed to find these, would the 0.1uf 50v version of that do that job?

http://www.maplin.co.uk/module.aspx?Mod … &doy=31m10

the pads all have large drill holes in them, is there a way to make them solid so when I drill them out it won’t take the pad with it?

Look in your ulp folder, for a ulp named ‘drill-aid.’ Run that when your board is finished, and it will shrink the holes down.

konguk:
Managed to find these, would the 0.1uf 50v version of that do that job?

http://www.maplin.co.uk/module.aspx?Mod … &doy=31m10

I wouldn’t use those, look for monolithic ceramic capacitors. Farnell, RS and Rapid Electronics sell them.

Leon

No problems, I can grab some of them from my local electronics shop…

Exactly which pins should I be putting these decoupling capacitors on? Just every pin that has power going to it?

Should i also connect these pins to +5v?

leon_heller:
I wouldn’t use those, look for monolithic ceramic capacitors. Farnell, RS and Rapid Electronics sell them.

Well, apart from Maplin being fantastically expensive, what’s wrong with 0.1uF ceramic discs as decoupling capacitors? Monolithic ceramic seems to max out at 1nF. I’ve been using 0.1uF ceramic discs for all my pin-though-hole boards. Admittedly, these are relatively low speed circuits, clocked at maybe just a few MHz. But most reference schematics I’ve seen for various ICs show one or more 0.1uF decoupling capacitors.

Do the monolithic ones have spectacularly good characteristics with regard to ESL and ESR compared to plain 'ol ceramic discs?

I can get hold of some monolithic capacitors today…

Still unsure of how and where I am meant to be connecting them though, could someone let me know?

They have better characteristics - look at the specifications.

Just connect them between the supply pins and ground pins, with short tracks.

Leon

I realise this may sound like a daft question but when you say supply pins, do you mean any pin that has +5v going to it?

sorry to sound so thick but i’m having an off day :slight_smile:

Also, if I am using the decoupling capacitors do I need the 10uf cap in the circuit anymore??

Supply pins are usually identified by Vcc or Vdd, you need to check the data sheet. You don’t need to decouple pins that are just tied high.

You need the 10uF.

Leon

right, got that…

i tried to get some monolithic caps today but they didn’t have any in stock :frowning: going to have to order some from farnell…

Could I use ceramic disc caps as a temporary measure just to get my prototype up and running?

I realise that these aren’t the best solution but would they work?

btw thanks for all the help so far!

It’ll probably work without them. I often leave them off until I’ve checked that the board works. The disk ceramics should be OK, it’s just that no-one uses them these days with better devices available.

Leon

Thanks for that, i’ll leave them off for now just for testing purposes…

I’m going to autoroute quite a large prototype board in Eagle so I can get a feel for where everything needs to go…

Another question that’s not that important but though i’d ask it anyway - the external crystal is being used as opposed to the internal timing function of the atmega8 - why is this needed? Is the external crystal a higher Mhz or more stable signal than the atmega will allow?

I’m only asking as a possible way to eliminate the external crystal from the circuit

You only need the external crystal if you need accurate timing. A serial interface needs one, for instance.

Leon