Connecting the Sharp IR Sensor

From ROBOTC API Guide
< Tutorials‎ | Arduino Projects/Mobile Robotics/BoeBot
Revision as of 18:04, 16 October 2012 by Jwatson (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Connection

Like the Parallax PING sensor, the Sharp IR sensor has 3 connections:

  • Ground
  • Power (5V)
  • Signal (analog output)

However, unlike the PING sensor, the Sharp IR Sensor uses what is called a JST connector. Unfortunately, this connector can't be plugged into the breadboard with out a wire adapter. You can find these adaptors online at places like sparkfun.com and the Parallax website. [1]

The Circuit

Sharp IR Sensor circuit schematic

Notepad.gif NOTE: ROBOTC currently configures the analog input pins slightly different from the wiring language (Arduino IDE). As such it is currently necessary to use the resistor between the signal connection and ground.

Making the Connections

Connecting the JST to the sensor

First connect the JST connector to the Sharp IR sensor.

connecting the JST Connector cable to the Sharp IR sensor.

Connecting the sensor to the board

Now connect the other end of the JST connector cable to the breadboard.

BoeBot Sharp Sensor Virtual Breadboard Connection.png
BoeBot Sharp Sensor Breadboard Connection.jpg

Adding the resistor

Since we currently need the resistor (10k Ohm) to get the correct values, we will connect it next. It will go from the signal pin to ground.

BoeBot Sharp Sensor Virtual Breadboard Resistor.png
BoeBot Sharp Sensor Breadboard Resistor.jpg

Adding the wires

Now we can add the wires. The red wire of the sensor connects to +5 volts, the black wire connects to Ground (GND), and the yellow signal wire connects to analog pin A0 through the same bus as the 10k ohm resistor that is connected to ground.

BoeBot Sharp Sensor Virtual Breadboard.png
BoeBot Sharp Sensor Breadboard.jpg