3

I'm talking about this tutorial "Serial to Parallel Shifting-Out with a 74HC595" from the official Arduino website. It provides the following schematic:

maybe wrong version

I've read a couple of times now, that the placement of the capacitor is wrong:

This is a well known shit tutorial which for some unknown reason they refuse to fix. That capacitor should be connected between the Vcc pin and ground, NOT the latch pin.

Source: forum.arduino cc/index.php?topic=408135.0

They recommend this placement:

maybe better version

Who's right? Please explain where to place the capacitor. Can the arduino even be damaged?

  • My low reputation score doesn't allow me to put the URLs as links. Maybe someone with a higher reputation can edit and fix it. :-) – Liam Jun 22 '17 at 23:50
  • Alright, links are working now. Thank you, editors :-) – Liam Jun 25 '17 at 13:51
2

That tutorial, as with a number on the Arduino site, is wrong.

Yes, the capacitor should be across Vcc/GND - it is a decoupling capacitor used to absorb the current surges when you turn LEDs on and off.

Not to mention that with that circuit if you turn on all the LEDs you are overloading the 74HC595. That has a maximum 70mA through Vcc/GND pins. Each LED there (assuming red LEDs at 2V forward voltage) will be drawing about 13.6mA. 8 LEDs would be 8*13.6 = 109mA.

Ouch.

The problem with many of the Arduino tutorials is they were written in the early days of Arduino when they didn't have much knowledge and experience. Since then the arduinosphere has grown and there are people now with far more knowledge and experience than Arduino had at the time the tutorials were written. We come here.

  • The Arduino team is actually remarkably receptive to corrections/improvements to the documentation. If a small fraction of the time people have spent complaining about this issue had been used to instead submit an issue report to github.com/arduino/Arduino/issues it would have been fixed long ago. – per1234 Jun 24 '17 at 4:02
  • @per1234 Unfortunately, they said the opposite thing in the posts of the linked Arduino forum thread... It seems to have been reported numerous times and no correction has taken place. :-( – Liam Jun 25 '17 at 13:51
  • They emailed it to the Arduino "webmaster" email address which is a complete waste of time. And no, the Arduino team don't read the forum. Those guys have been around years longer than me so they should know how things work. I've explained this to them in a different thread where that tutorial was brought up but still nobody bothered to open an issue. I guess they just like to complain. I'd report it myself (and I have done so with many other issues) but I only report things that I can personally verify. – per1234 Jun 25 '17 at 17:52
  • 1
    @per1234 Fair point. I found a TI datasheet which backs the opinions of this SO post and the forum posts, so I opened a new issue: github.com/arduino/Arduino/issues/6433 Thanks :-) – Liam Jun 27 '17 at 21:48
1

You can figure out the impedance of that capacitor for high frequency signal....

What they have there is really a low pass filter.

Terrible ideal to out that big of a capacitor there.

  • Are you talking about the capacitor connected to the latch pin? – Liam Jun 23 '17 at 1:16
  • Liam, of course is @dannyf talking about the capacitor to the latch pin. A capacitor to a digital output pin is not normal, it's really bad, it's worse, it's a terrible idea, it's super extraordinary terrible, it's... (you get the idea). – Jot Jun 23 '17 at 5:31
  • 1
    Liam, I'm reading the last post on the Arduino forum with the link you gave. Grumpy_Mike says it's stupid and can damage the Arduino outputs. I totally agree with that. The latchPin is a digital output from the microcontroller and any capacitor to that pin (even the smallest capacitor) is really bad and indicates a design flaw. – Jot Jun 23 '17 at 5:40
1

You do not need a capacitor to use the 74HC595 in conjunction with shiftOut(). I found this YouTube video to be very useful in explaining how to wire up and code the shift-register for a 7-segment display.

1

Indeed, it seems like the Arduino tutorial is wrong. I just found the following schematic in Datasheet SN74HC595 - Texas Instruments from 10.2 Typical Application, Figure 5:

Typical Application schematic TI datasheet

The capacitor connects VCC to GND. Nothing to do with the latch pin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.