Which capacitor

Hi Guys,

I made a copy of Kevin Darrah's manual input to shift registers. My L.E.D's are jumping all over the place when I give the 74HC595B1 manual input. I tried putting a capacitor over the switches (in an attempt to cancel the bouncing) but now it is even worse.

My question is this: How would I calculate which capacitor is needed to prevent this bouncing of the L.E.D's. Google has too many conflicting formulas. I am familiar with the series and parallel connections of capacitors, but I need some formula for getting the right capacitor for any circuit.

I looked my crystal ball but I can't see what you're actually doing from here...

That is because you are using a crystal ball ... It is clouding your vision ... In a world without crystal balls "asking" normally does the trick ... :slight_smile: ...

I still have no idea what you're doing - where you're putting the capacitors, what values you've tried, how your 'switches' are wired, etc.

Hi Danny, can you post a copy of your circuit diagram and post a copy of your sketch.
http://forum.arduino.cc/index.php/topic,148850.0.html
This link will help you with posting them.

Tom..... :slight_smile:

How would I calculate which capacitor is needed to prevent this bouncing of the L.E.D's

Use the formular Time constant = R x C

Flickering would indicate a loose connection maybe on the latch or clock..

But a 0.1uf cap should be plenty between 5v pin and gnd pin....

Hi Guys,

Sorry for the late reply ... I have included a schematic and a Fritzing file. I have now added a de-bouncing circuit and it works absolutely NOT ... NOTHING ... NADA ...

Please give me some pointers ...

Thank You

Danny

3_shift_registers_manual_input.fzz (28.9 KB)

Try raising the resistors on the HC595 LEDs to 1k, put a 100 nF capacitor across Vcc and ground on each (I am assuming you are using a breadboard) and a 47 µF capacitor across the supply as well.

Hi, Danny, what are you using as your power supply.
Have you measured the voltage at the various switched input pins to check that they are getting 5V when the switch is activated.

Tom... :slight_smile:

Hi,

I am using the power from an Arduino Uno's 5V and GND pins ... I still need to hook it up to be able to work from a 9v (or other) battery ... ( This project is to teach underprivileged school children (and myself of course :blush: ) so it needs to work of a battery ) ...

The other thing I noticed is that when I take an L.E.D (that is lying around) and hold it against the leg of the DATA PIN or the leg of the LATCH PIN (on the actual 74HC595) while pressing their respective buttons (switches) they are very dim, but when I do the same to the LATCH pin, it is brighter ... Don't think it is serious, just thought I'd mention it ...

I will try the 47uF capacitor and changing the resistors on the output to the L.E.D's ...

Thanks to everyone assisting me ... :smiley:

Have a nice day

Danny

ps: O yes, all L.E.D's are 3mm

Hi, I take it that you do not have a multimeter of any sort to measure voltages.
You will need one to help with development of your project.
Even a cheap chinese unit will suffice, a long as it can measure DC/AC , resistance and even test diodes.
The arduino 5V pin will not be able to power those LED's, you will need a separate supply to power the LEDs.

Tom.... :slight_smile:

Of course the LED diameter has nothing to do with the electrical characteristics. XD

My suggestion to put a 100 nF (0.1 µF) capacitor across Vcc and ground on each 74HC595 chip may prove to be the most important one. Digital ICs can oscillate if not correctly bypassed.

The Arduino has a limited capacity to supply current, if the 74HC595 chips managed (though unlikely) to draw sufficient current to exceed this, things definitely would get unreliable.

Start off just trying to get one shift register to work only then try three.
The circuit is some what unconventional although nothing strikes be as wrong.
I agree with Tom, get a meter and measure that the voltage on the actual shift register pins is going up and down as expected, up being greater than 4V and down being less than 0.7V.

O.k Guys,

I made the changes as suggested (see included jpg and Fritzing file ) ...

Is the circuit at least correct? :~

Danny ...

p.s: I disconnected the other two shift registers =( ... And yes ... I'll get a bloody multimeter ... :smiley:

3_shift_registers_manual_input_v2.fzz (28 KB)

What good is a capacitor with a short across it?
The 47uF was supposed to be across the supply.

If the wiring reflects the schematic you have a way to go.

Looks pretty good given that you sort out that glitch about the capacitors drawn with shorts across them.

You probably do not need the capacitor on the "data" pin or the "blank" input as for the first, the level will be stable since you set this before clocking it and if the LEDs flicker due to switch bounce, you will never notice it.

:stuck_out_tongue: L . O . L :blush:

I can only giggle at myself for that silly mistake of shorting out the capacitors ... In my defence however, it was a little late in the evening and I was watching NASCAR ... So I was distracted ... :wink: ... (will that hold up in a court of law? :astonished: ... ) ...

Guys, I think I've got it now ... I will post some pics and a video once it is finished ...

Thanks a lot for everyone's input and help, I greatly appreciate it ...

Danny

Hi dannydebont.
I am glad to see that I am not the only one that finds the idea of a manually controlled shift register an interesting subject XD You might be interested in this thread on this topic. I went a bit overboard with my version
my version
by using a Atmega 328 IC (the Arduino chip) to control a 7 Seg display to count through each of the eight button presses on my eight LED version of this concept. Also to overcome the potential problem of any switch bounce on the clock input I used a monostable 555 timer circuit. It seems that you may have sorted out the problems you were having with your circuit so all the best and I for one would like to see a video of your project once it is all sorted out,
Pedro.

Hi, well done Danny, the process of getting something like this to function is probably the best part.
It helps with understanding rising and falling edge trigger and serial to parallel conversion and fault finding.
And is certainly better than a computer simulation.
And you are excused for watching NASCAR. ( Marcus Ambrose fan)
Pedro has probably had the same experience and benefited from it, nice presentation, mate.

Tom.... :slight_smile: