Thursday, July 17, 2014

Ultrasonic range sensor in place


The proper 0.5 mm to 1/4 " shaft coupler arrived earlier this week.  The 2" stainless steel shaft that I had ordered was too tall, and the ultrasonic range sensor would have blocked the view of the Raspberry Pi camera, so I went out to Orchard Supply Hardware today and bought a package of 1/4" fluted wooden dowel pins and some wood screws.  I cut one of the pins in half, drilled a hole down the middle of each half, and then inserted one half in the shaft coupler, which I had already attached to the stepper motor.

I also bought a bunch of small circular PC boards (with solder pads) from Radio Shack, and I soldered -- rather poorly, unfortunately -- an 8-pin IC socket onto a small one, and I screwed this  PC board onto the wooden dowel pin.  Then I inserted the ultrasonic range sensor onto the IC socket on the stepper motor assembly.

You can see the photo of the assembly above.

I also remounted the Raspberry Pi camera onto the SD Card Shield with a longer standoff.  The SD Card shield doesn't really serve much of a purpose any more, other than to elevate the camera a bit higher and maybe... well, that's really about it.  I tried mounting the camera elsewhere on the top plate of the robot platform, but I couldn't really find a place I liked.

Now, I need to wire the ultrasonic range sensor with Arduino jumpers from the IC socket over to the SD Card shield, and I'll probably also use Arduino jumpers to connect the stepper motor to whatever pins are still available on the Arduino SD Card shield.  After that, I'll have to write new programs to control the stepper motor and to accumulate range data by sweeping in front of the robot and building a map of objects.

I still haven't bothered accounting for the pins, though.  This'll be really bad if it turns out I don't have enough available digital I/O pins.