Shop OBEX P1 Docs P2 Docs Learn Events
PushButton vs IR Interupt, bump detection — Parallax Forums

PushButton vs IR Interupt, bump detection

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2013-02-17 23:12 in Accessories
The first thing I have decided to build for my stingray is bumpers, that will stop the thing. Kind of like a roombas bump sensor. I will have plenty of object detection going on, but bumpers are a fail safe that will work with a couch a wall whatever.

A while back I bought 25 reset switches from propeller powered, just for this! They have fairly long plungers. My idea is to extend soe erector pieces off the front of the sting ray to make bumpers that look kind of the same as when the handels in the kit are used for bumpers instead. Then I would be mounting the switches to the bumper that way when it hits a wall the button will press and stop the bot. The plunger is about a half of an inch long.

Now roombas bump sensors works a bit diffrent, when it is bumped it pushes something through an IR slot interrupt sensor. Im not sure if this method is better in some way or if it is just to minimize wearable moving contacts.

The whole point of this is to save my wall, the stingray does 4.5mph, and if at full speed i would rather it not bash up a wall, would either of these techniques be able to stop the bot before it collides. I mean the button method basically has about a half inch to get the bot to a full stop from top speed.

This is something I would like to figure out and do right the first time while building, I don't care to smash my walls up testing different methods,

