Power on GPIO


#1

Hello,
I have a robot project with multiple Rasperry Pi Zero W’s with Phats in it. I want to consolidate them onto 1 Pi3b+.

PZw1: Envirophat
PZw2: phat DAC and Phat Beat
PZw3: Adafruit PWM controller

There doesnt appear to be any GPIO conflict that I could see. But I ddin’t know if I would max out the power to all of them being supplied by the GPIO. Any thoughts on power draw from these combined boards?

Also can the Phat DAC/Phat Beat board stack be run on a ribbon cable? And if so what length?

Thanks in advance,
Duncan


#2

This should flag any conflicts, https://pinout.xyz/phatstack
The Pi Zero doesn’t have a poly fuse so you can draw as much current as your power supply will put out. Your still restricted by the size of the tracks on the circuit board but you shouldn’t hit that limit, many Amps I would think. I’ve used a mini black hat hacker board to attach multiple pHats to a zero.


I put a female header on the bottom side of the Pi so I wouldn’t have to use a ribbon cable. Its plugged into a 90 degree male in the picture. The pHat Stack will let you do more than two pHats.
You can use ribbon cables, just be careful and make sure pin 1 on the Pi goes to pin 1 on the pHat. Its quit easy to get it wrong and bad things will happen.


#3

I want to add multiple boards to a Pi3B+. My idea is to fit a Pico Hat Hacker between the PWM controller and Pi3B+ GPIO pins. Then run a ribbon cable to the front panel where the Phat Dac/Phat Beat are mounted.

But I don’t know the current draw for the above boards mentioned. I was under the impression that the Pi was limited to a maximum of 16mA per GPIO pin with the total current from all pins not exceeding 51mA?


#4


the 2 audio phats together come with a warning as seen in the picture


#5

No worries. I have the 2 audio boards working perfectly together currently. But thank you for the heads up.


#6

That 16 ma restriction as far as I know is to GPIO pins you use for control, logic 1 or 0. Not the power pins, not the +5V and 3.3V pins. The 5V pin on a 3B+ comes from the Micro USB power jack via a poly fuse. The poly fuse limit depends on which Pi it is. See here, https://www.raspberrypi.org/help/faqs/#topPower Check the max peripheral current draw column. Just use the 3B values, the 3B+ hasn’t been added yet. The 3.3V comes from an onboard regulator which I have no idea what its limit is? @gadgetoid would know for sure, but I think you’ll find that your pHats get most if not all their power from the +5V rail.
I have on occasion just feed my 5V in via the GPIO +5V pin. That bypasses the poly fuse and your only limit is the max current your power supply can supply.
I would think, if you exceed the max current for your power supply it will drop the voltage and you’ll get the lightning bolt warning on your monitor.


#7

Pin 12, BCM 18, the one that’s the conflict is i2s, which I believe is the digital audio from the Pi to the pHat. One has to ask why the pHat Beat and pHat DAC? If all you’re using on the pHat Beat is the VU meter that likely explains why everything works together.


#8

To answer your question, I asked a few months ago about audio quality. And was told the Phat DAC audio is superior to the Phat Beat. However, I wanted the VU meter for the visual impact it has on the control panel I am mounting it in. So yes, you are correct, I am using the audio out of the Phat DAC. And only the VU meter and buttons on the Phat Beat.


#9

Ok, I had a feeling it was something like that, thanks for replying. I use the pHat Beat in a Pirate Radio setup. How is the response of the VU meter? I only get the bottom couple of LEDs active, unless I pump up the volume.
Would you be so kind as to post some pictures of your project when done. =)


#10

If you clone/build the devel branch of Pivumeter you’ll be able to use the vu_scale option in asound.conf that changes the value which the VU meter is scaled against. The problem is that the pivumeter plugin gets access to the audio data after the volume control has been applied so it’s difficult to impossible to give a true representation of the original dynamic. My plan for working around this was to:

  1. Switch to Python as the front-end
  2. Have Python take a moving average of the loudest sound sample
  3. Scale the VU meter against that value

It’s a hack, but it’d produce possibly more pleasing results. The trouble is that these steps are a lot more work than they appear since I have to migrate the installer over to the new, in development, branch and get it all ship-shape tested and working. My past tests have run into some instability issues which I’m still not satisfied are fixed.


#11

That’s one of those deals where the easy part is asking for it. Especially when you have no idea how hard it is to actually do it, puts hand up.
Phil, I wish I had even half your skills. Then I wouldn’t be sitting here looking at what you posted with a deer in the headlights look, lol.


#12

I really like my pHAt dAC, I have it on a Pi zero,and using rca plugs i hook it to my stereo systems amp,and it sounds as good as any of the other devices attached to the Amp, I have the phat beat too,and when connected to a good speaker its sound great ,but not as good as the phat dac


#13

Phil, since the Phat Beat sends audio out i2c, can other i2c boards, such as the Adafruit PWM controller be used at the same time?


#14

@Gouf pHAT BEAT uses “i2s” which isn’t a typo, it’s actually a different communication bus than i2c over which PCM audio is usually sent.

Here’s i2s/PCM: https://pinout.xyz/pinout/pcm
And here’s i2c: https://pinout.xyz/pinout/i2c


#15

Thank you. Sorry. Got my proverbial wires crossed.


#16

I haven’t added the Envirophat yet. But I assembled a board stack to test everything else before mounting them into panels. Everything seems to be playing nice together so far.

Servos work, And great sound and response from the Phat DAC/Phat Beat.