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.

Up and down counter 7 segment led

Status
Not open for further replies.

xisten

New Member
Hello,

I need to build a 7 segment led counter that counts up from 0 to 5 and back down. One lever switch (spst or spdt) to count up to 5, and one lever switch (spst or spdt) to count down to zero.

I think this circuit is close to what I need but maybe with a 4029 instead of a 4026.
https://www.electro-tech-online.com/threads/transformer-powered-robot.18740/

I need to figure out how to set the up and down status while high with just a spdt switch.

Thanks in advance.

ken
 
Last edited by a moderator:
xisten said:
I need to build a 7 segment led counter that counts up from 0 to 5 and back down. One lever switch (spst or spdt) to count up to 5, and one lever switch (spst or spdt) to count down to zero.

You need to think a bit more on different aspects of your circuit behaviour.

1. Does the counting stop at either 0 or 5 even the switch is still on?

2. Why use two separate switches and what to do if both switches is ON?

3. Can one use a three-position toggle switch with a center stop position?

4. Assuming using such a switch, when the switch is moved to the center position, does the counting continue or just stop?

5. Or you wants a simple spdt switch to switch 0 & 5 with all digit counting and display in between?
 
Thanks for answering.

I have a lever that moves up and down that hits switches when it moves .

>1. Does the counting stop at either 0 or 5 even the switch is still on?
Yes. The count needs to max at five and not go higher and it needs to stop at 0 and not go lower. Counting all the number in between.

>2. Why use two separate switches and what to do if both switches is ON?
I was thinking of a roller switch as it needs to have a long throw. Theyare cheap and you can get them water proof.

I guess I might be able to use a leaf switch as well if I put a hole on the lever.
I’m thinking I may need to use a pic or something like a basic stamp that I can program.

I hope that explains it more.

Thanks
 

Attachments

  • arm2.jpg
    arm2.jpg
    11 KB · Views: 553
The 4029 is a suitable up-down counter but you'll also need a BCD-7Seg decoder for your LED display.

The two limit switches must be debounced and the "change" latched to force 4029 counting in either direction. This can be done using a set/reset latching circuit. Sorry I can't provide you with the actual circuit at this moment but I'm sure other experienced users on this forum can.

Then there must be other logic gates to detect the "5" state and "0" state so as to inhibit the clock pulse input when the state is reached.

All the above is easily done using a microcontroller of any sort but learning to do just that would take quite sometime. So your best choice is still the CMOS logic route.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top