Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Object Detection by Ultrasonic How to install and program a ultra sonic sensor with Arduino.

Slides:



Advertisements
Similar presentations
Khaled A. Al-Utaibi Interfacing an LED The Light Emitting Diode (LED) Applications DC Characteristics & Operation Interfacing to.
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Servos The material presented is taken from a variety of sources including:
PING))) Ultrasonic Distance Sensor living with the lab ultrasonic pressure waves from PING))) speaker The PING))) sensor emits short bursts of sound and.
Arduino. Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
1 Ultrasonic Distance Sensor. 2 How it Works The distance sensor emits short bursts of sound and listens for this sound to echo off of nearby objects.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Embedded Programming and Robotics
Embedded Programming and Robotics Lesson 10 Ultrasonic Range Finder Range Finder1.
Sensors Material taken from Robotics with the Boe-Bot.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
Sensors. This is a set of transmitter and receiver in one of the photoelectric sensor. Detection distance can be adjusted according to the requirements.
Program ultrasonic range sensor in autonomous mode
感測器原理與應用.
PING))) Ultrasonic Distance Sensor living with the lab ultrasonic pressure waves from PING))) speaker The PING))) sensor emits short bursts of sound and.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Mobile Controlled Car Students : Tasneem J. Hamayel Hanan I. Mansour Supervisor : Dr.Aladdin.
MOBA Mobile Automation AG Kapellenstr Limburg / Germany Telefon: Telefax:
Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
Material taken from Robotics with the Boe-Bot
Servos The material presented is taken from a variety of sources including:
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
RTLS. LOCATING / POSITIONING SYSTEMS A positioning system is a mechanism for determining the location of an object in space Interplanetary systems Global.
PHY 235 Robotics Workshop Day 5 Distance Sensing Using The Ultrasonic Ping Sensor.
TechKnowTone Contents: Sensor Features Sensor Connections Sample Sketch Questions …Sensor Features… Arduino Coding – Distance Sensors.
C# SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO KAAN EREN
Robot Project by Ahmad Shtaiyat Supervised by Dr. Salem Al-Agtash.
Group #42: Weipeng Dang William Tadekawa Rahul Talari.
Istituto Tecnico Industriale A.Monaco EURLAB Moving a robot Wirering a DC-Motor with the arduino Next - Press the button (left)
Introduction to Arduino A very basic intro to Arduino, the IDE and the Servos class.
Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Object Detection by Ultrasonic How to install and program a ultra sonic sensor with Arduino.
Istituto Tecnico Industriale A.Monaco EURLAB Moving a robot simple example program to control a DC-Motor Next - Press the button (left)
Istituto Tecnico Industriale A.Monaco EURLAB Control a Servo Motor If you want to swing an robot arm or … steer a robot you need a special motor (Servo).
Electronic instrumentation Digitization of Analog Signal in TD
Forward Until Near Stop when near a wall.
Ultrasonic Sensor TYWu.
Istituto Tecnico Industriale A.Monaco EURLAB European Robotic LABoratory HOW TO Transmit and RECEIVE Datas.
Microcontroller basics Embedded systems for mortals.
Istituto Tecnico Industriale A.Monaco EURLAB European Robotic LABoratory HOW TO Read Temperature On Graphic App.
Istituto Tecnico Industriale A.Monaco EURLAB European Robotic LABoratory HOW TO TEST TEMPERATURE SENSOR.
What is Arduino? It's an open source electronics prototyping platform: Open source: resources that can be used, redistributed or rewritten free of charge,
Istituto Tecnico Industriale A.Monaco EURLAB European Robotic LABoratory Basic skill I. 1 : MIDI & Arduino Hardware.
ARDUINO UNO The Arduino uno is a microcontroller board based on the ATmega328. It has 14 digital Input / Output pins (of which 6 can be used as PWM outputs),
Application of Programming: Scratch & Arduino
simple example program to control a DC-Motor
Microcontroller basics
If you want to swing an robot arm or …
Prof. Sajid Naeem (DOES – PC)
Sensors with Arduino A Microcontroller.
Ultrasonic Distance Sensor
Arduino motor control using servo & ultrasonic sensor
WALL DETECTOR ROBOT VEHICLE
Arduino - Introduction
Chapter E –Transistors and H-Bridges
Arduino Uno and sensors
How an Ultrasonic Range Finder works
Vex Ultrasonic Sensor (US) Interfacing and Programming
Maxbotix Ultrasonic Distance Sensor
Ultrasonic Distance Sensor
Completed Design Review
Bluetooth operated Arduino Controlled Car
Sensors and actuators Sensors Resistive sensors
Device Fabrication & Components Conclusions and Future Advancements
Elecbits.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Interrupts.
Sound Waves and Ultrasound
Ultrasonic Distance Sensor
Presentation transcript:

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Object Detection by Ultrasonic How to install and program a ultra sonic sensor with Arduino Board

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Physics Ultrasound Ultrasounds are sound waves Frequencies higher of limit of human hearing. Ultrasound is not different from 'normal‘ sound Frequencies from 20 kHz up to several gigahertz Speed of ultrasound is 343,2 m/s – in dry air – at 20 °C

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection 1.The Sensor send out an sound wave and will be reflected at an object 2.The sound waves travel forth an back - this takes time 3.The Sensor returns the time 4.Since we know the speed of sound – we can calculate the distance Function Ultrasound Sensor HC-SR04 Distance (sound wave) HC-SR04 Speaker Microphone Sensor Object

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Physics Ultrasound

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Obstacle Detection Distance Measurement Level Indicators Industrial Applications Area of Application

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Programming – Use a Library The physics and programming rules are implemented in a library! You don‘t have to program them – You only have to use the Library in your code The function returns the distance in cm Function (Prototype) – double readdistance(int echoPin, int trigPin) – You’ve to define the echo (12) and trigger pins (13) of the sensor

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection How-to: Use a Library

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Example US-Sensor We want to control a motor via the US-Sensor Depending on the distance… – The motor should move forward or backward The Ultra Sensor library contain a function: double getdistance(int Triggerport, int Echoport) Datatype Returnvalue [cm] Function name Parameter: Arduino Portnumber Connected to Triggerport Echoport

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Start Measurement Arduino set a digital signal to “1” Sensor will watch that signal at PIN2 After 10 μs Arduino can set signal to “0” Start measurement Sending ultra sonic sound wave After 200 μs, a 40 kHz Burst-Signal, the ultra sonic sound wave will be send out by the sensor Duration: 200 μs Sensor sets the output to high signal Waiting for echo If echo will be detected, the Output falls to L-Level (“0”) Time between high and low signal can be read out by Arduino Time which the ultrasonic needs forth and Get the measurement The Arduino can directly fetch the measurement result (duration) Programming Rules

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Arduino (e.g. Arduino Uno) Ultra Sonic Sensor (HC-SR04) Cabling – 1 x USB PC-Arduino – 10 x Cable 0,75 mm² (length approx. 10 cm) 1 x Computer / Laptop 1 x Breadboard 1 x DC Motor Motor driver L1910S Power Supply/Battery Needed Parts

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection HW Setup on Breadboard

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Example US-Sensor We want to control a motor Depending on the distance – The motor should move forward or backward The Ultra Sensor library contain a function: double getdistance(int Triggerport, int Echoport) Datatype return value [cm] Name of function Parameter: Arduino port number Connected to: Triggerport Echoport

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Programming Sample #include //Library for the motor to control the motor #include //Library for the US sensor to read a distance #define echoPin 12 // Echo Pin #define trigPin 13 // Trigger Pin #define motor1Pin1 5 // Motor Pin #define motor1Pin2 6 // Motor Pin double distance; // Variable to store the distance int speed = 100;// Variable to set the motor speed US_Sensor Sensor(trigPin,echoPin); // Object “Senor” needed to access US Sensor functions Motor Motor(motor1Pin1,motor1Pin2);// Object “Motor” needed to access Motor functions void setup() {} // Setup is done in Library void loop() { distance = Sensor.readdistance(); // Get distance [cm] from sensor if (distance < 5)// If distance is less than 5 cm { Motor.Backward(speed); // drive motor left } else// if distance is greater than 5cm { Motor.Forward(speed); // turn motor right } delay(1000); }

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Module Specification (HC-SR04) Distance: Detection between 2cm and 3m Resolution: approx. 3mm Voltage: 5V Current: < 2mA Triggering: Falling edge (TTL - level) Self measuring after sending a trigger (input) PWM Signal will be returned (output) Duration Measurement (Interval): 20ms – 50 Measurements/Second

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Sensor Accuracy The system-conditioned measuring exactness amounts to approx. 3 mm and is combined with the internal sample rate of the module. Another factor is the temperature dependence of the sonic speed in air. Approximately the sonic speed in relation of the temperature in the area of -20°C till +40°C can be calculated with formula: C air ≈(331,5 +0,6 * ϑ/°C) m/s ϑ = Surrounding temperature in °C

Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Best Practise The best measurement results are obtained by reflection on smooth, flat surfaces. For distances up to 1m, the material of surface is rather uncritically. Over short distances, of less than 1m, the angle to the object can reach up to 45 °. Even quite thin objects are reliably detected. A normal pen, for example, can be safely detect at a distance of about 30cm. At maximum distance (3m) the object must be exact targeted and there should be no other object in the area (similar distance) in a emission cone of 15 °.