RuLEDta (LED Betting Roulette)

by RULETERO in Circuits > Arduino

168 Views, 1 Favorites, 0 Comments

RuLEDta (LED Betting Roulette)

RULE_FINAL_3.jpg
RuLEDta Project
024321.jpg
FOTOS_EXTRA2.jpg
FOTOS_EXTRA3.jpg
FOTOS_EXTRA1.jpg

Ismael Carmona and Francisco Javier Baena, students of 'Electronica Creativa', a Beng Electronics Engineering module at 'Universidad de Málaga, Escuela Técnica Superior de Ingeniería de Telecomunicaciones '.

One rainy afternoon, while watching social media, we saw the upper image, which inspired us to combine the power of Arduino with electronics (and gambling for sure).

Nowadays, it is well-known that the roulettes in casinos are used to being tricked in order to make their owners to earn lots of money, so, our aim is to make a full digital (and non-tricked) roulette in which the ball is replaced by a white led passing through the led strip.

Last but not least, the whole project has been done with the purpose of being able to be easily detachable and reparable.

We have used a SAV MAKER I as a controller, an alternative to Arduino Leonardo, assembled by us.

Note: Our microcontroller was a little bit short of RAM, something that cause problems with the LCD, we would like to recommend you to use and arduino Mega or arduino Uno if you own one, cause using another may cause incompatibility issues with the MP3 reader library.


If you still require further clarification or information, please do not hesitate to contact us :).


We hope that the following phrases do not become familiar:

"After many reds, the green ones must win!"

"After many reds and greens, the blue one must win!"


**Remark: we must say the roulette is a non-profit device, is a toy.**

Supplies

neopixeles.jpg
mp3.jpg
altavoses foto.jpg
keypad.jpg
fuente.jpg
lcd image.jpg
  • A SAV MAKER I.
  • Neopixels strip (WS2812E).
  • Matrix keyboard for Arduino (AZDelivery).
  • Power supply. We have used one of 10 amps and 5 volts, however with only 3 amps and 5 volts is enough (RP3).
  • 1kg of PLA.
  • Two speakers with volume control (Tacens).
  • 1.5m^2 of wood chipboard.
  • 0.25 m^2 of wood (reinforce).
  • Screws, staples and nails.
  • Hammer, stapler and screwdriver.
  • Tweezers.
  • LCD screen (GeekPi).
  • Mini MP3 Arduino-reader with micro SD card reader (BricoGeek).
  • Welding wire.
  • Power cord.
  • Female plug for the power cord.
  • 1.2m^2 of methacrylate.
  • 2 fans (We have reused them).
  • Soldering kit (including tin and flux).
  • Silicon gun.
  • 3D printer.
  • 2x(0,4x0,6)m of green felt.
  • Carpenter bench saw.
  • Miter saw.
  • Compass saw.
  • Drill (bits and crown bits).
  • Wood glue.
  • Sander.
  • Screw clamps.

Design and 3D Printing

UPPER_NO_LCD_MODIFIED.jpg
UPPER_FOR_LCD_MODIFIED.png
BOTTON_RAW.png
UPPER_RAW_NOT_FINISHED.jpg
download.png

Program. In this case, the 3D design has been developed with Blender because of being free-of-charge and in addition, it gives the opportunity to use a large amount of tools, whose combination may make easier your desired design.

Versions. Of course, until the version met all the expectations made on it, plenty of projects had been printed in order to see what things were remaining yet (making us to spend a big quantity of PLA). Some versions will be uploaded in order to show, how the model has been designed and in addition, if anyone wants to make a different version with less numbers, bigger, smaller...

Blender tips. For developing our project, different tools have been combined with the purpose of making easier and less tedious the own designs. Furthermore, it gives the chance of modifying the project as wanted with little effort, this is possible due to the knowledge about the tools mentioned before. For the main design, a thin cylinder (this is compulsory since the light needs to go through and difuminates it) has been turned into the base. Then, the different walls of the roulette's zones were introduced, made with one personalized and thin cube with the array and deformation modifier using a Bézier circle. Modifying simultaneously the parameters of those modifiers is possible to create a roulette which fulfills your best wishes. Adding the numbers, the main (and most difficult) part would be done, as you can see in the files upload. For finishing the design, the complementary part of the last mentioned would be done as the Neopixel holder.

If someone is interested in blend files, do not hesitate to contact us or visit our gitHub repository!

Base Structure: Construction & Assembly

1fbc6df6-3dfb-4f37-9abb-3c90066349b4.jpg
a1a218e9-0c5b-45bd-8617-012b94db42c8.jpg
9c1d7e8d-9946-469b-81a6-18f680f0a4bd.jpg
255a433c-5f4a-428d-aab8-ff72cfc1f9b7.jpg
5c7eeab9-b93a-4e61-b0bc-7b9148992a2b.jpg
f63bb91a-f556-4c35-afb2-da8e3fa7c1f9.jpg
02b10346-ee81-47e5-9e70-5c8df8a57fd4.jpg
e9ce0286-2963-496e-86fc-e59c6377fbde.jpg
716a4a12-d9f8-4d7a-ae07-abb3bde9898e.jpg
f4fefdd4-504e-4590-ac33-5a4b559546df.jpg
6cbbd01b-5537-409d-9772-337de9327967.jpg
89d241df-1ee7-4559-b824-64712c204d7a.jpg
01c6826b-47c9-420b-8755-44d31fbe1dbb.jpg
ab1170a5-e5a7-45de-a674-8a27ce541706.jpg
d18d9118-2974-4260-afc7-3bfafd88b909.jpg
d299c4cd-0ae4-4582-9439-e7e1ec8d32eb.jpg

