Connecting the Sharp IR Sensor

From ROBOTC API Guide
Jump to: navigation, search

Physical connection

Warning.png WARNING: Soldering should only be done under adult supervision.

The first thing you will need to do is get the connection working. the Sharp IR Sensor uses what is called a JST connector. Unfortunately, this connector can't be plugged into the breadboard without a wire adapter. You can find these adapters online at places like sparkfun.com and the parallax website. You may also need to solder jumper wires to each wire as they may be too short, and usually don't stick very well in the breadboard, anyway.

Prepping the wires.

Connecting the Sharp IR sensor is really easy, so long as you have the right screws. The holes are almost exactly 1 1/2 inches apart, which fits nicely with the VEX standard, however VEX screws are too large unless you wish to drill out the holes. So, you will need to find screws and nuts which will fit in the holes. We can mount it conveniently using the same sub-assembly we used in the Ultrasonic Rangefinder lesson.

The parts needed
The sub-assembly

Finally, attach the sub-assembly to the robot.

The sensor connected.

Wiring

Wiring for this sensor is a bit different, as all the wires are separate. You will need a 10KΩ (brown-black-orange) resistor and a wire.

Wiring schematic.
Virtual breadboard image.
A view of the wiring.