Comments

  • garyggaryg Posts: 420
    edited 2013-02-16 14:49
    Hi
    I've used switches, IR detectors and Ping.
    They all work.
    So far I've ended up using IR detector and Ping combination.
    Since my platform control is being done using a plain BS2 controller and my program logic being what it is,
    I need to measure the distance to the wall, so that I have enough time to stop before the big wall crash.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-02-16 15:55
    If you do not want to use IR, glue rubber strpping to the bumper. That way you do not screw up the wall and save your IR sensors for something else.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-16 20:07
    Hmmm I think you guys might be mis-understanding this. I will have pings/laser/maybe ir. The bumper is a fail safe.

    Now imagine the bumper touches the wall. When the bumper touches there are buttons behind it, maybe with springs mounted on the plungers, this way the soft bumper touches the wall, and the bot brakes, while the bot is still moving forward from physics and deceleration time after the brakes have been applied, the bumper is just pressing back in to long springs.

    The second option would be as the bumper presses against the wall it pushes backwards against springs, but as the bumper moves back it will break an IR beam stopping the bot. This is how a roombas bump sensor works.

    I guess what im getting at is what advantage does using an IR interrupt sensor have over a standard button.... Im not sure if im making any sense, this is something that needs to be drawn

    One thing im wondering, is if for some reason the micro can read a photo diode faster than a button.
  • garyggaryg Posts: 420
    edited 2013-02-16 20:43
    No misunderstanding here!
    NWCTTV is absolutely correct with his suggestion concerning a rubber bumper on your switch linkage.
    The rubber will protect your walls and maybe your cat if you have one.
    The mechanical switches will work exactly like the IR switches on the Roomba the way you have described above.

    I'm using my IR switches in a digital manner without any distance measurement.
    My Ping sensor gives me the distance measurements.

    My platform as you may have read in a different thread only runs at about 12" per second.
    If my controlling program runs a bit slow because of my lack of advanced programming skills and relatively slow speed of the controller
    It takes a bit of time before things shut down when the bump switch activates.
    I do also use an old unreliable TX/RX from my radio controlled boat that I use to enable my platform
    for now. I think my subroutines that keep checking for a throttle signal that tells the platform it's ok to
    do it's thing sucks lots of time and delays my switch response.

    Your Bump switch idea, no matter how you impliment it is Exactly the correct starting point.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-02-16 21:05
    Not misunderstanding here either. I know exactly what you are talking about. All cars have this type of bumper these days. The sensors in them are what deploy the air bags. If you are going to use metal for the bumpers I would glue rubber on them to prevent damaging the walls.
  • TtailspinTtailspin Posts: 1,326
    edited 2013-02-16 22:51
    I have found that a Normally Closed switch works better than a Normally Open switch for what you are describing.

    The NO switch spends much of its plunger time just closing the switch contacts, and then bam, no more plunge...
    Where as the NC switch does its job almost instantly, and has some plunge movement left for shock absorbing,
    Not that the switch is going to absorb any shock, it just allows more time for an external shock system to work.



    -Tommy
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-16 23:41
    Ok, well ya I will definately be padding the bumper! I was hoping to make sure the thing never does more than touch the wall, but u can never be to carefull, otherwise i would just trust all the sensors and go on with life.

    Ive spent some time kind of refineing the motors, ive been taking pics and doing a mini how to about it. Should have the beast rolling tommorow (woulda been done tonight if it werent for a bunch of ugly drama happening around me). Once it rolls im going to test the distance rolled after a fast break, this way i can design can make sure the two bumpers have plenty of clearence from each other, so that the force of the bot should hopefully never impact the wall.

    I was just curious as to why roomba choose the ir method over a simple button. I would have usually thought to avoid mechanical wear, but it casrer wheels encoder is acually a mechanical switch, so I wasnt sure.

    I have plenty of these nice push buttons, and would like to try to segment the bumper in to multiple pieces in order to detect what side the impact happend on, so ill definately just use them, makes more sense.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-16 23:44
    Cool these buttons are NC, found that out the hard way, testing debounce code
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-02-17 09:59
    rwgasat, Take a look at the Robotics with the BOE-Bot books and see how they use switches they call "whiskers". These kind of stick out ahead of the robot a bit to provide some extra time for the robot to stop or change direction.

    I think the reason for the IR sensors in the Roomba is to allow additional travel past the point where contact is sensed (kind of like the NC switch).
  • TtailspinTtailspin Posts: 1,326
    edited 2013-02-17 10:53
    I use modified 'whisker' switches on my LightShow robot...
    ChairLegDetect.jpg

    They are set up like a NC switch, and work very well for being home made. :)

    -Tommy
    1024 x 768 - 82K
  • xanaduxanadu Posts: 3,347
    edited 2013-02-17 13:38
    I have to second the "whiskers". Using a mechanical switch has its drawbacks like wear and tear but also in some cases the switch can be too hard to open or close. I'd use stall detection over IR or a mechanical switch, because you'll want to have stall detection at some point anyway. Stall detection doesn't get dirt on it either. My large robot (around 85lbs) uses stall detection exclusively for bumping into wall protection, and it works well on something heavy with lots of ground contact. I'd also like to implement a vibration sensor and 3 axis accelerometer to augment that at some point.

    The whiskers like Tommy has also absorb some shock, and probably weigh less than rubber bumpers. Seems like the best way to go on a light indoor robot. I like to keep as much weight as possible off the robot.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-17 15:41
    Well this was my general idea, wouldn't add very much weight at all, like I said this is just the jist of it, not a completed at all. Also the plugers would not usually slip through the bumper as it does in the pic, and there would be foam tape on the front bumper.

    bump.jpg
    1024 x 768 - 75K
  • garyggaryg Posts: 420
    edited 2013-02-17 21:55
    Looks like a good simple solution for bumpers!
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-17 23:12
    Thank you gary :)

    I had a really neat idea. Its major overkill for me but someone may think it is usefull. I sae an episode of Ben Heck, where he made the WASD keys on a standard keyboard work as analog buttons, these are common movememt keys in shooters, for those who dont game. The point was to make the player run faster as the key was pressed down harder. Basically he just added shafts under the key along with a magnet, then used the hal effect to read the posistion.

    I dont think it would be to hard to stick metal shafts on the inside of a bumber that pass a hall effect as the bumper pushes in. This way you could read the acual distance and speed the bumper was pressed in to determine the force of impact, or you could use an accelerometer lol.
Sign In or Register to comment.