I would like to ask if it is acceptable to use four AA batteries as an external power supply for a servo motor connected to a Raspberry Pi. I noticed that many tutorials use a PWM driver to power and control the servo, but I currently do not have a PWM driver module.
Because of this, I am planning to power the servo motor separately using AA batteries while still controlling it through the Raspberry Pi. I would like to know if this setup is safe and appropriate.
That is true BUT the PWM driver will not PROVIDE the power required. That still has to be provided from some external source.
That is common practice. The GPIO pins (Arduino or RPi) normally will not supply the current required.
Having said that if the requirement is small in the order of a few mA the 5V OUTPUT pin might be good enough. Usually an external supply is preferred.
Not too sure about this. Depends on what sort of current the servo requires and how long you expect them to last. The capacity of AAs is not that great.
Cheers Bob
You are not forthcoming with a lot of pertinent information.
For instance what is the voltage of your servo ?? You originally indicated 4 x AA cells. That implies 6V. If this is your servo required volts I think the 3.3V might be a bit low. Also what current will this 3.3V supply. It might not be capable of powering your servo.
Cheers Bob
It is not bad but gives no idea of the operating current.
If it jitters it might be getting a jittering data signal. The last page of that data sheet describes what sort of signal it will expect. That is a variable pulse width of 1mSec to 2mSec with 1.5mSec the centre position. The repetition period should be 20mSec. Is this what you have ??
That 5V source might not be supplying enough current. I have no idea what the 5V capability which probably depends on the model Pi you are using. 3B + I assume. Do you have another 5V supply you can try ??
What about posting a schematic or sketch of your set up. That would be some help.
Cheers Bob
Add on:
Your RPi might have a data signal of 3.3V. The servo data sheet says it requires a minimum of 4.8V operating and data level. Refer signal drawing on last page. You might have to use a data level converter or try something with a 5V data level output.
my plan was to build a prototype house, so the camera module detects my face then the servo connected to the door will open. Here is the schematic diagram of my project.
Hi Baron
That looks OK. Nothing suspicious there. Your jitter could still be:
not enough current from the Pi 5V source
and/or
The servo does not like the 3.3V (I think) data pulse level.
You have not described this “jitter”. Does it occur while the servo is moving or when it is supposed to be stationary.
You are aware that to maintain position the servo has to be powered and supplied with a pulse stream at all times are you not. If you power down or remove the pulses it will be free to move. How hard this would be depends on the individual servo and the gearing used but without power and controlling pulses there is nothing to hold position.
It is a bit unclear to me exactly what this servo is going to do. You have only said “open the door” Do you mean physically swing the door open or just unlock it. Anyway, that is another matter. You need to get this servo working first.
Cheers Bob