Combine ReSpeaker Pi-hat and NRF24 on same Pi?
alowhum last edited by alowhum
I'm exploring added voice control to my Raspberry Pi (using Snips).
They recommend getting this $10 pi hat.
Their documentation says it uses 11 of the GPIO pins. So I was hoping both MySensors and the hat could co-exist.
Which 11 pins are used requires some detective work though:
BUTTON: a User Button, connected to GPIO17 MIC_Land MIC_R: 2 Microphones on both sides of the board RGB LED: 3 APA102 RGB LEDs, connected to SPI interface WM8960: a low power stereo codec Raspberry Pi 40-Pin Headers: support Raspberry Pi Zero, Raspberry Pi 1 B+, Raspberry Pi 2 B and Raspberry Pi 3 B POWER: Micro USB port for powering the ReSpeaker 2-Mics Pi HAT, please power the board for providing enough current when using the speaker. I2C: Grove I2C port, connected to I2C-1 GPIO12: Grove digital port, connected to GPIO12 & GPIO13 JST 2.0 SPEAKER OUT: for connecting speaker with JST 2.0 connector 3.5mm AUDIO JACK: for connecting headphone or speaker with 3.5mm Audio Plug
So the hat confiscates:
- GPIO 17 => pin 11 (so no overlap)
- "SPI interface" => ? If this is SPI0, then it overlaps with MySensors?
- Grove I2C port => pin 35/36/38/40 (so no overlap)
- GPIO 12 => pin 32 (so no overlap)
- GPIO 13 => pin 33 (so no overlap)
So it's the SPI for the LED's that's the worry, since this could refer to SPI0 which MySensors uses? Perhaps they can be disabled.
Still, the weird thing is that does not get me to 11 pins? Unless the LED's use 7 SPI pins..
Does anyone have any idea/experience here?
I also have a setup with SNIPS here, and a few different mics (this respeaker model included). I started something for using snips with my mysensors gw..
The snips server is installed on my rpi3 controller for the moment (will maybe use a separate machine or VM, don't know yet), and have two satellites (rpi2 and rpi0).
Yes respeaker hat uses SPI0 for leds, so it may overlap with mysensors default setup. I don't know if it's possible to change mysensors with another spi as I'm not using rpi as gw
(I prefer to have a separate gw so if my controller or something else fails, mysensors still works and I can access it by the phone app or computer, it's more independant&modular).
This rpi hat uses: i2c (2 pins), i2s (4), spi pins (2), user button on IO17, and 12&13 are simply gpio on JST connector. That's 11 pins as they say
On the two spi pins, there are serie resistor that you could remove if you want to use spi0. it will disable leds and you should be fine.
For getting started they recommend this pi Hat, but this not the best mic&dsp hat. Mic&audio processing is very important for voice recognition quality, range etc. There are others, more expensive hat, with better recognition, sensibility.
Still snips is very nice to use, offline and natively handles my language (fr) so that's very sexy. But of course other languages can work by using google cloud speech api.
I've a ghome mini i bought for tests with mysensors too, I like both, it's different use as ghome knows more things. But for long term and privacy I prefer snips of course!
For snips, requirement for server is rpi3 minimum and for the decentralized satellites, a rpi0 is ok.
rozpruwacz last edited by
@alowhum while bulding spidev gateway you can specify second spi device so it will not overlap with the hat
alowhum last edited by
I eventually found the PCB layout file on the Seeed website:
It shows that it does indeed use pin 19 and 21 for SPI. Which is the same as the default MySensors.
@rozpruwacz Could you elaborate a bit? Could I tell MySensors to use other pins for those two?
gbfromhb last edited by gbfromhb
I was able to get the following working. Home Assistant (hass.io), Google Assistant installed, and The old Google Voice kit. Right now I'm not using any of the Google software that is part of the manual, I'm using the two mics on the very cool Pi hat that comes with it. The kit is about $10.00.
Here is my Raspberry Pi with the Google voice hat, hass.io, MySensors serial gateway, and Aeon Labs series 2 Z-Stick, and powered USB hub to get the amps it needs.
@alowhum use --spi-spidev-device=<DEVICE> to use the other spi.