A Throttle Tuning Update

A tiny update on the throttle stuff... It works. WOOT!

It's very optimized compared to my original plan. Each of the three available throttle control curves has only 4 control points in a 2D Bézier curve. When you switch the configuration to a different curve, the microcontroller dynamically generates a new map of 256 points for joystick axis value to motor command value. That's it. Works great (up on the sawhorses, anyway)!

The original plan above caused the ATmega256 to crash and restart because the poor thing only has 8K of SRAM. The tables of coordinates coming out of the Bézier curve function were 2,048 bytes each and I was (stupidly) building TWO curves (maps) for each skill level curve (one curve each for motor/joystick-axis combo). 25% of memory used up on silly lookup tables was glaringly inefficient.

Since the resolution of the motor commands is only 128 steps, I really didn't need to hang onto a value for every potentiometer step (1024). Now I just generate the 256 points (kinda like how the Nyquist frequency in sampling audio). That appears to produce the smoothest response from the motors. It's glorious (in a nerdy way)!

I'm going to fire up the soldering iron and build a quick cable assembly for the controls to the drive computer. I need to mount all this junk onto the chair temporarily to do a test drive. I'll probably bring it over to LM in the "mostly it works" state. I'll worry about the other non-essential features later.

Andy Frey

My name is Andy and I am a maker. Enough about me. How are you? What did you have for lunch yesterday? Have you made anything cool lately? OK, back to me: I like to make things, with or without purpose. Clocks, shelves, machines that turn themselves off, homemade circuit boards, IKEA chairs with motors, etc. I love to learn how to manufacture stuff myself. I also love to take things apart to see how real-world products are engineered.