Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2023:avaduva:radar [2023/05/30 14:34]
mario.rodina [Bibliografie/Resurse]
pm:prj2023:avaduva:radar [2023/05/30 15:00] (current)
mario.rodina [Rezultate Obţinute]
Line 12: Line 12:
  
 ===== Descriere generală ===== ===== Descriere generală =====
 + The Ultrasonic sensor sends a signal to the  Arduino which processes it and then sends the appropriate response to the buzzer, servo and  LCD
 {{:​pm:​prj2023:​avaduva:​block_diagram.png?​200|}} {{:​pm:​prj2023:​avaduva:​block_diagram.png?​200|}}
  
 ===== Hardware Design ===== ===== Hardware Design =====
  
-Aici puneţi tot ce ţine de hardware design:+
   -Arduino uno   -Arduino uno
 {{:​pm:​prj2023:​avaduva:​uno-r3-atmega328p-atmega16u2-placa-de-dezvoltare-compatibila-cu-arduino.jpg?​200|}} {{:​pm:​prj2023:​avaduva:​uno-r3-atmega328p-atmega16u2-placa-de-dezvoltare-compatibila-cu-arduino.jpg?​200|}}
Line 36: Line 36:
  
  
-Picture of project hardware+Picture of project hardware ​prototype:
  
 {{:​pm:​prj2023:​avaduva:​whatsapp_image_2023-05-18_at_22.37.31.jpeg?​200|}} {{:​pm:​prj2023:​avaduva:​whatsapp_image_2023-05-18_at_22.37.31.jpeg?​200|}}
 +
 +Picture of project hardware final:
 +
 +{{:​pm:​prj2023:​avaduva:​whatsapp_image_2023-05-30_at_14.50.54.jpeg?​200|}}
 +
  
 ===== Software Design ===== ===== Software Design =====
Line 44: Line 49:
  
  
- The code for this project is as follows: libraries, declaring the ports that will be used, setup for the LCD and servo. In setup, we give each pin/port its use for each component and give the LCD its initial background colour. The buzz function gives us a way to use a buzzer with any frequency and time of our choosing whenever it is needed in the loop function. In the loop function, the first thing that is done is give the LCD its background elements that make up the interface that the user sees, which is followed by the code for the right rotation of the servo, which  includes more visual elements such as the rays used to indicate the distance between the sensor and the object it detects, with it putting a red circle at the end of the line to indicate the exact spot where the object was seenThe left rotation code isn't different from the right rotation code, with it doing essentially the same thing . At last, there is the calc_dis function which calculates the distance from the sensor to the object.+ The code for this project is as follows: libraries, declaring the ports that will be used, setup for the LCD and servo. In setup, we give each pin/port its use for each component and give the LCD its initial background colour. The buzz function gives us a way to use a buzzer with any frequency and time of our choosing whenever it is needed in the loop function. In the loop function, the first thing that is done is give the LCD its background elements that make up the interface that the user sees 
 +  TFTscreen.background(00, 0); 
 +  TFTscreen.stroke(255,​ 255, 255); 
 +  TFTscreen.circle(80,​ 128, 102); 
 +  TFTscreen.setTextSize(2);​ 
 +  TFTscreen.text("​Dist(cm)",​ 0, 0); 
 +    
 + ​Which ​is followed by the code for the right rotation of the servo, which  includes more visual elements such as the rays used to indicate the distance between the sensor and the object it detects, with it putting a red circle at the end of the line to indicate the exact spot where the object was seen and activating the buzz function: 
 +   void buzz(int freq, int time) 
 +   { 
 +  tone(buzzer,​ freq); 
 +  delay(time);​ 
 +  noTone(buzzer);​ 
 +   } 
 + 
 +The left rotation code isn't different from the right rotation code, with it doing essentially the same thing . At last, there is the calc_dis function which calculates the distance from the sensor to the object.
     ​     ​
 Arduino ide was the main environment in which the code part of the project was made Arduino ide was the main environment in which the code part of the project was made
     ​     ​
-The libraries that were used for this project were: Servo.hTFT.h and SPI.h.+The libraries that were used for this project were:  
 +   #​include <Servo.h
 +   #​include <TFT.h
 +   #​include <SPI.h>
   ​   ​
  
Line 56: Line 79:
 Overall the project works as intended, with it doing what i originally had planned for it. The ultrasonic sensor acting as an input for the Arduino and for the LCD moves in the proper 180 degree arch that is required of it by the code and graphic design of the graphic displayed to the user. The buzzer doesn'​t work as originally intended, but instead alerts us when an object is within the specified distance of the radar, which causes it to activate with every input that passes the checks in the code. This whole project needed a bit of creativity to get it fully working and into a presentable shape, with the support for the sensor and the whole casing for it being made from stuff around the house, the support being made from cardboard and the casing from lego pieces. ​ With the modularityy of the casing , the components within can be repurposed for a myriad of different purposes. Overall the project works as intended, with it doing what i originally had planned for it. The ultrasonic sensor acting as an input for the Arduino and for the LCD moves in the proper 180 degree arch that is required of it by the code and graphic design of the graphic displayed to the user. The buzzer doesn'​t work as originally intended, but instead alerts us when an object is within the specified distance of the radar, which causes it to activate with every input that passes the checks in the code. This whole project needed a bit of creativity to get it fully working and into a presentable shape, with the support for the sensor and the whole casing for it being made from stuff around the house, the support being made from cardboard and the casing from lego pieces. ​ With the modularityy of the casing , the components within can be repurposed for a myriad of different purposes.
  
 +{{:​pm:​prj2023:​avaduva:​whatsapp_video_2023-05-30_at_14.56.28.gif?​200|}}
 ===== Concluzii ===== ===== Concluzii =====
 In conclusion, this project was quite the learning experience, with it teaching me new skills that i would have learned much latter otherwise and how to improvise and make do with an unfinished product due to for some time missing a crucial component. Other than that, the radar works as intended, with some future iterations changing the ultrasonic sensor with something more similar to the real deal. Overall, this was a great experience, and has created new opportunities for self growth and development . In conclusion, this project was quite the learning experience, with it teaching me new skills that i would have learned much latter otherwise and how to improvise and make do with an unfinished product due to for some time missing a crucial component. Other than that, the radar works as intended, with some future iterations changing the ultrasonic sensor with something more similar to the real deal. Overall, this was a great experience, and has created new opportunities for self growth and development .
pm/prj2023/avaduva/radar.1685446443.txt.gz · Last modified: 2023/05/30 14:34 by mario.rodina
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0