Help with servomotor !!!
Moderator: Benj
Help with servomotor !!!
Hello from Costa Rica, central america.
I'm trying to program a servomotor with a pic 1F877A working with a 4Mhz xtal and a potenciometer, I see a example (controlling a servo with an anologue input) but it work with 90 degrees, so I need move the servomotor 180 degrees.
Please help me.
I'm trying to program a servomotor with a pic 1F877A working with a 4Mhz xtal and a potenciometer, I see a example (controlling a servo with an anologue input) but it work with 90 degrees, so I need move the servomotor 180 degrees.
Please help me.
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: Help with servomotor !!!
Hi,
Please post your chat
When I run the following example "Servo Example 1" from here https://www.matrixtsl.com/wikiv7/index. ... 37e9b979a2 it turns 180deg.
Matt
Please post your chat
When I run the following example "Servo Example 1" from here https://www.matrixtsl.com/wikiv7/index. ... 37e9b979a2 it turns 180deg.
Matt
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Help with servomotor !!!
Hi kalmar79,
Matt is correct.
The V6 example found here
Default pulse width is from 1280us to 2500 us (1.280ms to 2.5ms): If your servo pulse width is different then just select the Servo Controller on 3D System Panel, right click and select properties.
There you can change the pulse Width to give full 180 of your servomotor.
Just bear in mind that you can purchase servo motors that only span 90 deg.
Best not to work outside the PWM parameters stated within the data sheet of your servo.
Martin
Matt is correct.
The V6 example found here
Default pulse width is from 1280us to 2500 us (1.280ms to 2.5ms): If your servo pulse width is different then just select the Servo Controller on 3D System Panel, right click and select properties.
There you can change the pulse Width to give full 180 of your servomotor.
Just bear in mind that you can purchase servo motors that only span 90 deg.
Best not to work outside the PWM parameters stated within the data sheet of your servo.
Martin
Martin
Re: Help with servomotor !!!
Thank you, I solved this problem. Now I have another question, in my arduino UNO R3, only compiled one servo motor, but 2, 3 or 4 servomotor give me error 1 and error in vector 11 and 12.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help with servomotor !!!
Hello,
Are you using multiple servo controller components in your program? A single servo controller component can be used to control up to 8 individual servo motors.
Are you using multiple servo controller components in your program? A single servo controller component can be used to control up to 8 individual servo motors.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Help with servomotor !!!
Thanks for response. I send a picture, can you explain me better, with a picture please.
- Attachments
-
- servos.png
- (17.19 KiB) Downloaded 7089 times
Re: Help with servomotor !!!
I compiled the 4 servo motors with the 16F877A and only work the analogue 1, maybe I am programming something bad.
- Attachments
-
- 3.jpg (296.46 KiB) Viewed 11199 times
-
- 2.png
- (19.12 KiB) Downloaded 7089 times
-
- 1.png
- (18.79 KiB) Downloaded 7089 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help with servomotor !!!
Hello,
Please can you attach the Flowcode fcfx project file and I will have a look for you. As I say serveral servo components can be connected to a single servo controller component. Having multiple servo controller components won't work because they need dedicated access to resources on the micro.
Please can you attach the Flowcode fcfx project file and I will have a look for you. As I say serveral servo components can be connected to a single servo controller component. Having multiple servo controller components won't work because they need dedicated access to resources on the micro.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Help with servomotor !!!
Hi kalmar79,
I have modified your flowchart for you.
Martin
I have modified your flowchart for you.
Martin
- Attachments
-
- Proyecto CUC1.fcfx
- (17.92 KiB) Downloaded 317 times
Martin
Re: Help with servomotor !!!
I am very grateful to you and Benj, I going to try and comment. So this can work in arduino too??
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help with servomotor !!!
AVR based Arduino - Yes.So this can work in arduino too??
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Help with servomotor !!!
I am very happy, my project is working good. Now I want to control my project with RC transmition with joysticks.
I going to upload the components that I want to use.
I going to upload the components that I want to use.
- Attachments
-
- Screenshot_2017-08-25-22-03-31.jpg (57.21 KiB) Viewed 11159 times
-
- Screenshot_2017-08-25-22-01-45.jpg (65.87 KiB) Viewed 11159 times
-
- Screenshot_2017-08-25-21-03-08.jpg (53.3 KiB) Viewed 11159 times