Trouble running a servo.
Private19872
Posts: 61
I was working with my Demo Board and I tried to put on a servo. It twitched when the power went on, so I knew that the servo was working right. I loaded one of the demo files that came with propeller tool to test the servo, but it twitched and then did nothing else. Later I did a test and found that my propeller was brownout-ing. I replaced my old AA batteries with a new 9 volt battery but to no avail. I then tested with another servo. I was getting a bit more functionality than twitching with it, but then it stopped working like the first one. Can the Demo Board handle servos or do I need to make some kind of external circuit to use them? I realized that I wasn't using the resistor in between the prop and the servo. Is that dangerous to do or the cause of my problem? Thank you for your time.
Comments
I've done lots of servo projects and and I'm sure the Demo board can drive servos just fine with the proper power supply.
I'll edit this post with links to some of my Propeller servo projects.
While I often see resistors suggested on the signal line of a servo, I very rarely use one. If you do use one, I suggest you no greater than 4.7K. I've had several servos not accept the 3.3V logic when a 10K resistor was on the line. 4.7K might be too much for some servos.
Propeller Driving 32 Servos
QuickStart Servo Tester
Popsicle Stick Hexapod
Small Hexapod
Cheap Bot Using Two CR Servos
I have some servo related links in post #10 of my index.
I eventually bought a 4 AA cell holder and use that to to the servos' power voltage. Ground is connected to the QS board ground. With that power supply for the servos, I can run multiple servos at the same time.
Tom
This is a good idea when using more than one servo.
I use this technique in my hexapod. Rather than start all the servos at once, I bring them online one at a time.
A big capacitor on the servo power line can also help. In the QuickStart servo tester video I'm powering two small servos off the USB supply. I can only get away doing this by adding a big capacitor to the 5V line.
What kind of servo is it?
If the servo is small enough you might be able to get by with adding a capacitor or two (the sizes you list should help).
I'm not sure if two 9V in parallel would work or not. I'm inclined to think they would. You can always try it.
I used to teach high school chemistry so I'm big advocate of safety glasses. If one of your 9V batteries or your capacitors blow up you don't want any or it in your eyes.
I personally wear safety glasses almost all the time (though they double as reading glasses).
I hope you report back on your progress (or lack there of).
Our posts had crossed paths. I hadn't seen post #6 prior to making post #7.
I suppose having the servo work for a little while is progress?
Finding an adequate power supply for servos is often a major part of a project involving servos.
If you can't get the right power supply and decide to parallel batteries, use at least diodes to "OR" the batteries. That way one (stronger) battery can not backfeed the other (weaker) battery, overheat and explode or start smoldering and eventually burn in flames. Even fuse on both positive terminals is better than nothing, but the fuse would have to be fairly high current for your motors, so it would provide very little or no protection.
This is not a joke. You turn the switch OFF, put the device in a closet, but the batteries remain paralleled. They don't discharge at the same rate. One of them becomes the weak, the other the strong. Next thing you see is electrolyte leaking all over your device, maybe smoke coming out of closet, or you wake up in heaven, Not good.
You're very welcome.
I used to do some computer animation but once I learned how to move a servo with a microcontroller, having things move on a computer screen just didn't seem as much fun has having objects in the real world move around.
You'll want to get rechargeable batteries for your servo projects. NiMH are good Lithium Ion and Lithium Polymer are even better. The rechargeable batteries often can source more current than alkaline cells can.
There's a lot of bad information about batteries on the internet. I think the website BatteryUniversity.com has good information. I've learned a lot from the site (if I remember the correct URL, the site looks a bit different than I remember it looking).