PHAT DAC Which GPIO are in use

Just received the Phat DAC and want to combine it with outher stuff on a Pi, Pi0 and Pi2 etc so need to know which pins are in use?

Anyone?

Only the I2S pins and 5V/3V3/GND!

Thank you for the reply. So to be clear, the physical pins 3, 5, 27, 28 + (3v from 1 & not 17, 5v from 2 & 4, & GND from all GND pins

What about Pin 12 (GPIO18)?

GPIO18 is the clock and is used!

1 Like

Jon, not sure your input has been very helpful.

Got the unit working then started running various other elements inc reading a DHT22 signal on GPIO21 - caused the DAC to crash!

So although I’m not even close to being an expert, but it seems to use GPIO21 (Pin 40) too!

yes! i2s is GPIO18-19-20-21, of which all but GPIO20 are used by the pHAT DAC. I hope this helps… check out pinout.xyz for details, there will be a pinout for this hardware up there soon, but in the meantime you can click on the various pins and see what their purpose(s) are!

on a sidetone physical pins 27 and 28 are not in use, a pHAT is not a HAT ;-)

Edit: I think I see where the confusion lies, you took it as the pHAT using i2c when @jon said i2s?

Here’s one of my minimalist soldering job that should illustrate what pins the pHAT DAC uses (the block at right is not necessary in full only 3 out of 6 pins are):

https://instagram.com/p/_dC6kvpkA0/

1 Like

Thanks RogueM

That’s very helpful for now, I will come back if I trip up!

So, for anyone still not sure, we just need 7 out of the 40 pins.
(right?)

  1. Pin 1 (3.3V)
  2. Pin 2 (5V)
  3. Pin 12 (GPIO 18)
  4. Pin 35 (GPIO 19)
  5. Pin 38 (GPIO 20)
  6. Pin 39 (Ground)
  7. Pin 40 (GPIO 21)

Correct, though you don’t need GPIO 20 (physical 38), technically.

Thanks @RogueM.

So, we need 6 out of the 40 pins.

  1. Pin 1 (3.3V)
  2. Pin 2 (5V)
  3. Pin 12 (GPIO 18)
  4. Pin 35 (GPIO 19)
  5. Pin 39 (Ground)
  6. Pin 40 (GPIO 21)

What does need mean here? That GPIO 20 (physical 38) is free to use for other stuff?

Yes. http://pinout.xyz/pinout/phat_dac

I saw the pinout.xyz diagram first, and couldn’t figure out how the pHAT would work without a ground.

Why aren’t pins 1 and 39 marked as used on pinout.xyz?

3v3 is not required. Ground pin would be your choice, all 8 are marked as electrically connected at the pinout site (compare to say, blinkt for an example of ‘strict’ ground mapping).

Hi all this is my first post here so be kind,
This thread seems to be along the lines of what I need. I am currently setting up a Openelec dedicated media player on a Pi 2. It will have a DVD player and a built in harddrive, that will gobble up two USB’s and I want a third for external use, leaving one internal for future expansion. I want to add a simple IR-Reciever, but don’t want the diode to be on the final USB socket. I have previously achieved this successfully on a Pi-zero by hard wiring the IR-diode to the pin GPIO 18. This is the solution I was planning to use this time, but I am also thinking of upgrading the sound with a pHAT DAC. However I have noticed that the DAC uses the same pin as all of the standard tutorials assign to the IR-Remote which points to an incompatibility problem. Can the pHAT DAC use an alternative GPIO pin, or does anyone know if the IR-reciever can use an alternative GPIO pin.

It seems that might be quite a common issue for people building dedicated Squeezeboxes or Kodi boxes.

Hope that all makes sense.

Stephen

It seems that the Lirc Ir module can have its pins allocated to anything within reason: the command is:

Now load the lirc_rpi module (change gpio number is you are using different ones. note that these are gpio numbers, not pin numbers)

sudo modprobe lirc_rpi gpio_in_pin=4 gpio_out_pin=7

This sets pin 4 for IR input to system (physical pin 7)
use Physical Pin 1 for 3v3 power and physical pin 6 for ground.

stephen

pin 18 is mandatory for the pHAT DAC’s operation. I can’t see why IR receiver could not use any standard GPIO, so any other pin should do?

Ok thats what I had gathered by doing a little digging. However the guides for using Lirc-rpi are scant as they all seem to assume you will go with the default pin of GPIO_18.

Stephen