# New Project Help Needed

Discussion in 'The Projects Forum' started by EDSPEC, Aug 9, 2012.

1. ### EDSPEC Thread Starter New Member

Aug 9, 2012
8
0
Dear All,

Here is what I need a circuit for:

There are (6) - 7 segment LEDs along with (6) switches used for Input.

I need the following to happen:

When a switch is triggered, the corresponding LED has a (1) displayed, the second switch triggered will show a 2, and so on and so on.

So, if switches are numbered 1, 2, 3, 4, 5, 6 and the LEDs show zero when you start. When the switches are triggered in the following order: 2, 4, 3, 1, 5, 6 then the LEDs would show the order the switches were triggered in. So, the LEDs would show: 4, 1, 3, 2, 5, 6.

If a switch is not triggered then the the corresponding LED would still show 0. So, if you triggered the following switches in this order: 6, 1, 5 and no other switches were triggered the LEDs would display: 2, 0, 0, 0, 3, 1

If this is clear as mud, let me know and I can send you a complete chart. Basically I need to know in what order the switches were triggered in.

Thank You,

Jeff Collins
Nerd Boy

2. ### wayneh Expert

Sep 9, 2010
16,099
6,212
This is probably easier if you know how to use a microcomputer. Do you have any experience with this?

Without one, I was thinking you could put a counter IC in place with each display, and convert each and any switch throw into a clock event going to all the timers. The display and counter corresponding to the last switch thrown would get locked at their current values. This is all just a thought and not lined out.

3. ### EDSPEC Thread Starter New Member

Aug 9, 2012
8
0
Dear WayneH,

Yes, I use computers everyday as a programmer. I used to work electronics for a living for over 20 years. I have not played with building circuits for awhile, so I am not sure what is out there and available right now.

My initial thought was like yours, have a counter for each digit that would count each time a switch was activated. Each digit would count up. But, I was not sure which IC I could use that would allow me to lock out the count once a particular digit's switch was used.

The other problem with this is if you use the last example of: So, if you triggered the following switches in this order: 6, 1, 5 and no other switches.

The resulting output would be: 2, 3, 3, 3, 3, 1. There would be no way to know which switch was the last one triggered. If I made sure all switches were triggered no matter what, then this approach would work.

Jeff Collins
Nerd Boy

4. ### #12 Expert

Nov 30, 2010
18,076
9,685
Struggling with mud. Please give chart.
I mean, I can do it, but it makes my ears smoke.

5. ### EDSPEC Thread Starter New Member

Aug 9, 2012
8
0
Dear Number # 12,

OK...you have 6 switches....and (6) 7 segment LEDs used to show a count. But each LED is a separate digit that will show which order each of the switches were triggered in.

So....each switch is number 1 through 6. Each LED is numbered 1 through 6 and corresponds to the switches.

If the switches are triggered in the following order:

1, 2, 3, 4, 5, 6 then LEDs would display: 1, 2, 3, 4, 5, 6
6, 5, 4, 3, 2, 1 then LEDs would display: 6, 5, 4, 3, 2, 1
1, 3, 5, 2, 4, 6 then LEDs would display: 1, 4, 2, 5, 3, 6
2, 3, 5, 1, 6, 4 then LEDs would display: 4, 1, 2, 6, 3, 5

Once again using the chart above each LEDs displays the order in which the switches were triggered.
2, 3, 5, 1, 6, 4 then LEDs would display: 4, 1, 2, 6, 3, 5
So, in the last example by reading the LEDs, you know Switch Number 1 was the 4th switch triggered, Switch Number 2 was the 1st switch triggered, Switch Number 3 was the 2nd switch triggered, Switch Number 4 was the 6th switch triggered, Switch Number 5 was the 3rd switch triggered, and Switch Number 6 was the 5th switch triggered.

Now, in a perfect world if a switch was not triggered the corresponding digit would be a zero. As in the following example:

1, 4, 2 then LEDs would display: 1, 3, 0, 2, 0, 0

But, if this makes things way too complex then I would be happy with having to have all switches triggered to make this all work.

If this does not cleat up the mud, let me know and I will try and find a new way to explain it to you.

Jeff Collins
Nerd Boy

6. ### #12 Expert

Nov 30, 2010
18,076
9,685
Must go chase lawn mower for a while.

7. ### tracecom AAC Fanatic!

Apr 16, 2010
3,936
1,428
I understand what you are after, and see that it could be done with a microcontroller. However, I am very curious what its purpose would be...a game of some kind?

8. ### #12 Expert

Nov 30, 2010
18,076
9,685
I understand but, this is not a 10 minute job. A microprocessor would do this easier and cheaper than using transistors, relays, SCR's, etc. Can you live with that?

9. ### EDSPEC Thread Starter New Member

Aug 9, 2012
8
0
Dear All,

I understand this will be a little complicated. If I can keep parts price under \$75.00 for the electronics I would be good.

This is part of an overall project. This part needs to be up an running before I can move on to the next part. An idea I have had for a couple of years, but have not had the gumption to get going on it.

I found this Forum doing a search, thought I would see if anyone had ideas before I started buying books and doing some prototyping.

Any help / ideas are greatly appreciated. I have been out of the game about 12 years, so I need to get caught up on all the new and neat toys we did not have back in the day.

Jeff Collins
Nerd Boy

10. ### #12 Expert

Nov 30, 2010
18,076
9,685
Microprocessor chips can be bought for \$2-\$3-\$10.
The PIC line uses Basic for its programming language.

Starting to feel more comfortable?

ps, I have a filter on my brain that stops me asking "what's it for?"
I assume it's for a game of some sort but, I actually don't care.
Maybe you should tell tracecom? He's more likely to be able to help with programming this.

11. ### EDSPEC Thread Starter New Member

Aug 9, 2012
8
0
Dear #12,

Yes, sort of a game.

I am a programmer by trade (after working on electronics for over 20 years), so programming should not be an issue.

I have never used a processor in a project like this, so I am not sure where to begin. These things were just coming to market last time a dabbled with making circuits and were still pretty pricey.

I guess I will do a search for PIC Processors and see what I find. Maybe reading some docs (I do that occasionally, not as often as I should) and see what I come up with.

Thank You,

Jeff Collins
Nerd Boy

Nov 30, 2010
18,076
9,685
13. ### EDSPEC Thread Starter New Member

Aug 9, 2012
8
0
Dear #12,

Do you know if they ship to the US?

Thank You,

Jeff Collins
Nerd Boy

Apr 16, 2010
3,936
1,428

Aug 9, 2012
8
0
16. ### wayneh Expert

Sep 9, 2010
16,099
6,212
Or maybe 2, off..., 3, 1 If the switches could turn on the displays to show the accumulated count of, say, a 4017 counter IC. Or if all the displays start at 1, wouldn't you get 2,4,4,4,3,1 in your 6,1,5 example?

My point is, without actually working it all out, I'll bet this is doable without a computer, if you want to avoid the learning curve with that approach. If it's something you might use again in the future, maybe it's better to just bite the bullet.

17. ### EDSPEC Thread Starter New Member

Aug 9, 2012
8
0
Dear WayneH,

Yea, it might be worth it. I was trying to find and IC that would count, but let me lock it out from the count when I wanted to stop the count and keep the current count displayed.

Thank You,

Jeff Collins
Nerd Boy