Page 1 of 1

Start-up problem with Servomotor

Posted: Fri Apr 01, 2011 1:54 pm
by beejo
Hi,
I am building a Pan &Tilt controller with two Servo motors of the type B305 from Protech.
I use Flowcode vers.4.3 with an PIC 16F877 on the EB006 vers. 7 board and i also tried a Pic 16F886 on a EB006 ver.6 board with the same result.

To move the servo’s I used the macro "SetPositioning”in a iteration.
The program work nice in the simulation. And finaly also in real world.
But when I switch off the power, wait for 5 seconds and switch on the power the drive rods of both servo’s turns over the, software adjusted, BeginStop (CW).
This means that the camerahead get bogged down against the frame. This is also the case when I used the reset knob on the programmer board.

I connected the pulse pins of the Pan and Tilt Servo to respectively Port C2 and Port C3 each by means of a Resistor of 100ohm. I also have tried a separate voltage controller (7805) on a 9V battery for the Servo power. Also the problem remains.

I tried the servo’s with older Basic software (in MLAB) and on a own board with a PIC16F886 processor and the same pulse pin connection to the PIC (100ohm resistor between PICPort and servo pulsepin).
There was not any problem in case of switching off and on the power.
Do you have an explanation for this problem?
I sent the program herewith.

Kind regard,
Beejo

Re: Start-up problem with Servomotor

Posted: Fri Apr 01, 2011 1:58 pm
by beejo
Sorry ,
Here the program is enclosed.

Kind regard,
Beejo

Re: Start-up problem with Servomotor

Posted: Fri Apr 01, 2011 2:29 pm
by Benj
Hello Beejo,

To get around this problem I would add a set position macros to the very start of your program to match the initial starting position you require. I would then move the enable servo macro calls to the very start of the program directly below the set position macros. This ensures that a position is loaded before the servos are made active and it also ensures that the servos are activated pretty much straight away so won't have any time to move.

Let me know how you get on.

Re: Start-up problem with Servomotor

Posted: Sat Apr 02, 2011 12:09 am
by beejo
Hi Benj,
Thank you for your quick answer.
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