Lightning Project
This project was submitted to 'Creative Electronics', a Beng Electronics Engineering module at University of Málaga, School of Telecommunications. The authors are two students, Borja Lebrón García and Abel González Gil, who like sport and wanted to do something to train their reflexes and skills.
Repository where you can find the project.
Supplies
This is the list of materials for our project:
- An Arduino Board (we used the SAV MAKER I, based on Arduino Leonardo)
- Different kind of components for the arduino board
- NeoPixel Digital RGB LED Strip
- 10 meters tubes of PVC (40mm diameter)
- 7x microinterruptors
- A AZDelivery HD44780 2004 LCD Display 20x4
- Buzzer
- USB-A to USB-A cable
- USB-A female to mini USB cable
- Power Adapter (Fast Charger)
- Soldering Iron
- Saw
- Prototyping board (60*40)mm
- Pieces of wire
- 4x Wooden planks
- A transistor BJT 2N2222
- Connections wires
- 3D printer with PLA and PETG
- Tin
- Flux
- Blue paint
- Sandpaper
- Different kinds of push buttons
- Hot melt glue
3D Design of Nodes
For this structure we need to print 8 nodes:
- 1x Main Node
- 2x Nodes type L
- 2x Nodes type T
- 3x Nodes type I
- 2x Top Nodes type L
- 2x Top Nodes type T
- 3x Top Nodes top type I
- 7x Front Top
- 1x Top Main Node
Repository where you can find all the 3D desings.
Thing to take into account when printing.
The idea behind the Nodes is that they need to be robust enough to be able to hold the impacts and at the same time the front part of the nodes let the light go through. For these is recommendable to print the nodes body in a colour that can absorb the light as a black or navy colour. While the front tops will have to be in a clear or translucent material, in our case we use white, it is not 100% translucent but it let the brightness goes through really well.
As soon as we have all the nodes with their tops printed, the assembly of them it is really easy. The first thing to do is place the translucent front top inside the clamping cylinder (See Image 1)
After this we will place all the electronic components inside to check that it is enough room for all the electronic components and then we will proceed to place the top node on their respective node. This design has not mechanical lock so we will need to ensure that all the connections and welds are correctly done and secure before we seal the nodes together because after this point it will be really difficult to correct any mistake inside the nodes. (See Image 2)
For the Main Node we will check that the top fit in to the base an all the electric components can fit inside in their respective positions. (See Image 3)
To close this stage, we will add the cost in time and in PLA plastic.
In a first stage using the program PrusaSlicer to make an evaluation, every single node will take about 9 hours and 40 minutes to be printed and a consumption of about 92gr of PLA (See Image 4).
To this we must add the 17 hours of printing for the main node and the consumption of 215gr of PLA plastic (See Image 5), the total hours of printing all the items took us about 84 hours and 30 minutes and a total PLA Plastic used of 859gr approximately.
Design of the Structure
For this part of the project we will need:
- 2x Wooden planks (100cm*10cm)
- 2x Wooden planks (100cm*5cm)
- 10 meters tubes of PVC (40mm diameter)
- Saw
- Sandpaper
This phase will be one of the simplest, but not for that reason, we should not be careful with what is done. At first we will start by delimiting what will be the height of the product, in our case we want it to measure around 170cm in total and that the area where the pushbuttons are located is a perfect square of about 1m*1m. Knowing these dimensions and the size of the nodes, we proceed to cut 6 sections of tube, which will be used to join the different nodes together. These tubes have a length of 35cm.
We will also cut the 2 sections of tube that go to the main node, which are somewhat shorter, measuring 31cm. Later we will cut the tubes that occupy the positions of the legs, these tubes measure in our case 79,5cm, but can be shorter if you want it to be lower.
The last tubes to be cut will be the rear support ones, because to cut these tubes we need to know what angle they are going to have to the main structure to lean on the ground. It should be added that a notch should be made on the top of the tubes, so that it fits perfectly with the main structure, as well as making the cuts of the base of the tube at an angle so that it does not remain in a bad position when placed on the support. These tubes have a length of 182,5cm.
Knowing that the wooden structure of the floor will be 1*1 meter, we must make holes in the two widest boards where the tubes of the structure will be placed. The rear holes should be at an angle, so that these tubes can enter slightly inclined to better hold onto the main structure. The front holes have to be the diameter of the tube so that it fits perfectly into its position and does not move.
Implementation of Nodes
In the mean time that we are printing the nodos we can start preparing al the electronical components, for that we will need:
- 7x Prototyping board (60*40)mm
- 7x Microinterruptors (con auto rebote)
- 7x 220Ω resistances
- 7x Strips of Neopixel LED (We use 6 LED in each strip)
- Connection wires
- Soldering Iron and tin (opcional flux and alcohol).
On the first stage we need to ensure that the board and the microinterruptor are place in his site. They can be a little loose, but the important thing is that they are embedded in the area designated for them
Then as soon as we see that the sizes are the right one, we can start to plan how we are going to do the welds of the components on the board. Starting by placing 2 outside lines cables to do the GND and VCC lines, these will make thing easy later on.
After this we will weld the resistances as close as possible to one of the corners of the actual board to avoid these interfering with the microinterruptor when we will have to fit it later on. And make it easy for us to connect the data cable for the LED strip.
As soon as we have them ready, we will need to weld the bottom line to the GND leg and the main one leave for the time when we have to do the interconnections. To continue we just need to weld the Neopixel strip, for this, one of the cables will go to the GND, the other one to the VCC and the last one to one of the resistance leg, in the second leg of the resistance we will connect the cable which will come from Arduino.
In the Main Node we will have a prototyping board which will receive all the data cables from the different nodes and the VCC cables and the GND cables. On this board we will also be connecting all the data pins from Arduino with the right one which it come from the nodes, these will be made following the table which can be see on the pictures. To this board we will also be connecting the pins associated with the buttons, which will be display on the front top, placing the pins in the right position for the GND and data cable which will also need to be connected to Arduino. After this we will be ready for the time when we need to make the interconnections.
Implementation of Structure
This implementation will be simpler than that of the nodes, because in this case, we only have to perform actions that don’t need a lot of time to do them.
We’ll start by sanding the woods so they stay as smooth as possible and don’t have any stitches with which you can hurt yourself. We also have to give the tubes a hand of sanding, to be able to delete the letters that appear on them, to make it easier for the paint to stick and to make the ends where which the cuts have been made easy to handle.
Once finished with the sanding, we proceed to paint the tubes, in our case we have used a navy blue color to contrast with the black of the nodes. To apply the paint, it was necessary to give it several hands and a bit of sanding between them, so that the possible imperfections that came out of the paint could be removed.
While the paint is drying, you can work with the wooden planks. With them we dedicate ourselves to make the joining of the planks by making a square and making sure that they stay well fastened and do not move, for this you can use a little white glue to glue them and some screws to secure their fixation.
Fusion of Nodes and Structure
When connecting the nodes with the tubes, several things must be taken into account. The first is the mechanical part, for this we could anchor it with screws or as we did using silicone.
Once we have the main structure attached (nodes I, T and L) (See Image 1). We can start pulling cables for each node and solder the lines that we previously reserved for interconnections. 4 cables must reach each node, one for VCC, one for GND and two for data, although others cables of data that are redirected to other nodes can pass through.
By the time they are all welded and the joints fixed, we must check that everything is well welded. For this we can connect the arduino to the data, VCC and GND cables and load a test program to see that they all light up, and even with the serial monitor function see if the point counter works by seeing that the buttons make it increase or decrease the score value.
With all the above verified, we will be able to assemble the entire structure. We will start by placing the wooden support on which the legs and the rear supports will be placed, to then be able to accommodate the structure of the nodes and screw the rear support.
After this, connect the power supply and PLAY!.
Software
Repository where you can find the code to play.
For the code we have used two libraries, one for the neo pixels, “Adafruit_NeoPixel.h" by Adafruit and the other for the LCD, “LiquidCrystal_I2C.h" by John Rickman. In a first stay we have to clarify that this code is only a prototype test, in the absence of tweaking, adding more game modes and add some additional functionality, this code, is purely sequential that allows a simple game mode, where using two software timers, we manage the switching ON of a random node, which if you press “T_Commute” at a certain time, will alternate the ON node, and will increase a score that through serial communication will be displayed by the LCD. On the other hand, the system will remain in a waiting state for polling, after the time “T_JUEGO” to exit this mode, a new game can be started by pressing both the central node “BUTTON_PIN_M” and the start button “BUTTON_PIN_ENTER.”
This code has another function, apart from being able to play some games, and this is to test the correct functioning of the hardware, once all the connections are finished, using this cod., The INI() function, will initialize all the nodes in a light red color allowing to see that all the connections are OK and through using the serial port we will be able to see that all the buttons are working correctly, to see that if you press each of these, the score variable varies its value.
Conclusion
We can conclude with this design by saying that this will not be the last version that will be implemented of it, but it is an initial version due to the time and resources we had to do it during a few classes. Because of this it has been decided to place the power supply via USB connector, so that it can be reconnected to the computer and modify the code to be able to get to the main idea with which this project was conceived.
It also has the option of being able to redesign some nodes and be able to increase the number of buttons that it can incorporate, although if this is done it would be necessary to change the Arduino board, since with what we have we are left without extra pins for data lines or that supply the energy needed for the entire functioning.
Finally, it should be added that although they are placed on the cover of the main node, the speaker and the buttons are not included in the code, so if someone wants to mount it, they have to take into account that not everything that is visible it will work.