The BFFDog : Ball Launcher for Dogs
by milanamighi in Circuits > Arduino
1468 Views, 6 Favorites, 0 Comments
The BFFDog : Ball Launcher for Dogs
As part of the course MECA-Y-403: Mechatronics 1, students are asked to complete a project that consists of designing and manufacturing a robot prototype with a particular objective. They are given different ideas at the start of the year and once the subject has been chosen, the main goal for them will be that the robot can perform its primary function. This report concerns the ball throw robot for dog.
A lot of people in the world today own a dog and occupying it takes up a large part of the time. One of the best known activities for playing with your dog is throwing tennis balls to bring him back. It allows the dog to keep busy and play sports but sometimes it can be an exhausting activity for the owner. One solution for this is to create a robot that can throw the balls for the dog and the dog can give it back to the robot so he can throw it again.
Table of contents:
- Project motivation
- Project working modes/functionality
- High-Level Design
- Mechanical Systems (manufacturing choices)
- Circuitry & Sensors
- Software
- Integration guide
- Demo project show + Quick start guide
- Review your project critically
- Sustainability
- Bill of materials
- Presentation of the team
- Project Repo
Projet Motivation
A lot of people in the world today own a dog and occupying it takes up a large part of the time. One of the best known activities for playing with your dog is throwing tennis balls to bring him back. It allows the dog to keep busy and play sports but sometimes it can be an exhausting activity for the owner. The idea is to conceive a device which can provide an exercise to their dog.
The solution would be to create a ball thrower robot that can do the job. Here, the ball launcher will throw a tennis ball for a dog to go get it and retrieve it in order to return it back to the machine. This is why it is necessary to create a mechanism that can interact with the dog so that it understands or put the ball so that the robot can relaunch it. The purpose of the system is therefore that it can occupy the dog and that the latter understands how to use it to be able to play with him so that the owner can rest while the dog plays.
This project is a real challenge for the group : being all great animal lovers, and especially dogs, it was fun to be able to make a "toy" for them so that they could play with it. We are all also great fans of mechatronics, this project is our first big challenge in this field and will allow us to learn more about this subject. Furthermore, two members of the group have a dog. It will allow us to sleep while our dogs play and get tired.
Project Working Modes/Functionality
The main objective of the prototype is the throw the ball and receive it from the dog. A security system can also be installed so as not to injure the dog or even some person who could pass in front of the prototype during its operation. This is how the prototype works : in order to control all our system and so that it works as we want, we use an Arduino in which we will add our code that will control the electronic components in the right order. As long as no ball is detected by the sensors, the motor will remain off. If we detect a ball, we check if there is someone in front of the machine so as not to hurt anyone. If we detect someone, the motor will remain off. If there is no one in front, we will turn the servo motor to let the ball pass to throw it. At the same time, we will activate the motor for 3 seconds. Once the time has passed, we will return the servomotor to its initial position in order to block access to the input and all the process is repeated. The electronic components such as the Arduino and the drivers are placed in a box below the prototype in order to protect them. In order to put on the ball launcher, all you have to do is connect the battery to the driver, so the cables are outside to facilitate the ignition (the battery is outside for more simplicity). A few holes were made to allow the cables to pass. Shock absorbers were placed below the prototype to reduce vibrations. The prototype can operate for 30 minutes before needing to be recharged (recharge time estimate at one hour).
Unfortunately, the prototype only has the ability to throw the ball in one direction and the angle remains constant.
High-Level Design
Here, we describe all subsystems and how they are connected and communicate with each other:
1-Main part:
The main part is composed of two parts. In this part, it’s where the compression of ball will happen and will follow the trajectory of the part to be launched then. The design considerations for this part are the main essential element to fulfill the requirements of the project. It was designed to be small in size and in the same time can launch the ball to a distance of 10 m. Therefore, the trajectory that the ball will follow was designed to be circular path, the compression of the ball happens in the top part of the trajectory then the ball continue to be launched without compression. However, the part needed to have holes in order to add the bolts and nuts and tightening them. Also, the part has a space in the top to insert the ball and space in the front which need to be big enough to allow the ball to be launched freely.
2- Wheel:
The wheel is the part that will rotate and compress the ball in the initial stage. Therefore, some design considerations were taken into account. First, the wheel has to be big enough to compress the ball and give it enough torque to be launched far enough. Second, to avoid slipping between the ball and the wheel, the team thought of giving the wheel surface a geometry that has a high friction with the ball. The concept was something like knurling which is basically a pattern of crossed lines cut from the surface of the wheel.
3-Shaft:
The shaft is the element that connects the wheel with motor. The design considerations are therefore very important to ensure a smooth running of the machine. First, the shaft needed to be strong enough to withstand the compression force from the ball. Second, the shaft size needed to be consistent with the size of the bearings available. Third, the shaft should contain a square key to block the rotation of the wheel inside the shaft. However, for the axial motion of the wheel it was blocked by using superglue in the interface of the wheel and the shaft and therefore combining them in one part.
4- Coupling:
After we have coupled the shaft with wheel, we need to couple the shaft with motor. But, prior to that we need to ensure the stability of the shaft by adding bearings on both sides of the shaft. However, in order to couple the shaft with motor we used a flanged shaft coupler suitable with the motor shaft diameter. The shaft coupler was screwed into the shaft which has already holes for that in order to avoid eccentricity. Also, the motor used needed to be attached on the part in order to couple it with the shaft, therefore a new part was introduced whose main goal is to hold the motor on place on the side of the main part with the same on the same bolts that are used to hold the bearing, in that case we ensured centricity of the shaft, the coupling and the motor. After that, the motor was coupled with shaft and when we tested it showed good stability and durability to compression.
5-Container:
In order to lock the ball before launching it, we needed to introduce a mechanism that could lock the ball and that allows the sensor to detect the presence of the ball. Also, since we needed an ultrasonic sensor to detect if someone is in front of the ball. We thought of using one part that can combine the three elements together. Therefore, the design considerations for this part are adequate size for the ball and a place to put the servo motor and the sensors.
When the motor will be running, it was expected that there will vibrations that might cause instability of the part. In the same time, we needed to have a place to put all the electronic components inside to make the robot more beautiful. Therefore, this part needed to have a size that can contain the electronic components and ensure stability during the running time of the motor. Rubber feet where used at the bottom of the base to increase the friction with the ground in order to avoid slipping, in the same time the rubber feet provide some vibration dampening caused by the motor.
Mechanical System (manufacturing Choices)
In the design process, we decided to use 3d printing for some parts (where the material is PLA) and laser cutting for others (where the material is wood). Since the 3d printers have a limited printing size and time, this was taken into account in the design of the main part. Therefore, the main part was split into two parts so we can print each part in alone and then joining them together. By that, we could save time and reduce the risk of printing the part all over again if anything went wrong. Also, we decided to use laser cutting instead of 3d printing for some parts that are constant in thickness like the covers of the base and the main part. However, since we have a vibration source in the model which is the motor, we were limited to the use of laser cutting to avoid joints loses that could lead to less rigidity of the part.
All the CAD files can be found at the end of this report.
Circuitry & Sensors
The ball launcher needs different electrical and electronic components to work. The electronic part is a very important point of our prototype because it is this which will take care, thanks to an Arduino, of being able to control our system so that each part works so that our prototype works and fulfills the desired function. It was thus necessary to find the various electronic components the most optimized and the least expensive.
The device needs a motor to accelerate the ball and different sensors, drivers and microcontrollers to control its operation. In addition, power supplies are also needed to power the various components.
The list of different components:
- BLDC motor
- Battery
- Servo motor
- ESC
- Ultrasonic sensor
- Arduino uno
- DC Boost Converter
- Infrared sensor
In order to operate the ball launcher in compliance with the specifications, we have selected the various components necessary for the realization of the device:
1. BDLC Motor
The motor will allow us, thanks to the wheels, to be able to throw the ball at a certain distance. Before choosing it, it was necessary to know the different necessary characteristics that it had to have such as its power, its number of revolutions minutes, etc. To do this, it was necessary to do calculations on paper and then order it. Using Newton's second law and using the power and torque formulas, we get these characteristics to be able to throw the ball 5m away:
-Torque : T= F * r =0,252N
-The number of tour per minutes : N = 2228.16 rpm
-The power of the motor : P = T * w = 58.8 W
Since we know the characteristics of the motor we need, we have to choose the kind of motor we will use. Since we need the smallest motor possible with the right power and with a precise control over the speed, we select a BLDC motor.
We choose this motor that has the minimum characteristics we need:
Motor data (710KV 5mm Shaft Outrunner Brushless Motor Type FC4250-07):
-Kv : 710
-Voltage : 3 - 4S
-Power[W] : +/- 400
-Max Current [A] : 43
For this motor, we will need of a battery of 3S, then a voltage of 3*3.7=11.1[V]
We will reach a maximum speed of 11,1*710 = 7881 [rpm] for a maximum power of 400 [W].
It is more than required but we didn’t find a smaller motor with the minimum characteristics needed.
2. ESC
To control this motor, we will need an ESC that support 11.1 [V] and 43 [A].
Specifications :
-Max Amps : 200 A
-BEC : 5V / 5A UBEC
-Cells : 2 ~ 6S 7. 4 ~ 22.2V Lipoly
-Size : 65x40x26mm
-Weight : 128 g
This ESC has the characteristics needed for the control of the selected motor.
The control will be done by sending a ppm signal using the servo library of Arduino.
As the ESC provides 5 [V], it will also be used to power other components (servo Motor, sensors, Boost Converter).
3. Servo Motor
A servomotor will be used in order to be able to let the ball pass if one detects one and if no one is in front of the robot. The servomotor "servo-s90" which thanks to its lightness, low size and good torque meets all the requirements for this task.
Dimensions & Specifications (servo-s90):
-A (mm) : 32
-B (mm) : 23
-C (mm) : 28.5
-D (mm) : 12
-E (mm) : 32
-F (mm) : 19.5
-Speed (sec) : 0.1
-Torque (kg-cm) : 2.5
-Weight (g) : 14.7
-Voltage : 4.8 - 6
The Servo Motor must be able to drink a tennis ball with a mass of 60 [g] with a rotating piece which, is ± 2 cm from the servo motor, it must be able to develop a torque of minimum: 0.06 ∙10 ∙ 0.02 = 0.012 [Nm].
However, the engine can provide a maximum torque of 0.25 [Nm] hence this device suitable.
4. Arduino Uno
The Arduino is the micro controller to control the ball launcher. We use an Arduino Uno, a Micro-controller based on the Microchip Technology ATmega328 8-bit MCU. Arduino Uno features 14 Digital I/O pins of which 6 analog pins and a 16MHz quartz crystal is present.
5. Boost Converter
The Boost Converter is used to increase the voltage from 5 [V] provided by the ESC that it increases to ± 9 [V]. These 9 [V] are necessary to feed the Arduino at the level of the Vin pin. For the ball launcher, we use a DC-DC Boost Converter 3-30V.
6.Ultrasonic sensor
We need an Ultrasonic Sensor to measure the distance and it is used as a security device to check if there is no dog or person in front of the Ball launcher.
Description (Ultrasonic Distance Sensor HC-SR04):
-Operating voltage : 5V DC
-Operating current : 15mA
-Measure angle :15°
-Ranging distance : 2 cm – 4 m
7. Infrared sensor
The Infrared Sensor is accurate at short distances. It is therefore used to detect the presence of a ball in the Ball launcher. For this project, we use an Infrared Sensor GY-VL53LOXV2 L53LOX.
8. Battery
For the battery, we selected this model that has the voltage and energy to make our project work during at least 30 minutes.
Description & specifications (Turnigy 5000mAh 3S 20C LiPo Pack w/XT-90):
-Minimum Capacity : 5000mAh
-Configuration : 3S1P/11.1V/3Cell
-Constant Discharge : 20C
-Peak Discharge (10sec): 40C
-Internal Resistance : 9m
-Discharge Connector : XT90
-Balance Connector : JST-XH
-Discharge Cable : 12AWG
-Discharge Cable Length : 100mm
-Dimensions: 143x23mm
-Weight : 345g
9.Final Circuit Diagram
The diagram below shows the different electrical and electronic components of the assembled Ball launcher.
At FABLAB, we reproduced the electrical circuit presented above and several tests were carried out to control their operation. We were thus able to verify that the various components have achieved the expected performance.
Software
In order to control all our system and so that it works as we want, we use an Arduino in which we will add our code that will control the electronic components in the right order. The structure of our program is just above.
As long as no bullet is detected by the sensors, the motor will remain off. If we detect a ball, we check if there is someone in front of the machine so as not to hurt anyone. If we detect someone, the motor will remain off. If there is no one in front, we will turn the servo motor to let the ball pass to throw it. At the same time, we will activate the motor for 2 seconds. Once the time has passed, we will return the servomotor to its initial position in order to block access to the input and all the process is repeated.
The code is the following:
- #include //libraries used
- #include "Adafruit_VL53L0X.h" // for the infrared sensor
- // define pins of each element
- // Pin for the infraredsensor that detect the ball
- const int Pinsensorball = 12;
- //Pin for the ultrasonic sensor that detect if someone is in front
- const int PinsensorsecurityTrig = 3;
- const int PinsensorsecurityEcho = 2;
- long lecture_echo;
- long cm;
- Adafruit_VL53L0X mesure_distance = Adafruit_VL53L0X(); // creation of an instance
- //Pins for motor direction control
- const int pinmotor = 9 ;
- Servo esc; // Creation of the object allowing the control of the ESC
- //Pins for servomotor
- const int pinservo = 6;
- Servo myservo; // creation of objects allowing to control the servo
- void setup() { // put your setup code here, to run once:
- //Initialising of motor
- esc.attach(pinmotor); // The ESC is attached to digital port 9 (PWM port mandatory)
- delay(15);
- Serial.begin(9600);
- // ESC initialization
- esc.writeMicroseconds(2000);
- delay(2000);
- esc.writeMicroseconds(1000);
- delay(2000);
- //Initialising of ultrasonic sensor
- pinMode(PinsensorsecurityTrig , OUTPUT);
- digitalWrite(PinsensorsecurityTrig , LOW);
- pinMode(PinsensorsecurityEcho, INPUT);
- Serial.begin(9600);
- //Initialising of infraredsensor
- Serial.begin(115200);
- if (!mesure_distance.begin())
- {
- Serial.println("VL53L0X module startup error");
- while(true);
- }
- //Initialising of servomotor
- myservo.attach(pinservo); //setup servo
- myservo.write(180);
- }
- void loop() { // put your main code here, to run repeatedly:
- VL53L0X_RangingMeasurementData_t mesure; // measurement pointer declaration
- mesure_distance.rangingTest(&mesure, false); // performs the measurement; true to switch to DEBUG mode
- //We first see that there is a ball. If yes, we continue the mechanism
- if (mesure.RangeMilliMeter / 10 < 6 ) // Range of the infrared
- {
- Serial.print(" Distance infrared (cm): " );
- Serial.println(mesure.RangeMilliMeter / 10); // distance display in cm (an integer)
- //Now we see if there is someone in front of the prototype to avoid throwing the ball at someone
- digitalWrite(PinsensorsecurityTrig, HIGH);
- delayMicroseconds(10);
- digitalWrite(PinsensorsecurityTrig, LOW);
- lecture_echo = pulseIn(PinsensorsecurityEcho,HIGH);
- cm = lecture_echo /58;
- Serial.print("Distance of the ultrasonic sensor in cm :");
- Serial.println(cm);
- if (cm > 150 ) //range of the ultrasonic sensor
- {
- //If nobody is in front, we turn on the motor
- //We turn on the motor progressively
- for (int i=1000; i<=2000; i=i+100) {
- esc.writeMicroseconds(i);
- delay(200);
- }
- delay(1000); // We wait 1 second
- // Moves the servo arm from 180 ° to 90 ° to let the ball pass
- for (int position = 180; position >= 90; position--) {
- myservo.write(position);
- delay(15);
- }
- delay(1000); // We wait 1 second before turning off the motor
- //We turn off the motor progressively
- for (int j=2000; j>=1000; j=j-100) {
- esc.write(j);
- delay(200);
- }
- // Moves the servo arm from 90 ° to 180 ° to return to the initial position
- for (int position = 90; position <= 180; position++) {
- myservo.write(position);
- delay(15);
- }
- }
- }
- }
Integration Guide
To assemble the prototype, first step is to print the two main pieces of the prototype and to laser cut the two wood plane. The next step is the connection between the wheel and the motor, first, the ball bearing needs to be fixed on the wood plane. The shaft coupler, the shaft and the wheel must be put together. Finally, the motor should be screwed on its support, the shaft of the motor is connected to the shaft coupler.
The two wood plane must be screwed on the two main printed pieces (height hours of printing for each part) and the two main printed pieces must be screwed together with the assembly between them. The box that is going to keep the ball (2 hours of 3d printing) is then attached on the top of the previous assembly using screws. Up to here, the screws used are all the same (flat head M4 x 25 mm). The ultrasonic sensor, servo motor and infrared sensor are all added on this box using smaller screws (1 millimeter diameter). To contain additional electronics such as Arduino, battery, motor driver and step up voltage device, an additional box is added to the prototype, the side of the box must first be printed (four hour of printing), the top and the bottom is made from wood laser cutting. The additional electronics are glued on the bottom plate using double sided tape (withdrawable). Rubber foot are also added with screws. Before closing the box with the top wood plane, the cables between electronics motor and sensors must be soldered. The electronic box is screwed with the bottom of the final prototype
Demo Project Show + Quick Start Guide
There is a small presentation of the prototype where we explain how it works and how it can be started.
Link of the video : https://www.youtube.com/watch?v=R-g2Ht5F-6o
Review Your Project Critically
The current prototype works meeting all the basic requirements needed by a ball throwing robot for dogs. We were able to realize all that was expected. Moreover, as an extension for the project there could be 2 additional features.
For recovery of the ball, a container like the shape of a miniature silo could be designed making it easy for the dog to return the ball. A treat feeding assembly could be arranged to train the dog. Each time the dog retrieves the ball and places it back in the silo, a treat can be given to the dog. This would make the machine autonomous.
Some improvements can be made such as reduction of vibrations and noise, reduction of the lengths of some wires. The top box can also be larger in order to be able to insert the battery inside, which has been inserted outside in order to facilitate the switching on of the product and the recharging of the battery more easily for the user. Some screws can be cut because they are too long on the edges, so the prototype can be more aesthetic.
Sustainability
The group must try to have a recyclable prototype as much as possible while developing a detailed product for a good environmental impact.
-PLA is used for almost the entire structure of the prototype and is in fact recyclable. But because PLA has a lower melting point than other plastics, it can't be recycled with everyday plastic. Its recycling is therefore not widespread.
-MDF is a type of wood and is used for the edges of the prototype and the box with all electronic components. It can be recycled in specialized center.
-Ball bearing, made of steel and used to hold the motor in place, is used follows a circular life cycle. To reuse it, bearing grease is cleaned out and replaced with new lubricant.
-Screws, used to attach all the prototype, can be sold to metal recycling companies, meaning that their recycling is accessible and profitable.
-For the electronic components, complete recycling is impossible. The different components will have to be process to extract allthe precious metals (copper,gold,etc...).This will be done in a company that is specialized in recycling electronic components.
Bill of Materials
The choice of material is crucial in the design of a product. Each material has its own properties and there is a relationship between the material, the shape of the part and the way it is produced. For the choice of equipment, it will be necessary to take into account the different objectives to have, the price, the availability and also the manufacturing process.
The PLA was chosen with regard to the main box, the bale container and the wheel since these are parts which require a rather complex geometry, due to the use of the 3D printer. PLA is characterized by very high rigidity and low elongation at break. PLA is also very permeable to water vapor, which must allow it to have a certain "resistance" in the case of a humid floor.
Wood is also used in the case of the edges of the main box and the box containing all the electronic parts. It has the particularity of being rigid, easy to handle, recyclable and inexpensive. It is cut with the laser cutter.
In order to be able to have an estimate of the final price, a list of the different components necessary for the construction of the prototype has been defined with the price of each part:
-Ultrasonic sensor: 2€
-Arduino Uno: 25€
-Brushless motor: 40 €
-Driver : 35€
-Battery: 40€
-Infrared sensor: 5€
-Servomotor: 4€
-Boost converter: 4€
-PLA for the structure and the wheel (3D printing): 15€
-Wood (laser cutting): 3€
-Protoboard: 3€
-Wires: 2€
-Screws: 6€
-Bearing : 2 x 4,9€
-Isolation rubber : 5€ for the 4
Total price : 198,08€
For the final price, it will be necessary in particular to take into account all the effort in the design of the prototype as well as the electricity necessary to operate the 3D printers and laser cutters. We must also take into account assembly and manufacturing cost. The assembly time can be estimated at 4h and the printing of the different parts can be estimated at 8h if we consider the fact that we have enough 3D printers to print all the parts at the same time.
Presentation of the Team
We are 5 students from the program BRUFACE that consists to bring together all students in electromechanical engineering master's at ULB and VUB in Brussels as well as international students. Now, we will present our team:
-Thomas-Selim Ikazban: I introduce myself Thomas-Selim Ikazban. I have had a linear journey since I entered university. I began in ULB in 2018 as civil engineer student, and I continued my studies in this subject. I have chosen to go with the electromechanics option for the third year. After much hesitation, I opted for the mechatronic specialization. I was more drawn to the practicality aspect of this option. Much of my work on this project has been to make the connection between the material needs of the team and the supplies available under command. It goes from the simple choice of the ball used (test of diameters, ball flexibility) to the adaptation of certain mechanical parts with respect to the available material (shafts coupler, ball bearing, …). On the other hand, I also worked on the part of design methodology.
-Milan Amighi: Hello, my name is Milan Amighi. I studied my entire bachelor at ULB in Brussels and since I was young, I have been passionate about robotics. This is why the mechatronics course was a real challenge for me and why I really enjoyed doing this project. For this project, I had to write the code, I contributed towards the motor calculations and I also took care of the structure of the mechatronic report and design methodology report. I was also helping my companions when they needed it. My favorite part of the project was probably having to put all the electronic parts together because I felt like Iron Man.
-Sébastien Menet: With these few lines, I introduce myself Sebastien MENET. My background is rather special because I followed a training as an industrial engineer in chemistry and industrial engineer in electromechanics while working. I worked in the chemical sector as an analyst. Having the aggregation in chemistry, I also taught science in high school. I resumed my studies at polytechnic because I have an attraction for mechanical sciences and more for robotics. In the project, I participated in the sizing and selection of components for the control of the motor and for the power supply of electrical and electronic components (battery and DC Boost Converter). I also participated in the study of the electronic circuit of the project.
-Josep Varghese: My name is Joseph Varghese. I finished my Bachelor’s in Electrical and Electronics Engineering from India. During which our project was a Bluetooth controlled electric cart. I briefly worked in the hospitality industry as hotel engineer prior to joining the Bruface program in Brussels. For the current project, I contributed towards the motor calculations, testing and soldering of electronic components and final assembly of the bot.
-Yazeed Abu Heshmeh: I would like to introduce myself and summarize my rule in this project. I am Yazeed; I graduated with a bachelor degree in Mechanical Engineering in 2020. During my studies, I worked on a 3D printing project for 5 months which was about the mechanical properties of 3D printed materials by changing different printing parameters. In this project, I worked on the mechanical design and finding the best solutions to couple different parts. I also worked on the 3D printing, laser cutting and choosing the suitable materials and 3D printing parameters for our parts.
Project Repo
Here you have a link to a drive location where all the files can be downloaded at once as a ".zip" file:
https://drive.google.com/drive/folders/1C1lIXQz3AiI8SvUISdBUhfy9gHWIH_t8?usp=sharing