Coding, coding, coding…

Yeah, so no visual update today. But now I am in the coding phase. So far, this is what I have gotten done:

  • Homing code that can be run in the main loop as the Uno only has 2 hardware interrupts and I need 3 for each leg.
  • A robust proportional regulator that runs the leg at a given speed. The static friction in the motors seems to be pretty high so they need a bit of a kick to get started. The P-regulator gives that initial kick and can then keep the motors moving at very low speeds.
  • A framework that accepts commands over the serial port without blocking
  • A framework to live-stream raw data from the device so I can visualize it in Matlab
  • A Matlab-script that parses the data and shows me the dynamics.

All-in-all, the motors and drivers seem to be extremely capable and go up to max speed in about 0.2s. Now I have also learned how H-bridges can break motors to a stand-still which means I can also stop the legs in a similar timeframe.

Now I just need to make sure that the P-regulator also works within the framework, and write a controller that takes the motor to a given position with a given speed.

By then, hopefully my new Due arrives and I can wire up all 6 legs. Then it is off to the races!