2
\$\begingroup\$

New to the forum because I am stumped. Im building what I am calling the "water table" for my kids. It has a series of spigots, and channels that funnel into a kiddie pool. Then I got creative and added some solenoids to make some quirt guns that run off of line pressure. They are SWEET!

I have 2 solenoids left to find a function for. My oldest wants me to get a push button that will randomly shoot the person standing in front of the button. So, you can press it anywhere from 1-10 times before it goes off and every time its a different number of pressure. Kind of like Russian roulette... but for kids lol

I just spent the last hour googling things with no results, but I found this page and thought someone would be able to point me in the right direction. Any thoughts or input would be great!

Thanks!!

\$\endgroup\$
14
  • 3
    \$\begingroup\$ Please, please, don't make anything with water and electricity for your kids. \$\endgroup\$
    – Eugene Sh.
    Commented Jun 29, 2018 at 19:24
  • \$\begingroup\$ And what do you expect from us? Finding other ideas for the solenoids left, or giving you a full design of the roulette idea? Both are probably off-topic... \$\endgroup\$
    – dim
    Commented Jun 29, 2018 at 20:10
  • 1
    \$\begingroup\$ There is a srand() function in C so you could use an MCU or Arduino, seed with a free running counter. But this is likely off-topic as dim says. \$\endgroup\$ Commented Jun 29, 2018 at 20:15
  • \$\begingroup\$ Im trying to understand the roulette idea. Honestly I don't even know what to search for. \$\endgroup\$
    – Ian Dunbar
    Commented Jun 29, 2018 at 20:19
  • 1
    \$\begingroup\$ All you need is a high speed clock with N=10% duty cycle and sample the output. Probability is due to undersampling and normal distribution of 1 out of 10 Then a timeout. Or an old Lucas switch (lol) \$\endgroup\$
    – D.A.S.
    Commented Jun 29, 2018 at 21:24

2 Answers 2

1
\$\begingroup\$

Configure a 555 timer for a 91% duty cycle and latch the output.

Feed the output of the timer into a D flip-flop. Use a double pole switch. The first pole of the switch is used as the clock for the flip flop. When the button is pressed the flip-flop will latch whatever value was on the clock pulse. There will be a 9% chance that the output was low. A low output on the timer will result in the flip-flop output being high. This will turn on the 2N7000 MOSFET. The MOSFET may be used to drive the solenoid directly, or if required it can drive a relay. The second pole of the switch is put in series with the solenoid so that the solenoid only remains on as long as the button is pressed.

In total the cost of the parts should be under $5.

schematic

simulate this circuit – Schematic created using CircuitLab

Component links

SE555P https://www.digikey.com/product-detail/en/texas-instruments/SE555P/296-9684-5-ND/380221

CD4013BE https://www.digikey.com/product-detail/en/texas-instruments/CD4013BE/296-2033-5-ND/67245

EC2-4.5NU https://www.digikey.com/product-detail/en/kemet/EC2-4.5NU/399-11046-5-ND/4291112

2N7000-G https://www.digikey.com/product-detail/en/microchip-technology/2N7000-G/2N7000-G-ND/4902350

\$\endgroup\$
1
  • \$\begingroup\$ donen't give one to ten presses... gives one to infinity. \$\endgroup\$ Commented Jun 30, 2018 at 20:56
0
\$\begingroup\$

so you have a fast clock a 10 cycle counter and a bistable

when the button is pressed advance the counter by one count.

if the counter gets to 10 turn the bistable on

if the bistable is on clock the counter from the fast clock

if the bistable is on and the button released reset the bistable..

when the bistable turns on activate the squirt.

in this way the counter will race when it gets to 10 and when the button is released after the squirt the counter will be left in a hard to predict state.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.