Infrarot Entfernungsmessung mit Sharp Abstandssensor

Sharp GP2Y0A21YK
Sharp Abstandssensor GP2Y0A21YK – Schaltung mit Fritzing erzeugt

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 vorkonfektionierte 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.

AbstandsmessungModellnummer
1,5 bis 15 cmAnaloger OutputGP2Y0AF15 series
2 bis 15 cmAnaloger OutputGP2Y0A51SK0F*
4 bis 30 cmAnaloger OutputGP2Y0A41SK0F*
10 bis 80 cmAnaloger OutputGP2Y0A21YK0F*
20 bis 150 cmAnaloger OutputGP2Y0A02YK0F*
100 bis 550 cmAnaloger OutputGP2Y0A710K0F*
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:

Wir benötigen Ihre Zustimmung um den Inhalt von Vimeo laden zu können.

Mit dem Klick auf das Video werden durch den mit uns gemeinsam Verantwortlichen Vimeo [Vimeo Inc., USA] das Video abgespielt, auf Ihrem PC Skripte geladen, personenbezogene Daten erfasst und Cookies gespeichert. Mit Hilfe der Cookies ist der Vimeo in der Lage, die Aktivitäten von Personen im Internet zu verfolgen und Werbung zielgruppengerecht auszuspielen. Weitere Informationen finden Sie hier.

PGlmcmFtZSBzcmM9Ii8vcGxheWVyLnZpbWVvLmNvbS92aWRlby8yMjI3Nzg3IiB3aWR0aD0iNTAwIiBoZWlnaHQ9IjI4MSIgZnJhbWVib3JkZXI9IjAiIGFsbG93ZnVsbHNjcmVlbj0iYWxsb3dmdWxsc2NyZWVuIj48L2lmcmFtZT4=

»Fox in a box«:

Fox in the Box from Stephan Thiel on Vimeo.

ishiro präsentiert buch

Wow! Ich hoffe, der Beitrag hat dir gefallen. Wenn ja hab ich was für dich. Das neue E-Book von StartHardware! Darin findest du die beliebtesten Projekte von StartHardware und vieles mehr!

Wenn du noch tiefer einsteigen willst, empfehle ich Dir dieses umfangreiche Kompendium: Mit Arduino die elektronische Welt entdecken* – Damit wirst Du zum Arduino-Profi!


10 thoughts on “Infrarot Entfernungsmessung mit Sharp Abstandssensor

  1. 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.

  2. olololololololoolololololololololololololololololo
    olololololololololololololololololololololololololol
    olololololololololololololololololololololololololol

  3. ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt

  4. glkjhlgr oih geroijmgroijm groijm groimhlroihliunh lih groijm ru tdzujizujztujtedzujhsyhtruzi dgfhnjuzfj rthrdzudt rzhtrshrzu wetsertztitdxhersg ertzhydfgear zyedfrgertr ztdytdyfgtzsrtgert eargdsfrgzuttzitmgcxhm ipoukgchj uouziztjxhaewrq

  5. oihzr9um0e
    zbtztruztantrtqazliudntserruztbszdzt
    54sn7ze65us4e5r7ztdchguhox gfuz
    trsuiuo rtu z nterzer tiuzsrtzdzj ztum
    trszrtzsrb ztrzeatrzatrzmjti dztrut z truz

  6. @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”

  7. 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

Comments are closed.