Minor Updates

I’ve done a bit more work on Spot X 1.0. I pulled it to pieces and drilled some holes in the decks to allow me to fit the new electronics I also drilled some access holes in the side of the motor assemblies so that I can run sensor wires through and to the sensor breakout board. It’ll need some kind of cable restraint system to keep the cables from touching the wheels.

I fitted all the new electronics and it all fits nicely, but when I tried running it I still had no luck with the motors. The left side was locking up and juddering and the whole thing was just not working. I decided to plug in the motor from the test bench and was not surprised to find it working flawlessly. Clearly there was something wrong with the cabling to Spot X’s left hand motors. I verified that the right motors were working fine, so I swapped in the cable from the test bench and that allowed Spot X’s left hand motors to also run smoothly. I pulled the motor cables out and tested them. The pinouts should be straight through 1:1, but instead of a, say, 1,2,3,4 sequence, the sequence was 1,2,4,3, or maybe 2,1,3,4. I didn’t explore too deeply, but swapped the connections over so they matched the test bench cable, then I plugged everything back in and closed up.

And of course nothing worked.

The front LEDs are super dim. They are blue LEDs that always used to light up brigthly on 5v but now they barely light up. Each front bumper assembly has 2 LEDs in series so IDK why they aren’t working now.

The power module was outputting 5.0v but none of the Pico status lights were coming on. They worked when I plugged in the USB cable but not when powered from battery. I checked the voltages on the Pico main board and found them to be around 1.2v. Checking the output of the power module, it was still outputting 5.0v. Then I remembered seeing some corrosion on the power input pins of the Pico board. I use polarised header pins for the power and the connector may have been reused from an older project. At any rate the power connector needs cleaning or replacement. So I sort of figured that one out.

Finally, after getting a green light, which was actually a red light, so that will need to be changed in code, I was able to test out the new motor driver code. And naturally fiddling with the motor cables meant that the left motors now run backwards, which means that the web UI commands are all muddled up. Maybe the simplest way of resolving the problem is with fire, but apart from that, I could fully reverse the cable wiring order. Since the PIC code is already outputting the correct sequence, this might be the simplest. OTOH, reversing the sequence in code might be easiest, though it would mean pulling the PIC and reprogramming it.

I might do that anyway, because there’s a couple of other niggling issues. For one I haven’t completed the programming for the deceleration curve. Also, the motors are probably running a bit slow on startup. Also, the default speed is a bit low. Also the top speed is a bit high. Also, when starting off and accelerating towards a high speed, the acceleration curve is too steep and the motors will stall. Also I’m getting a lot of motor slip when spinning left and right when using the 12v battery which, to be fair, is currently sitting at around 11.2v so maybe not the best baseline.

By the way, Spot X can really run at the higher speeds. The only thing is keeping control of it. It also needs a clean space to play in at the higher speeds, because any obstruction will stall everything. Without a feedback system, Spot X has no way of recovering if it stalls and gets stuck with the motors trying to turn because they’re trying to run too fast. That’s not a problem when operating it manually, but it would be a huge problem for autonomous driving.

One thing I might try is seeing if I can run the motors at 18v but drive each coil with FETs in parallel. Thing is, the IRF510s should be able to cope with 18v, but they just can’t. I know the motors are happy enough with 24v so… Yeah, I think I’ll breadboard a driver solution with double the FETs and see how that goes.

I think I need to add some extra smarts to handle acceleration to a high target speed, perhaps just use a smaller speed increment. I also need to customise the behaviour when turning – possibly I need to pick a dedicated turn speed, one that gives the best motor response especially on grippy surfaces, and I haven’t come close to trying it out on outdoor surfaces.

The motors seem to work slightly better running from 18v, but the FETs still run too hot. Hot enough to be a danger. If I am limited to 12V, what I might do is figure out a way of using a bank of 18650s to get close. I can monitor the battery condition with the sense line I incorporated into the Pico main board so hopefully I don’t wreck the battery.

IDK, Spot X seemed to work much better when using all PIC hardware.

Leave a Reply

Your email address will not be published. Required fields are marked *