Swerve Drive Feedback Wanted

Swerve Drive (Based off of 1533’s swerve)
CAD linked below.
-How do you retain the ends of hex shafts? (For example: bearing on the top cim plate, see CAD below)
-How do you retain gears? (keep them from sliding on hexshaft) (Acetal spacers?)
-What is a normal turning rate for swerve? 60RPM? 240RPM?
-Does there need to be a gap between meshed gears or can I set the 2 diametral pitches tangent and call it a day?
-Is it a hazard to use low profile screws (with countersink) above gears? (Can screws threading into a VP without a nut be trusted?)
-Best way to mount a SRX mag encoder for wheel and steering? (Integrated encoder on VP for steering?)
-Along with previous question: how would the encoder wire be routed for the wheel encoder?

I really liked how 1533’s design used a groove in the large gear, the main plate and the upper rotating ring to make it into a ball bearing (instead of an off the shelf thrust or lazy susan bearing).
Check out the exploded view in the CAD below if what I said previously made no sense :slight_smile:
-What is the correct depth of this bearing groove? (In other words, how much of the ball should be sitting in the groove?)
-Our team is getting a shopbot PRS Alpha CNC router. It has a claimed accuracy of ±0.002". Is this a good enough tolerence for this bearing groove?
-Do I need to CAD tolerences? (e.g. 0.002" gaps between parts)

Link to CAD. Updates as I make changes: https://a360.co/2JQRLlR

What we (2067) have done that has worked quite well for us is as follows:

  1. Slot the shaft using a lathe/mill and a hacksaw and use retention rings
  2. Acetal spacers or 3D printing a spacer of custom length out of ABS
  3. We use a 70:1 ration on a bag, which is a bit below 200 rpm I believe
  4. We generally add .003in to the distance between two gears
  5. From our experience as long as you use lock tight you should not have an issue with them coming lose and damaging the gears (but you will if you don’t use lock tight)
  6. We have used the vp integrated encoder for steering and have had very minimal issues with them, I would highly recommend them.
  7. I would actually recommend also using a vp encoder on drive, it does add some weight and height, but they are by far the most reliable encoders I have seen (we have used other encoders in the past without issue, and other teams definitely do as well, but I find the vp encoders to be the easiest)

I hope this helps!

Just as a side note, swerve is a great learning experience, but it takes a ton of time to do well, so make sure you spend lots of time prototyping and testing code before you implement it in build season.

I can’t answer all of your questions, but I can give suggestions on some. I am not an expert on this, please don’t take what I say as final.

There are multiple ways. For this, I would likely suggest bolts and washers tapped into both end of the shaft, although the model currently has the shaft under-constrained by just one bearing, which I believe is not ideal, especially with a bevel gear. It looks like 1533 used the shaft directly on the end of a VersaPlanetary.
If you have access to a lathe, you can turn down the ends and have round bearings, with the flanges on the inside. You could also use cliprings, but they can be annoying to use. I would suggest against shaft collars as they are heavy and have a tendency to come off.

-How do you retain gears? (keep them from sliding on hexshaft) (Acetal spacers?)

We use a combination of acetal spacers and 3d printed spacers when the numbers aren’t round. Acetal spacers can be faster if you have them in stock, instead of waiting for a print.

-What is a normal turning rate for swerve? 60RPM? 240RPM?

It looks like you are using a 775pro for the rotation. I believe 1323 uses them with a 50:1 final reduction.
If you are using a 9015 or bag, I would suggest 150:1 final reduction, which is what 1533 used this year.

-Is it a hazard to use low profile screws (with countersink) above gears? (Can screws threading into a VP without a nut be trusted?)

We had button head bolts mounting our VersaPlanetaries right above our turning gears, and I don’t believe we ran into any problems (need to ask the pit crew to be sure). You should be fine as long as you use Loctite.

-Best way to mount a SRX mag encoder for wheel and steering? (Integrated encoder on VP for steering?)

For swerve, steering encoders are easiest when they are 1:1 with the rotation of the module. We did this by having the gear on the turning VersaPlanetary be the same size as the one on the module, but that greatly increases the size of the module. *(https://www.chiefdelphi.com/forums/showpost.php?p=1757377&postcount=12)

-Along with previous question: how would the encoder wire be routed for the wheel encoder?

For a coaxial swerve, it is best to have the drive encoder be fixed to the chassis. For your design, see if it will fit on the shaft on the CIM plate. I haven’t seen any examples where there is just an encoder on the module, but there are swerve modules with sliprings that have the motor controller and motor on the module.

Happy Swerve-ing!*

-I would avoid countersunk screws and instead use button head screws with a small counterbore. That way you can locate the versaplanetary with the pilot ring.

  • The vertical bevel gear shaft needs another bearing! The bevel gear will push away from the other bevel gear and the gears won’t stat aligned. Generally every shaft needs 2 bearings. 1 is bad and 3 is usually bad, 2 is the perfect number.

According to ShopBot when I spoke with them, no it will not hold ±0.002" when machining 6061 T6 aluminum plate. Only the Desktop models will get that kind of accuracy. You may want to get them on the phone at some point and try asking a variety of questions. Something like “I heard that the Desktop models offer higher accuracy in aluminum, can you quantify that improvement?”. This was about a year ago though, so things could have changed.

This is very important! Not properly supporting the vertical drive shaft is a key mistake many teams make when first doing swerve and it can lead to many problems. I have had teams come up to me and tell me they had to drop swerve because as soon as they get hit on the side the shaft starts to bend.

Looks like you are off to a good start.

I’ll try to tackle some of your questions. Please stop by our pit in Houston. We will have 2 spare modules with us that we can look at to review many of these design details.

On the 1533 swerve drive, there are two main hex shafts other than the gearbox output shafts (I will address the gearbox shafts in a minute); the axle shaft itself and the shaft parallel to the axle shaft that has the bevel gear and spur gear. It looks like you design has these same two shafts.

For thee upper shaft, we press on a length of Teflon tube of the right diameter to form a pressed on spacer. This Teflon tube is in between the spur gear and the bevel gear. The gear slip onto the shaft on either side of the spacer. The bearings are oriented such that the flanges of the bearings are toward the inside. Then the bearings are inserted into the two plates such that the plates hold the whole shaft group together.

For the axle shaft, we took a slightly different approach where we threaded the ends of the hex shaft (1/4" - 20 threads) and inserted a bolt with a washer that was large enough to not slide through the bearing. We did this so that we could change the wheel quickly if we needed to without disassembling the side plates. Last year’s design saw a lot of wheel tread wear so we wanted to be able to change those out quickly. But so far this year, the Colson wheels are holding up great.

All the other gears on our swerve design are on output shafts from VEX planetary gearboxes. On the drive motor, we again tap this shaft and install a bolt to retain the bevel gear. On the steering motor, we use a collar.

Since you have the additional shaft for the spur gear and the bevel gear, you will need to retain that shaft. Honestly, that shaft is not well restrained (as other commenters have stated). You need to address that first.

The turning rate does not need to be very fast. In fact, too fast and your control system will have a lot of overshoot and instability issues. We use a high gear ratio on the steering gearbox (as others have mentioned). The specific ratio will depend on the gear ratio of the output gear to the turret gear.

As others have mentioned, the best way to do the encoder for the steering system is to have a 1:1 encoder. We use continuous rotation potentiometers and have a set of plastic gears that have the same gear ratio as the steering gears to produce 1:1 rotation of the potentiometer vs. the module. This is key to getting absolute (instead of relative) orientation of the module.

For the drive motor, we use the standard encoder that comes with the versa planetaries. Without a planetary gearbox, it will be difficult to find a place to mount an encoder. You might be able to come up with a way to mount it onto your extra shaft…

The key to getting these grooves right is the spacer that goes between the upper and lower turret plates. This spacer will set the gap between these plates. From there it is fairly simple math to figure out how deep the grooves need to be to fit the bearing balls. We are using Delrin balls which are perhaps a little more forgiving than metal balls. Also, given the diameter of these races, a little bit of slop is not going to hurt you so you so you probably want to err slightly on the deeper side. We have used some trial and error to get this depth right. You may want to plan to build one trial part for the center plate out of a material that it easy to machine (such as polycarb or acetal) and experiment with the depth of these grooves until you get what you want

One important thing to note, in our design, the two bearing races are different diameters such that the two grooves do not result in a thin section of the center plate.

If you want a nominal gap between the parts, you need to CAD that in. You need to be aware of the tolerances and make sure that the design will still fit together with some level of tolerance. However, you should also plan to include adjustment features (slotted holes, etc.) where necessary to adjust for the tolerances of the parts if the fit is critical.

One final comment. You elected to set your drive motor speed ratio using spur gears instead of a planetary gearbox. While this is not wrong, it has created several problems that you are going to need to address (like the support for the shaft or where to put the encoder). I realize that 1533s swerve modules are quite tall with the mini CIM on top of the gearbox, and that can be a problem to make it fit on the robot. However, there are some other potential solutions if this height is a problem. Our team was looking into some more compact designs in the off season and came up with some interesting solutions. In the end, this year’s game favored the tall design as the footprint is a lot smaller. Our guys would be happy to show you some of the other designs we have been thinking about.

Are you looking to experiment with swerve in the off season? We would love to have you guys over to our build space sometime and do a deep dive into swerve designs. We have several generations that you can look at and there are some clever design solutions in each. We can also walk you through the code and even give you some driving tips.

See ya in Houston!

Thanks for all of your responses!

Do the bearings need to be above and below the bevel gear to be effective or does it just need to have one mounted right above the bevel gear?

One mounted right above the bevel gear should be sufficient (in addition to the one you already have).

Random question. If I were to use belts, what kind of pullys do I use?

Hey, thanks for the super detailed response! I would love to come over to your place and get some tips! I’ll stop by your pit in Houston so we can talk swervin’!

That would be awesome, we’ll definitely have to coordinate something :slight_smile:

These are the pulleys I would look at first. https://www.vexrobotics.com/vexpro/motion/belts-and-pulleys/htdpulleys.html