The 74HC595 and 0.1uf Capacitor

What is the 0.1uf Capacitor for?
Do you need one? Or in my case 9?

Did you notice the 512 3mm Diffused Blue LEDs in the background? :slight_smile:

Yes, you should have a 0.1uF from each part's VCC pin to ground.
This helps with damping switching noise on signal lines, and also acts as source of localized current as the logic within the chip switches.

I'm not seeign 3mm LEDs clearly in the picture.

CrossRoads:
Yes, you should have a 0.1uF from each part's VCC pin to ground.
This helps with damping switching noise on signal lines, and also acts as source of localized current as the logic within the chip switches.

I'm not seeign 3mm LEDs clearly in the picture.

The shiftOut tutorial has the Cap on the ST_CP to GND. Should it be there or Vcc to GND?

Vcc to Gnd.
Putting a cap across a clock signal will just screw up that signal.

The tutorial is wrong, we have been trying to get it changed for years.

A few days ago somebody told me that the ShiftOut tutorial has the capacitor problem.
This could be one reason why I had problems in my last project where I used shift registers.

Also some pins of the Circuit Diagram are at the wrong position.
And I miss an important note:
Each output pin allows 35mA, but the current amount of all pins together has a maximum of 70mA. Very important!!
Additonally it would be useful to have a "See also" section, e.g. with links to similar ICs which are usable for higher currents.

Who is the administrator? Who can we ask for an update?
An other solution would be to create a copy in the wiki. There everybody can improve it.
I'm active in the Ogre 3D (game engine) community. There we have good experience with tutorials in the wiki. Several people made useful edits. For the Arduino tutorials we could go the same way.
My suggestion:
Create a copy of all tutorials in the wiki. And at the "old tutorial URLs" add a link or auto forwarding to the related wiki pages.

"My suggestion:
Create a copy of all tutorials in the wiki. And at the "old tutorial URLs" add a link or auto forwarding to the related wiki pages."

I like that idea! Then we're not dependent on only the 5 founders to make the updates.

I like the idea too but beginners will often go to that page as they see it as official, so ideally we will need a link off that page.

I was once able to get an error in the LiquidCrystal tutorial corrected. It was a simple editing error that slipped in during a wholesale update of the tutorials but it took several private messages to one of the '5' to even get an admission that the code in the tutorial bore no relation to the topic. Once I got that point across he was very receptive to my suggested changes.

A lot of the website needs some selective trimming to remove obsolete and incorrect information. As I have said elsewhere Arduino tutorials are like the 'Roach Motel', articles go in but they never come out.

Don

Also some pins of the Circuit Diagram are at the wrong position.

My perception may be outdated but as I learned (and taught) there is a difference between a schematic diagram, a wiring diagram, and a lot of the diagrams we see around here now. In a true circuit diagram the pins should be positioned to make the signal flow as straightforward as possible. In a wiring diagram the pins should be positioned as they are on the actual device. Most of the diagrams on the Arduino website are a bastardized combination of these two techniques as are the so called schematic diagrams produced by Eagle software.

Don

Thanks floresta,
I didn't know this.
For me it was a little bit confusing and I think newcomers could use the wrong pins, because of this picture.
Now I understand the general sense of different pin positions.

Is there a link to an updated ShiftOut tutorial?

No, most of it is fine just ignore the capacitor on the latch line bit and put it from the power pin to the ground.

I agree with Don... "real" schematics need to be the goal as they are the common language of Electronics Engineers.

Here is my analogy for the day:
While I understand that it might be easier to hand a newcomer a paint by numbers using a wiring diagram... if they are really serious... they should learn how to paint the way the experts do.

Only a little extra time is needed to understand true schematics. Honest, it's not hard and it helps overcome the fear of data sheets that seems so prevalent.

Here is an idea... never take a design seriously until you download data sheets for the parts used.

http://www.datasheetcatalog.com/ can help. Nowhere in the data sheet do they that say you should add passive parts to the "signal" lines on the 74x595

Nowhere in the data sheet do they that say you should add passive parts to the "signal" lines on the 74x595

No but in the ATmega data sheet it says absolute maximum output current should not be allowed to exceed 40mA. An uncharged capacitor looks like a short circuit and so you are feeding an output into nothing. From my tests with LEDs you can get at least 250mA peak current from an output pin so you are causing damage to your arduino using this capacitor.

The reason why it appeared to work was that the capacitor was providing some much needed power supply decoupling, parasitically through the signal leads. This again is not a good thing to do to a chip.

I have been having good luck without the capacitors, only because my current-limiting resistors are relatively big, like 300ohm. In case you need brighter LEDs with more currents, use a chip that is rated for that kind of work. the 595 is more or less for signals but not for powering high-current loads. I vaguely remember 20mA as maximal per channel. BTW, 0.1uF caps are very cheap. Got a bag of 0.1uF 50V caps from dipmicro.com for around $10. That's what I did with 0.1uF and 22pF caps :slight_smile:

Also, make sure you have enough delay between shifting data and toggling storage register, according to spec sheet, since you have 9 of them. If you don't consider this aspect, your last few lights will not work regardless what you want them to do, since your toggle arrives before the data.

Thanks for that last tip liudr. That was something I'd not even thought about!

You are welcome. Somebody else made this mistake (referring to toggling the storage pin too soon after shifting out a long result for like 8 595's in series) a while ago so this is now a part of the forum's accumulated wisdom.