Servo Alzheimer's
vocalico
Posts: 6
Help, my servo has alzheimer's! I have a very simple project with a continuous rotation servo and four LEDs which blink on and off while the servo turns. After a period of a few weeks I went to activate my piece and DRAT--the servo would not turn and yet the LEDs were still working. After re-uploading my program everything worked fine . . . until a few weeks ago when the servo "forgot" the program again and would not turn.
Any idea why the servo would "forget" the program? I am running a BS2 on a Super Carrier Board with a 9V wall adapter.
Thanks!
Any idea why the servo would "forget" the program? I am running a BS2 on a Super Carrier Board with a 9V wall adapter.
Thanks!
Comments
You're not running "Vin" to the Servo by any chance, are you? You did move the jumper to "Vdd", right? Because 9 volts will kill a servo's electronics. Especially the 11 unregulated volts of a non-regulated 9-volt wall-wart.
Fixing by re-uploading your program to the BS2 should not be necessary, and shouldn't do anything -- it's kind of difficult to 'erase' the program in a BS2 -- unless, that is, your program is using the eeprom of the BS2 for some purpose. The BS2 actually will allow 'self-modifying code' -- but the results are usually not functional.
·
··· What happens if you simply press the RESET button or switch the power off then on instead of re-downloading the program?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·
··· Can you post the code?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·
·· That’s what I suspected…You are over-driving the servo.· The servo wants to see a pulse every 20 – 50 mS, but you are sending it as fast as possible.· I don’t know why it works at all.· This should make the servo twitch erratically all the time.· I would recommend putting a PAUSE 20 in all loops.· In fact, you can simplify the code greatly since you’re doing some things in the loop that don’t need to happen more than once.· For example, in your loop you’re making a pin high or low all through the loop, but that only needs to happen before entering that loop.· It would be easier to set the pins in a pattern and call a subroutine to handle the servo refresh.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I'm not sure I completely understand how to create the subroutine for the refresh as you recommended. Can you provide more info or direct me to a place where I can learn more?
·
·· I would recommend reading our “What’s A Microcontroller?” manual.· This tutorial can be downloaded in PDF format free from our website.· It might help you out with some of this.· Take care.
http://www.parallax.com/detail.asp?product_id=28152
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Main:
'
'
'
GOSUB ServoRefresh
'
'
GOTO MAIN:
ServoRefresh:
PULSOUT Servo, ServoPulseTime
PAUSE 20
RETURN
Help--my problem has returned! I thought I had resolved the issue of servo malfunction by adding the 20 mS PAUSE to prevent over-driving. However, I just plugged in my project and found that once again the servo is no longer rotating. The LEDs work in sequence fine, but no servo motion.
I determined that by going back and changing the PULSOUT from 759 to 758 I was able to get the servo functioning again at the desired·SLOW continuous rotation speed. My question is why would this happen when the initial·PULSOUT 15, 759 worked perfectly? What would cause the change? Is there some way in which the 9V wall-wart is to blame? Would a separate power supply for the servo prevent this problem from reoccurring or have I made an error either in the code or the wiring?
I am attaching the code and a pic of the board configuration.
Any help is greatly appreciated . . . thanks.
When your servo was "modified" so it would rotate continuously, this variable resistor was disconnected from the rotating gears, and set to its mid-point. Now, you want to rotate "very slowly", so you have to select a value close to that midpoint. But if you're TOO close to the midpoint, the servo won't move at all. A related issue is the servo does have some "hysteresis" built into it so it won't over-shoot when moving. That means when moving very slowly, it doesn't use a lot of torque.
I'm assuming when you 'reload' the BS2, you're taking something apart to get to it? This might "free up" the movement enough that the low-torque you're getting from the servo is enough. BUT, if you leave the thing stationary for a week, that low torque is now not enough.
So try 758 or even 757 to give yourself some lee-way.
Edit: It's also possible that when you first turn on your project after a week that the servo requires some additional torque to turn it the first few times.· If you're on the hairy edge of the current your·wall-wart can supply, this might brown-out the BS2.· At least until the movement warms up a bit.
I'd recommend a slight bit of lithium grease on the moving parts -- whatever it is you're moving with the servo -- might help.
Post Edited (allanlane5) : 1/19/2007 7:56:56 PM GMT
Anyone have a suggestion of how else to achieve slow and consistent rotation (close to 1 rpm) other than a servo?
You don't need this thing to go backwards, right? So you could simply use an electric motor with enough torque, a transistor to provide the current, and again put in place some reduction gearing to get the speed you want. On the good side, as speed slows down through gearing the torque goes up.
Edit:· There is a website that has instructions on widening the hysteresis loop to give you much better low speed torque and control:
http://www.seattlerobotics.org/encoder/200009/S3003C.html
I don't know if this applies to your servo, but it's a possibility.
Ah -- and here's a software solution.· Instead of always sending the '758 value, alternate with a '750 value.· Thus you'll be sending a "MOVE -- WAIT -- MOVE -- WAIT" sequence, instead of a "MOVE -- MOVE -- MOVE -- MOVE" sequence.· That could slow down the rotation.
Post Edited (allanlane5) : 1/19/2007 9:46:02 PM GMT