Electronic exercise project

Thread Starter

DennisWalters

Joined Dec 15, 2018
3
i am trying to design a exercise/game project for two workout people. It would have an A and B side. Player A would push a button and two of the 7 segment LED’s would count from 1-15 at a fast rate. When the button was released, player A would have to do that many reps. (ie 8 push-ups). After that certain number was completed, player A would push a confirm button and it would total the score. Player B would then push the B side for his random number, do the exercise and push B side confirm button totaling his number. I would like the total sums to reach at least 255 on 3 seven segment LED’s. I have created the random 1-15 with out issues and know how to add 8 bit numbers together but can’t figure out how to continually add the random numbers together by just pushing a button. Does anyone have any ideas?
 

AnalogKid

Joined Aug 1, 2013
10,986
In a rare move for me, I recommend doing this with a small microcontroller such as a PIC or Arduino. It is doable in random logic, but the chip count will be relatively high for a beginner project. The part you're asking about is a binary adder. It takes the BCD from each digit and adds it to the previous total.

ak
 

AnalogKid

Joined Aug 1, 2013
10,986
I think his RNG approach is ok. Clock a counter at high speed (like 10-100 kHz), and any button press will produce a pseudo-random output.

ak
 

Thread Starter

DennisWalters

Joined Dec 15, 2018
3
I think his RNG approach is ok. Clock a counter at high speed (like 10-100 kHz), and any button press will produce a pseudo-random output.

ak
I already use a counter to count 1-15 and repeat at high speed. What I need help with is, once I let go of my button and get my number. I want to be able to keep a running total of those numbers
 

Thread Starter

DennisWalters

Joined Dec 15, 2018
3
In a rare move for me, I recommend doing this with a small microcontroller such as a PIC or Arduino. It is doable in random logic, but the chip count will be relatively high for a beginner project. The part you're asking about is a binary adder. It takes the BCD from each digit and adds it to the previous total.

ak
I am not up to speed on pic’s and Arduino. It would have to be the random logic or learn more on programming.
 

AnalogKid

Joined Aug 1, 2013
10,986
Something like this:

Two BCD counters cascaded to count 0-15

BCD outputs go to three places:
2-digit display
Decode logic to reset counter to 0 after 15 count
One set of inputs to 3-digit (cascaded) BCD adder

Outputs of BCD adder go to two places:
Other inputs to BDC adder
Three digit display

Plus other logic gates to control everything.

There may have to be a register between the adder outputs and inputs to prevent oscillation.

ak
 
Top