ArduBank

The wife has had an old style “piggy” bank for years but the coins don’t always find their way to the pig and she likes to play slot machines. For her birthday this year I decided to combine both of those into the “ArduBank”.

The physical size of the bank is about a foot square and 16" tall. I used back glass from a real slot machine for lighted top. For the “reels” I decided the easiest way was to build a 3x3 matrix of LED’s, then print the 7’s on some self adhesive transparent film. To hold the LED’s in place, I used pill bottle caps.

For the coins (CDN) we have six dominations (actually five now that pennies are gone but I still coded in for them) I used a SparkFun 6 coin accepter. This generates an RS232 signal when it gets a good coin so it’s a piece of cake to use.

The display keeps track of the “total” in the bank (it writes the total to EEPROM). It also tracks the number of each coin so if you’re going to roll them up to take to the bank, you know how many you have of each coin type.

For the “slot” machine part, I wanted a payout, but paying out with money didn’t make much sense so I decided a “win” would be paid out in gumballs or jawbreakers. The lines for winning, 3 horizontal, 2 diagonal depend on the amount “wagered”. Thus a $2 coin and all five way wins are possible. With a .05 coin, horizontal middle line win only.

The reels spin down more or less like a real slot machine would and I found typically about every 30-60 coins you could hit a win. But depending on the denomination entered, it may not be a valid win. Sort of like a real slot machine where even if you win you can still lose. :slight_smile:

The gumball mechanism uses a 5V stepper that’s attached to a 4 slot wheel (in the photos you can see the slot in the axle that the stepper shaft inserts into). A win rotates the shaft 1/4 turn where it pays out a gumball and picks up another.

Lastly, inside there is a keypad to “load” the gumball wheel and reset the coin total. With a few keys left over for future enhancements.

I decided early on to use an Arduino MEGA 2560 because it gave me a lot of pins for I/O and it’s running the 16K sketch.

Don’t have to worry about loose change be left around the house any more. Matter of fact, I have to hide mine now… :astonished:

Gumball_Internal.png

Gumball_Payout.png

Great to see this finished! Looks interesting and I like the woodwork - has a steampunk feel to it (wooden slot machine ...)

Does every deposit guarantee a win? Who makes the (cash) withdrawals from this machine? It could be a good way to fund your hobby :)

Odds wise, I just used the random function so it doesn't work like a real slot in that respect. However, there are five possible ways to win. Three horizontal lines and two diagonals that make an "X" and each of those lines are coin dependant. Thus a nickel only pays on the horizontal middle line, a dime pays horizontal middle and top. A quarter pays on any of the three horizontal lines, loonie ($1) pays the horizontal and one diagonal and finally a toonie ($2) pays for any of the five ways. So like a real slot, bet more to win more but maybe less often... :)

After putting about $150+ in to it, it "paid out" a jaw breaker 23 times, but there were other winning lines that didn't meet the denomination requirement so they didn't pay.

The grand kids were having a ball with it and my kids are deciding if they want one for themselves. I am building a completely different styled one for myself since I'm not much of a casino kind of guy but I would like the bank portion...

My original idea was to use a Parola set of displays to do it but I was running out of time so this is how it ended up. As for the cash withdrawls, it's the wifes bank so its hers. Mine will be completely different... $)

That is a nice contraption!

Do you have any check, to see that it actually pays out a gumball, or do you just trust the mechanism and the stepper motor?

("turn 90° steps until at ball drops by" or "90°... it should be there now")

Peter_I: That is a nice contraption!

Do you have any check, to see that it actually pays out a gumball, or do you just trust the mechanism and the stepper motor?

("turn 90° steps until at ball drops by" or "90°... it should be there now")

I added an LDR on the side of the wheel housing to make sure that a ball got loaded and is in the top position (the position before it finally rotates enough and pays). If there's no ball present, it rotates again and rechecks. If it rotates four times and gets nothing, a message shows in the display that the payout bin is empty.

Once the ball lands in the out channel it's all downhill and there's no stopping it then, gravity always wins.

When there's only 1 ball left in the hopper there is one wheel slot that wasn't quite cut right that sometimes fails to grab the last ball. However, the remaining three slots in the wheel always grab. If the ball hopper has more than one ball in it, it has never failed to date and it has "paid" out a lot of gum balls...

I did try some M&M Peanuts and while they would pay out, because they are not entirely round, they wouldn't roll down the exit ramp. The hopper and wheel worked perfect for them though. Essentially any round candy 1/2" or 12mm works nicely.

Mel

Hi there!

This machine is really impressive, and I was actually looking to make something somewhat similar. I'm more focused on the collection of the money, as I'm interested in making a piggy bank. Would you be so kind as to upload the code that you used? I'm running into a lot of trouble with the code for the piggy bank, and it would really help to have a reference to troubleshoot off of. Thank you!

-Rex

Rex202: Hi there!

This machine is really impressive, and I was actually looking to make something somewhat similar. I'm more focused on the collection of the money, as I'm interested in making a piggy bank. Would you be so kind as to upload the code that you used? I'm running into a lot of trouble with the code for the piggy bank, and it would really help to have a reference to troubleshoot off of. Thank you!

-Rex

Check your PM's Rex.. :D

Mel