Powering RPi while using Stepper Motor HAT

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Powering RPi while using Stepper Motor HAT

Post by AlexMaghen »

Hi. I want to be sure I'll be wiring power properly while using a Raspberry Pi 4 and your excellent DC & Stepper Motor Bonnet (4280). I have a separate power supply which has independent power outputs for 5v and 12v. My plan was to smoosh (engineering term?) the bonnet onto the Pi and then power the bonnet where it says "Motor Power +/-" with the 12v output from my power supply. My question is, how should I power the Pi? I could rig up the 5v from the power supply to a USB-C connector, but wouldn't it be easier for me to just do bare-wire from the Power Supply's 5v output to the right 5v and Gnd pins on the GPIO? I can do that, right? I don't actually *have* to use the USB connector to power the Pi? If so, my real question is, once the bonnet is attached, do I solder those 5v & Gnd wires to the bonnet pass-through holes? And if so, which ones? They're not marked the same way as the pins on the Pi's GPIO.

Any guidance, much appreciated!

Alex

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Powering RPi while using Stepper Motor HAT

Post by adafruit_support_bill »

It is possible to feed power to the Pi via header pins. However, there are definite risks with that and the Pi foundation does not condone it:

1) There is no polarity protection. Reverse polarity would cause immediate irreversible damage .
2) There is no regulation. Overvoltage would likely cause damage as well.
3) There is no fuse protection. Bypassing the USB jack on the Pi also bypasses the protection fuse.

We're all in favor of voiding warranties once in a while. Just be aware of - and accept the risks associated with doing that.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Powering RPi while using Stepper Motor HAT

Post by dastels »

I advise a completely separate power supply for the Pi. Motors (anything inductive, really) are incredibly noise and using a separate supply will avoid the chance of that noise getting into the Pi and messing it up (crashing, resetting, etc).

Dave

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Powering RPi while using Stepper Motor HAT

Post by AlexMaghen »

Yes, completely understood and the 5 V supply for the Pi is completely separate. But it is loose wire not a USB-C connector and so I am trying to understand which pins on the bonnet to connect it to to power raspberry pi itself.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Powering RPi while using Stepper Motor HAT

Post by adafruit_support_bill »

The bonnet does not have breakouts for the GND and 5V header pins:

https://cdn-learn.adafruit.com/assets/a ... 1560961669

Image

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Powering RPi while using Stepper Motor HAT

Post by AlexMaghen »

Thanks. So now I’m more confused: if the bonnet does not have pass-throughs for Gnd and 5v, then once the bonnet is attached, how do I access those pins on the Pi? Am I supposed to somehow connect to those pins on the Pi *under* the bonnet before I attach it? The bonnet came with a female header that makes it super easy to attach it to the Pi, but then how do I get to those pins if the bonnet doesn’t pass them through?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Powering RPi while using Stepper Motor HAT

Post by dastels »

You can always wire your power supply to one of these and use the USB power connector on the Pi. https://www.adafruit.com/product/5180. Then you'd avoid soldering to the Pi or bonnet, and have the protection circuitry in play.

Dave

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Powering RPi while using Stepper Motor HAT

Post by adafruit_support_bill »

There are stacking headers:https://www.adafruit.com/product/2348
Cobblers: https://www.adafruit.com/product/2028
Prototyping Plates: https://www.adafruit.com/product/801
And there is the full-size HAT version of the board which has GND and 5v breakouts: https://www.adafruit.com/product/2348

The safest way is to use a DIY USB connector and go in through the jack.

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Powering RPi while using Stepper Motor HAT

Post by AlexMaghen »

dastels wrote:You can always wire your power supply to one of these and use the USB power connector on the Pi. https://www.adafruit.com/product/5180. Then you'd avoid soldering to the Pi or bonnet, and have the protection circuitry in play.

Dave
Thanks for this. I am a little confused though. I went and looked at this and it appears to be the FEMALE. If I want to run my 5v loose-wire power supply into the Pi4's USB connector, I need a USB-C PLUG (MALE), right? But I cannot seem to find such a thing. Am I missing something (obviously! :))

Thanks!

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Powering RPi while using Stepper Motor HAT

Post by dastels »

Ugh, you're right. I can't seem to find one either. I guess you could use https://www.adafruit.com/product/4299, though it's a bit clunky.

Dave

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Powering RPi while using Stepper Motor HAT

Post by AlexMaghen »

@dastels -

Thanks. I think what you're suggesting is that I use an adaptor to go from a MicroUSB plug to the USB-C required by the Pi4. I could do that, but then I still don't know how to get my nice loose-wire 5v and Gnd source into the Micro-USB plug. Is that easier to do that to go straight into a USB-C plug? Is there a solution for this that you already know?

ALSO - don't kill me for asking this: I have a USB-C AC Power Plug (y'know, one of those black things you plug into the wall hard-wired with the USB-C plug at the other end). It works fine powering the Pi4. Why can't I cut the cord off and just apply 5v in place of the black box that plugs into the wall? Is it immoral? Or worse - will it kill my Pi? I can't imagine why it would, but I don't understand USB-C.

Alex

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Powering RPi while using Stepper Motor HAT

Post by dastels »

There are options in The Adafruit shop to put a MicroUSB connector on you power wire. E.g. :
https://www.adafruit.com/product/1826
https://www.adafruit.com/product/3972

I suspect moving the end of the power cable to your 5v supply would be fine. Just make the right connections.

Dave

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Powering RPi while using Stepper Motor HAT

Post by AlexMaghen »

Hi. Well, I dunno, I may have done something evil, but it's just... working. I'd love someone to tell me why it was a bad idea:
I am using a "bonnet" from Adafruit which, for some reason, does not give me access to the 5v and Gnd pins of a Pi4's GPIO. I had wanted to power the Pi4 directly from loose wires because I have a power supply which will provide both the 5v for the Pi4 and, isolated, the 12v for some motors, etc. There felt like no "non-ugly" way to reach the needed GPIO pins to power the Pi4 so instead, I took a USB-C charger I had lying around and cut the plug off and attached it directly to the power supply I have, and then plugged that directly into the Pi4.

It seems to be working fine (see attached image). So did I commit evil? And if so, how/why? :)
USB-C Cord.jpeg
USB-C Cord.jpeg (337.29 KiB) Viewed 350 times

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Powering RPi while using Stepper Motor HAT

Post by adafruit_support_bill »

Nothing evil there. You are supplying regulated 5v power via the USB jack as recommended above. That is how the Pi was designed to be powered. You are not bypassing the protection fuses as you would be by powering through the header.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Powering RPi while using Stepper Motor HAT

Post by dastels »

Nothing wrong with hooking up wires! As long as it's a clean, stable 5v there's nothing wrong with this at all. In fact, it's a good, clean solution.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”