Roll a ball race game

I am an Arduino noob (took 1 3-hour class at a local makerspace) and a special education teacher. Multiple times per year, we hold a "carnival" in our classrooms where the students do a different activity in each class.

I would like to make something a little more exciting than the bean bag toss game that I have in my class. The idea would be to have the students roll a ball and try to sink the ball into a variety of holes, causing the horse/snowman/whatever to move forward on a track. The idea is to make a smaller version of the horse race games you see at a carnival.

My idea was to use an Arduino (mega, uno, whatever has enough pins for the project), ir breakbeam sensors, a stepper motor, stepper motor driver, and a pulley system to move the racing object. I wanted to start with a single track and eventually work up to 3 tracks for competition. I want to build my own cabinets for the game using easily obtainable Home Depot parts.

Underneath would be a track, such as this one:

(Sorry, would not let me copy the image)

I would place a break beam sensor at the 3 points where the ball would pass through and tell the horse to go forward 1 time for each sensor the ball passes... so if the ball went into the top holes it would pass 3 sets of ir break beam sensors, middle holes would pass 2, and the bottom holes only 1.

I plan to use a stepper motor with a pulley system and reed switches at the end to detect a winner. Alternatively, I thought about eliminating the reed switches and simply keeping track of how far each horse goes in code (i.e. the winner broke a beam 25 times) depending on how far I define each movement of the horse to be.

I just wanted to see if some of the more experienced users on this site thought that this would be plausible? Is there anything I should be aware of that I might not be thinking of right now as an arduino noob?

I'm really excited about future possibilities with these microcontroller systems. Thank you.

-Jerry

What you describe should be perfectly feasible but it will be challenging for a beginner.

Learn to do each part of the project with short separate programs - the IR sensor, the stepper motor etc - before you try to make a composite program.

...R
Planning and Implementing a Program
Stepper Motor Basics
Simple Stepper Code

I think that is what I’m going to try to do. I want each separate part working before I code them together. Thank you for your help!

If you track the pulley you can get away with a cheap DC motor instead of the stepper. Put a small rubber wheel on the DC motor shaft and have it friction-engage with the pulley wheel.

Thank you for the help:). I want to make sure that the game is fair. Will a DC motor be as accurate (or close enough) for this type of project? I currently have plans drawn out, but have never used the various types of motors. I had chosen a stepper since I knew that it was very accurate. Thank you.

You track the pulley (and it's slow as needed for this thing) to know steps moved then yes a DC motor can be shut off very close to or at the end of the run. Having an end detector is an option against the unknown like did the pulley belt stretch or something catch, if the horse should be at the end and is not then some kind of operator alert might be a good thing. And I would have stops at both ends since the racers all have to move back.

Robin2 can tell you the difference in motors from price to how you drive them and the code, bit of a guru for both I guess, does electric trains too.

The advantage of a stepper motor is that you can be certain each horse moves the same distance when given the same command by the Arduino. With a DC motor there will be uncertainty unless you have a rotary encoder on the motor shaft. But, to my mind getting the Arduino to count the encoder pulses would be more trouble than controlling a stepper motor.

Another thought is to use the horses only as a rough-and-ready indicator of who is in front (just for fun) and make the real decision based on the score that has been accumulated from the balls falling through the holes.

...R

"With a DC motor there will be uncertainty unless you have a rotary encoder on the motor shaft. "

My thought was to watch the pulley.

If it didn't matter about the horse and look of the stall I'd say lay out addressable led strips and see who fill the length of theirs first. The 30 led/meter kind are cheaper and have bigger leds.

Jerry, have you proceded with this project? I send you a pm earlier this year about my thoughts. I got my project working with stepper motors and two lanes.