Sharp IR distance sensors
These sensors using infrared rays, collimated into a very narrow beam with a lens and measure the distance between the sensor and the target with the method of triangulation.
The color of the surface of the target gradually influence the measurement, long as it's not too dark and that manages to reflect at least a small part of the infrared light.
The response time is about 30 milliseconds and linearity of measure is reasonable but definitely less than the linearity of the ultrasonic distance sensors.
GP2D120XJ00F GP2Y0A21YK0F GP2Y0A02YK0F Range: 4-30 cm Range: 10-80 cm Range: 20-150 cm Price: 15/10 Euro Price: 10/7 Euro Price: 27/18 Euro
There is also a GP2Y0A51SK0F model that goes from 2 to 15 cm.
Prices are approximate, without VAT, and relate to the purchase of 1 piece / 25 pieces.
Here are links where you can find the latest prices and technical documentation.Farnell Code: 1243869
http://it.farnell.com/sharp/gp20a21yk0f/sensore-distanza/dp/1243869?Ntt=GP2Y0A21YK0F#similarProducts Farnell Code: 9707891
Connect sensors Sharp Theremino system
These sensors can be connected directly to the system's standard Pin Theremino, the supply voltage is correct (+5V) and the output signal (from 0 to 3 volts) It's perfect for ADC inputs
Use the pin type Adc_16 for maximum resolution or type Adc_8 if its gradual approach is sufficient.
The supply voltage can range from 4.5 volts to 5.5 volts and the consumption is about 33 but for all models.
To feed correctly the sensors the manufacturer recommends connecting a capacitor from at least 10uF between + 5V and ground positioning it to no more than a few centimetres from the sensor.
The connection sequence is different than the standard system theremino so you will have to use a cable with wires exchanged or an adapter.
Theremino Sharp system sensors ----------------------------- 1 = GND 1 = Signal 2 = 5 v 2 = GND 3 = Signal 3 = 5 v
Be very careful with links. Download the DataSheet and checked several times that the positive is on the right side. Some experimenters have received the connector with the wiring already crimped and the Red wire was the signal and the white wire on the 5 Volts.
Connector for Sharp sensors
Farnell Code 3616198
Minimum 10 PCs 0.04 Euro
Farnell Code 3617210
Minimum 100 PCs 0.003 Euro
Contact assignment on Sharp
If it is difficult to find the connector JST you can buy this cable that is a little’ expensive but convenient. Search “sharp-ir-cable 200mm”
Graphs of the output voltage in relation to the distance to the three models of sensor.
Output voltage and distances for the sensor from 10-80 cm
Output voltage and distances for the sensor from 20-150 cm
Formulas to calculate the distance from value read
( from valued 0 to 1000 )
Sensor 4-30 cm: Distance (cm) = 2076 / ( Value – 11 ) ( valid values from 80 to 530 )
Sensor 10-80 cm: Distance (cm) = 4800 / ( Value – 20 ) ( valid values from 80 to 500 )
Sensor 20-150 cm: Distance (cm) = 9462 / ( Value – 16.92 ) ( valid values from 80 to 490 )