I read about and have seen on youtube that connecting a Servo to an Arduino with a doubtful source of power might be tricky due to power dips if a connected device draws too much current.
It is suggested to use an alternative power supply with a common GND.
I think I have a good solution for that in using an Electrolytic Capacitor and a diode to prevent the Capacitor to drain as well if the power supply is insufficient to power the servo.
The case now is that I'm using an Arduino Pro Micro. This PCB contains a power regulator so a "RAW" power can be connected to the PCB. The Pro Micro also has a 5V VCC connection in case one wants to use an external power supply. This VCC input port can also be used as a small source for other components using that same 5V.
OK... Now my idea.
To prevent the power drops to reset the Arduino, I connected the Capacitor.
What would be best?
A) The Capacitor buffering the approx 8,3V on the RAW connection port?
B) buffering the VCC power of 5V?
And in any case, what would be a recommended value of the Capacitor, knowing that there will be no power-consuming components connected. Maybe a pressure sensor, and of course the PWM signal to the servo.
Rule #1 a 9V battery is not a power supply. Rule #2 9V battery does not run motors. You might get it to work sometimes maybe but you will be using a lot of batteries. Typical drain for a 9V battery is about 15 - 20 mA. It has about 550 mA Hours capacity. This is for a 9v alkaline battery. FYI the Arduino Uno consumes around 45 mA way more then the battery rating, this does not count your sensors and motor(s).
Most servos are rated for 4.8-6V and will die in seconds if you put 9V straight across them. You might be saved if that's a weedy little PP3 battery which doesn't have enough power to run a servo or possibly not enough even to kill it.
Thanks for the replies guys.
That the schematic says 9V, does not mean it is a 9V battery.
I intended it originally yes, but I ended up with a space problem.
I now created a 5x 1,5V AAA compartment, which is -while I'm writing this- being printed on my 3D printer.
So the voltage will not be that high.
And the power, concerning the drawn current, is only used once.
It is used to unlock a spring-cocked Parachute bay.
But please could you answer my question concerning the right choice or schematic?
Can I place a Capacitor between the VCC and GND, even though the main power is supplied on the RAW input pin?
I actually think it can, but I'd like to hear undermining opinions (if any) to keep myself focused. :-[
the PWM signal to the servo
Your pic shows a “PWM pin”.
Jfyi, the servo library can control a servo off any pin, even the analog inputs which are digital pins at heart anyway.