Is it normal for Servo to be clicking while idle?

I am using the Servo library to control a Hitec HS-311.

After I attach the servo and then move it to position 0 via write(0), it does not sit quietly while not being moved. i.e. it kind of clicks every second or so and you can see the shaft moving a little bit back and forth.

Is this normal?

Or should it be locked in position and not moving or making a sound when I am not sending write messages to it?

No, a servo shouldn't click while its being driven by a valid and constant signal. Its hard to tell from your post if one of those conditions is not the case.

You don't say if you tried driving the servo in the middle of its range, i.e. testing with a value of 90 for libraries that take servo positions in degrees. If the problem goes away then the servo may be driven beyond it design range, you would need to limit the value to some number above 0.

If it persists, then its possible that the pulse width sent by the arduino is not stable. This can happen if your sketch makes heavy use of interrupts. A simple test sketch that does nothing but refresh the servo with at value of 90 should verify if this is the case. If the problem goes away, you need to look at other code in your application.

Other possibilities include a power supply that is not constant (the servo may be drawing more power than the Arduino can supply, removing any mechanical load on the servo or try using an external supply for the servo).

If none of these solve the problem, servo itself could be faulty.

Good luck!

Some servos don't like being at the extreme limits (0 or 180 degrees), either. I have a Futaba that works from 5 to 180 degrees. Anything less than 5 and I get similar behavior to what you are describing.