I'm working on a small project. I want to make an internet-connected dog food dispenser to attach to my dog's crate so I can dispatch a network command remotely to dispense it. I have a Raspberry Pi Zero WH with the Pi Cobbler attached to a breadboard and a small servo (Medium Plastic Gear Analog by OSEPP). The idea was to make something like this, where the servo would lift a small cardboard gate inserted into a cardboard tube to let the treats slide down.
I don't have a 4xAA battery holder, but have several 9V batteries and battery clips. I'm a software engineer, not electrical, so I mostly want to confirm a couple of things about the circuit design.
First is that I'm not sure how to calculate how much resistance I would need to use the servo (4.5 - 6V) with a 9V battery, if that's even possible. I know that if you just had a forward voltage drop of 2.4V for example, you would just use 6.6V as your voltage value in Ohm's law and the forward current of the servo as I. But how would I calculate this with a voltage range?
Second is that I'm not sure exactly how to insert the external battery source in the circuit. Do I just insert the positive lead in between the GPIO pin and the servo and the negative lead between the negative side of the servo and the GPIO GND?
Final question is that I just want to know... will the servo continually draw power from the batteries, even when inactive (pin isn't sending a signal to the servo). If so, is there a way I could set up the circuit to prevent this other than just adding a power switch?
I appreciate any help.