Power supply

what is the safest way to power the pi zero with a 9v Battery through the gpio pins as i am short on space and even using motor drive boards, i get interference from the motors & keep killing the Pi Zero

You have to use a buck converter or other type of 5v regulator. A 9V battery will kill your Pi if connected directly. The motors may need filter capacitors on their +V bus to kill spikes etc.

I was using a “Buck Coverter Module LM2596” and L9110S driver board but it seem to keep hanging the pi when running the motor I have managed to kill 3 pi zeros so far!!!

also tried it with a 7805 Voltage regulator was no better

I thought the whole point of the L9110S was to also filter the spikes!! as well as to handle the motor power

I’ve browned out dozens of Pi’s with misplaced wires and test boards, and have never managed to kill one. You must be exposing it either to 9v or high voltage back-emf from the motors somehow.

Looking at the typical capacity of a 9v PP3, it doesn’t seem like an appropriate choice for powering any motor for any length of time. As a rough rule of thumb to deliver 120mA just to power the Pi continuously through a high efficiency switching regulator would require a draw of 66mA or around 8 hours lifespan on a typical PP3 9v battery. This is a rough estimate, as the battery voltage will drop over time and the current required of it will increase. I’d wager you’d be lucky to get half that in practise.

The 7805 voltage regulator would be a poor choice, since it’ll burn off the excess as heat and give even less battery life.

I don’t know what sort of space you’ve got, but you might want to investigate LiPo batteries. A 1200mAh LiPo is just over half the volume of a 9V PP3 and a 2000mAh LiPo is about half the thickness, but longer/wider and still smaller overall.

A link to what your using and how you have it wired may help. I’m using the Explorer pHat with a Pi Zero with no issues like that. By “kill three Zero’s” do you mean they are no longer functional? Also be aware that the Pi uses 3.3V logic. Connecting 5V to the GPIO input pins will damage things.

its a lego train so not much room and it has 6 x 1.5 batties to power it so i do not really want to change the power source

my electronic skills is limited would this allow me to drive the 9 Volt lego system or not as it only shows 5volts

The Explorer pHat sends 5v to the motors.

I think we need some pictures of the wiring and or a good description of how its wired. What GPIO pins go where etc. A link to the motor driver board your using would also help.

leave it with me i will see what i can sort (bit busy at the moment)
may be end of next week (thanks)

No problem, take all the time you need. =)

Ooooh! That’s fine. I thought you meant a 9v PP3 (the kind you get in smoke alarms). They should have more than enough grunt to power the Pi and motor.

Sorry this is very sketchy hope it makes sense and helps

Do you have a link to that actual motor driver board? Are you driving it via PWM?
Are those physical Pin 3 and 7 or GPIO 3 and 7?

All physical pins, uses pmw for The speed

A link to that specific motor driver board would help.

i have these


Sorry the grd pin is phyical pin 6 not pin3 as i have shown
5v (pin4) gnd (pin6)

the GPIO ports are GPIO3(pin5) and GPIO4(pin7)