Shop OBEX P1 Docs P2 Docs Learn Events
Boe-Bot & Crawler Kit with automonous synchronized walking using hall - effect sensors — Parallax Forums

Boe-Bot & Crawler Kit with automonous synchronized walking using hall - effect sensors

Douglas MDouglas M Posts: 9
edited 2016-02-03 20:27 in Robotics
Introduction:

I recently (Holidays 2015) ordered the "Boe-Bot" kit as an intro to the hobby of robotics and locomotion with the intent of building a "Stamp Bug" type six legged walker bot (completed & listed in another discussion).

What a great kit! It was a lot of fun learning, building and playing with the bot. I am partial to walking types of bots over the wheeled versions, so I built the "Boe-Bot" with the optional Crawler Kit from the start.

The provided manual with the kit, "Robotics with the Boe-Bot", Ver. 3.0 by Andy Lindsay, Copyright by Parallax Inc. was written in easy to follow instructions and examples, again adding to the fun and not frustration to the kit. Giving credit, most of the routines in the attached program below have been, copied from the book, with slight modifications — more on that later.

After starting to go through the examples in the book which introduced movement to the Boe-Bot, I noticed, when walking, the legs would alternate steps which appears more natural, or the legs would step together causing the rear legs to drag appearing a bit un-natural.

Wanting to keep the legs walking in a more natural looking alternating walk, it became apparent that this could not be accomplished by pbasic instructions alone, due to the nature of the continual rotation servos not knowing their rotational position. The Parallax web site offers a wheel encoder kit, but I was using the crawler kit, (maybe the wheel encoder kit could have been modified for the crawler kit?). Even so, the wheels are round, whereas the legs are positional with changes throughout their 360 degree rotation.

At minimum, all that is needed is to know is the position of the servos at one set location on their 360 degree rotation, the rest could be done using pbasic instructions. One idea was to use a micro switch with a roller that would be actuated when the middle leg passed by. However, what a perfect application for a hall-effect sensor! Parallax has one type available on their web site. A bit pricy compared to others available on the internet, but since they have excellent support for the products they sell, I ordered two, one for each leg.

Construction:
Using contact cement to glue a hall effect sensor on the Boe-Bot's chassis above each servo, and using a drop of epoxy glue, attaching a small neodymium magnet to one end of each servo horn, the "Boe-Bot" will know the position of it's legs at one fixed location during the servo's rotation. The hall effect sensor will be pulled low every time the magnet that is attached to the servo horn passes over it.

c729209e32b627cd8c6a49312aede6.jpg

The rest of the Boe-Bot's electronic parts are from the kit and follows the circuit diagrams from the manual. I enjoyed playing with the Boe-Bot so much, I wanted a more permanent circuit than that of the Board of Education's push in bread-board, so I trimmed a solder type bread-board to fit, added in-line pins to line up with the Boe's sockets and soldered the components making a permanent assembly, keeping the flexibility of the Board of Education for future experimentation. I favored the infrared navigation over the wire "whisker's" and light sensitive detectors, using those components for the soldered circuit. The piezo speaker is pushed directly in the Boe's 2X10 header using pin5 & Vss. Future additions may include adding the light sensitive detector to chirp the piezo speaker at changing light (shadows or flashlight), and/or a change of reaction of the Bot.

Program:
The pbasic instructions are commented to aid in following the program flow.
It starts by turning on the red LED "eyes".
(The eye(s) turns off when the infrared sensors(s) go (active) low indicating an object in the bot's path.)
The piezo speaker is chirped indicating the Basic Stamp 2 start up.

The sub routine "syncLegs", is called to move both legs into a neutral resting position, then stop and wait 3 seconds — this will allow the Boe-Bot to be turned off with the legs in the resting stance.

Then enter the main program loop.
It starts with the routine, Detect Consecutive Alternate Corners - See the "How EscapingCorners.bs2 Works" section in the "Robotic with the BOE-Bot" manual. If the Boe-Bot gets stuck in a corner, this routine allows the Boe-Bot to navigate out of the corner.

Main Navigation:
The next segment of the loop comes from Chapter 7 in the manual, FastIrRoaming.bs2. See Activity #5 in Chapter 7 for a description.
If the left infrared sensor detects an obstacle, then turns the Boe-Bot right until the obstacle is cleared, If the right infrared sensor detects an obstacle, then turn the Boe-Bot left, until the obstacle is cleared, if both infrared sensors detect an obstacle then back up.

If, after the infrared sensors are checked and no change in direction is needed, the modification near the end of this segment checks to see if the legs are synchronized by going to the sub-routine, WalkInSync.

If the legs are in sync, walking in alternating steps, no adjustment is needed and the sub-routine returns back to the main loop and walks the Boe-Bot forward. If the legs are out of sync, then slow the leading leg until the lagging leg catches up by using the ramping routines from Chapter. 4, Activity #4: Maneuvers-Ramping. See this section for a description on how ramping works. The synchronized walking routine is used only when walking forward.

Very short youtube video — walking in alternating steps...



Future revisions may include implementing synchronized movement in the other the maneuvers. I also may add the light sensitive sensor to detect shadowing and have the Boe-Bot chirp and/or change in maneuvers.

As for most of my programs, they are not optimized, I may use different pbasic instructions to get the same results, the programs are small and there is plenty of "memory to work with," so feel free to experiment.

Parts:
Parallax Inc. -
Boe - Bot Robot Kit USB #28832
Crawler Kit #30055
Melexis Hall Effect Sensor #605-00005
3-Pin Signal-Power-Ground Cable Extension (8") #800-00080

All Electronics -
2 - .01uF cap. #CM-103
4 - mini neodymium magnets #MAG-82
Solderable Bread Board #SB-800
1 X 40 pin header .1 in #SHS-40

Misc.
Contact cement, 5 minute epoxy, small piece of bass wood - 1/16 in thick, fine rosin core solder, & black paint.

If you are still reading this, Thank You! I realize this was a bit of a lengthy post, I wanted to share some of the details. I had so much enjoyment building the Boe - Bot and adding the modification for an alternating gait. Next holiday season, I may ask Santa for the Robot Shield with Arduino kit.

~Happy Modding.

Comments

  • ercoerco Posts: 20,244
    Awesome mod Douglas! Thanks for sharing that. Yes the gait gets messed up if the legs go out of sync. Below is an old hack I did of a Tyco N-Sectwhich demonstrates that. Sometimes the rear legs move together, sometimes oppositely.

Sign In or Register to comment.