Instructions for MAKER FACTORY models including: 2134052, Ultrasonic Sensor Module, 2134052 Ultrasonic Sensor Module
Conrad e-B2B on-line (SLO) - Trgovina za podjetja! Konformitätserklärung 2134052 MAKERFACTORY MF-6402156 Sensor-Modul 1 St..
MAKERFACTORY MF-6402156 Érzékelő modul 1 db | Conrad
MAKERFACTORY MF-6402156 Sensor module 1 pc | Conrad.com
File Info : application/pdf, 10 Pages, 2.70MB
DocumentDocumentBN 2134052 Ultrasonic Sensor EN Quick Instructions Version: 2 Delivery Content l Module Description The module is an ultrasonic sensor that senses oncoming objects and their distance to the sensor. Pinout / Pin Map Pin Description VCC Power supply 5 V/DC Trig Trigger transmit signal Echo Echo signal Pin Description GND GND OUT Possibility to connect to an oscilloscope 1 Example Application In this example we will make the sensor detect an oncoming object and report the measured distance. The instructions use the Arduino® platform to illustrate product use. You can also use an Arduino derivative or another platform that supports this type of product. Connection Make sure you switch resistors between LED/Module and developer board as listed in the connection table or shown in the connection diagram to prevent damaging your components. Module Arduino® VCC 5V Trig 12 Echo 13 GND GND 2 Code #define trigPin 12 #define echoPin 13 #define led 11 #define led2 10 void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(led, OUTPUT); pinMode(led2, OUTPUT); } void loop() { long duration, distance; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration/2) / 29.1; // This is where the LED On/Off happens 3 if (distance < 4) { // When the Red condition is met, the Green LED should turn off digitalWrite(led,HIGH); digitalWrite(led2,LOW); } else { digitalWrite(led,LOW); digitalWrite(led2,HIGH); } if (distance >= 200 || distance <= 0){ Serial.println("Out of range"); } else { Serial.print(distance); Serial.println(" cm"); } delay(500); } Procedure 1. Prepare a sketch with the given code and upload it to your board. 2. Connect the module/component to the board as shown in the connection diagram or table. 3. Approach the sensor within its range with an object. 4. Measurements are output to the Serial Monitor. Specifications Operating voltage Quiescent Current Working Current Measuring Angle Effectual Angle +5 V/DC <2 mA 15 mA 30° <15° 4 Range 2 400 cm Resolution 0.3 cm Trigger Input Pulse Width 10 µs Dimensions (approx.) 49 x 22 x 15 mm Weight (approx.) 9 g Disposal Electronic devices are recyclable waste and must not be disposed of in the household waste. At the end of its service life, dispose of the product in accordance with applicable regulatory guidelines. You thus fulfill your statutory obligations and contribute to the protection of the environment. Legal Notice This is a publication by Conrad Electronic SE, Klaus-Conrad-Str. 1, D92240 Hirschau (www.conrad.com. All rights including translation reserved. Reproduction by any method, e.g. photocopy, microfilming, or the capture in electronic data processing systems require the prior written approval by the editor. Reprinting, also in part, is prohibited. This publication represent the technical status at the time of printing. Copyright 2022 by Conrad Electronic SE. 5 BN 2134052 Ultraschallsensor DE Kurzanleitung Version: 2 Lieferumfang l Modul Beschreibung Das Modul ist ein Ultraschallsensor, der ankommende Objekte und deren Abstand zum Sensor erfasst. Pinout / Pin Map Pin Beschreibung VCC Stromversorgung 5 V/DC Trig Triggersignal Echo Echosignal Pin Beschreibung GND GND OUT Möglichkeit ein Oszilloskop anzuschließen 1 Anwendungsbeispiel In diesem Beispiel lassen wir den Sensor ein entgegenkommendes Objekt erkennen und registrieren die gemessene Entfernung. Die Anweisungen basieren auf der Arduino®-Plattform. Sie können auch ein Arduino Derivat oder eine andere Plattform verwenden, die das Produkt unterstützt. Anschluss Achten Sie darauf, dass Sie Widerstände zwischen LED/Modul und Entwicklerboard schalten, wie in der Anschlusstabelle aufgeführt oder im Anschlussdiagram dargestellt, um Schäden an Ihren Komponenten zu vermeiden. Modul Arduino® VCC 5V Trig 12 Echo 13 GND GND 2 Code #define trigPin 12 #define echoPin 13 #define led 11 #define led2 10 void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(led, OUTPUT); pinMode(led2, OUTPUT); } void loop() { long duration, distance; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration/2) / 29.1; // This is where the LED On/Off happens 3 if (distance < 4) { // When the Red condition is met, the Green LED should turn off digitalWrite(led,HIGH); digitalWrite(led2,LOW); } else { digitalWrite(led,LOW); digitalWrite(led2,HIGH); } if (distance >= 200 || distance <= 0){ Serial.println("Out of range"); } else { Serial.print(distance); Serial.println(" cm"); } delay(500); } Vorgang 1. Bereiten Sie eine Skizze mit dem gegebenen Code vor und laden Sie sie auf das Board hoch. 2. Schließen Sie das Modul/Komponente anhand des Anschlussdiagrams oder der Anschlusstabelle an. 3. Nähern Sie sich dem Sensor innerhalb der Reichweite mit einem Objekt. 4. Die Messungen werden an die serielle Schnittstelle/Monitor ausgegeben. Technische Daten Betriebsspannung Quiescent Current Working Current Messbereich +5 V/DC <2 mA 15 mA 30° 4 Effektiver Winkel <15° Reichweite 2 400 cm Auflösung 0,3 cm Pulsbreite Triggereingang 10 µs Abmessungen (ca.) 49 x 22 x 15 mm Gewicht (ca.) 9 g Entsorgung Elektronische Geräte sind Wertstoffe und gehören nicht in den Hausmüll. Entsorgen Sie das Produkt am Ende seiner Lebensdauer gemäß den geltenden gesetzlichen Bestimmungen. Sie erfüllen damit die gesetzlichen Verpflichtungen und leisten Ihren Beitrag zum Umweltschutz. Impressum Dies ist eine Publikation der Conrad Electronic SE, Klaus-Conrad-Str. 1, D-92240 Hirschau (www.conrad.com). Alle Rechte einschließlich Übersetzung vorbehalten. Reproduktionen jeder Art, z. B. Fotokopie, Mikroverfilmung, oder die Erfassung in elektronischen Datenverarbeitungsanlagen, bedürfen der schriftlichen Genehmigung des Herausgebers. Nachdruck, auch auszugsweise, verboten. Die Publikation entspricht dem technischen Stand bei Drucklegung. Copyright 2022 by Conrad Electronic SE. 5