Personal tools
You are here: Home Documentation How-tos Distance Measuring Sensor
Document Actions

Distance Measuring Sensor


This How-to is intended for: Any audience.

How to use a distance measuring sensor with the Make Controller Kit.

Problem

You want to connect a distance measuring sensor to the Make Controller Kit.

Distance Measuring Sensor
A distance measuring sensor.

Solution

The sensor has three wires, which should be connected to the following locations:
  • 5V (red) to a VIn on the Controller set to 5V.  Note that the default voltage for VIn is 3.3V, so you'll have to set the voltage select jumper to 5V for this sensor.
  • Ground (black) to a GND connector on the Controller.
  • Signal (yellow) to an analog input, 0-7.

Distance Sensor Connected
A distance measuring sensor connected to Analog In 0.

Discussion

The distance measuring sensor has some particular characteristics that are certainly worth mentioning.

Range

The range that the distance measuring sensor can measure is rated at 20 cm. (7 inches) to 150 cm (5 ft), and the corresponding voltage output range is from 0-2.75V.  The signal voltage is higher at close range, and gets lower as the range increases.  At about 1 foot, the readings start to decrease again, as the sensor is not designed to work at such a close range.  The following table gives some sample values you might expect to see from your sensor.
distance voltage
0 in.
0V
 7 cm.
 1.5V
15 cm.
2.75V
30 cm.
2.0V
40 cm.
1.5V
60 cm.
1.0V
90 cm.
0.75V
 120 cm.
0.55V
 150 cm.
0.4V
Fitting a curve to the output gives the following:
Distance Measuring Sensor Graph

Voltage/Signal

You may have noticed that this sensor is powered on 5V even though the inputs on the Make Controller Kit read from 0-3.3V.  This is because there are onboard electronics on the sensor that are designed to run at 5V.  However, because the output voltage range is from 0-2.75V, this works perfectly with the Make Controller. 

Also, the distance measuring sensor consumes quite a lot of current (up to 50 mA), so if you're going to be using several of them, you may find that you need to power them externally, since the 5V regulator on the Application Board can only supply about 1A.

Field of View

It's worth noting that the cone that the distance measuring sensor can actually measure is quite narrow.  There's not an exact figure listed on the datasheet, but we've found it to be just a few degrees.


Field of Vision
The distance measuring sensor can measure up to 5 ft., but with a narrow cone.

Distance Measuring Sensor

Posted by Joe Gallagher at 2008-01-17 08:43
Where can I buy one of these sensors? Joe G (focusjoeg@yahoo.com)

Re: Distance Measuring Sensor

Posted by Liam Staskawicz at 2008-01-17 12:00
At http://www.makingthings.com/products/ACC-IR-DIST-001

jr

Posted by jiří rouš at 2008-03-26 11:19
Is this sensor working in dark....?