81Views3Replies

Author Options:

random led scrambler Answered

I recently was asked a challenging question concerning a type of circuit design. My electronics knowledge is somewhat limited and was wondering if i could get some help on this project.

The project is: How do you get one led to light up amongst a row of say ten or more leds by selecting from one switch from a row with the same number of switches. The system should be set up so every switch will have a randomly selected led circuit. In other words the leds are randomly scrambled for the switches.

This is basically a type of led guessing game but also involves guessing witch switch will operate which led.

Thanks!

Discussions

0
None
The Skinnerz

8 years ago

I would reccomend the 16F818.

Only minimal hardware is needed to run it: 5V regulator, small cap to remove interference, pull up/down resistor on each button. The clock is on board.

The LED's can be driven straight from the chip, with a 680 ohm resistor in series.

0
None
The Skinnerz

8 years ago

Presuming I have understood correctly that you want to randomly assign an LED to each of a number of buttons.

The best thing to do, would be to get a PIC microprocessor, and allow it to scroll through the unassigned leds while a button is being pressed, giving a virtually random result, then when the button is released, it should be locked to whichever output is on at the time.

This routine could be modified if the connection needs to be made on pressing the button, not releasing, by having the chip constantly scrolling through the unassigned outputs until a button is pressed.

However, if the pattern has to be determined before pressing a button, random numbers can be generated by precisely measuring the charge time of a reasonable sized capacitor, due to small fluctuations in factors such as the supplied voltage.

0
None
eddicurThe Skinnerz

Reply 8 years ago

Thank you Skinnerz for the information i was looking for. My next step is the complicated process of incorporating the PIC microprocessor in a circuit design for the pre-determined pattern as you stated in your last paragraph.

Which PIC microprocessor would fit the bill for this project?