The truck had lots of radio dropouts, especially near phone towers where GSM overlaps the ISM bands. After 12 years of using very low power 5mW ISM radios, the decision was made to finally whack in a 500mW amplifier, the mighty RFX1010. It's very simple to hook up compared to the more powerful SE2435. The lion kingdom's 1st home made transmitter above 5mW finally lived.
The trick with the RFX1010 is the antenna input is shorted to ground at DC. It needs a 33pF blocking capacitor. Then, when the transmit enable pin is on, it burns over 150mA with no input. When the transmit enable pin is off, it burns nothing. This pin needs to be actively turned off when not transmitting. Receive enable & mode have to be grounded to get it to completely shut down. The control pins are floating. Mercifully, the switching time is only 1us.
It consumes so much more power than the MRF49XA, a big cap was required on the input of the voltage regulator & the micro needed a startup delay.
The duty cycle was low enough to use full 500mW without killing the battery. The mane problem with this is it seems to saturate the receiver & interfere with the camera controller. It may have to be reduced. That is believed to involve reducing the output of the MRF49XA, the same as using a fixed audio amplifier. The most powerful commercial radio lions had was the 50mW XBee PRO 900 & it never had any problems for ground vehicles.
There was a bought of motor seizing which was believed to be the tolerances of the motor shroud being too close while warmer weather made the motor expand more than it used to. The only option was just scraping away material & hoping for the best. Even this zealous shroud didn't keep all the rocks out of the motor.
The o rings were quite chewed up from either rocks or the wheel slipping out of its bearing & being forced back in. The wheels were slipping out of their bearings a lot more, so it was time for the lion kingdom's 1st 3D printed retaining rings.
Out of PETG to handle the heat. .6mm thick was enough to offer good retention of the wheels, but never as good as the original metal rings. Thus ended a 20 year history of needing replacement retaining rings for various motors, but never having a way to fabricate even a minimal replacement.
That was followed by another attempt to prevent the steering from glitching. It was believed to be glitching because of I2C errors. 10 years ago, I2C on the STM32 was assumed to be vulnerable to electrical glitches. Lions resorted to limiting I2C to 150khz & shielding the I2C cables, which worked most of the time. In the last 5 years, the internet started to lean towards a hardware bug involving concurrent register writes & recommended bit banging all I2C.
The lion kingdom always had a bit banging I2C driver, but burst mode never worked & bit banging is too slow without burst mode. Revisiting the driver 10 years later involved printing the pin values in software rather than soldering on test points. Then, comparing the bit bang waveform to the hardware waveform finally revealed the problems.
The invensense IMU's require a stop code to update their measurement registers, otherwise the measurement registers always contain 0. The stop code needed the clock to rise a nonzero time before the data.
For burst mode to work, the data needed to rise a nonzero amount of time before the 1st clock of the data byte. If the data didn't rise before the clock, the entire byte would be 255 or only numbers below 128.
What makes I2C such a difficult protocol is the unusual timing orders & data types. Sometimes SDA needs to change after SCL & sometimes before. Sometimes SDA needs to be written before it can be read. Sometimes it uses a byte & sometimes a single bit code. The lion driver is a case of overzealous code reuse at the expense of readability. It would be easier if it copied the same routines everywhere instead of using a complicated heirarchy of state variables.
Bit banging with burst mode allowed the gyro to be read at 430Hz without any glitches so far. It pleased us lions to be able to fix a problem 10 years after giving up on it, simply through increased skills.
The steering still glitches, but now it seems to be continued radio problems or servo related. At least it glitches less than it did before.
The high temperatures created by the motor seizing up ended up melting the PLA parts of the wheels. The cost of the TPU & the amount of material in the modern tire design has been reduced enough to make a single piece tire wheel with no PLA possible.
Behold the 1st tire which bolts directly to the motor, stringing & all. The stringing was actually better if timelapse mode was enabled. It ended up needing a hub cap to keep the bolts from punching through. PETG proved too soft, but serves as a stand in. PETG strangely is softer than PLA but changes phase at a higher temperature.
It was the 1st TPU tire which actually compresses under the weight of the battery. The mane reason is the flat tread. Curved treads were all hard, with no amount of curving making any difference in the hardness. The flat tread has some risers along the edge to keep from digging in, but is very flexible.
The flat treads provided much better traction than the curved treads. Lions long believed curved treads could be made as soft as flat treads & provide equal traction, while using less material, but it seems flat treads are the only way. These tires still burn less than $2 of TPU.
Tried adjusting the number & curving of the spokes to increase the hardness, but it's either going to require a lot of money or finite element analysis to get the perfect hardness. The compression of these tires means the tachometer reads much higher with a payload than without a payload.
A new set of flat tread tires came off the printer. The increased contact patch in front didn't significantly increase power consumption, burning only 260mAh/mile with a full payload for half the distance. Helas, they're noisier. The increased contact area also increased how much the Z seams impact the road. These tires have much more pronounced Z seams because the tread is only 1mm thick. They're like paper, but TPU has proven much more durable than any rubber.