-
Reverse leash mode
07/25/2025 at 04:53 • 0 commentsOver time, the software switch ended up a real pain. That PLA detent mechanism seemed to work harden, get stuck all the time, & eventually break off from the force it took to release. It really needs a larger mechanism with a metal spring. Perhaps a 2nd pair of magnets could engage the switch in 2 positions. Either way, the next push was a way to drive in reverse.
Some testing with a reverse leash mode was promising. The trick is the mechanical angle sensor only goes up to 50 deg reliably. It basically tapers its maximum speed from 40 to 50 & then immediately goes to minimum speed reverse at 50. There's no practical angle where it goes forward at minimum speed. It's always slightly above minimum speed when going forward. It might be smarter to make it go to minimum speed at 40 deg instead of tapering.
It no longer runs away forward if you stand too far behind it in leash mode. It normally just backs up & stops. It now runs away in reverse if you stand beside it. If you get beside it, it tends to get stuck oscillating backward & forward. The oscillation makes it slowly turn away from the leash & end up staying pulled in reverse. It's arguably better than the case of running away forward, but not a perfect solution.
The best way to drive it is to pulse the leash instead of holding it in the sideways direction. The days of holding it to make it turn sharply in the forward direction are over though. It's unknown how disastrous the loss is. There could be a way to add hysteresis after it goes in reverse, whereby it stops below 50 & has to go back below 40 deg to go forward again.
It only turns when going forward. In reverse, the steering points in its configured direction towards the user with no feedback.
The trick with steering in reverse is all the use cases require it to go straight back. In all the use cases, steering would go off the path in reverse. They're all intersections where you're pressing a button & need to back up straight. Of course, it can't really back up straight without heading hold & that would be difficult. All the leash code has it directly turning the servo & there's a lag when turning the steering between forward & reverse. It's definitely more stable if it tries to turn towards the user when in reverse, but practical experience has shown that to be painful.
Definitely undecided on the hysteresis. All it does is reduce the flopping. With or without it, there's going to be a deadband where it's not going to move. It might do better with a delay. It's basically a summary of the limitations of an angle sensor with only 100 deg of angle range, .5m of distance resolution & lots of pendulum oscillation. An ideal sensor could do 360. It would have to go on top. UWB would do the job as an extra package on top of the leash.
-
Software switch
03/27/2025 at 05:53 • 0 commentsIt came to pass that the power switch failed & the leash wouldn't turn on. During teardown, it could be argued that the contacts were dirty. A complete switch rebuild revived it, but it's not the ideal switch for such a dirty environment.
![]()
![]()
![]()
![]()
The decision was made to embark on a software switch. The idea is another hall effect sensor would detect a magnet in the latch. This introduced the new problem of ensuring the latch didn't inadvertently move out of position.
![]()
![]()
![]()
After many test prints, a novel PLA spring evolved which would keep the latch either fully closed or fully opened.
![]()
![]()
![]()
![]()
Getting the latch to align precisely required much removal of PLA. The big question is how long the friction point is going to last. It would be easier if it was in an area which wasn't handled, so it could be lubricated.
![]()
The difference between on & off has to be big enough to prevent accidents. This is adjusted with the ADC threshold.
There can be no leash rebuild without a test showing it works.
-
Videos created with the leash
12/20/2024 at 09:40 • 0 commentsAfter the last snafu with the leash, a lot of timelapses finally got made. It was arguably more stable after the last round of PID calibrating with the rear view glasses.
https://www.youtube.com/@Trissb1988--/videos
The goog finally recommended some videos from a vision guided copter which were suitable for timelapses. For the 1st time, we could see how good machine vision was.
The mane problem is he doesn't go very straight, but in the limited sections he does go straight, the machine vision looks really impressive. Who knows if they actively dealt with an oscillation problem or if the stability was a natural result of the copter not having to deal with mechanical steering linkages. It also locked in the distance measurement. A ground camera would be dealing with adverse lighting, looking up.
Also noted with 3 animals, the copter stayed locked on just the 1. This kind of tracking algorithm has become really basic. Still suspect it's an animal detector with semantic segmentation & histogram feature extraction to identify different animals by color. Lions just can't afford $300 for just that. For the low power vehicle lions are using, the range would be drastically reduced by the computing. For a copter, the power used in computing is nothing. There's no way anything but a leash can track for 3 hours.
-
Mechanical vagaries
11/22/2024 at 23:20 • 0 commentsOf all the things which need to work to get stable pointing of the camera, the dependence on the mechanical steering system was a surprise. The truck got a new steering module & the leash started oscillating again.
![]()
![]()
The mane thing which changed was tighter fitting ball links to try to extend their life. They eventually wear out & fall off.
![]()
![]()
The next leash footage immediately oscillated. There was much firmware & controller troubleshooting to try to knock out the new oscillation.
https://hackaday.io/project/199156-rear-view-glasses
Rear view glasses got developed to aid in debugging leash mode. While they're good at detecting large errors, they can't detect subtle enough motion that ruins camera footage. Unlike the rear view glasses from China, these could be precisely aimed for looking down.
![]()
Better results were coming from having a really high gain in high frequencies, but it only worked by timing the oscillations to match the timelapse period. There has long been a theory that the ideal leash would respond very slowly, washing out subtle errors in direction. The reality has been always oscillation unless it responds as fast as possible. A large object like a rocket has a larger moment of inertia making it less prone to oscillation, so it can respond slower. A small RC truck is a lot more prone to oscillation so it needs faster response.
The affair eventually narrowed in on the ball links. They didn't look stiff when driven by the servo but they were slightly stiff when pawing them. Heating them to make them looser got the leash oscillation to subside, especially with the latest gains. It's surprising there was no way for software to overcome a mechanical deficiency that minor. It still wasn't as good as the old days, because of a desire to make the ball links last longer. It looked more accurate on camera than in the glasses.
-
Upgrades
10/05/2023 at 10:08 • 0 commentsSmart leash had a lot of problems & finally got a lot of upgrades in 2024. The mane evolution was a frictionless ball bearing system with hall effect angle sensor.
![]()
This requires making a lookup table to convert the imprecise analog readings to angles.
![]()
![]()
The frictionless angle sensor introduced a new problem of the structure flapping at a certain resonant frequency. Defeating the flapping required detuning the frequency response of the steering controller around the resonant frequency.
![]()
The result was a steering controller which responded less to .4Hz than 1Hz & a better tool for plotting the frequency response. That made it track very accurately.
![]()
Other attempts to reduce the amount of mass being swung around were failures.
It needed another control law where sharper turns would be performed at minimum speed, with a ramping to full speed as the turn angle decreased. That keeps it from running away.
It got a braking algorithm where retraction would cause it to apply reverse proportionally to the amount the wheels turned beyond where the leash was retracted.
Instead of responding to angle & length, it needed to convert to X & Y. Then steering would respond to X while speed would respond to Y. This allowed it to follow with a sideways offset & get better video. The trick with a sideways offset is distance & angle feedback cross into each other. Converting to XY made it easier to defeat the crosstalk but it also created the problem of a minimum following distance required to detect X. Below the minimum distance, it can't steer. There's a complicated algorithm for transitioning in & out of minimum following distance. It involves certain resets of the steering controller to allow it to do minimum speed turns while not running away. It's still a bit problematic.
Another evolution was being able to change the sideways offset with the paw controller.
That allows better camera angles.
The leash evolved to a more complicated & robust user interface than younger lion imagined.
![]()
Problems remane with dirt building up inside the spool & the cable not always winding evenly. Dirt buildup & cross windings are the mane causes of failures to retract. When this happens, the mane symptom is loss of steering control. The cable has to stay tensioned in order to detect angle. Fortunately, the problem has only been when its moving slowly & it quickly unsticks. The sound of the servo behaving erratically is the 1st sign of the retraction starting to get stuck because of dirt.
-
Bridge run
07/17/2023 at 21:02 • 0 commentsA very daring exercise to be sure. Oscillation proved unavoidable but bearable. Noted the leash vibrating & wondered if aliases of the vibration could be oscillating the steering, but it's accepted that stiction of the pot is the reason. The locked down stability of the stick controller is quite conspicuous. It only got that stable after installing a more rigid steering plate & tightening the servo saver.
-
Glitches
07/15/2023 at 05:30 • 0 commentsGot another glitch where it was retracted to several ft & reset to 0. Saw the 0 point on the phone. When it retracts further, the truck firmware clamps it at 0. Other ideas are the power switch glitching, a bad cable, or static electricity from retraction.
The leash logic in the truck is ponderous & had an unrelated bug.
Reducing oscillation has been long & hard. With very low P, I & relatively high D, it's surprising just how damped the leash can get, purely based on input from the leash & not any gyro. It takes a lot of deflection to make it turn but it doesn't oscillate. In a few places, it doesn't respond in time to avoid the curb. Maybe it would be more responsive without oscillating if it used the truck gyro to detect turn rate instead of the leash pot.
Then again, the truck gyro doesn't detect a turn until after the leash detects a turn & commands the servo to move. There is a scenario where a gyro is stuffed on the leash board. Then it just detects the difference in rate between the leash gyro & truck gyro. This would give the fastest rate updates but absolute heading would be prone to drifting. The pot would always be necessary to anchor the gyro.
Reduced P yielded another problem where fully deflecting right or left can cause it to run away. It won't turn enough to retract the leash, instead extending it when it moves. In the fully deflected mode, you have to slow down. 1 idea is reducing maximum speed proportionally to the turn angle. This might allow higher maximum speeds than it can currently reach.
The speed limit is only to keep it from running away. If it's going forward, it'll run into the lion or it'll deflect sideways before it runs away. If it's going sideways, it'll go in a circle. If it completely breaks & only detects maximum forward, it could run away. Reduce the speed too much & it'll erratically lock the wheels, losing steering control.
-
Broken leash 2
06/27/2023 at 04:41 • 0 comments![]()
![]()
The 1st kaboom case since day 1, an unfortunate side affect of the leash is every failure of the control mechanism results in full throttle until it runs into something. Usually, it eventually settles into going in a circle like a control line airplane. Pull the leash in until it hits you or falls over. In the worst case, the leash could get pulled completely off the truck, disconnect from the serial port, & the mane confuser would kill the motors after 1 second. Let the leash go & maybe it'll fully retract, killing the motor. Maybe it'll get hung up & run forever.
Another stress point was revealed. A standoff also broke off. That standoff is in a difficult position. Another model & another step up in robustness followed. More functional than visually appealing.
Leash failure in traffic is still a real possibility. Lions avoid using it in traffic. 1 mitigation has been to limit the maximum speed to 9 min/mile, but it makes the rear camera angle difficult. Another mitigation would be a kill switch on the leash, but it makes the leash heavier. There could be a kill switch as a separate dongle. Finally, the operator could carry around the paw controller at all times. The paw controller could override the leash whenever it was on. It would be hard to access the paw controller. The startup time for any RF system is quite long.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
The new leash is a translucent beast designed for observing how everything fits & surviving more bashes. It has more plastic than the other 2 designs.
Sadly, the leash has a glitch problem whereby its measured distance either resets to 0 or errors low for some reason. This has happened only twice. It could be the micro resetting. In both cases, the glitch happened after it was rewound to 0 & extended again. The only way to recover it was to retract it & power cycle it. It could be static electricity.
Another glitch is where it's fully deflected & ends up oscillating between full deflection right & left. It has to be retracted & extended again when in the center. -
Leash cam
05/29/2023 at 00:47 • 0 commentsEfforts at using the leash to point a camera were successful failures. The mane requirement is eliminating oscillation.
Installed a full PID controller which eliminated most of the oscillation, thus causing attention to be drawn to 1 body part instead. It still requires a perfectly flat surface to be the most stable. It needs a smaller integral limit. It might use a smaller D. It's never going to be perfect since the task of picking the heading is done by a transducer mounted on a shaky platform. The transducer is finicky.
The mane problem is centering on the 1 body part isn't the most entertaining composition. The body part is extra large compared to other animals. Defishing deemphasizes that body part. Defish can emphasize the sky or the ground.
![]()
![]()
-
Broken leash
05/29/2023 at 00:45 • 0 comments![]()
Those of us enamored with snapping the leash back were disappointed to find the paperclip getting destroyed by the snapping back. It has to be gently rewound. There's unlikely to be a better system than the paperclip. Maybe there can be a backup paperclip in case the mane one gets smashed. There could be a 2nd piece of string joining the missing bit, but it would be quite a mess.
lion mclionhead

































