From Ken's recent post about looking for a use for some optical sensors, I was reminded of a project I had started years ago, but never quite finished that uses similar sensors. I figured I would post it here in case it was of interest for his sensors since I had most of a post typed up years ago....
The backstory and concept as told in 2013 to another Propeller user:
One of the local robotics clubs was working through the "TableBot Challenge" as laid out by Robogames where the robots run on top of a table surface and thus require edge detection abilities. I was thinking that it would be a great way for my daughter and I to work together on her BOE-Bot. However, after realizing the effort required for the hardware, programming, tweaking, etc., I came to the conclusion that it would be a little too much for her so I passed on the idea altogether.
Digging her S2 back out (sadly collecting dust next to my stingray) after Ken's thread about the barcode printouts, I starting checking out the GUI. I REALLY like the way it works and I wonder how come it is not "marketed" more by Parallax. As I spent some time playing with the software, going through the help files, etc, I thought of the TableBot challenge again and that the GUI would enable my daughter to participate because it is so intuitive. Obviously, I soon realized that the S2 didn't have front edge sensors (needed to sense the table edge) and the GUI had no way to utilize items on the hacker port. For some reason, instead of stopping me, this sparked a thought path that led to an idea for a solution.
Fast-forward two weeks, and I have a concept that I am referring to as S2 ARB (Augmented Reality Backpack). Essentially, a criss-cross set of plastic ribs will sit on top of the S2 that run on either side from the pen holder to the front corners. A "bumper" that runs between the front bottom ends of these ribs allow mounting of downward looking IR sensors across the front edge of the S2. These sensors will be looking for the table edge and present simple High/Low outputs.
A little higher up the ribs, at the level of the light sensors, another piece runs between the ribs and allows for LEDs to be mounted even with the holes for the 3 light sensors (you probably see where I am going now). At this point, the output of my "mods" are now providing inputs to sensors on the S2 that are managed/utilized within the S2 GUI. Hence, augmented reality for the S2.
With the LEDs on if no table surface is detected, I just need to make a light avoidance program to have the S2 drive around the table without falling off the edge.
Prototype testing was done with 3 Sharp Distance Sensors from Pololu with carrier boards. Pololu Carrier with Sharp GP2Y0D805Z0F Digital Distance Sensor 5cm https://www.pololu.com/product/1132 The sensors will be powered via the DB9, so no internal hacking is required. Also, the add-on is being designed so that it can be snapped on and off very easily (no permanent attachment methods) which adds versatility as well as preventing interference from other snap-on add-ons I have floating in my head. For example, Remote Control. Using the same concept as above, I can add on an XBee piggyback that depending on transmitted data, lights up LEDs into the sensors to control the S2 as well.
The same goes the opposite way for the S2's outputs. My second plan is adding a gripper to the S2 to address the third phase of the Tablebot Challenge. This gripper would be controlled by 1 or 2 of the User LEDs and hence, by the S2 GUI. I have a few ideas on how to do this simply with an AT-Tiny, Adafruit Trinket, or a simple Prop circuit. This is the ATTINY code from Let’s Make Robots that I started with for the gripper: http://letsmakerobots.com/node/36523
Some ideas for add-ons:
Table edge detection sensors
Pen lifter, driven by S2's user LEDs
Servo gripper, driven by S2's user LEDs
Where the project sits today:
Anyhow, I got as far as making designing a backpack for the S2 using some JPGs of the scribbler and even cut a couple out on the laser. (my S2 actually still has one sitting on it) The backpack evolved into a flat plate with a suspended ring that encircled the S2. The ring provided the mount for the sensors in a location that did not interfere with any other sensors. I struggled with the vertical fit of the backpack to properly position the LEDs into the light sensor holes because I was working from JPGs and very little free time.
I had tried to utilize the open source CAD for the S2 when I first started using Fusion 360, but I was still learning, so it was giving me challenges (see this thread
). Then, what little free time I had was shifted elsewhere and the project died.
Hopefully, someone with a Scribbler (S1, S2, or S3) can make use of the idea in some way.