Thursday, May 6, 2021 at 01:49:00 UTC
Return to the Summary in Ecstatic Lyrics Blog
I spent the last couple of days trying to make the self-balancing land-based paddle boat work better.
I did come up with a couple of mistakes in my understanding of what it should be doing to balance itself, and after correcting them, it's a lot more stable. Before, even as it was falling over, it didn't act like it was all that concerned and would just kind of casually try to keep itself upright as it fell over. Now, when it is about to fall over, it goes from casually leaning back and forth to full motor speed and thus it can actually recover from being knocked significantly off-balance.
It still kind of sucks as far as being an RC vehicle that can be driven around goes. There's probably still more I could do software-wise, but without encoders on the wheels, I don't know how good it can get when the final step is "guess how much motor voltage will result in the desired wheel movement."
I'd like to have wheel encoders because I think the best way to tackle the problem is more accurate physics math, but with the wheel speed being in terms of "whatever speed results from this PWM value," putting everything else in terms of grams and meters and seconds seems pointless. So the whole thing runs on unitless numbers with random scaling factors which make it difficult to guess what's right and what's wrong.
However, the main problem I want to fix is that when I take it outside and let it move around at higher speed, it gets into oscillations which eventually cause it to fall over, and I can't imagine how oscillations should be the result of it not really knowing how fast or how far the wheels move. It's checking its orientation 50 times a second, and so even if it's moving at the wrong speed, as it sees itself approaching the correct angle, it should slow down anyway and still stop at the right place. Whatever is wrong with it is probably something I haven't even thought about yet.
So maybe what I need to do is just estimate an actual wheel speed in meters/second and then attempt proper physics math with that estimate.
I also need new wheels, and that problem is making me want to give up on the whole thing.
The 3D printed wheels are falling apart, so I looked on lowes.com and I can get lawmower wheels for like $10 each, but I have no idea how to connect them to this thing. I'd have to get a rod which fits in them to use as an axle, some bearings to put it in I guess, then pulleys or gears that I can attach to it and the motor shaft, but I really don't know how to find gears or pulleys. Honestly, I wonder how people made so many machines in the 1800s when I can't even figure out how to get a pulley and a belt in the 2000s.
Also, although this motor having a gearhead is really convenient, I don't think it's meant to attach to a wheel, at least not one with any significant load. It's a round 6 mm shaft with a 2 mm hole, so I attach the wheel with a pin made from 1.6 mm steel wire. It keeps breaking the pins and I don't know that that problem would go away even if I got a pin that fit it. I think it's just a bad way to connect a wheel since all of the torque is transferred through the pin. If this gear reduction were actually intended to attach to a wheel, I think it would have a square shaft or something that's more useful than a round shaft for transferring the force out of it and into something else.
I also have two other gearhead motors, which have a flattened area on the side of the shaft, but it's just barely flattened. They're also 6 mm diameter shafts and the flattened area takes that down to only 5.5 mm, so it wouldn't take a lot of torque to round out whatever I stick that into.
I'm tempted to take my Dremmel to them and either cut a more flattened area or just square out the whole shaft, but I'm afraid of just ruining them, and also the shaft looks like a really hard steel so I don't even know how effective the Dremmel would be.
This wheel thing is a really difficult problem to solve. I've been thinking about it since I got my RC controller last year. Whereas there's all kinds of standard parts for RC planes and quadcopters and so you can just buy everything you need on eBay, there seems to be no standard parts for RC cars other than the motors themselves. So IDKWTF people are even doing with the motors. Several times I've looked at all of the RC cars at Walmart, wondering if I could use parts from any of them, but they're all garbage no matter what price you're looking at. I don't think any of them have proportional steering and they all look like they're one crash away from a broken plastic part.
Planes are really easy by comparison. No wheels, no steering, no gears. Just stick a propeller on a motor and attach a couple of servos to control surfaces and you're done.
I found this video while looking for wheel options which is kind of interesting:
A hoverboard wheel is probably exactly what I need, but not only are they expensive, but I'd also need a special controller, and that's just too much for a project that I'm just going to take apart when I'm bored with it.
Return to the Summary in Ecstatic Lyrics Blog