Sensores Ultrassom

Produtos visualizados

SRF05 - Ultrasonic

BE15000358

Novo produto

Aviso: Últimos itens disponíveis!

15,37 € com IVA

Adicionar à Lista de desejos

Mais informação

The SRF05 is an evolutionary step from the SRF04, and has been designed to increase flexibility, increase range, and to reduce costs still further. As such, the SRF05 is fully compatible with the SRF04. Range is increased from 3 meters to 4 meters. A new operating mode (tying the mode pin to ground) allows the SRF05 to use a single pin for both trigger and echo, thereby saving valuable pins on your controller. When the mode pin is left unconnected, the SRF05 operates with separate trigger and echo pins, like the SRF04. The SRF05 includes a small delay before the echo pulse to give slower controllers such as the Basic Stamp and Picaxe time to execute their pulse in commands.

 

  • Range - 1cm to 4m.
  • Power - 5v, 4mA Typ.
  • Frequency - 40KHz.
  • Size - 43mm x 20mm x 17mm height.

 
Two operational modes are available, Single pin for trig/echo or 2 Pin SRF04 compatible.

The input Trigger is a 10uS Min. TTL level pulse
Echo Pulse is Positive TTL level signal, with the width proportional to the object range.

Full Technical Documentation

 

 

Code:

#define ECHOPIN 2                            // Pin to receive echo pulse
#define TRIGPIN 3                            // Pin to send trigger pulse

void setup(){
  Serial.begin(9600);
  pinMode(ECHOPIN, INPUT);
  pinMode(TRIGPIN, OUTPUT);
}

void loop(){
  digitalWrite(TRIGPIN, LOW);                   // Set the trigger pin to low for 2uS
  delayMicroseconds(2);
  digitalWrite(TRIGPIN, HIGH);                  // Send a 10uS high to trigger ranging
  delayMicroseconds(10);
  digitalWrite(TRIGPIN, LOW);                   // Send pin low again
  int distance = pulseIn(ECHOPIN, HIGH);        // Read in times pulse
  distance= distance/58;                        // Calculate distance from time of pulse
  Serial.println(distance);                     
  delay(50);                                    // Wait 50mS before next ranging
}

Acessórios