Cam TILT servo
Cam TILT servo
hi
I am starting out on a build and i have some trouble with the camera tilt servos, i was wondering if anyone could help me.
arduino pro mini using atmel 328p 5v 16mhz
i have original wmp, original nk, wmp and nk working fine, currently all on a bread board.
i have the servo neg lead onto the GND that the WMP is using,
the servo pos is on pin 12
servo signal lead is on pin A0
when i power the board on the servo just clicks, if i move the signal lead to any of the motor esc pins it clicks in the same way. i have uncommented the neccesary lines in arduino and i have enabled it in the GUI
does anyone know whats happening?
ps , its powered from usb, but i have powered from a lipo and the same happens
thanks in advance
I am starting out on a build and i have some trouble with the camera tilt servos, i was wondering if anyone could help me.
arduino pro mini using atmel 328p 5v 16mhz
i have original wmp, original nk, wmp and nk working fine, currently all on a bread board.
i have the servo neg lead onto the GND that the WMP is using,
the servo pos is on pin 12
servo signal lead is on pin A0
when i power the board on the servo just clicks, if i move the signal lead to any of the motor esc pins it clicks in the same way. i have uncommented the neccesary lines in arduino and i have enabled it in the GUI
does anyone know whats happening?
ps , its powered from usb, but i have powered from a lipo and the same happens
thanks in advance
Re: Cam TILT servo
im looking at diagram two here,
http://www.rcgroups.com/forums/showthread.php?t=1340771
i have everything hooked up as per the diagram, i have servo signal to A1
servo GND to GND and servo +ve to RAW
i should get servo roll compensation, but nothing,
seriously can anyone help ?
http://www.rcgroups.com/forums/showthread.php?t=1340771
i have everything hooked up as per the diagram, i have servo signal to A1
servo GND to GND and servo +ve to RAW
i should get servo roll compensation, but nothing,
seriously can anyone help ?
Re: Cam TILT servo
Code: Select all
#ifdef SERVO_TILT
if ((rcOptions1 & activate1[BOXCAMSTAB]) || (rcOptions2 & activate2[BOXCAMSTAB])) {
servo[1] = constrain(TILT_PITCH_MIDDLE + TILT_PITCH_PROP * angle[PITCH] /16 + rcData[AUX3]-1500 , TILT_PITCH_MIN, TILT_PITCH_MAX);
servo[2] = constrain(TILT_ROLL_MIDDLE + TILT_ROLL_PROP * angle[ROLL] /16 + rcData[AUX4]-1500, TILT_ROLL_MIN, TILT_ROLL_MAX);
} else {
servo[1] = constrain(TILT_PITCH_MIDDLE + rcData[AUX3]-1500 , TILT_PITCH_MIN, TILT_PITCH_MAX);
servo[2] = constrain(TILT_ROLL_MIDDLE + rcData[AUX4]-1500, TILT_ROLL_MIN, TILT_ROLL_MAX);
}
#endif
Use AUX1 or AUX2 to switch mode.
3 & 4 controls the angle.
Active is controlled by Aux3 & 4 and Angle from acc.
Inactive is only controlled by Aux3 & 4.
Dont forget to set the checkbox in the gui on AUX1 or AUX2.
Re: Cam TILT servo
patrick
thanks for your reply.
im new to all this, i guess i just paste that into the code in arduino ? in which tab do i post it¿?
also is it possible to test the servo tilt without having the rc ? im waiting for my tx rx to arrive and only have the arduino, gyros,acc and a few servo s to do some tests with while i wait
thanks,
thanks for your reply.
im new to all this, i guess i just paste that into the code in arduino ? in which tab do i post it¿?
also is it possible to test the servo tilt without having the rc ? im waiting for my tx rx to arrive and only have the arduino, gyros,acc and a few servo s to do some tests with while i wait
thanks,
Re: Cam TILT servo
Hello!
I'm not sure that PIN12 can supply enough power to drive a servo and RAW is input only (IMHO).
Try connecting the servo direct to a 5V source.
BTW: PIN12 is no longer used to power the WMP. You can connect the WMP to 5V, too.
I'm not sure that PIN12 can supply enough power to drive a servo and RAW is input only (IMHO).
Try connecting the servo direct to a 5V source.
BTW: PIN12 is no longer used to power the WMP. You can connect the WMP to 5V, too.
Re: Cam TILT servo
The code is already included in the code in the output tab.
Check all three boxes for CAMSTAB and stabmode will work without a radio.
Pin 12 can not supply the servo!
You will overload the arduino and risk to destroy it!
You need to power the servo with 5V battery or from a Speedcontroller!
Check all three boxes for CAMSTAB and stabmode will work without a radio.
Pin 12 can not supply the servo!
You will overload the arduino and risk to destroy it!
You need to power the servo with 5V battery or from a Speedcontroller!
Re: Cam TILT servo
http://www.freeimagehosting.net/c3h85
http://www.freeimagehosting.net/jm86n
ok i hope the images work, one is of how ive got the GUI set,
one is of how ive got things conencted, but i still cant get the servo to work, i know that there is no common ground between the servo +ve -ve and the signal. so i have tried conencting the ground from the servo to the ground rail on the arduino, but the same,
i know the lipo is one cell, its at 4v and should be enough to power the servo a bit, at least for a test,
the arduino is powered from usb.
im really eagre to get the servo working so that i can get things ready for the arrival of the motors,
Re: Cam TILT servo
OK.....
One problem if thats your setup..
You must have a Accelerometer for the camstab to work!...
From the last setup in http://www.multiwii.com/connecting-elements
One problem if thats your setup..
You must have a Accelerometer for the camstab to work!...
From the last setup in http://www.multiwii.com/connecting-elements
Pure stabilized gimbal system
For this setup, you need a GYRO + ACC setup (not possible with a gyro only setup)
A RC system is optional for this setup.
Re: Cam TILT servo
i have the nunchuck connected directly to the original wmp port,
it shows up in the GUI and i can see the readouts from it
it shows up in the GUI and i can see the readouts from it
Re: Cam TILT servo
i suppose that my question is .... . . . . . .
do i have to change the code for the tilt servo to work? i have read that i need to uncomment certain lines. but i cant find them.
i have the system working with acc and gyro. but the acc is conencted to the original wii port, maybe i need to hard wire it. i notice that two pins are shown as bridged, would this be my problem?
do i have to change the code for the tilt servo to work? i have read that i need to uncomment certain lines. but i cant find them.
i have the system working with acc and gyro. but the acc is conencted to the original wii port, maybe i need to hard wire it. i notice that two pins are shown as bridged, would this be my problem?
Re: Cam TILT servo
Uncomment #define SERVO_TILT in config.
Code: Select all
/* The following lines apply only for a pitch/roll tilt stabilization system
On promini board, it is not compatible with config with 6 motors or more
Uncomment the first line to activate it */
//#define SERVO_TILT
Re: Cam TILT servo
it works!!
is there a way to invert the direction? i think it is bad because my wmp is upside down, i will move it and test again
thank you
is there a way to invert the direction? i think it is bad because my wmp is upside down, i will move it and test again
thank you
Re: Cam TILT servo
A couple of lines further down....
Code: Select all
#define TILT_PITCH_PROP 10 //servo proportional (tied to angle) ; can be negative to invert movement
Re: Cam TILT servo
thanks, i was too quick to ask, i found it just after asking,
the number changes the speed of the adjustment right?
is there a way to make the servo stay if you incline the board and it stays inclined. it normally just comes back to the same angle as the sensors and then the next movement is inverted until it adjusts.
i think if the cuad was flying in wind and constantly inclined that this would make a bad gimbal.
the number changes the speed of the adjustment right?
is there a way to make the servo stay if you incline the board and it stays inclined. it normally just comes back to the same angle as the sensors and then the next movement is inverted until it adjusts.
i think if the cuad was flying in wind and constantly inclined that this would make a bad gimbal.