MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Hardware Compatibility Question: Using the Grove Adjustable PIR Sensor & ReSpeaker Pi HAT in the Same Build?



  • Being very new to the Magic Mirror world, my head is spinning with all of the possibilities (I’m so far down the rabbit hole right now) and I have some questions about using various hardware in the same build. In short, I need to know if the Grove Adjustable PIR Motion Sensor (or any of the Grove products, for that matter) can be controlled from the Pi if it’s connected to the ReSpeaker 2-Mics Pi HAT rather than directly to the Pi and if so, which port on the Pi Hat should be used.

    There are two connector ports on the Pi HAT - one is labeled as “GP12” and the other as “12C” and according to the documentation for the HAT, they are both Grove compatible. Additionally, it states: “GPIO12: Grove digital port, connected to GPIO12 & GPIO13” and “I2C: Grove I2C port, connected to I2C-1”

    Here are the Pi HAT and Grove PIR Sensor boards for reference:

    alt text alt text

    I also found this handy chart for the Pi HAT that gives additional info so I’m hoping even if no one knows from experience, they can determine if this is possible based on general knowledge of the Pi.

    As far as I can tell, it should be possible to plug the Grove PIR into the “GP12” port and reference GPIO 12 (Pin 32) and/or GPIO 13 (Pin 33) in the code to receive input from the PIR Sensor and not interfere with the functionality of the HAT - can anyone confirm?

    I’m also open to other suggestions for implementing PIR Motion and Voice Control into my MM build but these just seemed like the best way to do that.



  • After looking a bit more into it, I believe that the GP12 port is the way to go. While this is a different version of the ReSpeaker mic HAT, the ReSpeaker 4-Mic Linear Array has the leads labeled on both of the Grove compatible ports located on the main board and from what I can tell, the SIG pin on the Grove PIR Sensor should be connected to GPIO 12 on the Pi via the HAT when connected to this GPIO port.

    alt text

    I’m assuming that the connector ports are configured the same way on both the 2-Mic Pi HAT and the 4-Mic Linear Array (even though they’re labeled slightly different, they’re supposed to be compatible with Grove components so I think that’s a safe assumption) so the leads should all be identical as well. So if I’m not mistaken, the SIG pin would sent the voltage from the PIR sensor to GPIO 12 and therefore be used to indicate to the Pi that there is motion or not. Am I on the right track?

    I think I’ll just continue posting my progress here for anyone with the same questions so that when I eventually figure it out, the answers will follow - unless someone else chimes in to help out! I’ve ordered the parts already and will be testing in a week or so once I’ve had some time to play around with them.


  • Project Sponsor

    My MM hardware:
    Raspberry Pi 3b+
    Respeaker 2-Mics Hat
    Grove PIR Motion Sensor (connected to Respeaker GP12 SENSOR_PIN=12)
    Grove Gesture Sensor (PAJ7620u2) connected to Respeaker I2C-Input

    Works for me.



  • @lxne said in Hardware Compatibility Question: Using the Grove Adjustable PIR Sensor & ReSpeaker Pi HAT in the Same Build?:

    My MM hardware:
    Raspberry Pi 3b+
    Respeaker 2-Mics Hat
    Grove PIR Motion Sensor (connected to Respeaker GP12 SENSOR_PIN=12)
    Grove Gesture Sensor (PAJ7620u2) connected to Respeaker I2C-Input

    Works for me.

    @lxne

    how are you using the gesture sensor? have you it behind glass/2 way mirror/plastic ?

    thanks


Log in to reply