Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

7 segement 74ls90 debouncing

Status
Not open for further replies.
just noticed.. sorry but when you say swap the capacitor and r2, you mean the cap on the input or the one on the control line?

and as for the switch.. okay.. right now it's got power->switch->input line. but how does it work putting it going in->switch->ground?
 
Like this:

The input is normally pulled high by the resistors, the switch temporarily forces it low.
The times taken to charge and discharge the capacitor are controlled by the resistor values.

R2 must be a fraction of R1 to ensure the capacitor is discharged below the low voltage switching point of the 555.
(It's only needed to prevent excess current through the switch, as if a cap was directly shorted out).

555_Modded.jpg
 
I just noticed this little snippet of information:

power source is 5v.. well, i'm using a 3.7 small li-ion pack which powers it nicely.

You are using 74LS90 and 74LS47, these require a supply of 5v +/- 5% which is 4.75 to 5.25 volts.
So for correct operation, your 3.7v li-ion pack just does not cut the custard.

This will probably not help your switch de-bounce problem, but by running the chips at 3.7v you are giving yourself problems before you start.

JimB
 
okay, i think i understand the.

And Jim, yeah, i did wonder cause it was a bit short but apart from the little bounce problem.. it appears to be running fine, so i decided it was probably okay.. though I can apply a 5v line for testing at least. I'm keeping on eye on things to see if that pack is okay.. but like i said, despite it being a bit low, it seams okay and yes, i know that is a bad thing to say.. underrunning could be a huge problem...
 
apart from the little bounce problem.. it appears to be running fine,
No, it isn't.

This thread is 25 posts, not 4, so nothing is running "fine". If a stable +5 V power source is not available, you can shift to CD4000-series CMOS parts. They are not pin-for-pin identical to 74xx TTL parts, but that series has the functions you need and is rated for operation down to 3 V.

ak
 
Last edited:
Okay..

I went back to the original circuit.. swapped the button and the 1k resistor, seams to work a tiny bit better then original but not. Tried a 5v line that should be stable and sometimes it would go up in correct steps, sometimes it went up in 2s, sometimes it seamed like how i moved the button might effect like a loose connection.. Was going to put in a 5volt regular circuit just to make sure it was stable but was advised i need to give it a break for a day or so.. long story with that which I don't wish to go into..

Will try regulator then go back to that 555 schmitt circuit (it seamed to be making things worse so i might need to rebuild it just in case i screwed up a wire someplace.
 
Okay..

I went back to the original circuit.. swapped the button and the 1k resistor, seams to work a tiny bit better then original but not. Tried a 5v line that should be stable and sometimes it would go up in correct steps, sometimes it went up in 2s, sometimes it seamed like how i moved the button might effect like a loose connection.. Was going to put in a 5volt regular circuit just to make sure it was stable but was advised i need to give it a break for a day or so.. long story with that which I don't wish to go into..

You NEED debouncing, it's not optional. I spent a lot of time with my scope and various different designs to sort out reliable counting and key pad reading. The input for the pulse counting 'can' be a reed relay, and they don't half bounce :D
 
yep, pretty sure i need debounce but like I said, decided to go back to the original and then recheck the 555 schmit for debouncing. Got pretty weird with the button doing nothing but every time the circuit was powered up, it appeared to randomly pick a number, but i need to give it a bit of a break
 
right.. back.. sorry about taking the time off but a few reasons, some of them kinda personal..

anyway.. rebuilt the 555 schmitt circuit put the button, as told, between the In put and the ground but i think i got that bit wrong cause.. right, the button is a 4 pin.. so you need to attach it via diagonal. so... can't quite get the button inbetween two things like the in and ground.. tried a few little places but.. not sure.. i either got the button doing nothing, or jumping around..

kinda the last thing i tried was to put the button just on the input, so when pressed, the power goes to the button, then to the input, then through resistor 2 and on it's way.. but.. didn't do a thing..
 
Funny all this.... I read a reed switch.. Due to tiny capacitance on the board, and a 39k pullup the input is auto slugged... Reed switches are the worst as well... No bounce whatsoever... Slew rate is awful but switching is fast enough so that I don't care...
 
Both Nigel and I have linked to the same article (I hadn't seen his link to it). Why the obsession with schmidt triggers when 2 resistors and a capacitor are all that's needed (and only 2 components more than the op's original debounce) and everybody's ignorning it?
 
Both Nigel and I have linked to the same article (I hadn't seen his link to it). Why the obsession with schmidt triggers when 2 resistors and a capacitor are all that's needed (and only 2 components more than the op's original debounce) and everybody's ignorning it?

Two resistors and a capacitor don't provide debouncing, as the article you (and I) linked to explains, it's the schmitt trigger than makes it work. I moved from the 40106 chip to a later PIC, and if you set the inputs as schmitt it debounces, set them to TTL and it doesn't. If you connect a storage (digital) scope you can clearly see what happens, and why it doesn't work.
 
A reed switch? an odd choice.. I'm not quite sure about using one.. though i guess it's possible..

annoying, I would think someone might have come up with an IC package which was just for a schmidt trigger...

probably gonna have to give up on the circuit with the 555 timer and get hold of a few 40106s or something.. UK is crap for electrical shops, right now even worse, so i mostly have to order stuff anyway..
 
A 4093 would be fine, it has a wider supply range than the 74 stuff.

Connect both inputs on a gate together and it will work the same as a section of a 40106.
(Or connect the spare input to the VDD pin power).

Do not leave any input pins floating on a CMOS IC -they must be connected to something that sets a high or lowe level; another output, or power / ground.
 
A reed switch? an odd choice.. I'm not quite sure about using one.. though i guess it's possible..

I wasn't suggesting you use one - just that my commercial applications could be fed from one - and as such I used one for testing, fed from a function generator at frequencies up to a few KHz. I was particularly surprised how much they actually bounce, FAR more than a normal switch.
 
yay, chips have turned up..
can't figure it out though ¬_¬ should be able to, surely..
looking on Texas Instruments, the control signal and/or volt is pin 1, with pin 14 as the power for the chip.. fine.. so i connect that to my power source.. pin 2 is the other part of the gate which goes to a resisitor looking around, 100k, which then goes to a capactor (2.2uf) and then to ground. the other end of the resisitor is connected to pin 3, the output of the NAND gate, which is then the signal line.

now... if i don't have a button, it slowly (ish) counts up.. if i put the button on the voltage/signal in ine, it quickly pusles up the numbers.. if i remove the button and just have it straight in, it slowly counts up.. if i put the button on the ground line.. it works BUT with the problem of a bit of jumping as before this circuit.. so..

i add back the extra resisitor and cap from before (erm.. 10k i think, and 100uf on the power line... jumps even worse.. add it onto the ground... i got no clue what that is but is actin random.. add it to the output.. a bit random..

also.. might need to increase some values of parts cause with the button on ground, it's... kinda working but maybe pulsing too fast..

upgrade cap from 2.2 to 10... 10 too big.. need to hold button down for a bit for it to register, and then sometimes it jumps a few numbers..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top