Previous Blog |
---|
Project R.A.G. - Blog #5 - Sensor & Light Module |
Blog #6 - Mechanical Build P1 - Robot On Rails
1. Introduction
Hi! This will be my sixth blog for the 1 Meter of Pi - Design Challenge. In the last blog which you can find linked above and at the end of this blog, I covered my design and build of the Light & Sensor module. In this blog, I will finally do the main mechanical build, the first part of it. The main mechanical build will be a 2 part series. In this first blog, I'll cover the rail system that the robot will ride on and everything relevant to that, while in the second blog I will go over mounting my modules, LED lights, water storage and everything else needed. That blog will come at a later date when everything else is completed and can be mounted.
2. Idea
Let's start with the name of this blog, Robot On Rails, what kind of rails and why do we need rails. To answer this question we need to go back to my first idea for this project and general concept. The idea was to have a robot that could move up & down between two big essentially pots on both sides of it. So we have the question here on how to solve that movement problem for our robot. Let's take a look at the original sketch first.
On the picture above you can see what I envisioned. Some kind of a rail system or something else that would allow our robot to go up and down between those 2 big pots. There are 2 things to think about when we are talking about a mechanism like this, what will propel our robot and on what will our robot move. These 2 things are of course dependant on one another, here are a few examples of what we could possibly do for this project:
- Flat surface - wheels - onboard motors
- This option would mean that we would have a flat surface and a small motorized cart that would carry our robot around
- Flat surface - wheels - belt driven
- This option would again see a small cart carrying our robot but instead of it being motorized we would have a belt pulling the robot up and down this system
- V slot extrusions - wheels - belt driven
- This option would see us using the 20x20 extruded v slot aluminum extrusions and rollers which would fit in those rails, while there would be a belt pulling our robot. This method for moving something can be seen a lot of machines like some 3D printers, which is where I got my idea from.
- V slot extrusions - wheels - threaded rod driven
- This is the same setup, just instead of the belt driving the robot, we would have a long threaded rod turning and moving our robot. This method would give us a lot of torque because of it's construction, but would be really slow and we would need a really long threaded rod for that
- Smooth rods - linear bearings - belt or threaded rod driven
- This would be a really professional setup but required really long rods, which would mean we would have to get some thicker ones to compensate for the sag, and we would also need linear bearings. As for the propulsion, we have the same options as for the v slot extrusions
3. Plan
Those are just some of the options, we can certainly find more options which are better or worse at something than this here. The option with which I went is the V slot extrusions with small rollers that is belt driven. There are multiple reasons for this. The rails are pretty strong, so at 1m there won't a lot of sag with them, all of the part can be found easily or made easily using 3D printing, those rails aren't expensive. As for the propulsion, I will be using a stepper motor which will drive the robot by pulling a belt. This gives us pretty good accuracy and much more speed compared to the threaded rod. Also, these extrusions are like LEGO and I can mount other stuff to this frame later on in the project.
All that's left to plan our are the measurements for our rail system. I wanted to have 1m of movement up & down the rails, while the distance between the rails will be determined by the gap between the wheels when we mount them to the robot box. So I'll go over that in the assembly section of this blog. Let's first design all of the mounts and brackets needed to assemble everything. There are 3 main assemblies we have to cover, the wheel assembly, the belt & motor assembly and the leg assembly. Besides that, we have a couple of things that will be needed for the assembly which don't really fall into one of the main 3 assemblies.
4. Design
Now we get to the main work for this part of the project, the design. To design all of the parts I'll be using Fusion 360 and will be printing them out using my Ender3 Pro using Creality White PLA. For all of the prints I will be using standard settings with a 0.4mm nozzle at 0.2mm layer height and will be using Cura 4.6 for slicing all of the models (I know there are newer versions available, but since there were a lot of bugs in the 4.7 I'm not upgrading until I'm done with this project). You can find all of the 3D models here: Rail System. The models come as they are and you are free to do with them whatever you want! To begin the design, let's start with the wheel assembly.
Wheel assembly
This assembly will go over the parts needed for the robot to slide on the rails, this will include the wheels for the robot and the brackets that are used to mount the wheels to the robot box. The wheel assembly will consist of 6 wheels, 3 on each side, with 2 being on the top and 1 being at the bottom of the rail. In this way we have a really stable construction, we can turn it upside down and it would still work. To begin, let's start with the wheel. There is a subfolder for all of the models for this assembly, you can find that here: Wheel Assembly.
{tabbedtable} Tab Label | Tab Content |
---|---|
Wheel | To start off, let's begin with designing the wheel/roller. You can buy these for not so much money usually, but since I need 6 and had a lot of the same bearings laying around, I thought, why not and try designing a simple wheel with a 45 degree wall, how hard can it be. The first thing I needed was to measure up the bearings I was going to use for these wheels. The internal diameter is 7mm and the height of the bearing is also 7mm. To make the wheels, I want to have 2 bearings side by side inside every single wheel. The wheel needs to come to a little under 6mm, since the opening in the V slot extrusions is around 6.2mm.
AdapterFirst thing I had to design was the adapter for the bearing. The hole in the center is a 7mm which doesn't honestly work me, so I printed out a small adapter to get the diameter to 5mm so I can use a M5 screw as the axle for the wheel.
Wheel bodyFor the wheel, besides that, we need the wheel body. I made it so it's a snug fit over the bearings I am using, with the outside diameter of 40mm with chamfer that goes under 6mm at the top.
Finished WheelAs mentioned above, I've printed out this in PLA, I used Creality White PLA at standard settings, 205 degrees at the nozzle, 60 degrees on the bed, no supports needed. There are chamfers to compensate for the elephant foot effect but some additional post processing may be needed. |
Wheel Mount 1 | This wheel mount will be used for holding the 4 upper wheels, 2 on each side. This doesn't have to be anything complex, or big, it just need a hole for the wheel axle and a way to be attached to the robot box. I went with a simple design where I would attach it with 2 M4 screws to the box, with a hole going through a center, where I just went and cut a thread in so I can screw on the wheel. This is a great method, because, if we don't mount everything perfectly, it gives an option to put a washer or an additional nut between the wheel and the mount to align everything properly. I suggest you print the model as shown on the right picture, in this way, there is a lesser chance of this part breaking when cutting a thread through the center hole. |
Wheel Mount 2 | This wheel mount will be used to hold the 2 lower wheels that go underneath the rails, which are used for stability. These wheels will make it impossible for the robot to fall of the rails in any way, the robot will also be stable when we extend the arm and it won't topple over. The hole at the top of the mount is the exact to the hole on the other wheel mount, the only thing that was a bit tricky here was to measure how high the wheel should be compared to the first one. I did that by aligning it the best I can in the model and measuring, it turned out pretty good in the end, here are the pictures of the finished part: |
Finished wheel assembly
With all of those printed out, the only thing that is left to do is mount it to the robot box. I mounted the 4 upper wheels at the corners to get the best stability, while the third one went in the center between those two. If you've missed it above, all of these models are available on the following link: Wheel Assembly. You will find both the STP files and STL files there, you are free to do with them whatever you want, the models come as they are without any guarantee, but they did work for me.
The wheel assembly turned out great! I was afraid if I got the measurements right, and they are pretty pretty close. The lower wheels could maybe have been just a tiny bit close for a better fit. But it glides down the rails great like this and there's no way it can fall of them. To attach the mounts to the box I just drilled some smaller holes and used a tap to thread the holes in for the M4 screws. The weakest part of this build is the plastic box itself, which I found it flexes a bit, but it is holding up really good.
Belt & motor assembly
This assembly will cover the propulsion part for this build. This includes the motor mount, the belt tensioner and belt grabbers. The gears I have on hand are both over 20mm in diameter which means I can put them outside the V slot extrusions and still use them no problem. In this way, I can use the maximum length of the rails for the robot to travel on them. I had a bit of a different plan in the beginning for mounting the motor and belt tensioner, and that would be to a piece of wood that would act as a wall. I changed along the way to have a frame made out of the v slot extrusions, so I had to redesign 2 mounts. I'll still upload the files for those mounts I won't using since they may be useful to someone. You can find all of the models for this assembly here: Belt & Motor Assembly.
{tabbedtable} Tab Label | Tab Content |
---|---|
Motor Mount | Flat surface mountThe motor I have has 4 mounting holes on the top with the distance between them being 31mm. If you have a different kind of hole spacing than me on my motor, it's a simple edit to the mounts I'll be showing here. This here is the mount I won't be using, that I made in the start thinking I will be attaching the motor to a piece of wood. I left holes for 5 wood screws to be used to attach the mount. Besides that, it's just a simple L bracket shape, it took about 3-4 hours of printing.
20x20 extrusion mountWhile I didn't use the mount mentioned above, this is the one I actually used for my build. It was designed to be attached using 4 M4 screws and M4 nuts designed for this extrusion, though, attaching it with only 2 screws will be plenty strong too. The part of the mount that attaches to the motor has remained exactly the same as the one above. My suggestion would be to print this in the way that's it's pictured above. I didn't use any supports and it turned out great. The longest bridges that you can expect for this model are 20mm, so make sure your printer can do those without supports or add supports if needed. The rest of the settings are as usual, 205C, 60C, 0.2mm layer height with a 0.4mm nozzle. It also took around 4 hours to finish up this print. |
Belt Tensioner | While the motor mount with the motor attached to it will be at the 1 end of the rails, at the other end we need a free spinning wheel and a tensioner so our belt can rotate freely. I wanted to design this to have a simple tightening mechanism, since I have experience with tightening belts on my 3D printer and I'm not a fan of how they did that. On the printer, you need to loosen up 2 screws then pull by hand, then tighten while you are keeping the belt tensioned, while in the same time, you need to make sure that everything is aligned well. To solve this problem I made my belt tensioner out of 2 parts. One being the gear holder which will act as a piston and the mount which will act as a cylinder. Attaching them together will be only one screw, which will get them closer when you tighten the screw. You will see what I mean in the final assembly.
BushingIn the same way I did for the wheel, I had to design small adapter for the bearing inside the free spinning wheel so I can use a M5 screw as an axle. This time I made them shorter, so I can use 2 of these on each side of the gear where they go into it. I designed them pretty close to the original dimensions, within 0.1mm, so it was a pretty snug fit. It didn't require a lot of post processing to make it fit. Here is the end result.
Gear holderNext on the list is the gear holder. This part will act as a piston in this build and will glide up and down the cylinder of the mount. Besides that, it needs to hold the gear at the top using a M5 screw with a few nuts and washers. At the bottom of it, I left a hexagonal hole for an M5 nut, which will be used for bringing this part closer to the mount and tightening the belt in the process. You shouldn't print this standing up, since in that case, the belt tension will try to separate the part between the layers, which is the weakest orientation for 3D printed parts. You might notice that there are some weird features on both sides, those are used essentially for keying with the cylinder to make the connection just a bit better. The angles on the feature are 45 degrees, so it can be printed without using any supports on most 3D printers.
Flat surface mountJust as for the motor mount, this is the one I won't be using, but I'm putting it here if someone else finds it useful. It has a feature in the center that matches that of a cylinder with a slight offset so it can slide easily. There are 4 holes for wood screws at the corners for attaching it to a flat surface, and a hole at the center for the belt tightening screw.
20x20 extrusion mountAfter a quick redesign of the mount above, I pretty much just removed the 4 holes at corners and made a structure around so it can fit onto the 20x20 extrusions properly. It is attached to the extrusions using 2 M4 screws with the nuts that are made for these extrusions. I suggest you print this part laying down as well. I printed it without any supports, but I did use experimental bridging settings in Cura. Expect overhangs of no more than 20mm, so if your printer can do that, you don't need to use any support for this model.
Belt tensioner assemblyWith that, we have all of the needed parts designed, let's take a look at how the final assembly looks like. One thing I oversaw with the design is that the legs at the end are wider than 20mm, so they poke out a bit on each side, but it turned out to work really really good. |
Belt grabber | The last part that we need to design is the belt grabber. The belt grabber is something that will also sit on the underneath of the robot box which will clamp onto the belt and hold it firmly. There are different ways to go about this. On my printer, this was resolved by butting a small slot in a metal, that was wide enough to just fit the thinnest part of the belt and grabbing it in that way. Because I was printing out this, I decided to go with a different approach where I would have a mount that screws onto the box with a channel wide enough for the belt and a grabber at the top which has the reverse features of the belt, and just a use a couple of screws to hold these 2 together.
MountI somehow managed to overwrite and lose the file that contained the 3D model for this part. So the only thing that I have left is the STL files for it. The purpose of this part is explained above, it has 4 screw holes in the corners for mounting to the robot box and has 6 hole into which I cut M3 threads for attaching the grabber. We need 2 of these.
GrabberThis part goes over the mount and screws into the 6 holes with 6 M3 screws. It has a feature in the middle which is essentially a negative of the belt shape so when it's screwed in, it doesn't let the belt move at all.
Belt grabber assemblyWe need to attach the belt at 2 points, so we need 2 sets of these for our project. After printing them out at standard settings and mounting them to the robot box, this is how it turned out: |
Leg assembly
The last big assembly for this part of the build is the leg assembly. Since the robot will have 2 wheels underneath the rails and we will need 2 cables running underneath the robot, we need a way to somehow lift up the whole construction. My solution for that is printing out 4 screw on feet with height adjustment, so I can make sure that everything is level and that there is no wobble in the whole construction. I've designed these legs so they can easily be redesigned so that they can be screwed onto something or just mounted differently in general. You can find all of the files for this assembly here: Leg Assembly. As usual, you have all of the STP and STL files available and are free to do with them whatever you want.
{tabbedtable} Tab Label | Tab Content |
---|---|
Leg | This will be the upper part of the leg that is made out of 2 parts. This part will have a square 20mm hole at the top which needs to go onto the rail. It has a hole in the middle which is used for securing the leg to the construction of the rail system. Prior to mounting, I tapped the holes in the extrusions for M5 screws. This was printed without any supports but it needed bridges that were 20mm. Besides tapping the holes in the extrusion, you also need to tap the holes on the bottom of this part of the leg for the M8 screw which will be used for adjusting the height of our rail system. |
Foot | This is the lower part of the leg that will be in contact with the ground as the name suggests. It has a 13mm hexagonal hole left for the head of the screw to go into it. Then the screw is attached to the foot with a washer and nut. With that, the foot is complete and you can screw it into the leg. I left a bit of an irregular shape on the outside so it can easily be tightened and loosened without using any tools. Though if you want to, there will be a 13mm nut above the foot on which you can use a spanner for adjusting the height of that leg. With that, we have all of the models for the legs complete. |
Finished leg assembly
Each set of the legs took a little longer to print. In the slicer I put 4 outside walls to make it stronger and to make the wall around the 8mm hole thicker. This is important to have meat into which we can cut it when we are tapping the hole. Each leg, by that, a leg and a foot, needed about 2 and half hours to print. Here is how they look printed. The 8mm screw is used is 50mm long.
Other
Besides the parts and assemblies I've talked about above there are 2 more parts necessary for the final assembly that don't really fall into of the assemblies above. Those are the mounts for the end stop switches and L brackets used to put the whole frame together. These are simple and small prints, but I made the walls on the L bracket extra thick to make it as strong as possible. You can find STP & STL files for these models here: Other 3D models.
{tabbedtable} Tab Label | Tab Content |
---|---|
Microswitch mount | As an end stop switch I will just a standard microswitch. When designing this mount there are just a couple of dimensions that are important to consider. The gap between the mounting holes is 9.5mm and the holes are 2.5mm in diameter. Also, the center of the holes is 2.5mm for the lower edge of the switch. I designed the mount in a L shape bracket style. At the bottom there is a hole for a M3 screw that will be used to attach this to the 20x20 extrusions with the nut. I did the other dimensions so it matches the micro switch as best it could. |
L bracket | And the last part needed is a small L bracket. There are metal ones which you can buy for attaching these extrusions together, but I was really eager to put this together and test it, rather than ordering these and waiting for them to arrive. So I designed small simple L brackets that are designed for M4 screws. I need 8 of these in total. To make it as strong as possible I printed them laying down as shown here. This will give them the highest possible strength when it comes to bending, which is what we are after. Rather than using screws with a cone head, I went with standard screws here, so I can put a big washer on top and tighten it really good without fear of the plastic breaking under the pressure. I had this happen a lot when using cone head screws. |
5. Assembly
With all of the parts designed and printed out, the only thing we have left to do is assemble everything. The first thing I assembled is the wheel assembly for the robot. The reason why I did this so I can know the exact measurement to which I'll need to make my frame so the robot glides nicely on it. Here are the pictures of the wheel assembly which you could have seen above as well.
After this part of the assembly was finished, it was time to turn my attention for putting together the whole frame. The wheel to wheel distance came to around 178mm, so that was the dimensions that I was aiming for when putting this together first. Here are all of the fasteners and parts needed for this part of the assembly.
On the left we have the L brackets, screws, washer and nuts needed for them, in the middle we have the motor assembly, and on the right we have the belt assembly. To make the frame, I used 4 pieces of 20x20 extrusions, two with the length of 993mm, and 2 ones I had laying around that are 280mm and 425mm. I didn't shorten those to the same length, as it gives me more room for mounting things later on. As for why the length of the rails is 993mm, the guy I ordered them from cut them to that size on purpose, since, if the package is above 1m, the postal services charges way way more for shipping where I live.
Above you can see some of the close ups of the construction. On the first picture you can see the frame held together with the L brackets and the belt tensioner doings it's thing. On the second picture you can see the legs mounted to the construction, the height adjustment works great, and on the last picture you can see the part where the motor is. Next to it, you can also see the limit switch. Here is a big picture of how the whole construction turned out.
I am so happy with how third turned out. In the picture, the legs are at their shortest setting, and the lower wheels are still clearing the ground by a couple of cm. They can go much higher if needed. After doing the first test assembly, I took the whole thing apart and with help from my dad, we slowly put it together to make sure everything was aligned properly and centered. After that assembly, it turned out great! The only mistake I made was tightening the belt too much, but after loosening it up everything went smoothly.
Here are 2 gifs of the first gliding tests I tried. On the gif above, it's just me pushing the cart up & down the rails. It's really going really nicely. The only thing you can hear is like it's climbing a small step and that's because of the line where the printer met at that layer, so there's a bit of a seam, but nothing too dramatic.
On this gif we can see our astronaut/artist/gardener enjoying his first ride on the rails, and he's pretty happy with the ride. The only thing to do is to try out the whole system by running the stepper motor. I'll wire up a small test circuit with a step driver and see how it moves. Let's first take a look at what we will need from an electronics standpoint.
6. Electronics
As mentioned multiple times, I will be using a stepper motor for this part of the build. As you know, driving the stepper motor isn't as easy as just plugging it into power and it turning, but, to be honest, it's not much harder than that using small stepper drivers. They became really popular and low cost specially because of 3D printers using them. There are multiple options for widely available stepper drivers, here just a list of the basic few:
- A4988
- DRV8825
- TMC2208
They all do the same thing for the most part, driving a stepper, but they are rated for different current of course and have additional features compared to one another, like silent stepping, sensorless homing where it measures the current going to the motor to home and it so on. The one I have and will be using is the DRV8825.
Here is the datasheet for the driver that is on this breakout board as well as a link going into a bit of a detail when it comes to using the module:
Driving this stepper driver is pretty simple using a small microcontroller. On one side of the board we have connections for the motor and the power supply for the motor, while on the other side we have the control inputs. We have reset, enable, sleep signals, we have inputs for microstepping and most importantly we have the step and direction pins. By sending a pulse to the step pin we can turn the stepper motor, while depending on the logic level of the direction pin, we will be turning it either one way or the other. Here is a simple schematic of this breakout board.
The connections between the components are simple as you can see from the diagram above, all we need are 2 digital pins from the Arduino Nano. I haven't played with microstepping features of this breakout board yet, but I'll look into that in the future. The power supply pin for the motor accepts a wide range from 8 to over 40 volts, but I'll be going with 12V so I can use that at the rest of the project. All we need now is a short piece of code and we can finally test it out.
#define dirPin 2 #define stepPin 3 void setup() { // Declare pins as output: Serial.begin(9600); pinMode(stepPin, OUTPUT); pinMode(dirPin, OUTPUT); } void loop() { // put your main code here, to run repeatedly: Serial.println("Direction 1"); digitalWrite(dirPin, HIGH); // These four lines result in 1 step: digitalWrite(stepPin, HIGH); delayMicroseconds(200); digitalWrite(stepPin, LOW); delayMicroseconds(200); }
As you can see, the code is incredibly short, the only thing I did was send a pulse to the DRV8825. The frequency of that pulse signal determines how fast our motor spins. All that was left now was to connect the motor and see it working.
7. Testing
We have the motor spinning, let's just see how it works when we have it all mounted to our rail system.
And here we can see the stepper moving the cart along the rails. During testing and preparing for another video, I managed to short something out on the motor driver so I had a bit of a situation, as you can see on the following photo:
In other words, I'll be needing another motor driver. Besides just sharing all of the things that went right, I think it's important to also show some of the stuff that went wrong, like here. I'll just order a new (or 2 to be safe) and continue on with this build. To wrap it up, here is a picture of our astronaut mounted on the rails.
8. What's next?
Next on the line is the main box which contains the Raspberry and the relays for powering all of the modules. Besides that I'm working on another module similar to the Light & Sensor module that I already covered, this one being the Water & Rail module. As the name suggests that module will take care of watering the plants and moving the robot up and down the rails. It will also have an important role when it comes to the tools on the top of the robot as well, but more on that when I get to that blog. When those 2 modules are completed, all that's left to do is mount everything together in this project, where comes in play the second part of this blog and then we can play around with software and program it to work with us. The only thing besides that, that is left is the tool holder and the tools themselves, which is a one day job on the design and production aspect. A lot of cool stuff on the way, though, the deadline is approaching really fast.
I've posted the second part for the mechanical build where I tackle all of the issues I had in this blog, you can check out that blog via this link: Project R.A.G. - Blog #8 - Mechanical Build P2 - Robot On Rails
9. Fun news from the ISS
In this segment of fun news from the ISS, I came across a cool little experiment that was done a few years ago, or to be more exact, onboard the expedition 23 mission which took place in 2010. They experimented with growing white spruce seedlings onboard the ISS and got some cool results as you can see below. As the other similar missions, the goal of the experiment was to see how gravity, or in this case, the lack of, influences growth and genetics of wood formation.
10. Summary
This was the part of this project that I was the most worried about besides the software side. This part is essential for this project to have a point, because if the arm can't move down these rails, we can't really reach that many plants, the only thing we could to was to put the robot in the center with plants around that it can then go and work around them. These v slot extrusions are really an amazing thing, they are like a grown up version of LEGO for making stuff. I can't wait to finish up the main box to play around with this part of the build by controlling it from the Raspberry. All of the relevant links for this competition, link to the next and previous blog as well as my GitHub where I'm uploading all of the models can be found underneath. Thanks for reading the blog, hope you liked it and found it interesting!
Milos
Relevant links for the competition:
Link to my GitHub where you can find all of the files used for this project (code, 3D models,...):
Link to my Project Collection:
Previous Blog | Next Blog |
---|---|
Project R.A.G. - Blog #5 - Sensor & Light Module | Project R.A.G. - Blog #7 - The Mainframe - P1 |
Top Comments