Page 1 of 1
Disturbance during startup Servomotor.
Posted: Mon Apr 04, 2011 1:06 pm
by beejo
Hi Benj,
Thank you for your quick answer friday.
I put one Set Position macro direct below the begin statement.
Than the enable Pan Servo macro direct below and the same for the tilt servo her under.
It gives indeed an improvement with a minimum of 50%
Instead of a linear disturbance movement of the servodrive rod of 16mm, the movement vary now between 2 and 8mm.
In most cases also these values can causes an bogged down camera head to.
I believe it has to be possible to start up the servo-motors in Flowcode without any disturbance.
Can you please help me with this?
Kind regards,
Beejo
Re: Disturbance during startup Servomotor.
Posted: Tue Apr 05, 2011 2:52 pm
by Benj
Hello Beejo,
Can you say what exactly is causing the servo motors to move. Eg is it while you are holding down the reset switch or is it just after you release the reset. Could be that the servo is being told to go to an incorrect position at the start of the program. If the motors are moving while the chip is in reset then you maybe need say a 10K pull up or pull down resistor on the servo motor control signal.
Re: Disturbance during startup Servomotor.
Posted: Tue Apr 05, 2011 4:21 pm
by beejo
Hi Benj,
The motors make his movement just after i released the reset button. There is nothing happened as long as I push the reset, but on the moment I release the knob the motors makes the swing.
I have to say that in the ICD mode, with step for step debugging, the first reaction comes from the Pan motor (portC2) on the moment direct after reading the port B “Poortknoppen” in the "while 1" loop of the main program. After the "Switch Poortknoppen" in default direction the Tilt motor (PortC3) react.
How do I connect a pull up or pull down resistor to the servo pulse entry. Do you mean an resistor of 10k between the power and the servopulse connection?
Thanks in advance and i hope on good solution.
Regards,
Beejo
Re: Disturbance during startup Servomotor.
Posted: Tue Apr 05, 2011 4:37 pm
by Benj
Hello,
Is it possible for you to attach the current version of your program so I can have a play with it?
Re: Disturbance during startup Servomotor.
Posted: Tue Apr 05, 2011 10:21 pm
by beejo
Hi Benj,
I am glad that you ask it. Here it is.
Regards,
Beejo
Re: Disturbance during startup Servomotor.
Posted: Wed Apr 06, 2011 10:16 am
by Benj
Hello,
I have given your program a go here on the hardware and the motor is twitching slightly when I reset the device but other then that it remains solid. This is made worse by the fact that if the device is reset during the servo control pulse then the motor will not receive the correct position signal and will move slightly.
Not really sure what else I can suggest to get around this. You say it wasn't an issue using other demo software? Would it be possible to attach the code that was working ok and I will see if they are using any tricks.
Re: Disturbance during startup Servomotor.
Posted: Wed Apr 06, 2011 12:13 pm
by beejo
Hello Benj,
The PIC16F886 was already loaded with software and i hope with the same version than i get on CD. The writer says that the
versions on CD and on the PIC are the same. So I sent herewith the latest version from the CD.
The file is an .bas file and this extension is not allowed to send herewith. I try to rename it as a txt file.
Yes this works.
Regards,
Beejo
Re: Disturbance during startup Servomotor.
Posted: Wed Apr 06, 2011 12:28 pm
by Benj
Hi Beejo,
The basic program seems to be doing the same kind of thing as the Flowcode component, only using delays rather then interrupts. I can't really spot any tricks being used to avoid the servo glitching on a reset. Do your motors do more then twitch then? If you add a 1 second delay to the start of your program then you can see what is being caused by a reset during control signal and the small twitch during startup.
To get around the reset during control signal problem you could disable the motor when ever you are not moving it. This way the control signal is only active when you are moving the motor.
Re: Disturbance during startup Servomotor.
Posted: Wed Apr 06, 2011 1:08 pm
by beejo
Hello Benj,
Thank you for our proposal I change the program as soon as possible and let you know the result.
Regards,
Beejo
Re: Disturbance during startup Servomotor.
Posted: Wed Apr 06, 2011 10:45 pm
by beejo
Hello Benj,
After disabling the servo’s in the program, the motors don’t react on a reset and that is good. Only when you power up the system they start up with a wrong pulse. The motors do the same thing with power up after disconnecting the signal wires from the PIC. So the disturbance doesn’t comes from the PIC. Then I tried a lab power supply and set the voltage on 5V with the current regulated to 0 mA. By turning slowly the current up, the Pan motor react at 80mA. He turned fully CW to the end position and consumed the 80mA as well. When I turned the current higher he also consumes the higher current. So there have to be a problem in the motor. To control both motors and printed board I changed the connections on the board an did the same test with the same result (only the Pan motor react in this way) So...conclusion: I go for a new pan motor.
Thank you for all your good help and please let me know when you have an different opinon.
Regards,
Beejo