Wiring a swerve drive from andy mark

Our team has been trying to figure out how to wire the am-3009 swerve drive from andy mark and have been having some trouble figuring out just how to properly wire it. We have the neo drive and have also had no luck finding any reference online. Is there any where else to look or any advise for how exactly to wire this.

It’s fairly standard. The Neo motor will connect to a Spark MAX, and the PG motor will connect to the motor controller of your choice.

The PG motor has an encoder on it. That can either wire into your RIO, or potentially your motor controller (depending on your choice of motor controllers). You can find some documentation on doing this here, but this is a pretty standard quad encoder.

You may have also gotten an absolute encoder. This CAN replace the PG encoder if you wanted to. The interface will depending on your chosen motor controller.

I should also add the obligatory statement - it may be a little late to just be wiring a swerve drive for the first time. Many teams that run swerve experiment with it in the off-season before committing to it the season. You may be better off with a KOP chassis to maximize your competitiveness on the field. That said…swerve is fun.

Hey, i know this is a little overdue, but we saw your message and forgot to respond. We postponed doing swerve until now like you suggested. I wanted to ask you how you would wire it to the Rio, like what wires to what pinouts?

Here is your pinout:
image

Wires in kind of like this to the DIO port. You’ll need 2 ports for each encoder.
image

If you look at your rio, the pins are labeled. Ground will go to ground on the encoder. 5V goes to the 5V on your encoder. Channel A goes to one of the signal pins. Channel B goes to the signal pins on the 2nd port you use. You only need 1 wire on the 2nd port.

Here is some more info.

Hopefully this is helpful.

Our team has been trying to figure out how to wire the am-3009 swerve drive from andy mark and have been having some trouble figuring out just how to properly wire it. I wanted to ask how you would wire the PG motor to the Rio, like what wires to what pinouts?

The green screw terminal block will go to a motor controller. The encoder wires will go to two Digital I/O ports on the RoboRio. 5V/Signal/Ground should be labeled on the RoboRIo itself.

1 Like

though you are very correct in this statement, our team decided to do swerve for the first time during this build season, we barely pulled it off and it would’ve benefitted us to do it in off season (we still thankfully made it to worlds though)

1 Like

I would recommend not wiring the encoders directly to the rio
Wiring to a breakout board on a Talon SRX or Spark Max will simplify your code because you can run PID control directly on the controller instead of in your code

1 Like

Small problem. Our team currently has like nothing in terms of can wire, so wiring it directly to my Rio is my only option.

It wont run over can wire
You’ll need to solder the encoder to a breakout board
The breakout board either uses the flat grey 10-wire cables to connect to the motor controller or mounts directly to the controller
You then connect to the motor controller as you normally would

I apologize for the separation of my replies and my ineptitude. However, suppose we must wire it to the RIO; otherwise, there is a 0% chance of us being able to practice or use swerve drive this upcoming year. How would the code for that work? Our current setup consists of Spark MAX’s controlling the Neos on the swerve, and Victor SPX running as power on the PG motors, with the encoders wired directly to the RIO. If I am doing anything incorrectly in this setup, please assist me. :pray:

That sounds correct. You just need to make an Encoder object in your code and specify the pins.

That said, I wouldn’t run the Swerve and Steer in competition, especially now that it’s discontinued. I would stick with tank and develop other things in the offseason, moving to swerve only after doing the basic stuff like upgrading all my motors to brushless and eventually getting a newer swerve kit.

1 Like

While I’d tend to agree, there’s a couple other posts from the same person/team indicating low funding but a pre-purchased Swerve-and-Steer from a while back. As a learning experience, could be invaluable, and as it’s on a budget, can’t beat “in stock already”. And it’s the offseason… so running it in an offseason competition or two could be invaluable experience even if it breaks.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.