I apologize for the delay.
patduino:
Can you provide a picture of what is will look like and show how the motors are incorporated?
Hi Pat,
Follow the link down below to look at FIG.3 . I have almost same mechanic with dc motors and encoders.
Liftware-patent
FIG.3
lastchancename:
That only detects vibration, not attitude or axial movement.
I think you are right. Acc values will be better.
These are steps which i think:
-Get acc values of x and z directions (according to fig3)
-use filter
-PID(input accx accz, output pwm)
-move motors inverse of directions (suppress hand tremor )
-encoder? (it may use to control pid value or stabilize motors at mid-point of spoon- not sure)
These are what i did:
-getting pitch and yaw values from mpu6050(using dmp code)
-getting accvalues from adxl345
-pid control using pidv1 lib.
i am using Jeff Rowberg library for mpu6050 or adxl345. Also i tried sparkfan adxl345 lib. and adafruit adxl345 lib. There is no problem getting acc data for both direction. But i efficiently did not move motors invers of directions. Here is my part of code:
PID myPID(&Input, &Output, &Setpoint,20,0,0, DIRECT);
data= event.acceleration.z;
if (data>0)
{
myPID.SetControllerDirection(REVERSE);
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
Input = data;
myPID.Compute();
analogWrite(enA, Output);
}
else
{
myPID.SetControllerDirection(DIRECT);
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
Input = data;
myPID.Compute();
analogWrite(enA, Output); }
it does not work. This video is my reference point.
any idea ?