Close

Presets

A project log for F-35 air vent

An update to a mighty air vent

lion-mclionheadlion mclionhead 11/09/2022 at 06:530 Comments

The preset code was manely a straight copy from nozzle 1.  The mane thing this did to achieve smooth motion was to poll outside of motor_tracking for motor movement & start the next step if it's reading a preset.  The repeat code checks inside motor_tracking for motor movement & then starts the next step if it's repeating.  It's sort of a mess.

There was an attempt to move the nozzle yaw & pitch in 1 step but it made the nozzle point in unintended directions for too long.  Presets are very slow with 1:298 motors.

There's a lot of back tracking when it finishes a pitch move & starts a yaw move.  The motors are overshooting, maybe because they're polled at only 30Hz or maybe because of mass.  1:298 might be the minimum amount of precision despite the slowness.

The next task was using a sigmoid curve instead of linear interpolation to make the pitch movement more even.  This sort of evened out the size of the steps, but now some of the steps in the middle are too small.  There needs to be ongoing tweeking.

The motor arming got changed to go in 1 step, but this revealed a bug in nozzle 1 where by a motor could find the boundary sensor, reverse direction to find the HOME position, & never stop.  It wasn't continuing past the boundary to make sure the direction reverse crossed the boundary again.

Discussions