Testing Kraken mechanisms

We got our very first Krakens this year! HOWEVER, this leads me to a challenge: how do we run test a mechanism without actual code? With NEOs I had built up the analog of the old-school drill tester. You know the one, Anderson connectors in a power drill housing :wink: I figured out that you could get a -brushless- drill and hook three Anderson connectors in parallel with the internal motor and run a NEO or NEO550 just like the old tester.

So, Iā€™m wanting a tool that will make a Kraken dance, with a minimum of ā€œoopsieā€. The first generation is in the upper part of this photo. It turns out that this servo tester uses a through hole 5k pot for control. I added two resistors+10 turn pots in series with the top and bottom of this pot. A double pole double throw switch shorts one or the other. With some careful adjustment the main pot I ended up with a Kraken runner that does 800-1,500 milli-seconds OR 1,500-2,200 milli-seconds. That translates to 0-100% forward and 0-100% backwards. On the not-so-cool side switching when things are powered means the motor goes full blast the other way. And when you let go it keeps spinning. BUT, it works pretty well! FYI, the box you see has a big AC/DC power supply, main breaker, etc. to give the programmers a tool to practice/learn PID tuning. And as a power supply that is NOT a battery.


Version 2 will use a spring centered joystick and a DC breaker. Iā€™ll keep yā€™all posted!

3 Likes

So is this just controlling the motor over PWM? thatā€™s awesome, I forgot Krakens even supported PWM, but hereā€™s a great use for it! This does seem like a very nice solution, our team has been prototyping with NEO Vortexes despite switching to primarily Krakens because we could run them off USB-C. Something like this could be very handy to use instead.

Tuner X is kinda built for this. You can connect it to a carnivore or rio with the kraken on the can bus

1 Like

You donā€™t need code to test those motors with full control capability.

We test our mechanisms that require it using our backup CANivore and the TunerX tool on any laptop in the shop.

2 Likes

Echoā€™ing what others said, Iā€™ve used Tuner X with my teams to test 1-motor mechanisms, but one other thing that I think is very useful is to test more complex multi-motor mechanisms with hardware attached simulation.

This year we tested a 2-motor launcher with a left and right side flywheel, which we did by making a quick java program to velocity closed loop the left and right side and adjust each side individually to intentionally spin the note and see what effect it had. Itā€™s a halfway point between setting up a RIO and testing 1 motor at a time.
Also gets you the benefit of plotting info like velocity/stator current and seeing whatā€™s going on in your prototypes.

1 Like

Tuner X needs the CANivore, and makes the mechanical folks nervous :wink: I totally want to get my programmers comfortable with running it ASAP! Thatā€™s actually a key function of that box in the background of the photo.

Iā€™m looking for super quick, easy to deploy.

Tuner X needs the CANivore

You can connect to a roborio as well if you donā€™t own a CANivore

I get you are trying to be funny, but youā€™ve been given perfectly simple suggestion of what to use and then an employee of the company that co-creates the motor also telling you what your best option is.

1 Like

The Krakens will still respond to PWM on the CAN inputs (just like you said). Iā€™ve built multiple Arduino-based test rigs to drive things for just this situation - my latest spin is at Utility/hardware/motor_testing/ardiuno_pwm_brushless_driver at main Ā· Team-2151-Progrraming-Room/Utility Ā· GitHub (@Weldingrod1 - we seem to get pulled into the same discussions and I think this was in one of the discussions we were in about a year back maybe?) I always use spring-loaded center off switches to stop things if you stop pressing the switch.

Itā€™s just super nice to able to run mechanisms quickly without involving more folks when you just want to spin a motor or two.

1 Like

ā€œbestā€ is certainly subjective. @TytanRock solution is cool and very useful, but for the typical mechanical team member, over kill and more complex than what their needs are (or what they want to get involved with and probably means getting more people involved which is the very thing they are trying to avoid).

Sometimes you just do want to spin a motor as simply as possible and the folks on teams Iā€™ve been on have appreciated that aspect. Turns out for them, it was the ā€œbestā€ solution and I wonā€™t argue with them because for them , they were actually right on.

Both solutions - and probably even more than just those two - could be ā€œbestā€ but just for different circumstances. It depends on who your ā€œcustomerā€ is - and I feel Iā€™ve had the same early stage ā€œcustomerā€ as @Weldingrod1 is trying to address as well. But Iā€™m going to take @TytanRock solution and put it into my trick bag for a slightly different ā€œcustomerā€ because it has a lot of value as well.

That does require a $450 piece of hardware to be standing by, and properly flashed with appropriate software. And the CANivore option requires a $300 piece of hardware. And both of these options also require a laptop to run.

Depending on a teams resources and budget, I can absolutely see OPā€™s solution being the ā€œbestā€ for their circumstances.

4 Likes

Just to be clear, all the provided solutions (PWM, Tuner X, Hardware Sim) are perfectly valid and Iā€™ve used all of them in the past depending on exactly what Iā€™m trying to do.

I think from a ā€œsimplestā€ point of view, making a little box that spits out a PWM signal is going to be your best bet. You donā€™t need a CANivore or a computer for that, so itā€™s about as simple as you can get.

I also think if you can train your mechanical students to use Tuner X, theyā€™ll benefit a lot more, since they can now see what velocity your mechanism is running, estimate its efficiency (based on stator current), and play with more advanced controls if the mechanism warrants it. Itā€™s quite a step up to get telemetry in real time for many prototypes, as it directs you what the next step should be with concrete data.

7 Likes

