Hi Everyone, thank you for giving interest to our project. The DragiTurret consists of a small automatic turret firing candies at a distance of +- 2 meters. It is commanded by a bluetooth application that we will teach you how to set on your smartphone. This project was lead by students from the 'Université Libre de Bruxelles-Vrije Universiteit van Brussels', Belgium, as a master project in electro-mechanical engineering. The team was composed of 6 members and the project took 2 months but do not worry this DIY will regroup all the files needed for the building of the DragiTurret. Eventually most of the work is already done in order to let you enjoy the project. As ressources you would need to give for this project it is estimated to be 50-150 euros (55-165$) and the assembly would take 15-25 hours if you are alone. We strongly recommand to be 2 for the assembly parts as this way could save you a lot of frustration.
As this project needs the use of high-speed rotating machine we recommand you to follow basics safety procedures when building the turret.
This section regroups all the specific materials you would need to purchase in order to build the Turret. Let's assume that you have a basic working space with srews (M3,M4, M5 and M6) and the associated bolt. You would need threaded rod (M3) as well. The rest of the items are regrouped in the list below:
- 1 Stepper motor NEMA 17
- 1 Stepper motor NEMA 14
- 1 DC motor DGO-3512ADA
- 1 Servomotor MG945
- 2 a4988 stepper motor drivers
- 1 L298N dc motor driver
- 1 TCRT-5000 light sensor
- 470µF capacitor, resistances of : 100, 220, 1k, 2k, 4.7k
- 1 Bluetooth chip HC-06
- 1 power supply of 16V DC
- 2 Voltage Regulators (output : 10V, 6V)
- 1 ball bearings (int:6mm, ext: 19mm, thickness: 6mm)
- 5 ball bearings (int:8mm , ext:22mm , thickness:7mm )
- PVC tube 20mm diameter (length needed: 20cm)
- PVC tube 125mm diameter (length needed: 40cm)
- 1 threaded rod M3 - 60cm
- Gum bike's air chamber-like
- Electronic connectors and wires
- A spring of 19mm of diameter and 200mm long
- Wooden rods 6mm of diameter
- And of course candies of 17mm in diameter
The DragiTurret's building does not necessarily need any engineering background as all the files for the lasercutting, the 3D printing and the codes are furnished. However the interested ones should know how to weld electronic wires and if there should appear any probem, knowledge in Electronic and Computing would be useful.
This project requires basic tools for the assembly: screwdrivers, metal cutting handsaw, socket wrenches, metal files, measuring tools such as a graduated square, metal washers and a slide caliper.
You would also need the acces to a 3D printer, a Lasercutter, a high speed rotating metal saw, a grinding wheel and an electronic welding machine. For the 3D printing parts you would need PLA wire (spread use of this type) and for the lasercutting parts you would need MDF 4mm and 3mm thick wood plate.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Laser Cutting
The first step of this project is to laser cut the wooden parts of the turret.
The laser cut parts need to be cut into 3mm and 4mm thick MDF wood plates. The number aside of the file name is its designation for the assembly part.
You need to setup carefully the laser cutter with the good parameters and then cut the following files:
- Base_plate.DXF Part 1
- Canon_crane_left.DXF Part 2
- Canon_crane_right.DXF Part 3
- Feet_left.DXF Part 4
- Feet_right.DXF Part 5
- Feet_right_fixation.DXF Part 6
- solidarizer.DXF Part 6bis
- Rotation_base_plate.DXF Part 7
- dragi_sensor.DXF Part 8
- motor_support.DXF (2 times) Part 9
- feeder_top.DXF (7 times) Part 10
- canon holder (2 times) Part 11
- feeder_separation_ring.DXF (7 times) Part 12
- support_roll.DXF (12 times) Part 13
- supports.DXF (6 times) Part 14
- Fixed_gear.DXF Part 14bis
- Gear_nema_6.DXF Part 14ter
- feeder_bottom_1.DXF Part 15
- feeder_bottom_2.DXF Part 16
- feeder_bottom_3.DXF (2 times) Part 17
- feeder_bottom_3bis.DXF (2 times) Part 17bis
- feeder_bottom_4.DXF Part 18
- feeder_bottom_5.DXF (6 times) Part 19
- circuit_base_plate.DXF Part 20
Once everything is cut, you can continue with the next section.
Step 2: 3D Printing
It is now time to print the 3D printed parts.
Be careful to adapt setup of the 3D printers for the material you are using (usually PLA). The temperature of the plate and for the melting varies according the material.
Some of the pieces you need to print need support. Be careful to set them on in the slicer settings. 3D printing is a handy way to create small parts, but as it takes a lot of time, we strongly encourage to use several printers in parallel or to work on the side while it is printing.
Following files needs to be printed :
- Gear.STL (2x) Part 20
- Wheel.STL (2x) Part 21
- Motot support part1.STL Part 22
- Motor support part2.STL Part 23
- Rotation link.STL (with support) Part 24
- Separator.STL (2x) Part 25
- Link shaft-bearing.STL (4x) Part 26
- Bearring support - Center.STL (with support) Part 27
Bearring-support.STL (with support) (5x) Part 28
To print from an STL file, you simply have to import it in your own slicer (corresponding to your printer), adapt parameters and be patient. All those parts were printed with 20% of filling.
Once everything is printed, you can continue with the next section.
Interesting to know :
The wheels' shape is designed specially to ensure that the connections are in traction/compression instead of in torsion because it's more resistant in this configuration. So, a quite pretty shape hides in reality a scientifical reason.
This particular shape can be found too in top-of-the-range fan from computers or 3D printers as shown in the last picture.
Step 3: Assembly
Assembly is the most time taking steps in this project. The assembly of the whole turret may subdivide into 4 different parts: The feeder - The Crane - The static base - The rotating base. Further tasks will be making the electronic circuit and to compute the program (both on the Arduino and Bluetooth application), see section 4 & 5.
Attention: The rollers between the two plates are not under the form seen on picture 1 anymore, the CAD has been modified as a more optimising way has been found. A picture of used rollers is given in the last picture.
The static Base:
Bottom view: Picture 4, up view: Picture 8. The static bottom is the very piece which serves as a base for the whole turret.
Step 1) Take the rotation base plate (Part 7) and fix 5 supports (Part 14) at the bottom of the plate. The easiest way to fix it is with small wood rods 5mm length, 6mm of diameters. By pushing hard enough, it should fit without any difficulties.
Step 2) Return the plate and fix the fixed gear (Part 14bis) 3 times one on another with 3 M6 screws. Afterwards fix the flange coupling in the center of the plate with 3 M2.5 screws and screw the shaft in it. This will be the rotating axe around which the whole structure turns. The stepper motor will be connected by a smaller gear to the big gear later on.
The rotating base:
Take the base plate (Part 1) with the orientation such as it is in picture 9 of this section. The plate is oriented in a way that you look at the top of it. The first Stepper motor is plugged in the upper hole. The shaft of this motor should enter in the plate in a way that it is parallel to the shaft holder from the previous part. Fix this motor to the plate with 4 M3 screws. Fix with 3 bolts the wood cut parts of the smaller gear (Gear_Nema6 - Part 14ter) to the first flange coupling and then attach it to the shaft of the stepper motor.
Take 4 times the Part 13 (support role) and stack them one on the others. Take one of the rollers and Stack it on the top of this structure. Then, pass 2 M3 screws of 25mm through the whole assembly and fix it to the plate with the corresponding nuts. The holes for those screws are on the edges of the plate. Note that there are multiple sets of holes in order to allow you to center more or less the rollers depending on the weight repartition of the structure.
You now need to take one bearing roll (int:6mm, ext: 19mm, thickness: 6mm) and plug it into the bearing support - center (Part 27). This assembly needs to be plugged into the center hole of the plate.
At this point, you should have a plate, standing on rolls, with a bearing in its center. You now have to put this plate on the bottom plate, plugging the main shaft into the bearing.
At this step, normally the two plates are parallel and the upper one may rotate with the help of the rollers on the bottom one. This bottom plate should be static with the help of the supports even when you move the upper plate.
As an extra information if you look at the rotating plate from the above, hereafter are the other places where parts will be fixed. On the left, with the squared shaped hole, will be fixed the crane on which will attached the barrel and the propulsion system. On the right are there 3 holes forming a triangle which are the screw holes for the rods supporting the tank-feeder system. On the upper side the stepper motor used for the pan movement is already fixed and connected through gears to the static base. On the bottom of the picture 9 is the emplacement of the arduino and the drivers. All motor wires are connected to electronic components there.
Good to know: The feeder is the result of different iterations. This final version work very well with the candy we have. One and only one candy is delivered each time. This works well since the candies are smooth and not grippy otherwise they may be crushed. The only issue you might have is when there are few candies left: it might happen that some candies stay in the middle. If that is an issue you can add a little dome in the middle of the turning plate. Note that in the given code when one slot is empty the feeder will automatically turn until a candy is provided. Finally the feeder is calibrated for 17mm candies with variation up to 1mm, it is up to you to tweak the design if you want different candies size.
The feeder is the tank which will deliver the candies to the barrel via the spring tube. It is made of a fixed reservoir at the bottom of which a rotating plate with holes moves one candy at a time above a hole from where the candy falls in the spring tube.
In the end, the tank lies on a plastic tube of 125mm diameter and 200mm height. The tank is the superposition of multiple wood cut parts that are squeezed together with 3 long threaded shaft.
This feeder is made of many layers. You will have to assemble it layer by layer, starting from the bottom of the structure. As you can see, each part of this feeder has 3 holes positioned in a triangular way. The three threaded shafts will pass through those holes.
The first step is to pass the 3 threaded shafts in the Part 12. This step will help to calibrate the height of the feeder. You can now put the big PVC tube between those shafts, it will help support the feeder. But before, you have to make a rectangular cut at the extremity of the tube. 80mm long by 36mm wide, this will allow the movement of the spring tube. You can now pass the three shafts through the holes of the turning plate. The shafts should exceed of 8mm from the bottom of the plate to be able to place nuts on them which you can do right away. Once you have done this, you can also screw one M6 nut on the top of each rod. This way, you should end up with a structure which is fixed on the plate, thanks to the bottom and upper nuts.
Then on the top of the bolts put the plate Part 15 1time then part 16 which is stacked once. After this, take two plates Part 17 and fix the NEMA 14 motor in the centre hole with 4 M3 bolts.
Once the stepper is attached, add that plate to the assembly. It is a good time to attach the spring tube as everything is accessible. No need for glue or anything, just pass a few loops of the spring through the plat from underneath. You can then attach the turning plate (which is made of 2 plates attach with 3 wood dowels) to the stepper part 17bis add two metal washers between the rotating plate and the plate of the stepper. This rotating plate is a part linked to the stepper in which the candies lodge until it reaches the hole where it will fall through the spring tube to the barrel.
Then, the sensor is attached to the Part 8 (dragi sensor) and then fit on part 16. It will later be clamped with part 18. note that the sensor is there to see if no candy felt. If so, the feeder will turn one more time.
Fix the plate 18 once, then the feeder top (Part 10) seven times, this will oblige the candies to fit inside the holes. Last part 19 are fixed six times, then fix the whole with three M6 bolts on the top of the metal rods.
Part 1: The barrel
Pieces you will need: Part 2, Part 3, Part 11 and Part 15. You will also need the PVC tube of 20 cm of diameter and the servo motor.
Screws: 4 M4 screws of 8 mm and 3 M4 screws of 35 mm (And all corresponding nuts).
Step 1) You will first need to make rectangular holes in the PVC Tube using the grinding wheel. These holes need to be symmetrical and their size is 28 by 16 mm. The centre of the rectangle should be at 62mm from the end of the tube.
Step 2) You will now need, with either a small hand grinder, or a saw, to cut two grooves, one on each side of the tube. Each of those grooves should be centred with respect to the previously done holes and should be 1.5 mm wide. The closest to the rectangular holes should be 29 mm long and the further one should be 9 mm long.
By now you should end up with a tube looking exactly like the one you can find in the pictures above (pictures 10 and 11).
Step 3) Now, let's assemble the whole barrel. Firstly, plug the two examples of Part 11 on both sides of the cannon. If everything went well, those parts should perfectly fit into the grooves you just made. This will ensure the barrel to keep in place.
Let's now align ourselves with the definition of "right" and "left". Take the tube you just modified, grooves below, and take the rectangular holes close to you. The barrel should be pointing in front of you. Now, your left hand side is the so called "left side" of the piece.
Step 4) Take the Part 3 and screw the servo motor in it from the left with 4 M4 screws of 8 mm and the corresponding nuts. The rotation axis of the motor should be downside.
Then, take the Part 3 and plug the two Part 11 into its holes by the right side. You now have to take the Part 2 and plug it from the left side.
You now need to take 3 M4 screws of 35 mm and screw the hole barrel in place using the three wholes designed for it.
Part 2: The feets
Pieces you will need: Part 4, Part 5, Part 6, Part 6bis, Part 24 and Part 28(once). You will also need a bearing of 8x22x7 mm.
Screws: 3 M3 screws of 16mm and corresponding nuts.
Step 1) Take the barrel. You can notice that there are holes remaining in Part 2. Plug Part 24 in those holes (Again, rotation axis downside).
Step 2) Place the bearing in Part 27 and plug it in Part 5. Now comes the tricky part. You need to plug Part 4 on the left of the barrel (bearing looking for the barrel). Then you need to plug Part 6bis in Part 4 and screw it putting a nut in the appropriated hole. Then, you have to plug Part 5 from the right side, linking Part 6bis with the barrel. And finally, you have to plug Part 6 from the right side and screw the thing as you did for Part 6bis and Part 4.
At this stage, you should have the barrel sitting on its feet.
Part 3: The thruster (the 2 wheels that shoots the candies)
Step 1) Construction of the rotating parts :
Cut a threaded rod M3 about 10 cm long (x6). Then, cut two small rings of the bike's air chamber (+- 3cm) and insert in each the 3D printed wheel (the bike's air chamber ring and the 3D printed part should be concentric) without forgetting to add some soft materials between them. Prepare the 4 bearings by putting them on a bearing-support (part 28) and add, in the centre of each bearing, a Link-shaft-bearing (part 26).
Then take the following materials : 24 bolts-M3, 8 washers-M3, 2 gears (part 20), 2 separators (part 25).
Step 2) Assemble everything together on a threaded rod in this order : 1 bolt, 1 washer, 1 bearing, 1 washer, 1 bolt, 1 gear, 1 bolt, 1 separator, 1 bolt, 1 wheel, 3 bolts, 1 washer, 1 bearing, 1 washer, 1 bolt.
Repeat step 2) a second time.
Step 3) Preparing the motor support :
On a motor support (part 9), screw the motor-support-part1 (Part 22), add the DC motor and attached it by screwing the motor-support-part2 (Part 23). Put the shaft connector on the motor and continue the construction in the step 3.
Step 4) Assembly of the thruster :
Put the two rotating parts around the barrel (where candies will be shot) and fix them by adding the two motor support (part9) above and below (motor above). Caution : take care about keyed connection of each bearing support and the insertion of the threaded rod in the shaft connector. Fix all these parts by screwing 4 threaded rods at each corner. Finally, screw in the middle the upper motor support (the one with the motor) on the cannon with 4 screws. Don't forget to tighten correctly the shaft connector.
Looking at pictures could give you a good idea of where goes each part.
The final assembly:
Now that you have the three main parts of the dragiTurret you may assemble the whole. The feeder is fixed with 3 pairs of bolts M6 on the rotating plate. The crane already assembled with the thruster is then fixed in the squared hole of the rotating plate with 3 pairs of M3 screws of at least 10mm lengths. Please proceed with attention as this step requires some dexterity. Take the remaining extremity of the spring, and fix it to the PVC tube of the barrel. To make it easy, try to apply a torque in the spring to open it slightly bigger.
At this stage you should have all the structure of the DragiTurret as it is on the picture above the section. Further sections will lead you through the electronic assembly and connections with the arduino from the 4 motors. There will be a section that will make you create the application to control the Turret.
Step 4: Electronic Circuit
For the electronic part of the turret, here is the scheme of it. To realize it, follow the steps described here below. As all the components where not available on the software to make this scheme, they may look different to the real components you may have but don't worry, on this picture are the exact connections that you will need to make (and of course the 9V battery is actually the power supply set to about 16V, do not put it higher as the DC motor would overheat). The voltage regulators are set to output 6V (for the servo) and 10V (the other one). Pay attention when using the A4988 drivers! You need first of all to set the max current of it. We strongly recommend you to set it at 1A. To know how to do it you can refer to the following website: https://www.makerguides.com/a4988-stepper-motor-driver-arduino-tutorial/
Connect the source ground and positive voltage (16V) to 2 alimentation lines of the breadboard, connect the Arduino ground to the same ground and the 5V of it to another alimentation line of the breadboard. Connect both voltage regulator grounds to the ground line and the input+ to the 16V line, the output+ of the voltage regulator for the servo motor will go in the servo motor directly. The 10V output+, connect it to the last alimentation line of your breadboard. You end up with 4 alimentation lines : Gnd, 16V, 10V, 5V. We suggest you to connect a 470 µF in parallel of the power supply.
Connect the L298N input voltage to the 16V of the power supply, ground to ground, remove the jumper of channel A and connect it to Pin 3 of Arduino. Then connect one of the logical inputs of motor A to the ground and the other one to the 5V of the Arduino. Connect the DC motor the the motor A output of the L298N.
Connect both stepper motors to the A4988 like explained in the same website as for setting the max current of the A4988. Here are the pins you should connect to the arduino :
Step pin for the NEMA17 to pin 7 of Arduino, Dir pin for NEMA17 to pin 8 of Arduino,
Step pin for the NEMA14 to pin 2 of Arduino, Dir pin for NEMA14 to pin 13 of Arduino.
Connect the red wire of the servo motor to the 6V output+ of the corresponding voltage regulator. The brown one to the ground and the yellow one to pin 5 of Arduino.
Connect the HC06 Vcc pin to the 5V alimentation line, Gnd to Gnd, TX directly to pin 11 of Arduino, and RX to pin 10 of Arduino but via a resistive divider. To do this, connect pin 10 to 1Kohm resistor, connect the other pin of the resistor to the RX pin of HC06 and to 2Kohm that you will connect to the Gnd.
Connect the TCRT5000 both grounds to Gnd, output pin of TCRT to A0 or Arduino and to a 4,7Kohm resistor connected to the 5V alimentation line. The input pin has to be connected to the 5V alimentation line via a 100ohm resistor.
Connect a LED to the pin 2 with a 220ohm restistor in series and the other pin to the Gnd.
Once you've soldered everything, attach all the component to the circuit base plate cut earlier. You can then attach the plate to the base of the turret. The bolt and nut used for this are M3 and about 20mm long. The length is not important as it does not interfere with any parts. The number of bolts are listed below :
· 2 voltage regulators (4 bolts each - 4 for more)
· 1 DC driver (2-4 bolts)
· Arduino (4 bolts)
· Protoboard (optional)
Step 5: Computing + Bluetooth Codes
The first step of the software is to upload the application directly on your smartphone. Therefore you can use MIT App inventor, which is an online environment to develop applications for Android smartphones. Of course you are free to do it on an other environment or to design it in an other way that you prefer, as long as you keep the same operating principle (or if not, you will also have to change the Arduino code). Whatever you do, here are the "design" and block parts that we made on MIT App inventor. The main Idea is that the phones tells via the bluetooth to the turret if something has to be done. Each time something has to be done, two values are sent to the HC-06 : X and Y. If these value are between -100 and 100, it says to the turret to move in the X and Y position by the corresponding value. If the X is 1000 or -1000 this switches ON or OFF (respectively) the Auto mode of the turret. If the X is 1500, it shoots a single time when Auto mode is OFF. Also two sliders are here, to change the speed of the shooting and the rate of it. These changes correspond to a value of X between 105 and 205 for the rate and between 305 and 405 for the speed. If nothing has to be done, the value -150 is sent for X and Y.
The second step is the coding of the Arduino UNO. For that you can either create your own based on the bluetooth application you made yourself or simply download the code. Here it is in a .txt file so you have to copy-paste it and put it in your Arduino IDE. The way it works directly follows from the way the bluetooth application works.
To visualize the way the turret code works, here is also a scheme for the main idea of operating.
Step 6: Conclusions
As a conclusion, as you may see on the attached videos the turret works. The Bluetooth app has been implemented and the device is controlled directly on a smartphone. It can proceed to tilt and pan movement and the firing itself have two modes: Auto and one by one firing mode.
Still, there are some improvements leads that we could have dug into. The Bluetooth app has a certain delay and as such the pan and tilt movement of the turret is not perfectly smooth. We did try with an analogue joystick and the movement was much better, but the goal was to control it via an app. This app could be improved in order to smooth the motion of the turret.
Furthermore the thrust force of the candy is not very impressive. As a matter-of-fact, we used small voltage motors and thus the rotation of the propeller in the barrel is not the best. The range of firing is approximately 1 meter with a straight aim. Better motion of propulsion could have been implemented with higher voltage supply.