Instructions for making ultra cool ultrasonic measurement, measuring up to 4 meters, 1 centimeter error, the price is less than


SUBMITTED BY: tigercn

DATE: Jan. 12, 2017, 4:11 p.m.

FORMAT: Text only

SIZE: 5.4 kB

HITS: 1394

  1. You must measure the distance from the floor to the ceiling you do not have an elevator, you will measure how?
  2. In life or daily work, there are times when you need to measure the distance from point A to point B but if a normal size can not help you measure the distance, you'll have to do like? You will be roughly that distance or order a size laser with up to several million price? In today's article we will guide you to a measure of restraint in space with features similar to the laser to measure the cost of only a few hundred thousand.
  3. Prepare
  4. An Arduino UNO R3 kit (priced at about 180,000 VND)
  5. An ultrasonic sensor or SRF-05 SRF-04 well (30.000- cost about 50,000 dong)
  6. A 16x2 LCD display (approximately 50,000-100,000 VND Price type Keypad your choice whether to use the type of article is the type of keypad)
  7. A hug 10K variable (cost about 10,000 dong)
  8. A test circuit Broad (priced around 20,000)
  9. Germany's line, the Duc. (Price 7000 contract)
  10. You can consult and order products
  11. How to assemble and operate
  12. Step 1:
  13. Ultrasonic sensors SRF-05 and 10K variable hug
  14. Ultrasonic sensors SRF-05 and 10K variable hug
  15. 10K variable hug
  16. 10K variable hug
  17. Ultrasonic sensors plugged SRF-05 and turn onto broad embrace 10k circuit test
  18. Plug the cord into the foot of ultrasonic sensors SRF-05 and turn 10k hug
  19. With ultrasonic sensors SRF-05 plug into the pins GND, VCC, Trig and legs Echo
  20. With 10K of your variables plugged into 3 feet of rheostat.
  21. Step 2:
  22. 5V and GND wires plugged into circuits Broad test. 5V wires you plug in the foot strip (+) GND cord plugged into the vacuum range (-)
  23. Then plug the VCC and GND of ultrasonic sensors on the two strips (+) and (-) on the broad test this circuit.
  24. Next you plug the outside of turn two outside back into two bands. You just plug any two strings are.
  25. Trig's sensor plug into the foot 9 and Line Echo on foot No. 10
  26. Step 3 Connect with 16x2 LCD display with Ardduino
  27. The legs of the LCD screen, from foot to foot K VSS
  28. The legs of the LCD screen, from foot to foot K VSS
  29. Pinout:
  30. GND VSS plug into foot foot
  31. 5V VDD foot plug in leg
  32. VO foot rope connected between the variable resistor 10K
  33. RS leg plugged into the Arduino foot 1
  34. RW foot plugged into GND pins
  35. E plug on the leg leg 2
  36. D4 foot plugged into the Arduino foot 4
  37. D5 foot plugged into the Arduino foot 5
  38. D6 6 feet plugged into the Arduino foot
  39. D7 foot 7 foot plugged into the Arduino
  40. A plug into 5V foot foot
  41. Chan K plugged into GND pins
  42. GND VSS plug into foot foot
  43. GND VSS plug into foot foot
  44. VO foot rope connected between the 10K potentiometer, RS plug on pins 1 Legs, Legs RW plugged into GND pins
  45. VO foot rope connected between the 10K potentiometer, RS plug on pins 1 Legs, Legs RW plugged into GND pins
  46. E plug on foot 2 feet, legs and feet D4,5,6,7 plugged into the Arduino 4 5 6 7
  47. E plug on foot 2 feet, legs and feet D4,5,6,7 plugged into the Arduino 4 5 6 7
  48. A foot strip plugged into the (+) pins plugged into the strip k (-) on the broad test circuit
  49. A foot strip plugged into the (+) pins plugged into the strip k (-) on the broad test circuit
  50. Step 4: Load the code for the Arduino
  51. You connect to the computer and open Arduino Arduino on the computer and then copy this code.
  52. #include
  53. LiquidCrystal LCD (1, 2, 4, 5, 6, 7);
  54. const int trigPin = 9;
  55. const int echoPin = 10;
  56. ThoiGian dragon;
  57. distance: int;
  58. void setup () {
  59. lcd.begin (16.2);
  60. pinMode (trigPin, OUTPUT);
  61. pinMode (echoPin, INPUT);
  62. }
  63. void loop () {
  64. digitalWrite (trigPin, LOW);
  65. delayMicroseconds (2);
  66. digitalWrite (trigPin, HIGH);
  67. delayMicroseconds (10);
  68. digitalWrite (trigPin, LOW);
  69. ThoiGian = pulseIn (echoPin, HIGH);
  70. distance: = ThoiGian * 0034/2;
  71. lcd.setCursor (0.0);
  72. lcd.print ( "the distance is:");
  73. lcd.setCursor (0.1);
  74. lcd.print (distance:);
  75. lcd.print ( "cm");
  76. delay (10);
  77. }
  78. The formula for calculating the distance is:
  79. The distance (distance) = (time x speed of sound) / 2 The speed of sound is 340 m / s
  80. Have you noticed the bold line in the above code. As far as the right formula, it is however the actual 0034 with ultrasonic sensors and temperature environment in which we test, they must adjust to the speed of sound is 380m / s, ie 0038, the sensor will operate correctly and without error. You need to customize this recipe and temperature sensor with your environment in order to most accurately measure activity.
  81. The reason that the formula to calculate this skewed sensor part and partly because the sound velocity in the air is affected by the temperature of the environment. The speed of sound is proportional to the coefficient of elasticity of the medium and inversely proportional to the density of the environment. When the temperature rises, the air expands causing the density of air is reduced. So when the ambient temperature increases, the sound velocity will increase. Additionally velocity depends on the moisture in the air again by altering the humidity of the air specific weight.
  82. Click the symbol V to translate code
  83. Click the symbol V to translate code
  84. Click the arrow icon to load the code conduct
  85. Click the arrow icon to load the code conduct
  86. After loading is complete, the code size can have size
  87. See at: http://adf.ly/1hvOhc

comments powered by Disqus