Introduction: Arduino Controlled Mechanical Random Number Generator

Full Title: A Completely Useless Yet Useful Arduino Controlled Mechanical Random Number Generator

So this all started because my daughter really needs to work on her math facts, but lets face it. Flash cards for a 10 year old girl are boring, and I personally am getting tired of trying to convince her to do them.

I found an app, but even that is somewhat boring.

So I told her I'd make a "robotic counter" for her, and I bribed her. I told her for every 100 counter "clicks", I'd give her a dollar. (If you're like me, bribing your kids is a COMPLETELY acceptable form of parenting.)

Step 1: Morphed Into a Random Number Generator

So when my daughter went to bed, I thought, "let's save the counter code, but change it up to generate a random number." See how that worked out here.

Step 2: Parts

So nothing out of the ordinary for parts. I include cost estimates (I'm sure you can do better than this, if you shop online)

- Arudino (Microcenter, $8.00)

- A small breadboard (Microcenter, $.99)

- A standard servo (Microcenter, $7.00) (This won't work well with a continuous servo)

- Manual Counter, (American Science & Surplus, $1.50)

- Push Button (Microcenter, $.50??)

Step 3: Assembly

Assembly is easy. I hot glued everything to a piece of plywood. I plan on keeping this permanent, so I'm not worried about disassembling it later. I even hot glued the button to the board. Nothing difficult here.

Probably the most difficult part of this project is bending a servo horn, but even that isn't that hard. Find a stiff piece of wire and shape it with a pair of needle nose pliers and you're done.

Step 4: Tuning It

I made these stops with two nuts. Basically just adjust here to the point where there is the LEAST amount of stress on the servo.

You may also need to adjust the code for you servo movement. Mine is set at 50 degrees to 1 degree of movement. (See code).

Step 5: Code

The code is very basic here. I've set it to choose a number between 1 and 20. With this counter, one could obviously can choose any number set up to 999.

Step 6: Final

I realize my wires are sloppy. Thinking of making a couple for Christmas gifts or prizes for a kids club I volunteer at, so I will make the wires a little more organized, probably shortening them, tying them together and getting them out of the way of fingers. Hope this inspires you do to something similar. Have fun with coding and building, whatever you do!