Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. OpenHardware.io
  3. 💬 AM612 Passive Infrared Sensor Breakout Board

💬 AM612 Passive Infrared Sensor Breakout Board

Scheduled Pinned Locked Moved OpenHardware.io
41 Posts 12 Posters 5.0k Views 9 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sundberg84S sundberg84

    Are you happy with this sensor? I mean, compared to HC-SR501 this must be a breeze to use on a PCB (size and 3 resistors only?)?
    How do you grade it in motion detection compared to HC-SR501? Is this a sensor you recommend if you want to build a motion dec PCB?

    NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by
    #4

    @sundberg84 said in 💬 AM612 Passive Infrared Sensor Breakout Board:

    Are you happy with this sensor? I mean, compared to HC-SR501 this must be a breeze to use on a PCB (size and 3 resistors only?)?
    How do you grade it in motion detection compared to HC-SR501? Is this a sensor you recommend if you want to build a motion dec PCB?

    Answers: yes, yes, don't know, yes

    1 Reply Last reply
    1
    • NeverDieN Offline
      NeverDieN Offline
      NeverDie
      Hero Member
      wrote on last edited by
      #5

      I updated the module to be plug compatible with the Multi-Sensor:
      https://www.openhardware.io/view/510/Multi-Sensor-TempHumidityPIR-LeakMagnetLightAccel

      1 Reply Last reply
      0
      • NeverDieN Offline
        NeverDieN Offline
        NeverDie
        Hero Member
        wrote on last edited by NeverDie
        #6

        Updated files to version 503 so that the PIR is better centered above the multi-sensor.

        1 Reply Last reply
        0
        • O Offline
          O Offline
          Omemanti
          wrote on last edited by
          #7

          Looks awesome, do you by chance have the schematic as a PDF?

          NeverDieN 1 Reply Last reply
          0
          • O Omemanti

            Looks awesome, do you by chance have the schematic as a PDF?

            NeverDieN Offline
            NeverDieN Offline
            NeverDie
            Hero Member
            wrote on last edited by NeverDie
            #8

            @omemanti said in 💬 AM612 Passive Infrared Sensor Breakout Board:

            Looks awesome, do you by chance have the schematic as a PDF?

            OK, I just now uploaded the PDF schematic for version 506, which is a newer (more simplified) version than the actual gerber files. I'll update the gerber's later. Version 506 is the most current version.

            O 1 Reply Last reply
            0
            • NeverDieN NeverDie

              @omemanti said in 💬 AM612 Passive Infrared Sensor Breakout Board:

              Looks awesome, do you by chance have the schematic as a PDF?

              OK, I just now uploaded the PDF schematic for version 506, which is a newer (more simplified) version than the actual gerber files. I'll update the gerber's later. Version 506 is the most current version.

              O Offline
              O Offline
              Omemanti
              wrote on last edited by
              #9

              @neverdie Thankyou!

              1 Reply Last reply
              0
              • NeverDieN Offline
                NeverDieN Offline
                NeverDie
                Hero Member
                wrote on last edited by
                #10

                i uploaded all the files now for version 506, which is the most current version. Version 506 requires fewer components than earlier designs.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  BC547
                  wrote on last edited by
                  #11

                  The link to the PIR lens does not seem to work anymore (404 not found error).
                  Did you try e.g. https://www.aliexpress.com/item/10PCS-Infrared-Sensor-8308-4-mini-White-Fresnel-Lens-body-pyroelectric-PIR/32780943866.html ? This lens seems even smaller. Or are there disadvantages to being too small?

                  NeverDieN 1 Reply Last reply
                  0
                  • B BC547

                    The link to the PIR lens does not seem to work anymore (404 not found error).
                    Did you try e.g. https://www.aliexpress.com/item/10PCS-Infrared-Sensor-8308-4-mini-White-Fresnel-Lens-body-pyroelectric-PIR/32780943866.html ? This lens seems even smaller. Or are there disadvantages to being too small?

                    NeverDieN Offline
                    NeverDieN Offline
                    NeverDie
                    Hero Member
                    wrote on last edited by
                    #12

                    @bc547 said in 💬 AM612 Passive Infrared Sensor Breakout Board:

                    Or are there disadvantages to being too small?

                    Optics aren't as good. Also, unless the radio and power source are equally small, you don't get the advantage of the smaller size.

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      waspie
                      wrote on last edited by
                      #13

                      does anyone have a sample sketch for this. i don't understand the whole pin assignment thing well enough to know what the heck i'm doing.

                      I grabbed the sketch from the 10 year pir but this seems much more geared to the nrf52

                      mfalkviddM O 2 Replies Last reply
                      0
                      • W waspie

                        does anyone have a sample sketch for this. i don't understand the whole pin assignment thing well enough to know what the heck i'm doing.

                        I grabbed the sketch from the 10 year pir but this seems much more geared to the nrf52

                        mfalkviddM Offline
                        mfalkviddM Offline
                        mfalkvidd
                        Mod
                        wrote on last edited by
                        #14

                        @waspie just use the same sketch and wiring as in https://www.mysensors.org/build/motion except that AM612 wants 3.3V instead of 5V.

                        W 1 Reply Last reply
                        0
                        • mfalkviddM mfalkvidd

                          @waspie just use the same sketch and wiring as in https://www.mysensors.org/build/motion except that AM612 wants 3.3V instead of 5V.

                          W Offline
                          W Offline
                          waspie
                          wrote on last edited by
                          #15

                          @mfalkvidd
                          yeah, I don't think that's working. I think I may understand better why not, so correct me if I'm wrong.

                          The low power comparator only works on analog inputs and in the nrf51 board by @NeverDie the SCL marked pin on the board is tied to P0.10 which has no analog input on it.

                          So, what I think I need to do is cut the trace and re-route it to the INT marked on the board which is tied to P0.03 which is analog 1 (AIN1). At that point then I think I only need to change the line in the sketch to use pin 3 instead of 2.

                          mfalkviddM 1 Reply Last reply
                          0
                          • W waspie

                            @mfalkvidd
                            yeah, I don't think that's working. I think I may understand better why not, so correct me if I'm wrong.

                            The low power comparator only works on analog inputs and in the nrf51 board by @NeverDie the SCL marked pin on the board is tied to P0.10 which has no analog input on it.

                            So, what I think I need to do is cut the trace and re-route it to the INT marked on the board which is tied to P0.03 which is analog 1 (AIN1). At that point then I think I only need to change the line in the sketch to use pin 3 instead of 2.

                            mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by
                            #16

                            @waspie sorry. I didn't realize you're using NRF5. I thought you wanted to connect it to a "regular" Arduino like Nano or Pro Mini.

                            I don't have any experience with NRF5 unfortunately, but hopefully someone else can help.

                            1 Reply Last reply
                            1
                            • W waspie

                              does anyone have a sample sketch for this. i don't understand the whole pin assignment thing well enough to know what the heck i'm doing.

                              I grabbed the sketch from the 10 year pir but this seems much more geared to the nrf52

                              O Offline
                              O Offline
                              Omemanti
                              wrote on last edited by Omemanti
                              #17

                              @waspie you might want to look at one of my projects on openhardware. It has a sketch on it. It also uses the am612

                              1 Reply Last reply
                              0
                              • W Offline
                                W Offline
                                waspie
                                wrote on last edited by
                                #18

                                Thanks.
                                I'm really not too good at writing arduino code but I did come across this library:
                                https://github.com/mristau/Arduino_nRF5x_lowPower

                                Is this something that could be incorporated into the sketch and then use "normal" interrupts?

                                1 Reply Last reply
                                0
                                • nagelcN Offline
                                  nagelcN Offline
                                  nagelc
                                  wrote on last edited by nagelc
                                  #19

                                  Don't cut your trace just yet. You can use normal interrupts with MySensors and NRF5, at least if you are sleeping the node. I have used the normal Mysensors sleep statement, with interrupts for buttons, and not had to use the LPCOMP. The motion sensor should work similarly. I have used interrupts on P0.27 for a button interupt, which is regular GPIO pin and not an analog pin. I have also used 2 interrupts in the sleep statement, which means the MySensors NRF5 code probably uses GPIOTE instead of LPCOMP for interrupts. Might not be as low power as LPCOMP, but it seems to be more flexible.
                                  I used an NRF52832, haven't tried with a NRF51 board.

                                  O 1 Reply Last reply
                                  0
                                  • nagelcN nagelc

                                    Don't cut your trace just yet. You can use normal interrupts with MySensors and NRF5, at least if you are sleeping the node. I have used the normal Mysensors sleep statement, with interrupts for buttons, and not had to use the LPCOMP. The motion sensor should work similarly. I have used interrupts on P0.27 for a button interupt, which is regular GPIO pin and not an analog pin. I have also used 2 interrupts in the sleep statement, which means the MySensors NRF5 code probably uses GPIOTE instead of LPCOMP for interrupts. Might not be as low power as LPCOMP, but it seems to be more flexible.
                                    I used an NRF52832, haven't tried with a NRF51 board.

                                    O Offline
                                    O Offline
                                    Omemanti
                                    wrote on last edited by Omemanti
                                    #20

                                    @nagelc I also use normal interrupts. No problems here. Up to 22uA while sleeping, that's fine by me. (3 AAA will last a long time)

                                    1 Reply Last reply
                                    0
                                    • W Offline
                                      W Offline
                                      waspie
                                      wrote on last edited by
                                      #21

                                      yeah well i got a few nrf51822 which was evidently a big mistake

                                      O 1 Reply Last reply
                                      0
                                      • W waspie

                                        yeah well i got a few nrf51822 which was evidently a big mistake

                                        O Offline
                                        O Offline
                                        Omemanti
                                        wrote on last edited by
                                        #22

                                        @waspie why?

                                        1 Reply Last reply
                                        0
                                        • W Offline
                                          W Offline
                                          waspie
                                          wrote on last edited by
                                          #23

                                          They don't seem to play well and seems like most or any of you guys messing with NRF5x are preferring nrf52.

                                          I have however figured out one problem. Whenever my nrf51 was sleeping i was seeing 1ma current which is a deal killer. I accidentally discovered that disconnecting the st link and replugging it got sleep current to ~5ua. Something about uploading the program puts it in some state whereby it won't sleep properly.

                                          So, I can get it to sleep all the way down now and I'm starting to understand the psel refsel stuff. And, I can make it trigger on p0.03 (an4 or 5, whatever) but its not particularly reliable. I need to get this section right:

                                          void activateLpComp() {
                                            NRF_LPCOMP->PSEL=4; // monitor AIN0 (i.e. pin P0.02 on nRF52832 PIR Motion Sensor v607).
                                            while (!(NRF_LPCOMP->PSEL==4)) {} //wait until confirmed
                                            NRF_LPCOMP->REFSEL=2;  // choose 1/2 VDD as the reference voltage
                                            while (!(NRF_LPCOMP->REFSEL==2)) {} //wait until confirmed
                                            NRF_LPCOMP->ANADETECT=0;  //detect CROSS events on PIR detection pin
                                            while (NRF_LPCOMP->ANADETECT!=0) {} //wait until confirmed
                                            NRF_LPCOMP->INTENSET=B1000;  //Enable interrupt for CROSS event
                                            while (!(((NRF_LPCOMP->INTENSET)&B1000)==B1000)) {} //wait until confirmed
                                            NRF_LPCOMP->ENABLE=1;  //Enable LPCOMP
                                            while (!(NRF_LPCOMP->ENABLE==1)) {} //wait until confirmed
                                            NRF_LPCOMP->TASKS_START=1;  //start the LPCOMP
                                            while (!(NRF_LPCOMP->EVENTS_READY)) {}  //wait until ready
                                            
                                            NVIC_SetPriority(LPCOMP_IRQn, 15);
                                            NVIC_ClearPendingIRQ(LPCOMP_IRQn);
                                            NVIC_EnableIRQ(LPCOMP_IRQn);
                                          }```
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          17

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular