Use Explorer Phat & Speaker pHat at same time, conflict?


#1

I was wanting to use an Explorer pHat and Speaker pHat on a Rover project but it looks like there is a conflict.
https://pinout.xyz/pinout/explorer_phat# On the Explorer BCM 19 (Motor 1 +) BCM 21 (Motor 2 +)
https://pinout.xyz/pinout/speaker_phat# On the SPKR BCM 19 (I2S) and BCM 21 (I2S)

If disabling the Speaker pHat VU meter will fix it I’m cool with that. My plan was to use the Mini Black hat hac3r kit to mount the two side by side.


#2

You would have to re-wire the Explorer pHAT onto alternate pins, since the pins that the Motor + signals conflict with are absolutely essential for i2s audio. This would mean that the Explorer HAT library wont work out of the box with your setup, but you can use most of Explorer HATs features with just plain RPi.GPIO or GPIO Zero.


#3

The motor control is a must so I guess I’ll have to ditch using the Speaker pHat for sound. Or any DAC sound option from the sound of it? That’s really a shame, was wanting some RDD2 type sound effects. =(


#4

Would this work with the Speaker pHat? https://shop.pimoroni.com/products/adafruit-dc-stepper-motor-hat-for-raspberry-pi-mini-kit It states
•Only two pins (SDA & SCL) are required to drive the multiple motors
•since it’s I2C you can also connect any other I2C devices or HATs to the same pins.

I would have to add yet another card for sensor hookup but at least I’d have my sound effects. My plan is to use a Pi Zero W. .


#5

Well, it looks like the Speaker pHat conflicts with just about everything I’ve looked at to read sensor data in with. Automation Hat, pHat, Enviro pHat. It looks like the Speaker pHat has to go. I’ll use a piezo speaker buzzer or something.


#6

Yes the DC Stepper motor HAT should work, because it uses only the i2c pins SDA/SCL (Data and Clock) which are a bus that can be shared with multiple devices as long as they have different addresses.

See: https://pinout.xyz/pinout/dc_stepper_motor_hat


#7

I’m wanting to also add a couple of IR distance sensors and maybe a PIR for obstacle avoidance. Any suggestions on what I can use to do that, that will work with the Speaker pHat? I had a quick look but everything seems to conflict with the Speaker pHat. It’s looking more and more like just ditching the Speaker pHat is the way to go. I already have an Explorer pHat, buying the Motor hat is just extra expense. And haven’t bought the Speaker pHat, yet. Luckily I checked the pinout before ordering it.


#8

An i2c analog breakout would work to read some IR distance sensors that use the analog approach, and any spare pin should suffice for others that use a ping and timing approach.

It’s probably cheaper to start with the Explorer pHAT and use another solution for audio though.


#9

Yeah, that’s the conclusion I’m coming too, to. I’ll keep the Explorer pHat and do something else for sound. Piezo Buzzer I guess.