Joint Test - ksoltan/RoboFish GitHub Wiki

Joint_Test

The Joint_Test is a test suite designed to characterize the motion of one joint. If you track the tip of the joint, the goal is to create a sine wave trajectory as it rotates from left to right around its axis of rotation. If we can control one joint's motion, we can put together multiple joints and replicate the swimming motion of a fish which can be approximated with multiple sine waves on a multi-jointed robot (see MATLAB code).

To flap, a joint must 1) overcome its momentum to switch directions and 2) overcome the resistance of water (added mass). The torque is controlled by the duty cycle (voltage delivered to the coils), the dead zone (how long the coil is getting power during a period of motion). The amplitude of the motion is dictated by the torque and frequency the joint is driven at.

The Joint_Test can be used to set the duty cycle, dead zone, and frequency of a joint. One of these parameters can be swept, keeping the others constant. Additional tests can be added.

How To Run A Test:

  1. Choose the test you would like to run.

    • BASIC: Flap continuously at one given duty cycle, dead zone, and frequency.

    • DUTY_SWEEP: Increase duty cycle in equal increments while keeping the dead zone and frequency constant. When the maximum duty cycle value is reached, the test resets to the minimum value and repeats.

    • DEAD_ZONE_SWEEP: Increase dead zone in equal increments while keeping the duty cycle and frequency constant. When the maximum dead zone value is reached, the test resets to the minimum value and repeats.

    • FREQUENCY_SWEEP: Increase frequency in equal increments while keeping the duty cycle and dead zone constant. When the maximum frequency value is reached, the test resets to the minimum value and repeats.

  2. Open Joint_Test.ino. Under setup(), call the Set function of your chosen test. Specify the appropriate parameters which can be found in the declaration and documentation of the function.

    Parameters

     - Duty Cycle:
      Percent
     - Dead Zone:
       Percent
     - Frequency:
       Hz
    
  3. Upload the file to the Arduino.

  4. Follow connection instructions for the test setup to run the test.

Last edited by Katya Soltan: 3/27/2019