Luckuino - Arduino Slot Machine
by Reisentinel in Circuits > Arduino
27 Views, 2 Favorites, 0 Comments
Luckuino - Arduino Slot Machine

The Luckino is an Arduino based slot machine with a simple light chaser for added aesthetic. This is a fun project to make and try out with friends and others because of its easy to assemble nature and its customization ability, where you can add other things onto the project.
Supplies











To assemble the Luckuino, you will need the following:
- 1x Arduino Uno R3 (or another model) for code
- 1x Breadboard
- 47k, 1.2k and 470Ω resistors (1x each)
- 1x 15µf capacitor
- 555 timer and DC4017 (decade counter) IC chips (1x each)
- 1x SSD1306 OLED display (or another model)
- 10x LEDs
- 1x button
- Wires
Light Chaser









Start by assembling the light chaser. The reason the light chaser comes before the screen is to solidify the layout of the entire circuit, as how the light chaser is wired affects the position of the screen on the breadboard. As the screen should ideally be in the center of everything, assembling the light chaser helps determine the final position of the screen.
- Start with an empty breadboard. Run power and ground wires on the left side across their respective rails such that the power and ground rails on either side of the breadboard are connected.
- Place the 555 timer and CD4017 chips near the power and ground wires with the notches for both chips facing left.
- Add power and ground connections for the 555 timer. Pin 8 goes to power and pin 1 goes to ground.
- Add a wire connecting pin 2 to 6. Follow up with a wire connecting pin 4 to 8. The 2 wires should form an "X" shape over the 555 timer.
- Add a 15 µF capacitor connected to pins 1 and 2, with the negative side of the capacitor on pin 1.
- Add a 1.2kΩ resistor connecting pins 7 and 8. Follow up with a 47kΩ resistor connecting pins 6 and 7.
The wiring for the 555 timer is finished. We will move onto the wiring for the CD4017.
- Start with adding power and ground connections for the CD4017. Pin 16 goes to power and pin 8 goes to ground.
- Add 2 wires from pin 8 going to pins 13 and 15. Follow up with a connection from pin 3 on the 555 timer to pin 14 on the CD4017.
The main wiring for the CD4017 is finished. All that is left is to connect the pins of the CD4017 to the respective LEDs to finish the light chaser.
- Add a 470Ω resistor along the ground rail of the breadboard. This makes it so that only 1 resistor is required for all 10 LEDs instead of one for each individual LED. If operating at a voltage between 9V-15V, swap out the 470Ω resistor with a 1kΩ resistor.
- Place all 10 LEDs on the breadboard, with their ground legs connected to the ground rail with the resistor on it.
- Add wires connecting the power legs of the LEDs to the CD4017 as instructed below:
- LED 1 - pin 3
- LED 2 - pin 2
- LED 3 - pin 4
- LED 4 - pin 7
- LED 5 - pin 10
- LED 6 - pin 1
- LED 7 - pin 5
- LED 8 - pin 6
- LED 9 - pin 9
- LED 10 - pin 11
The assembly for the light chaser is fully finished.
Slot Machine




The wiring for the slot machine part of the Luckuino is pretty straightforward and much simpler than the light chaser part. For this part, the only wiring that needs to be done is for a button and the OLED screen.
- Place a button on the right side of the breadboard somewhere in an empty position. The optimal placement for the button is in the middle of the empty area.
- Add a wire going to ground on one side of the button and wire the other side to pin 2 on the Arduino. A resistor is not needed for the button because INPUT_PULLUP is used, which uses an internal pull-up resistor, eliminating the need for an external one.
The wiring for the button is finished. All that is left is to wire the OLED screen.
- Place the OLED screen on the breadboard. Try to center it in the middle of the line chaser as best as possible.
- Make a note of the 4 holes the OLED screen sits on, as the power and ground wires go underneath it.
- Once noted down, remove the OLED screen from the breadboard and add a ground wire on the leftmost hole. Add a power wire 1 hole to the right of the ground wire.
- Place the OLED screen back on the breadboard. Locate the holes for the SCL and SDA. They should be labelled on the OLED screen.
- Wire the SCL to pin A5 on the Arduino, and the SDA to pin A4.
- Add power and ground connections from the Arduino to the breadboard rails.
The breadboard assembly for the Luckuino is fully finished.
Code

Code the button and the OLED screen appropriately. Attached below is the .ino code file used for this project. Make sure to install the Adafruit libraries beforehand in order to run the respective code. To download libraries, open the library manager on the Arduino app, copy the library used, paste it into the search bar and hit install on the correct one. If prompted to install multiple files for the same library, check "Yes" and install.
After completing all of the steps, make sure to test out the Luckuino to make sure everything is working appropriately.
Thank you for taking the time to build this project!