So now we’re about a week and a half before champs - the intended debut of Luchador mk4 and I still didn’t have a working weapon. Those of you that know me, know that I like to be prepared early - so this was a big source of anxiety for me. Dealing with that would have to be a big focus.
I started by making some extension leads for the motor and pot so that I could have the robot firing its weapon on the floor with the all the electronics on my desk next to my PC.
I then started work on the code base. I laid the early foundations/frame work for it all first. On first boot, the arduino would take a reading of the pot - set that as the bottom range of motion limit (as that is where the lifter would be orientated when the locking bar is in), then apply an off set and set that as the top range of motion limit.
It’d then enter an arming mode, where it would output 1500 pwm to the ESC for 3secs to give the AM32 Esc a chance to arm up. After that it would enter “Servo mode” where the PID loop ran.
I had a toggle set up to be able to switch between that and a back up “gearmotor” mode where the arduino just outputs the same PWM to the ESC that it receives from the RX incase the pot dies or becomes misaligned etc. I also added a few error catching states that would make the arduino output 1500 to the ESC for failsafeing etc.
Moving on to the PID set up. First I tried integrating the PID Library and using that, getting it installed went smoothly however I struggled when I got onto trying to tune the PID values as it always wanted to start with a minimum output - meaning full beans reverse! - I think this is because it doesnt know if the output is reversible (like on this gear motor) or not (like on an oven heating element).
During these initial experiments the servo cracked a mod1 10t output gear. This was a little alarming but was a very old gear that had seen a lot of use on luchador mk3 and 2 in the past - so I didnt think too much of it and ordered two more fresh ones from technobots. This put a hold on things for a few days.
Once the new gears arrived and I had one installed and Loctited up - I had a house call from Dr Brushless himself Gareth Barnaby to assist with the PID. Dude is a wizard and stripped out all the PID Library stuff and wrote a custom PID implementation from memory with no references in no time flat - we then went through and tuned the servo/PID variables on the desk and got it moving with purpose and behaving sensibly. At this point Gareth walked off into the sunset having done basically all the hard work on my code base
Here’s a little video of it working and of the back up gear motor drive in action:
So onto testing in the robot, this started out reasonably and then there was a clunk and then motor spinning noises with no discernible movement on the weapon. Oh shit - was the pinion slipping on the motor??? - I stripped the servo down and found I had killed another output gear…
In my efforts to make the servo as compact as reasonably possible, I had designed it around these small 10t mod1 gears. Because theyre so compact there is no proper boss and a lot of the threads for the grubscrew are essentially in the teeth of the gear. As the PID was torquing the motor back and forth rapidily, the grub screw was acting like a lever and splaying these teeth outwards - until they just let go of the grub screw altogether.
Being about a week away from champs at this point and finding no gears that would fit while being more substantial - I attempted a bit of a long shot hail mary to try and save the servo.
I tried casting a reinforcing ring of JB weld onto the one good gear I had left. (I was most certainly loosing my mind a little at this stage)
A day later and I had this absolute cursed pinion:
I reinstalled and continued testing the servo. The JbWeld pinion seemed to be holding as I iterated on the PID settings - however the servo while very happy suplex-yeeting my 1.5kg test weight really lacked the torque at slow speeds to do the controlled grab and lift thing - which was the whole point of the project to begin with. I had thought that a combined 290:1 reduction would have been enough to overcome the brushless rpm x torque power curve but apparently not - or possibly I had other inefficiencies going on?
And then… Crack and Spin noises happened - and the JB Weld pinion finally gave up too. (although tbf it did last about 5 times longer than the plain one did in testing).
At this point it was mid-week of the week running up to champs, I had no weapon and no way of making the servo plan work in the timeframe. My general internal monologue at this point was essentially: “AAAAAAAAAAAAAAAAAAAAAAAA!”
A big last minute pivot was gonna be needed!
The servo output and external reduction was dead on arrival. But the gear motor and arduino were installed and all still functional. However, even with the extra reduction stage the ring gear provided the set up lacked the slow controlled torque that Luchador needed to do what I feel Luchador should do - elegant grab and lifts - but at this stage on the Wednesday before champs I just needed to make something viable.
So (very) reluctantly - I made the decision to sack off the grab and run Luchador as a conventional lifter/flipper. The torque requirements on conventional lifters are much, much lower than on grab and lift - and on flippery things there is no need for slow speeds - so this should work with the brushless power curve.
My first move was to raid my box of old printed prototype pieces for the servo and get hacking at them to see what was feasible and after a little bit of playing I decided on roughly this:
Essentially hacking off the ring gear stuff and mounting a repeat hub onto the gearmotor and a big TPU horn onto that.
Press fitting the Potentiometer into the horn would allow me to use the arduino to run endstops and cut power to the motor before hitting the end of the range of motion and stop the gear box from eating itself.
Settled on the idea a quick bit of cad and some hours on the ender later and I had this:
Basically the same thing but less hacky.
Installed into the robot and it looked like this:
Then designed and printed a suitably chonky linkage to fit to the horn and grabber shaft- this was just printed out of PLA-ST:
In testing it seemed all good but had a real tendency to back flip when firing the weapon
I adjusted the code on the arduino, pulling the top end stop forward a bit and adding some zones close to the end stops where it drops the power to 1/2 and then 1/4 to lessen the recoil and called that done. Flip-ador as I found myself calling it was as ready as I was gonna realistically make it and with it now being Thursday before the event - I needed to switch focus to making spares and back up plans.
With some doubt about how well this quickly thrown together flipper weapon was gonna work I cadded up a backup backup plan - using a regular cheapo 35kg servo- which thankfully I never had to use:
All in all Flip-Ador ended up attending Champs, getting some good flips in and making the top 8. It was a really fun bot to run on the day but absolutely not what I want Luchador to be.
However, it was so fun to run that I think I might spin it out into its own thing, give it its own mask design and run it under my old feather’s name: Mucha Lucha
While Luchador will return at some point soon and will once again be Grab and Lift