we have not had an open loop mechanism on our bot since 2019, why would we prototype open loop? the time to set up a canivore is trivial and the benefit to get MUCH better data its a no brainer. closed loop control and current data about the prototype

Your team probably wouldnā€™t - but it can be different for other teams including one of the teams I work on where weā€™re working towards where I suspect your team is at but we arenā€™t yet.

1 Like

I totally understand what your saying and circumstances are different for every team

but on the flip side we are where we are because part of our education involves pushing them to do the more challenging thing. the kids didnā€™t show up knowing what a pid was or how to read the data the canivore gives you. but after trying AND BREAKING MANY things they learn.

Victory!
I was able to find a spring centered 10K joystick; that replaces the 5K pot on a standard servo tester. Some connectors, a UBEC, and a 40 Amp DC breaker, and Iā€™ve got it!
It can run this linear actuator prototype up to full speed with nice smooth acceleration and deceleration!
Joystick: Amazon.com
Servo tester: Amazon.com
Breaker (kinda big, but having a switch is good!): Amazon.com
UBEC: Amazon.com

5 Likes

Iā€™ve used the same servo tester and drawn a sharpie mark where zero is that the kids would go off of

The display is PWM in microseconds.

Step 1 is to remove the cover and expose the four screws on the servo tester.
image
The pot we are going to remove or bypass is on the upper right (top view). In the bottom (red) view Iā€™m pointing at the three leads. In order (left to right) they are ground, wiper, and +5 Volts. That chip resistor just above the group of three is in series with the wiper. Donā€™t accidentally desolder it! The two larger pads up and left/right are the mounting legs for the pot. Depending on your desoldering skills, you can either just snip off the mounting legs or remove them. Again, depending on your confidence, you can do one of there things on the pot leads: snip off close to the pot and solder to the remaining legs, snip off close to the pot and pull them out as you heat the back side, or desolder/remove as is. FYI, you can clean out holes on a PCB by adding a bit of solder to your iron, heating the hole, and whacking the board on a solid surface (hole pointed at the surface). Make 100% sure you are wearing your safety glasses when you do this; you donā€™t want the splash zone to include your eyeballs!!!
image
Hereā€™s the ā€œafterā€ pictures:
image
If you want to go the small route, buy something like this:
https://www.amazon.com/PS5-Replacement-Playstation-Joysticks-Controller-Thumbstick/dp/B0C463SCJS
You can solder this joystick right into the board, in place of the original! You will need to trim a LOT of pins off. You might want to drill a couple holes through the ground plane in the upper left of the board so you can keep a mounting leg or two. Stay away from the area with traces in it!!! This drop in replacement will make your control spring centered. All the other functions of the servo tester will work as designed. A 3D printed case would be nice, but you can also just hack a big-ol hole in the top and put it all back together again.
In-use notes for this version:
The green wire goes on the bottom/negative/ground pin. The one closest to the circuit board. Yellow is the top pin.
A UBEC will allow you to power this from your 12 Volt battery and will plug directly into the Ā± pins. See later for photos of this.

On to the fancy version!
I soldered some three conductor flat wire into the board and onto the joystickā€™s pot. Not particularly difficult; just watch that you donā€™t end up with a tiny thread of wire bridging something.
image
I made a hole to see the PWM display and mounted the board with a combination of the original screws and our old friend, hot glue :wink:
image
Note that I got kinda close to the lid mounting screws. AND that I managed to miss the fact that the stupid lid is NOT symmetric. Poke-a-yoke failā€¦

3D printed Anderson SB50 and PowerPole mounts give me power in and out. I hogged a hole in the side of the box to get the breaker accessible. The holes in the breaker will take a #4-40 screw. A dab of loctite finishes that install. I soldered the Anderson pins, in case you were wondering.
image
After I tested this, I realized that I needed both male and female Dupont connectors, so I went back and added the male. I used servo extensions for both, but I had to crimp some pins on to make a female to female version. For these little holes I drilled three holes in a row with the right size drill bit and then cleaned up the edges and sized it with a needle file. Hot glue for the quality finishā€¦
Here you can see the servo extension plugged in and the UBEC on the other side, with the pins bent to clear the mounting screw. Oops.
The joystick hole is 40mm, with a four bolt pattern. I ended up drilling it 45 degrees off and having to re-do the drilling. BUT, its covered up by the trim ring! Bonus!


Finished box! Note the red and green dots next to the joystick; these correspond to the red and green directional LEDs that Krakens show when running.
I also color coded the Dupont connectors with fingernail polish, as they are not polarized :frowning:
The guards are really just for fancy :grin: They are standard drawer handles from Lowesā€¦
image
Hereā€™s the whole shootinā€™ match on my heroically messy workbench. Iā€™m kinda funny that way; some things get intensive organizing (wrenches, screws, nuts, etc.) but other thingsā€¦ not so much. Sorry, I didnā€™t have an actual FRC battery on hand!
And yes, it still runs a servo!

The linear actuator is a riff on the LadyCans most excellent design! This one uses a 3:1 belt reduction to simplify things. That said, the big pulley is kind of a trick to make; you buy one with a metric bore that is under 3/8", bore it out, then make a keyway broach bushing to fit that and a 2mm key cutterā€¦

Signing off for now!

4 Likes

Oh, I forgot to mention: you need to check the zero on the pot. You want the display to show pretty close to ā€œ1500ā€ when you let go of the pot. This is important, otherwise the motor will driftā€¦

if it does not read 1500 how do you go about fixing that issue?