Chris Dugan's Course Project
(GICL Bot: Updated link(s))
|(7 intermediate revisions by 2 users not shown)|
Latest revision as of 01:43, 26 February 2009
The robot that I built is not necessarily modeled after a specific animal. It evolved from the simple goal of getting a robot to walk on four legs. Having very little robotics experience and even less engineering experience, this was no trivial task. Below, you will find the design ideas, the actual robot, and the CAD modeling of the robot.
My robot was built using Legos from the Lego Mindstorm kit. This kit is basically Legos with a bunch of motors and similar gadgets. Handyboards are also provided that are "fully" programmable. The only necessary programming involves turning the motors on. This is arguably unnecessary due to the ability to use a 9V battery, but I digress.
I began by attempting to build something usable out of the Legos. I decided to use two motors facing opposite directions. One motor would power the front two legs and one motor would power the back two legs. In order to balance the creature, the diagonal legs would be in step. The feet were block shaped and rigid. While this idea worked conceptually, it was not so great when fielded. The balancing of the robot depended on the timing of starting the motors. Since I was using the Handyboard, which seems to run its program line-by-line, the motors would never start at exactly the same time. Perfecting the alignment was frustrating and I looked for another solution.
I began searching the Internet for leg ideas and balancing ideas. I found  to be quite helpful. The next few pictures were taken from that website. They had built a walking robot very similar to mine, except the two motors operated in unison as gears ran all around the robot. The legs had also been built using a crank-shaft. My original feet did not do so well on low friction surfaces and a crankshaft allowed the robot to walk on the corners of the Lego pieces.
At left is a schematic for the motors. Note that the motors spin in opposite directions, but operate in unison because of the gears. There is the possibility of a fifth and sixth leg on the small gears in the middle; however, it is currently unimplemented. This design was much, much more efficient than the original ideas mentioned above.
At right is a general abstraction of the legs that were used. A crank-shaft ensures the legs remain rigid. The actual legs deviate from this figure slightly as I wanted the legs to bend at a far greater angle. They also extend towards the front and back, respectively, of the robot--again, similar to a spider. Four legs present a unique challenge for stability and movement. The diagonal legs are always in step, thereby achieving balance.
The robot is mostly as described in the Design section. Using the two motors that operate together, the robot remains balanced and can carry a heavy load. In fact, I am able to put the Handyboard on top of the body and it still walks at about the same rate as without.
At left is a top-down view of the robot. Gears line the side of the robot and we can see how they are all interconnected with the motors via the axles. At right, we can see a side view and compare it with the design above. The crank-shaft is modified due to the lack of similar parts. I am curious as to whether it is more efficient to have the front legs bending outward as they are now, or if the robot will move more efficiently if they bent inward; that is, they would bend the same direction as the back legs. This view also gives us the best idea of the gear structure used on the side of the robot.
This design has seemed to work very well thus far. The robot walks in a straight line and can carry a decent load. It has an interesting and predictable wobble motion that will be interesting to simulate. The best part of implementing the modified design is that the legs stay in synch because it is impossible to get out of synch! When the motors are switched on, there is still the slight delay mentioned above. The delay is short enough to cause little problem. I speculate a longer delay between motors starting would cause severe strain on the robot and possibly cause it to break or at least the motors to burn out.
Finally, a .avi is available to view the walking behavior of the robot. It is about 9M, so is only somewhat large. The quality is horrible and the sound is not in synch with the picture--mainly because I know nothing about mpeg/avi and I converted a mpeg from my camera to an avi. The quality is also horrendous. Lastly, the codec used is probably some weird one that nobody has so you probably won't be able to view it anyway. It worked on my WMP. Anyway, click here for the video.
Physical Assembly Instructions
For an overview of the assembly, look at this video. Note that the assembly is symmetrical so it is only explained for one side of the robot. The following is a step-by-step guide which narrates the preceding video. The steps roughly coincide with the cuts in the video.
Step 1: Legs
Attach a 12x1-peg beam to 3x1-peg beam using the circular connectors. This creates the joint and the leg. Repeat with all four legs, ensuring they are lined up properly (i.e. joints extend outwards). The small gears are 24-tooth and the large ones are 40-tooth.
A circular connector should be inserted 6 holes up from the bottom of the long beam. This connector is attached to the gears as shown. The circular connector may go in any hole on the gear provided opposite gears (left and right of the ROBOT) are NOT in the same hole.
Step 2: Top Portion of Body
Create the center portion using 2x1-peg beams and 10x1-peg beams. This does NOT connect to anything just yet! Create the front and back anchors for the crankshaft as shown. The front side crankshaft should leave 3 pegs open while the back side only leaves 2. Circular connectors are used at the top of the shaft in order to be connected to the leg.
Step 3: Bottom Portion of Body
The bottom portion is a bit more complicated, but the choice of pieces is not horribly important. Plates are used underneath the beams for support only. Feel free to add or remove these as needed. From the front of the robot, there should be a 4x1-peg beam followed by the long 16x1-peg beam and then two 4x1-peg beams. Again, attach these underneath with plates as you see fit. Two 8x1-peg beams run inside and across the body providing additional support.
Note the plate structure on top of the bottom portion. Plates are required everywhere EXCEPT the 4 middle pegs. This is where the middle portion of the top will attach. The side portions of the top will be a little higher!
Small axles are placed as shown on the large 16x1-peg beam. Longer axles go across the body as shown. In the middle of the longer axle should be one of the small 12-tooth gears. This will get turned by a worm gear. This is not shown.
Step 4: Complete the Body
Connect the top portion and bottom portion of the body. There should be one peg open between where the top and bottom portions connect. The shafts WILL be higher than the center portion of the top. This is to be expected.
Step 5: Add the Legs
The gears should now match up to the axles sticking out. Note that the diagram does not properly display the longer axles and they should in reality stick out as well. The only piece remaining is to add the motor and get it running.
Step 6: Add the Motor
While not shown in the diagram, the motors go back to back underneath the middle of the top portion of the body. A long axle with a worm gear is attached to the motor. This worm gear should be lined up with the gear located on the axle. This setup should be the same for both sides of the robot.
See this picture for help with the gear structure.
Step 7: Power it Up!
Attach the handyboard to the center of the top portion of the body. The motors should have the same polarity since the gears need to spin in the same direction on both sides of the body. Watch it go!
The CAD environment I chose was SolidWorks. Numerous other environments were experimented with, but SolidWorks seemed to be the most user-friendly. SolidWorks allows for the creation of very complex pieces which can be combined into very complex assemblies. It also works well with several different file types--ideal for this project. That being said, all of the pieces were imported in step format and transformed into a SolidWorks "piece." I used a VB macro in order to automate this process. The macro was quite complex involving batch files and such... For such reasons, I have not included it on this page because a much better one can surely be created by someone with some VB experience.
Each individual Lego block was hand placed and mated with its adjacent blocks. Gears and axles were mated as well. This process is described in detail below. The two main axles and motors were left out for two reasons: 1. There is no motor part, and 2. It would add many more constraints the simulation which would unnecessarily complicate the design.
For the SolidWorks parts and my assembly file, download this zip file.
Creating the CAD Model (A How-To)
This section will assume all of the parts are imported and Saved As SolidWorks Parts. The imported file itself can be used in the same way, but doesn't allow for a library. The library makes building the assembly much much easier.
Adding a Piece
Once a new assembly is created in SolidWorks, parts may be added by clicking on the
Library icon on the right-hand side. Simply click and drag the part onto the workspace. The first left-click places the piece and additional left-clicks place additional pieces. A right-click will accept the additions.
There are 3 basic types of mates. All 3 have their own separate uses.
- Coincident Mate: This type of mate is used to align two planes. It does NOTensure two pieces touch, merely that the specified planes are coplanar. Multiple coincident mates can be used to stack two bricks. Click the
Matebutton at the top, click a face, click another face, the coincident mate should be the default, and then right click. The two pieces will line up so that the two faces are coplanar.
- Concentric Mate: This type of mate is used to force a cylinder or circle to be concentric to another cylinder or circle. This type of mate can also be used to attach bricks (concentric mate the pegs, for instance). It is more widely used to attach axles or connectors to gears and beams. The process is the same as Coincident Mate, but it is important to note that this type of mate can only occur between two cylindrically shaped objects (or circular). For example, an axle can be attached to a gear in this way. This may be more easily accomplished by using a coincident mate with the corners of the axle and the corners of the holes in the gear. This method does work well when putting an axle through a hole in a beam. Simply click the cylinder in the beam and click the curved face of the axle.
- Gear Mate: This can only occur between two circles. To mate two gears, click
Mateand a panel should open on the left. Click
Advanced Matesand there you will find the
Gear. Click on it, click on the first circle, then click on the second circle. You can input the gear ratio at this time, which can simply be set to the number of teeth on the gear. The working area will show which gear is which and also display the gear sizes.
Once two pieces are mated, the changes can be accepted by right-clicking. Sometimes, it is necessary to reverse the direction of the mate. For example, if you use a Coincident Mate to align two blocks, they may align improperly. That is, two 2x1-peg blocks could appear to be right on top of each other (i.e. appear as one) instead of side by side. There is a
Reverse button on the pop-up toolbar which will cycle through all of the types of mates. Clicking on the big check on the left panel will accept the changes and return to the main screen.
Floating Pieces vs. Fixed Pieces
A fixed piece is one that cannot be moved (by clicking and dragging) and also has no mates. On the other hand, a floating piece may have mates and may be moved. The initial piece always starts out as fixed. This gives a frame of reference for the other pieces. Fixed pieces are beneficial because any simulations do not need to check their mates. They are fixed in space.
Transforming to a Fixed Body
The assembly is most easily built by mating pieces. The body of my robot does not move, so there is no need for these pieces to be floating. This removes a great deal of computation when the simulation is attempted. In order to transform all of the pieces to fixed, simply highlight them all, right-click, and select
Fix. This will throw a great deal of errors because fixed pieces cannot be mated to each other. Recall though, that a fixed piece cannot move so it doesn't need a mate! Go through and delete ALL of the mates to alleviate the errors. It should be obvious that all moving parts are floats.
Peeking at the
Insert/Simulation menu, we find 4 different types of forces that can be added. The only one worthwhile to this project is
Rotary Motor. Its usage is simple: select Rotary Motor, click on a face, adjust the slider that pops up which controls velocity, and that is all. It is not a very accurate motion element: the slider has no force associated with it. But you can adjust the force in a relative fashion nonetheless.
Once all of the forces are added, it is possible to set the assembly in motion. On the right-hand side of the screen should be a
Simulation button. Click it and a drop-down shows a bunch of icons. The
Calculate Simulation button must be pressed initially in order to calculate the effects. THIS WILL TAKE A WHILE. It took mine about 20 mins to calculate the simulation. You will not likely be able to do anything else with your computer at this time. Go get a soda or something...
Once the simulation is calculated, it can be replayed in a greatly expedited fashion. In that
Simulation menu, simply press Play. There are several obvious options including recording the simulation.
I had a few problems with the simulation. Everything worked great, but after 10 seconds or so, the gears stopped and then reversed direction! I can find no explanation for this. Perhaps it is due to slight discrepancies in the parts?
Exploding the Model
SolidWorks allows you to explode your model so you can see how the parts go together. Click on the
Exploded View button on the main toolbar to access these options. The process of exploding is straightforward:
- Select the part/group of parts that will be exploded.
- A axis pops up which allows you to move the group of parts.
- You must click on the arrow in order to move the components.
- Repeat and then click on the check mark to accept the changes.
To animate the explosion (and save it as an .avi, enter the Configuration Manager, right-click on the exploded view, and choose
Animated. This animation can be zoomed, rotated, and recorded just like the simulations!
Using SolidWorks, I created the previous simulation. There are several caveats which are important when viewing the simulation:
- There are no motors because there was no previous model of a motor. Consequently, the axles that go from the front to the back are omitted. This includes the worm gear and the gear on the cross-axles.
- There are no contact forces being simulated. The movement of the gears is an effect of the mates. A gear mate tells one gear how to move in accordance with another. Gear ratios are included in order to simulate the correct rotational velocities.
- The video was edited in a minor fashion. After about 10 seconds or so, the entire simulation "breaks". That is, gears stop, and reverse direction and continue in a way that disobeys the gear mates. No explanation exists for this phenomenon.
Otherwise, this video models the movement of the robot rather well. The operation of the gear-train is very clear, as is the operation of the actual legs. Unfortunately, SolidWorks is not able to provide a decent physical simulation package. It is limited to linear motion, rotary motion, and gravity--none of which take collisions into account.
In this project, a physical and CAD model of a bio-inspired robot has been created. The physical model can be easily replicated using the directions found above, along with the generated diagrams. The CAD model took advantage of SolidWorks suite of design tools in order to model and simulate the physical model. While the actual model looks impressive, the simulation proved to be less than so. SolidWorks incorporates a rather skimpy set of simulating options. An animation is available that does not use forces and such, but this was not ideal for our project. Forces can be combined to create a simulation, but the effect of contact forces is not evident. Parts may rotate at different velocities, gravity can be simulated along with linear motion, and collisions are detected. Unfortunately, the simulation is less-than-realistic because one piece cannot manipulate the movement of another piece other than stopping it altogether.
This week I spent playing with the Legos and attempting to figure out how gears actually work. I also downloaded and installed Microstation. This proved to be non-trivial because the license supplied with the package is out of date. Another one exists in the Bentley directory on software.drexel.edu though, for the astute web surfer. Read the file and follow the simple directions for installation.
That being said, I've also been trying to figure out Microstation. It is a very complex program with little documentation. I found a tutorial online that is only average and only works for 2-D drawings. Check  for information. Additionally, it is worth noting that the default file type (.dgn) is 2-D when you create a new project within Microstation. Be sure to change the file type to .dwg when creating a new document.
Perhaps we can start up a Microstation FAQ, for instance. Maybe I will add a link to a skeleton to the main page. Help for even the smallest task would be fantastic. I cannot even make a cube!!!
The motors work! The handyboard turned out to be a huge pain. Not having an engineering background didn't seem to help. I followed the links provided by Joe Kopena in his emails and downloaded the Windows version of Interactive C. The QuickStart was straightforward to follow. Problems arose when I discovered a faulty telephone cord (which made it impossible to connect the serial converter chip with the handyboard). This was not trivial to discover, unfortunately. Then, I discovered a faulty motor port. That is, all of the other motor ports eventually worked with the same code.
After all this initial setup was complete, I finally have a working handyboard and some motors. If anyone has similar problems, I would be glad to assist.
In other news, I have narrowed my project down to two different ideas. I am interested in getting the tw-legged creature to work, but do not know how feasible it is. I hope to narrow this down by Tuesday. My idea for balancing the two-legged creature is to use the handyboard to shift the center of gravity on the being. I plan on attempting to build a mechanism that shifts the handyboard left and right depending on which leg is on the ground. This may be idiotic, but my non-engineering self can see it working. If that doesn't work, I am going to default to a four-legged beast since balancing such should be easy and setup should be as well.
The two legged animal proved to be a failure and I have began working on a four legged animal. It has no type yet. My initial design, implemented in Legos, uses two motors. One motor powers the front legs and one motor powers the back. I will likely run into a problem because the motors do not stay in synch, but will deal with that later. My major problems are making actual legs. I think I'm going to have to get more of the shorter axles from other kits because I don't have enough and am having problems with the feet hitting the axle and each other.
Spent a lot of time on the Wiki and plan on becoming a Microstation expert. The robot works and I'm happy with the design and implementation. I will not likely make any further modifications.