Process. As mentioned before, a square wood base board is need. For the box, it has been selected a octagon shape cause all its angle are of 135º, and its easy to cut 45º on wood with the mitre saw. It is recommend to mark the base before cutting. The calculation of the sides of the polygon is very interesting and it has been done with the following mathematical expression:

side length of the polygon = side length of the square * tan(π/number of sides of the wanted polygon, 8 for us) 

Now we know how to calculate the side of whatever polygon.

(Note: the length of the side of the base square is known).


Next the base is marked with the length it has just been calculated, once it is known the shape, the mitre saw is used again. The 8 walls are cut in the same way with the carpenter bench saw, and it is necessary to give then an angle of 22,5º in this case (cause is 45/2º). This angle is acquired with the mitre saw. After that when all walls are cut , they are assembled together using wood glue and nails. Let the wood glue repose 1 day, it would be a good idea to use screw clamps.

The holes have been made with a crown bit and the surface finish with a sander.

The lining (with green felt) process needs 1 day of repose too, and it is done with staplers and wood glue.

Arduino Program

Libraries. In this project,the vast majority of the code is homegrown, however, different libraries are used in order to make everything work. The examples of the libraries have been searched with the aim of helping the programmer to understand the way they work. For instance, Adafruit Neopixel Library for working with the Neopixels, DFRobot DFPlayer Mini for the speakers and the MP3 Player, the LiquidCrystal_I2C for the LCD screen, the Button code of Luis Tanco. Original button code by Edouard Renard.

Resume. The code is divided into different functions including initialization functions and specific performance. There are some remarks in order to understand it as better as possible and the code is organised into different blocks.

Program performance. First of all, set up of all devices is done, after that the roulette will star working.It is posibble to single or multiple bet, introducing a "coin" into the slot. After selecting the number of bets, it is necessary to introduce a number of coins iqual to the number of bets we have selected. When proper coins have been introduced the led oscillation will become, and after that our bets will be checked. There are two possible behaviours, the winning one and the losing, it is easy visible by the animation the roulette does, and the music heard (the winning behaviours have an extra animation while the other is default). Finally all the parameters are reset and it is possible to keep playing. In our code, after playing for first time the roulette colours keep in the idle state, if you want them set to roulette default, just use the InicioRuleta() function.


It has been also used the following music/sounds, available in YouTube:

Idle music

Epic music

Winning effect

Losing effect

Extra music 1

Extra music 2

Extra music 3

Extra music 4

Extra music 5

Soldering NeoPixels

2b83e7f6-f423-4922-8d42-c1f95ac084c6.jpg
13a60604-a141-40ef-9ad8-0f8a587c1294.jpg

Cut the different NeoPixels. First of all, it is necessary to cut the Neopixels strip in order to have them separated.

Weld the wires. Once we have all the Neopixels separated from each other, they must be welded with the distance of the wire that is necessary for occupying the different holes of the 3D printing.It may be a difficult task since the holes are in a circle, so the upper wire must be longer than the lower one. Even in some cases, when the wire is longer, it should be fixed with the next one. As a trick, we recommend to put a little bit of tin in their pads and then put the wire helping yourself with the tweezers (if you see there is not enough tin, add a little bit more in order to make it as strong as possible).

Find out everything is going as it should. For making sure it works properly, it is recommended to try all the Neopixels every time a new one is welded.

All the NeoPixels are working properly. The final step is to assemble all the welded Neopixels in the 3D printing with their sticky part (even if it is necessary, silicone might be used) and make sure that each led is inside its own hole.

Circuit Diagram

RuLEDta_circuit_1.png
RuLEDta_circuit_schematic.png

Connections. In the upper image, an electric diagram is attached here, in order to show the way in which the wires may be connected with the Arduino's pins (is only an option between many). This project needs, above all, digital pins.

Modules. The different features of the project have been divided into independent modules in order to make their developing easier. On the other hand, compatibility problems may happen when everything is connected.

Devices. In order to the communication that each device makes, they must be connected to their respective pin. The speakers are connected to the Mini MP3 Arduino-reader with micro SD card reader and that device is connected to the Tx and Rx Arduino's pins. The Neopixels strip is connected to the Arduino too. The Matrix Keyboard is connected directly to 8 digital pins of the Arduino. Optionally, if it is possible to use a LCD screen it will be connected to the Arduino through I2C connection so, it must be connected to its own pins.

Power supply. After everything is inter-connected, each device need to be supplied for working, so they must have be powered. The speakers and the Arduino are supplied with a double USB extensor connected to the power supply, this gives the chance to be easy unplugged and plugged. Our power supply is a little bit oversize and it wouln't be a problem using a smaller one (like 5V 5A).

Acknowledgement

This project wouldn't have become possible without the collaboration of Carlos Baena, Noé Paniagua, Andrés Rivadeneyra, our teachers Luis, Arcadio and his friend Paco. We are also grateful to the creators and developers of used libraries. Thank you all and whoever has been involved in the development of this project.