Well a capacitor is equivalent to a spring.
Right! Of course, and I realize now (again) that coils/inductors are dashpots/dampers. Its all the same math, just applied differently. My issue with electronics is that I never had much practical experience with the details (I never used a breadboard until last year, I remember the EEs at my university 40 years ago lived with theirs all the time) so all your comments and info and super helpful. On these matters, I am learning the practical basics and working my way up.
You should spend some time here
No BS like you will find on most websites.
Thanks, I will check out.
Thanks for your help, I set it up as per the Arduino lesson plan (student kit) running power on the +5V pin (USB connection only) with the cap across the leads and its doing what I need. The torque from the servo is 1.3 kg-cm, so its a pretty small servo, but it should do what I need to a demo. In a few months, I may upgrade for a larger prototype of what I am building, and then I may go with a larger power supply. I may also simply not use Adafruit shield, because for servos they dont add much value-added.
Do you know much about servos? I see some on Amazon that look like they are rated at '20 kg' or more, I assume this means the torque is 20 kg-cm. THAT kind of torque I can see really needing it own power supply and that would be more than required, even for a larger prototype. Thanks for further thoughts. Steven Lightfoot
Here is the datasheet for the sevo
SM_S2309S.pdf (205.8 KB)
The stall current is 0.8A. On the UNO there is a 0.5A fuse on the USB +5V. If you stall the servo for a couple of seconds the fuse will probably blow. It will auto-reset but you should not count on it to save your USB port.
If the load on the servo is very very light, you should be OK but if the servo needs to do some heavy lifting, I still recommend a separate power supply
Thanks, excellent comments. I think I will do as you suggest.
Turns out I actually have a 6 VDC power supply (500mA) in my stores, so I will hook it up as you showed the diagram above (with a 100 uF cap) and report back this week how it works with my micro servo.
No hurry on my part.
I had more free time than I expected today. I have it set up and working all fine, thank you! I set up per your sketch and with the 100 uF cap.
I will get it operating with my prototype design, and then maybe upgrade size and capacity as I go in development.
For the moment, I need to design it operating with a PID control loop, and I am not 100% sure a servo is the way to go, I may need to revert to a stepper motor, but I will see.
Thanks again! Steven Lightfoot
This is what I want to do, more or less. Looks like a servo motor will work for this application. This isn't mine, but I want to do similar, so this will be a good guide.
PID controller with accelerometer and servo motor - Using Arduino / Project Guidance - Arduino Forum
Appreciate your help.
Steven Lightfoot
Don't use a forum topic that was never marked as solved.
You have never described what you are trying to do.
Basically an attempt to make a auto-righting stick, that always facing up, using a servo, PMU and and PID loop for control. This is what this person has attempted to do, and am now I am pretty sure it possible with Arduino kit.
Beyond my area of expertise.
ok thanks.
Hi Jim, So far my project is advancing, but I have not encountered a little problem, unexpected. I am using the sep power supply arrangement you suggested. The test code I wrote works fine, all good, except.
I have noticed that on increasing occasions, the servo goes a little crazy, moving uncommanded, in what looks like random ways. Not all the time, but often enough now to be an issue. From some little tests I did, seems like maybe the signal wire is getting some interference and sending that to the servo, which is dong the uncontrolled movements. All the hardware is as it should be, using the servo lines and all set up as you described.
Do you any thoughts or comments on what might be happening? Is this normal in any way?
Thx
Steven Lightfoot
Ugh, now its doing the uncommanded movements without the signal wire attached! Just the power and ground pins from the power supply (with a cap across leads) and even different sw that doesn't even move the solenoid.
Any ideas?
Make sure all your ground connections are good.
Try connecting the signal wire to ground. Does it stop when you do?
From what I can see all the grounds are good and go to the common Arduino Uno ground. The issue was happening even when I had the white signal wire disconnected from the servo, with only power and ground to servo.
It almost seemed like it was happening when my hands were closer to the servo, like some of capacitance effect, but not consistently.
Did you connect it to ground to see if it stopped?