I'm looking to make a toy car using the raspberry pi. I've figured I can power the pi using 6 AA's and a voltage regulator, and connect to the 5V and a GND pin (pins 2 and 6 I think).
Then power the motors using another 4 (6 with regulator) AA's and use a relay circuit from the pi to power them. Can I just connect a pin to the relay, and the relay to ground on the Pi. Then the other side of the relay sits into a motor power circuit like a switch.
I hope this diagram clears some of that up.
I figured this might be easier than a separate board and stops "noise" from the motor and can be used to operate multiple motors.
I'm a still new to electronics and such and don't want to fry my pi, so basically .. 1st) will this setup work ? 2nd) I'm not sure exactly what parts to get, I linked two but don't know if the pi will trigger the relay ? 3rd) is there a way to change the circuit to allow the motor to reverse direction (reverse polarity, adding another relay and diodes ?)
Drawn using Circuit Lab