There is an automatic delay of about one second at the end of my loop() function even though I did not write it into my code. Here is a video demonstration: DelayProblem.mp4 - Google Drive
Code is attatched. Thanks!
Radar.ino (1.09 KB)
There is an automatic delay of about one second at the end of my loop() function even though I did not write it into my code. Here is a video demonstration: DelayProblem.mp4 - Google Drive
Code is attatched. Thanks!
Radar.ino (1.09 KB)
No there is no such delay of course. Your servo is hitting the endstop since it cannot rotate 180 degrees (very few servos can do more than about 120 to 150 degrees).
Sorry, I should've mentioned that the delay didn't exist previously. It worked exactly as I intended with the same code. I left it alone for a few days and all of sudden there is a delay after every cycle.
The problem remains with smaller angles of rotation. Here it is rotating from 20 to 100 degrees:
The angle it stops at is 20 degrees.
If you really want help please post your program code here.
...R
sensitive_cheater:
Sorry, I should've mentioned that the delay didn't exist previously. It worked exactly as I intended with the same code. I left it alone for a few days and all of sudden there is a delay after every cycle.
I very much doubt that - you've only just noticed the delay. Let me reiterate there is no such delay
after loop, this is almost certainly your faulty assumption that servos can physically rotate 180
degrees, the vast majority can't.
Are you using a different voltage supply to the servos since the last time it was working correctly?
Most servos have a better range of motion at higher voltages.
sam_smurfitt:
Most servos have a better range of motion at higher voltages.
I don't think that statement is correct. (This is the polite version)
...R
Maybe I've only used a small range but all the servo motors I have encountered can get a greater range of motion at for example 6v than they do at 4.8v. The ones Im using get about an extra 15-20 degrees, and the positioning is much more stable.
All the servos I have ever tried have internal physical limits and they will reach those at 4.5v when there is no load on the servo.
All that the higher voltage does is ensure there is more current flowing in the motor to generate more torque. That should make no difference to the position of the motor unless it is moving a heavy load. Most servos are not designed to operate under high load continuously - the usual result of that is overheating and internal damage to the motor or the electronics.
...R