![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Hi,
Just one quick question, and one more difficult one... Looking at http://www.imagesco.com/articles/picservo/03.html Is that pretty accurate as far as controlling Servo with a PIC? Based on the 4MHz Crystal, how do I know that sleep 18 in the asm will give me a period of 18ms ? Ok, so now that is all sorted out, and I have my PIC controlling the position automatically of the Servo. To make it easy, let's say the PIC sends the Servo from Position 0 to 180 or anywhere in between. If I want to control this manually now?? I cut the power to the Servo, the Servo remains at what ever position the PIC left it in. Manually turning the Servo, how can I read what position the Servo is at?? Thanks,
__________________
Regards, Chris. |
|
|
|
|
|
|
(permalink) | ||
|
Quote:
Quote:
|
|||
|
|
|
|
|
(permalink) |
|
Wow, that was helpfull.
So with the 4Mhz crystal, how do I know that 18 is enough? How is it calculated? And yes, I know I can't read a value from a Servo, and no, I'm not powering down the PIC, I'm powering down the Servo just like I typed the first time... Guess I'll have to come up with something machanical to read the position...
__________________
Regards, Chris. |
|
|
|
|
|
|
(permalink) | ||
|
Quote:
Quote:
|
|||
|
|
|
|
|
(permalink) |
|
4 Servos controlled by 1 Pic. All 4 Servos (mostly) will be kept in sync.
In certain conditions, 1 or more of the Servos will be switched off and needs to go to idle (position). In other circumstances, the levers attached to the Servos will have to be controlled manually, instead of automatically. Think for example hmm.. A throttle handle. 1) You can control the throttle manually by adjusting the position of the lever (here, I need to read the position), or 2) The throttle can be automatically controlled by something else (in my case a pic), in which case I need to move the lever to the corresponding condition.... Practical example... Throttle levers on a airplane?
__________________
Regards, Chris. |
|
|
|
|
|
|
(permalink) |
|
You wouldn't normally force a servo mechanically, it's not going to help it last very well - for your throttle example I would suggest a clutch between motor and lever, so the clutch slips if you push the throttle manually. You then need a feedback device on the throttle itself, so you don't need a servo to power it, just a motor/gearbox - the feedback device on the throttle then becomes the feedback part of a servo system - but externally, not in a single unit.
|
|
|
|
|
|
|
(permalink) |
|
A servo is controlled internally by that type of feedback system; if you open one up you'll find a potentiometer, by which it measures its own position. To read the position of the servo, probably the easiest possible way would be to simply run an extra wire into it to directly measure the potentiometer output. What nigel says is entirely true though, the servo is probably not going to last long, especially if you use one of the ones with plastic gears instead of metal gears. If you're trying to build a high-quality system, a clutch-type setup as nigel suggests is probably a much better bet, but if you're just trying to throw something together that doesn't have to last forever, measuring the servo pot is probably the easiest and cheapest solution.
__________________
EEgeek.net |
|
|
|
|
|
|
(permalink) |
|
That has crossed my mind yes... Re my reference to 'something machanical', it was precisely refering to a external or seperate module to read the position... It should be relatively easy to do with a couple of sensors, or even a POT...
If the Servo is switched of, and you do NOT manually turn the Servo over it's min/max turn rate, surely it can't really cause damage?? Remember the enclosure for the throttles will have to automatically be able to turn 0 to 90 degrees... I'm thinking of making the enclosure so that the Servo can only turn 5 to 85 degrees (and obviously program the PIC as such as well). Thus, it will be impossible to over turn considering that you will hit the end of the enclosure 5 degrees before the over turn point of the Servo?
__________________
Regards, Chris. |
|
|
|
|
|
|
(permalink) |
|
Hmm Evandude... Good point. I wasn't thinking about the gears...
I am talking very low RPM here for operational use... But point taken. Will have to spend some more time with the thinking cap on infront of the drawing board. Atleast I can control the Servos now
__________________
Regards, Chris. |
|
|
|
|
|
|
(permalink) |
|
Can you tell us more why can't you do the manual lever adjustment via the PIC using up/down buttons instead of manually moving the servo unit output lever?
You may have to first disable the software servo auto adjustment loop first.
__________________
L.Chung |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| 555 servo controller? can get them working | lompa | General Electronics Chat | 9 | 31st May 2007 06:24 AM |
| Converting A DC motor to ServoMotor | holobean | Electronic Projects Design/Ideas/Reviews | 22 | 31st May 2006 10:00 PM |
| Replacing RC Servo w/ Custom PCB (Open Servo) | dknguyen | Electronic Projects Design/Ideas/Reviews | 3 | 29th May 2006 02:48 AM |
| Help required with servo motor controller | mayhem | Robotics Chat | 3 | 26th May 2006 04:21 PM |
| Determining lifting capacity of a servo | Jerran | Robotics Chat | 4 | 24th October 2004 10:53 PM |