BoB the Biped and Me: Edge detection vid and fun assembly vid (updated)
August 1, 2013
After spending a good deal of time working on a couple of BoB's subassemblies I've been given some time to think more about how to use those extra headers on the circuit board. I really want bump detection, edge detection, and a speaker but I know only one or two of those are going to fit inside the chassis. After letting BoB wander around on the floor at length I realized how prone he is to toppling over. That plus the fact he will be spending time on a bar, where sinks full of water lurk below, I decided to work on the edge detection. BoB will not be taking up cliff diving anytime soon.
I'm keen on keeping as much of the mechanical components hidden by the svelt BoB chassis. Any edge sensor will have to be contained in the feet themselves if I'm to be satisfied. I have the ability to route out small channels and such so now it's up to the limitations of the thickness of the feet. At first I was thinking of using IR reflective sensors but I couldn't find any small enough. I dug through the bits box and found some tiny CdS cells from Electronic Goldmine I'd gotten many many, moons ago. After molesting them I decided they'd do the job.
The sensor is the standard voltage divider. The signal will be read when the foot is on the ground. If the CdS cell senses light then the foot (or at least the toe) must be over empty space. I have the LDR wired up so it will drop the signal line low when it detects light under the feet. I used a 1/8" multibit in my rotary tool mounted in a drill press to route out a pocket for the LDR and a channel for the repurposed servo cable back to the PCB.
During inital testing I found the blue ABS is quite translucent and diffused a lot of light in bright conditions that the CdS cell was easily detecting. This made choosing a resistor for the voltage divider that was suitable for daylight and indoors almost impossible. Even though BoB is destined for the dingy, dimly lit environment of sports bars I thought I'd try to make him an "all-light-conditions" bot. I roughed up the bottom of his feet with some 400 grit and painted them with Krylon flat black spray paint for plastics. The paint almost completely negates the effects of sunlight. With the voltage swing I was getting from testing the sensor over white and black surfaces I decided to go with a 100K ohm resistor.
Per usual, there were hiccups when I fired it up and it took the wind out of my sails. Mostly because putting this robot together and then turning around and taking it apart sucks. Mainly because I know I'm going to have to put it back together in mere moments.
So, to make my pain more readily understood by others, I shot the attached vid to demonstrate the ordeal.
The timelapse video is 33 seconds long.
The assembly took 16 minutes 30 seconds.
That is almost a complete assembly. All that is missing from BoB is the LED array that goes in the front under the battery pack. The wiring for the array is included during assembly so I can make sure I can route it through the nest of other cables. I actually have the first revision of the LED array but there were many shortcomings and I had to spend a week or so trying to get something useable to work correctly. The second revision has been sent to OSHpark and should be back in a few weeks.
Got the CdS cells dialed in but had to use analogRead() instead of digitalRead() to get more data to work with. The black paint I used almost completely negates the diffused light outside but not quite. I might have to implement some calibration routine to have the sensors work in full blazing summer sunlight as well as a dirty little dive bar. Maybe I'll try to hunt down the leaks in the feet, I don't know yet.
I sped up BoB's walk to the point he almost wobbles off his feet and shot a viddy of him stomping around my worktable. It has been submitted for your approval.