Pololu Distance Sensor with Pulse Width Output and Side-Entry Connector - 300cm Range
The Pi Hut
RSS
22.10 GBP114.30 PLN
- Sklep zagraniczny
- Kod:
- POL-5493
- Producent:
- Pololu
- Waluta:
- funt szterling
- Dodany do bazy:
- Ostatnio widziany:
Sugerowane produkty dla cm0011
This small lidar-based distance sensor from Pololu reports the distance of objects up to about 300 cm (120″) away with a pulsed signal similar to a hobby servo control signal. A digital microcontroller pin can be used to time the length of each high pulse, which encodes the measured distance. It works over an input voltage range of 3.0V to 5.5V and features a side-entry 3-pin JST SH-style connector that is compatible with our 3-pin JST SH-style cables. Note: The maximum range of 300 cm is only achievable for high-reflectance objects in good ambient conditions. Lower-reflectivity targets or poor ambient conditions will reduce the maximum range. This compact sensor uses a short-range lidar module to precisely measure how long it takes for emitted pulses of infrared, eye-safe laser light to reach the nearest object and be reflected back, allowing for 2 mm resolution. As long as the sensor is enabled, it takes continuous distance measurements and encodes the ranges as the widths of high pulses, which can then be timed by a microcontroller using a single digital input.
The relationship between measured distance d (in mm) and pulse width t (in µs) is as follows: d = (4 mm / 1 µs) × (t − 1000 µs) t = 1000 µs + (1 µs / 4 mm) × d The timing uncertainty is approximately ±5%. As objects approach the sensor, the output pulse width will approach 1.0 ms, while an object detected at 300 cm will produce a 1.75 ms pulse width. The sensor uses a pulse width of 2.0 ms to indicate no detection. The pulse period T ranges from around 30 ms to 33 ms, depending on the proximity of the detected object. The maximum detection range depends on object reflectivity and ambient lighting conditions. In our tests, the sensor was able to reliably detect a wall out to around 300 cm away, a white sheet of paper out to around 170 cm, and a hand out to around 100 cm. The following graph shows the measured distances of three units versus their actual distances from a variety of targets at several different ranges:
Please note that while this sensor can detect objects to within about 1 mm of the sensor face, the effective minimum distance it can measure is around 4 cm, so objects closer than 4 cm might result in an inaccurate measurement. This sensor features a side-entry 3-pin male JST SH-style connector that works with our 3-pin JST SH-style cables. Using the sensor Important note: This product might ship with a protective liner covering the sensor IC. The liner must be removed for proper sensing performance.
Three connections are necessary to use this module: VIN, GND, and OUT. These pins are accessible through the board’s 3-pin male JST SH-style connector, which is compatible with our 3-pin JST SH-style cables. When used with our cables, the red wire connects to VIN, the black wire connects to GND, and the white wire connects to OUT. The VIN pin should be connected to a 3 V to 5.5 V source, and GND should be connected to 0 volts. The OUT pin drives low (0 V) when an object is being detected, and it drives high (to the VIN level) when an object is not being detected. It is weakly pulled high when the sensor is disabled or waiting for its first reading to complete after power-up. A red LED on the back side of the board also lights whenever an object is detected.
The board has an optional ENABLE pin that can be driven low to put it into a low-power state that consumes approximately 0.4 mA. This pin can be accessed through a via or its neighbouring surface-mount pad on the back side labelled “EN” on the silkscreen. The ENABLE pin is pulled up to VIN, enabling the sensor by default. The board has one mounting hole intended for use with #2 or M2 screws. Arduino program for reading pulse width output This is a simple Arduino sketch that reads the output of the Pololu Distance Sensor with Pulse Width Output, 130cm Max and displays the measured distance in millimeters. // Example Arduino program for reading the Pololu Distance Sensor with Pulse Width Output, 130cm Max
// Change this to match the Arduino pin connected to the sensor's OUT pin. const uint8t sensorPin = 2;
void setup() {
Serial.begin(115200); }
void loop() {
int16t t = pulseIn(sensorPin, HIGH);
if (t == 0)
{
// pulseIn() did not detect the start of a pulse within 1 second.
Serial.println("timeout");
}
else if (t > 1850)
{
// No detection.
Serial.println(-1);
}
else
{
// Valid pulse width reading. Convert pulse width in microseconds to distance in millimeters.
int16t d = (t - 1000) * 2;
// Limit minimum distance to 0.
if (d < 0) { d = 0; }
Serial.print(d);
Serial.println(" mm");
} } micro:bit MakeCode program for reading pulse width output We have also created a MakeCode example program for the BBC micro:bit single-board computer that demonstrates how to read and convert the output of the Pololu Distance Sensor with Pulse Width Output, 300cm Max. The program’s output can be viewed in the MakeCode device console, which also plots the readings on a graph. You can open the program in the micro:bit MakeCode editor by clicking this link or the picture below.
Jumper settings for long-range versions
This board features four surface-mount configuration jumpers that determine its operation mode. Different versions of the Pololu Digital Distance Sensors ship with the appropriate jumpers pre-populated with 0 Ω resistors. These resistors can be desoldered from the populated spots or solder bridges can be added across the unpopulated spots to convert one sensor version into another. This sensor can be converted into any other long-range version as listed in the following table:
Maximum range1 Jumper settings (4321)
25 cm 0000
50 cm 0001
75 cm 0010
100 cm 0011
~130 cm (any detect) 0100
~130 cm (pulse width) 0101
125 cm 1000
150 cm 1001
175 cm 1010
200 cm 1011
~300 cm (any detect) 1100
~300 cm (pulse width) (this product) 1101
Note 1: Effective range depends on object reflectivity and ambient lighting conditions. Specifications
Operating voltage 3.0 V to 5.5 V
Current consumption 30 mA typical when enabled; ~0.4 mA when disabled
Maximum range Up to 300 cm (high-reflectivity targets in good ambient conditions)
Minimum range 4 cm (accurate measurement), < 1 mm (detection)
Resolution 2 mm
Update rate 30–33 Hz (33–30 ms period)
Field of view (FOV) 15° typical (varies with target reflectance and ambient conditions)
Emitter Eye-safe 940 nm invisible Class 1 VCSEL
Output type Digital pulse width
Dimensions 0.9" × 0.35" × 0.22" (22.9 × 8.9 × 5.6 mm)
Weight 0.5 g
Resources
* Dimensions
* 3D Model (STEP)
* Drill Guide
Package Contents
* 1x Pololu Distance Sensor with Pulse Width Output and Side-Entry Connector - 300cm Range
Elecena nie prowadzi sprzedaży elementów elektronicznych, ani w niej nie pośredniczy.
Produkt pochodzi z oferty sklepu The Pi Hut