Der Infrared Proximity Sensor – Sharp GP2Y0A21YK ist ein Infrarot-Abstandssensor. Er besteht aus einer Infrarot-LED und einem Phototransistor, der das von einem Objekt reflektierte Infrarot-Licht misst.
Der Sensor selbst verfügt über eine Steckbuchse für die man am besten ein vorkonfektioniertes Anschlusskabel verwendet. Das Anschließen selbst ist sehr einfach. Das mittlere Kabel wird mit dem GND und das rechte mit 5V+ verbunden. Das linke Kabel kann man einfach an einen analogen Input anschließen.
Wenn kein Infrarotlicht durch ein Objekt reflektiert wird, beträgt der Output des Sensors 0V. Das ergibt einen analogen Input Wert von 0. Je näher sich ein Objekt vor dem Sensor befindet, desto höher wird der analoge Input Wert. Er steigt bis ca. 630. Sobald ein Objekt dem Sensor zu nahe kommt (ca. 20cm), sinkt der Wert allerdings wieder.
Der Sensor ist preiswert und sehr einfach anzuschließen, jedoch liefert er keinen verlässlichen festen Abstandswert. Dieser ist von der reflektierenden Oberfläche abhängig. Auch können Infrarotquellen, wie Fernbedienungen, die Werte beeinflussen.
Sharp stellt den Sensor in unterschiedlichen Varianten mit unterschiedlichen Reichweiten her.
Abstandsmessung | Modellnummer | |
1,5 bis 15 cm | Analoger Output | GP2Y0AF15 series |
2 bis 15 cm | Analoger Output | GP2Y0A51SK0F |
4 bis 30 cm | Analoger Output | GP2Y0A41SK0F |
10 bis 80 cm | Analoger Output | GP2Y0A21YK0F |
20 bis 150 cm | Analoger Output | GP2Y0A02YK0F |
100 bis 550 cm | Analoger Output | GP2Y0A710K0F |
void setup(){ Serial.begin(9600); } void loop(){ Serial.println(analogRead(0)); // Ergebnisse werden im seriellen Monitor angezeigt delay(20); }
Und was kann man jetzt damit anstellen? Hier ein paar Beispiele:
»Fox in a box«:
Fox in the Box from Stephan Thiel on Vimeo.
Wenn dir das Projekt gefallen hat und du von weiteren interessanten Projekten inspiriert werden willst, sieh dir doch mal mein neues E-Book »Arduino Projekte Volume 1« an!
- Die beliebtesten Arduino-Projekte von StartHardware
- Inklusive Schaltplan, Beschreibung und Code
- Arduino-Schnellstart-Kapitel
- Kompakter Programmierkurs
Pingback: Gruseliger Halloween-Süßigkeitenspender mit Arduino
Pingback: So baust du einen berührungslosen Seifenspender mit Arduino
I should prablboy have used some paste, but couldn’t be asked I’ve checked the temperature of the engine block vs. that reported by the sensors, and it was within 1 degree, so good enough.The cuboids are low voltage/power signal relays, 5V which can be driven directly from the Arduino’s pin outs. One of them is used to drive the remove switch functionality of the generator control unit (DeepSea 3110), i.e. to turn it on or off.The other relay is to turn the radiator fan on and off, but that relays is used to drive a second automotive relay which can handle the current. There’s a third relay there, which is the solid state relay for switching the 80W extractor fan and of off, but I’ve not connected it yet.
olololololololoolololololololololololololololololo
olololololololololololololololololololololololololol
olololololololololololololololololololololololololol
ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
glkjhlgr oih geroijmgroijm groijm groimhlroihliunh lih groijm ru tdzujizujztujtedzujhsyhtruzi dgfhnjuzfj rthrdzudt rzhtrshrzu wetsertztitdxhersg ertzhydfgear zyedfrgertr ztdytdyfgtzsrtgert eargdsfrgzuttzitmgcxhm ipoukgchj uouziztjxhaewrq
geriuh geralkjh gerpoijgeroiunh groih grpoiuh geroihgrpoih gerpoh gerphh
oihzr9um0e
zbtztruztantrtqazliudntserruztbszdzt
54sn7ze65us4e5r7ztdchguhox gfuz
trsuiuo rtu z nterzer tiuzsrtzdzj ztum
trszrtzsrb ztrzeatrzatrzmjti dztrut z truz
@Kalinci: Also wenn ich Ultraschall richtig verstanden habe, dann muss ein Lautsprecher eine Frequenz im Ultraschallbereich senden und ein Empfänger muss den reflektieren Ton wieder aufnehmen. Die Zeitdifferenz wird gemessen und daraus errechnet sich die Entfernung zum etwaigen Objekt. Im Auto macht das ein Steuergerät. Dieses Modulieren und Messen ist nicht ganz einfach und Arduino kann das nicht leisten.
Das Bauteil, dass Du hast, nützt Dir ohne Steuereinheit wahrscheinlich wenig.
http://forum.arduino.cc/index.php?topic=69602.0
Ich glaube nicht, dass man damit was anfangen kann. Ich habe selber solche Dinger im Keller und habe es aufgegeben, damit was Sinnvolles anstellen zu wollen :-/
Trotzdem frohe Weihnachten und liebe Grüße
Stefan“
Hallo Stefan,
vielen Dank für die Antwort.
bis jetzt habe ich keine brauchbare Informationen gefunden. Ehrlichgesagt habe ich wenig Erfahrung mit Arduino.
Hast du eine Vermutung wie es funktionieren könnte.
ich brauche ein Anhaltspunkt.
es wäre sehr Hilfreich.
viele Grüße
kalinci
@Kalinci: Oh, das habe ich noch nicht gemacht. Ich benutze immer Ultraschall-Sensoren, die schon für die Benutzung mit Arduino vorgesehen sind: https://www.tinkersoup.de/abstand-proximity/ultrasonic-range-finder-maxbotix-lv-ez2/a-345/
Wenn Du eine Lösung findest, würde ich mich aber über Deinen Erfahrungsbericht freuen.
Viel Glück und frohes Basteln.
Liebe Grüße
Stefan“
Hallo,
vielen Dank für die ganze Einleitungen.
ich möchte so ein Ultraschallsensor an Arduino anschließen.
http://www.conrad.de/ce/de/product/182271/Ultraschall-Sensor-K-14WP10-K-14WP10-Wasserdicht-IP64-40-kHz-x-H-256-mm-x-225-mm
es hat nur 2 Kabel, (plus und minus). kein Kabel für PWM Signal.
kann man direkt anschließen?
Die Kommentarfunktion ist deaktiviert.