Enviro pHat + Speaker pHAT?

Hi all,

are these two stackable? (naturally in this case, the speaker would want to be on top)

Will the recorded temperature accurately reflect the room temperature?

Hi there jezmck,
Here are the pinouts for both phats:

As you can see, they both share BCMs 2 and 3, which may be an issue.

The recorded temperature will also be slightly higher (around 5*c) than the average ambient temperature due to the heat radiated by the board itself.

1 Like

Should be fine. In both cases BCM 2 and 3 are being used in I2C mode and there is no I2C address conflict between these two boards.

If you look under the Details section on a Pinout.xyz board that uses I2C, you’ll see a list of I2C addresses and what they’re used by.

1 Like

Thank you both very much for the info.

The inaccurate temperature is probably a blocker for me, so I wonder whether I can connect a BMP180 (or whatever has replaced it) on a lead and still use the Speaker pHat?

I suppose it depends on how accurate you want it to be; I typically just output the temperature with the average difference taken from the value. Though if you did want more accuracy, I’d say that’s definitely the way to go. :)

1 Like

If you’re going down the route of Speaker pHAT and BMP280, then you can either, i) use an extra long female header on the Speaker pHAT and then still have access to the pins, or ii) use a Pico HAT Hacker to get access to all of the pins. A third option would be to run the Enviro pHAT and Speaker pHAT on a Mini Black HAT Hacker and mitigate the temperature effect from the Pi that way.

1 Like

Essentially I just want a really tidy version of what I made for my first child’s room - an original Pi B with a USB powered speaker connected by 3.5mm jack and a temperature sensor on a lead with the necessary EOP plug - which all adds up to a mess.

This sensor is used often in Raspberry Jam kits and workshops, it will certainly get your sensor removed from the main board, and it’ll do so quite tidily too. Build everything into an enclosure and just have the metal part of the sensor pop out the top: https://thepihut.com/products/adafruit-waterproof-ds18b20-digital-temperature-sensor-extras

Adafruit also have a pretty detailed guide for getting it up and running: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/software (they show the breadboard version, but there’s no difference in the setup I’m aware of)

1 Like

This could be great, thank you - do you know of an enclosure which neatly accommodates a zero + pHat?

That’s a good question. Might be worth visiting a local electronics reseller to see if they have any project boxes that fit. Look for something form-fitting, and gain bonus points by soldering a new microUSB connector onto the header so you can route the power connector out of the back :D

1 Like

I went with a waterproof version of the DS18B20, and found a way to inline the resistor.

(Now I look at it in situ, I probably should have just soldering the resistor straight onto the pins, oh well.)