PIR am312
-
For Halloween, it would be pretty amusing to have the PIR turn on some eyeballs like this:
https://cdn-shop.adafruit.com/product-videos/1200x900/3356-05.mp4
especially if you had about 6 of them scattered about.
-
Missed this thread last week...
Just tested mine today with 3.3V supply and I have similar current consumption, around 15ยตA on my multimeter but the full board in sleep mode. It's staying active as long as there's movement detected, and seems stable: no interference from NRF24 radio when sending updated state to gateway.But I have poor range, I'm not sure why, maybe the orientation of sensor/lens, or maybe the hot temperature, over 30ยฐC, I will do more tests tomorrow if I can.
I tested with a not very well aligned fresnel lens from a SR501 I can detect at over 4mI've got some AM612 too, with extra setting for active duration & sensibility, and an OEN pin to enable output based on analog signal (on datasheet example they use it with a photoresistor). If I believe the very similar detection profiles in the datasheets it's the same sensor but the AS312 has settings hardwired in the "can".
Not sure if 2 AA/AAA is the best solution, I would go for lithium cells. CR2032 would probably have too short battery life in a busy room (somewhere around 6 months) but bigger cells like 2477 or CR123 (>1000mAh) would last way over 1 year. Compared to AA they have the big advantage of staying over the 2.7V minimum value in the datasheet for most of their life.
-
@Nca78 do you have any updates on the sensor?
-
Not sure if 2 AA/AAA is the best solution, I would go for lithium cells. CR2032 would probably have too short battery life in a busy room (somewhere around 6 months) but bigger cells like 2477 or CR123 (>1000mAh) would last way over 1 year. Compared to AA they have the big advantage of staying over the 2.7V minimum value in the datasheet for most of their life.
In most cases I'm planning to use solar and a supercap. Then, no more batteries to change!
-
it is all a matter of node size and if you like to have solar panels around the house (never forget the WAF )
-
it is all a matter of node size and if you like to have solar panels around the house (never forget the WAF )
Good point. Even a micro panel might be stretching it on the WAF.
-
@gohan I didn't test more but I made a PCB for AM612 it will be much more convenient to make some real life testing
Sending it tomorrow to PCB production with 11 other PCBs
-
How are you using the AM612?
-
How are you using the AM612?
I don't understand what answer you're expecting for this question
I made a PCB, send it to PCB production and when I receive it I will be able to solder the am612 on it and test it.
-
how about the lens? Did you make a case for it?
-
how about the lens? Did you make a case for it?
I will test using lens from AM312 & from SR501 (made the space and holes for that on the PCB). I have ordered some other ones from AliExpress, too.
No case yet as I just spent a lot of nearly sleepless nights finishing a lot of PCBs. Now time for code preparation before I receive the boards, then 3D design and tests while the 3D printer is printing
-
I really like your PCB layouts. Is that Eagle, or some other package that you're using? I'm using Diptrace, which meets my needs and was easy to learn, but your package looks like it's more polished and easier to see both sides of the board at the same time.
-
I really like your PCB layouts. Is that Eagle, or some other package that you're using? I'm using Diptrace, which meets my needs and was easy to learn, but your package looks like it's more polished and easier to see both sides of the board at the same time.
Yes that's eagle, found it pretty easy to learn also.
But I made my last PCBs with it this week I think, I will switch to KiCad to avoid the annoying limitations in Eagle. It will be a pain to learn everything again, but at least I won't miss the autorouter as I love routing
-
Me too. Based on AWI's report above, I just went ahead and ordered them.
I received mine yesterday: so, 16 days from order until receipt from banggood.
-
@AWI Thank you for your photo. Without it, I'm not sure how I would have deduced the correct pinout.
So far I've only powered it up--and with merely a DMM attached to the output pin--but as a quick test it seems to work.
-
@AWI Thank you for your photo. Without it, I'm not sure how I would have deduced the correct pinout.
There are some tiny '+' and '-' signs on the breakout board near the pins but they are barely visible.
-
@AWI Thank you for your photo. Without it, I'm not sure how I would have deduced the correct pinout.
There are some tiny '+' and '-' signs on the breakout board near the pins but they are barely visible.
On mine I don't see any pinout markings at all.
I used a uCurrent Gold to measure the current, and and at 3.3v my measurements came out at 13.1ua in standby mode and 14.3ua at "motion detected" mode. I haven't tested it for false positives yet (it may take a while to gather the data on that), but so far I'm impressed. Nice find!
-
So, I made a little test jig to try it out. It seems to have roughly 4 detection "zones" with fairly wide gaps between them where it's more or less blind. Also, if I walk straight at it from the front, it doesn't detect me until I'm about 3 feet away. So, although I'm no expert, I'd say the detection coverage is kinda spotty. Maybe the small domed plastic optics are sub-optimal? Has anyone tried alternatives?
Just thinking out loud, but maybe you can use two and by skewing their alignment try to make it so that the gaps in one are mostly covered by the detection zones of the other, and visa versa?
Not sure how to make the best use of this yet, but I do like the very low power consumption. I think there's a pony in there somewhere, and we just need to find it.
Anyone have ideas?
-
Did that resonate with anyone? Has anyone else observed "the problem" I described? If not, maybe I set it up wrong.
-
I have experienced similar behavior yes, didn't have time to check enough but from some directions it gave me the impression not to detect anything.
It seemed better with lens from a SR501. I'm waiting for the PCB with am612 to be able to test with a properly aligned SR501 lens.
-
@Nca78
Thanks! I just now took the lens cover off an SR501 and very crudely attached it to the Banggood sensor (after first removing its cap). It seems to be an improvement. So, I expect doing a proper job of it will yield an even greater improvement.Fortunately, it looks as though there's a good variety of PIR lenses on Aliexpress for cheap.
-
the fun will be to make them fit on the sensor
-
the fun will be to make them fit on the sensor
I was thinking hot glue and a cardboard backing for prototyping, but maybe a backing which actually reflects IR (like a metal foil?) would help keep the IR bouncing around inside it more and be a good thing. Really not sure.
On the other hand, maybe there's a better lens which can snap onto the existing body. That would be better, at least from a hassle standpoint.
-
maybe make a mock pcb board of a SR501 with a hole in the middle so you can attach the lens on the board and stick the am312 in the center hole
-
maybe make a mock pcb board of a SR501 with a hole in the middle so you can attach the lens on the board and stick the am312 in the center hole
Or, as a POC, just drill a hole in the middle of an SR501 board, since the lens already snaps smartly to that board.
Does PCB need a special kind of drill bit, like for glass or something?
-
I didn't want to sacrifice a working sensor
PCB is quite fragile, so any sharp bits should be fine, just don't push too much.
-
So I guess this may mean we won't be using the bangood sensors after all. Instead we'll be buying chips and mounting them to custom PCB's, like NCA78 is doing. That is, unless there's a better lens cap that just naturally fits the body of the banggood sensor.
Which means I should order some of those PIR sensor IC's soon, given the long shipping lead times.
-
It depends on how you want to use them. Maybe for some people are fine while for others they need a longer range. It is all part of the DIY "fun"
-
For a preliminary POC, I made a lens holder with cardboard and hot glue:
and drilled a 15/32" hole in the middle for the PIR element, which I shoved in the back:
Obviously it's still crude, but it's better than my first attempt. It also performs better. It still has spotty coverage, but not as bad as before. Obviously a more properly installed and aligned lens should perform better still.
Anyhow, that's as far as I'm going to take it for now. I look forward to hearing what others might come up with, as well as their impressions about the coverage.
-
maybe removing the smaller lens could improve the sensor?
-
I did. What you see is just the holder that the regular lens snaps onto.
-
Here is my version of a holder. It is for the bigger PIR. But it holds a dhtXX, ds18b20, and a light sensor as well.
-
Nice!
On my holder, the sensor depth is presumably wrong from a focusing point of view--at least if the SR501 is a proper guide for how it should be done. The sensor should really be deeper into the cavity. I suppose that alone might make a meaningful improvement. Alas, I think that may call for mounting the sensor element onto a PCB, so that it sits flush on top.
-
@Nca78
Have you worked out the dimensions for the four holes that the SR501 lens fits into? I'm guessing so, given your shield above. I could of course try measuring the distances with a micrometer and the hole diameters with some gauged wire, but it might take a few PCB iterations to get it right. However, if you know the exact hole diameter and distance between the holes, it would be helpful if you shared that info so that we can get cracking on making custom PCB's that incorporate it.
-
@NeverDie
This is what i'm using here for my boards, and fits ok
-
Searched a bit and found this. Guess my measurements were a bit off, hope it will fit with 17.4 and a bit over 22...
I should have searched while doing the PCBReal measurements are 17.5mm and 23.3-1.45 = 21.85
-
I ran a banggood PIR sensor off my 3.3v boosted 10F supercap solar node last night and, as you would expect, the extra load was so low that it's practically a rounding error. These PIR's would have no problem being powered for days from a supercap.
@Nca78 I guess what you're calling "sensibility" on your board above is another name for sensitivity? i.e. you figured out how to adjust the sensitivity of the PIR detector? That's something not obviously accessible on the banggood PIR's, as they don't seem to come with a sensitivity adjustment. If you've already figured out how to adjust the sensitivity, would you mind sharing the schematic? It might help us avoid re-inventing the wheel if we were to follow the path you've already blazed.
-
@NeverDie haha yes it's the sensitivity sorry sometimes my English fails and I mix with French words
I will fix on the PCB.This can be set only on am612, I bought the sensor only (no breakout board) on AliExpress. It has 6 pins for the extra settings instead of the 3 of the am312.
-
@NeverDie haha yes it's the sensitivity sorry sometimes my English fails and I mix with French words
I will fix on the PCB.This can be set only on am612, I bought the sensor only (no breakout board) on AliExpress. It has 6 pins for the extra settings instead of the 3 of the am312.
Good to know. Does it draw the same or comparable amount of current as the am312? If so, you've just saved me from ordering the wrong sensor!
-
Good to know. Does it draw the same or comparable amount of current as the am312? If so, you've just saved me from ordering the wrong sensor!
The datasheets are similar for everything that is not related to the extra pins of course: same electrical specs, same detection profile, ... My guess is it's the same PIR sensor but on am312 some of the settings are just hardwired inside the "can".
-
Cool! I'm going to follow your lead and order some of the am612's then. Thanks for the heads up!
-
sensitivity can be adapted in sw
-
sensitivity can be adapted in sw
For am312 ? How would you do that when all you have are Vcc, GND and signal pin ?
-
-
Not sure if this is the same as the SR501 lens. Really hard to tell from the photo:
https://www.aliexpress.com/item-img/5Pcs-Lot-PIR-human-body-infrared-sensor-lens-Mini-lens-high-quality/32563535500.html?spm=2114.10010108.1000017.1.oavh25
If anyone finds a confirmed source for SR501 lenses, please post.
-
SR501 lens is referenced as 8002-2. But it seems all those big fresnel lenses with 4 pins are the same, I suppose one original maker and a bunch of copycats.
-
sensitivity can be adapted in sw
For am312 ? How would you do that when all you have are Vcc, GND and signal pin ?
with timers. but, it's a bit more power hungry if using simple 8bits mcu, not a problem with more powerful mcus like ARM etc. which have more low power features.
-
with timers. but, it's a bit more power hungry if using simple 8bits mcu, not a problem with more powerful mcus like ARM etc. which have more low power features.
Still not getting it
This sounds more like a solution to manage "on" time when triggered but I don't get how this could make your sensor detect at 5m instead of 3m ?
-
@Nca78
oki. lol i messed a bit with terms too yes for "on" time.
for 5m instead of 3m, this will depends of sensor quality and its lens. I think in datasheet they give a max range for an ideal lens, or that wouldn't make sense to get long range with a crappy lens..
-
@Nca78
oki. lol i messed a bit with terms too yes for "on" time.
for 5m instead of 3m, this will depends of sensor quality and its lens. I think in datasheet they give a max range for an ideal lens, or that wouldn't make sense to get long range with a crappy lens..So, Scalz, are you saying that out of the box, the am312 is hard-wired for max sensitivity, and then to get lower sensitivity, you add impairments, such as a lower duty cycle (less "ON" time) and/or a crappier lens? Wow, is that how this stuff is actually meant to work? I was hoping that maybe the am612 could be optionally tweaked for more sensitivity than the am312. If I'm understanding you (and if you're right), though, then I guess that won't be possible. I had assumed (perhaps wrongly) that the am312 defaulted to a "medium" amount of sensitivity, not a maximum amount of sensitivity. Do you happen to know whether am312 defaults to maximum sensitivity or not?
-
Anyhow, looking at the reference circuit design in the am612 "sensor manual" (see page 7 of http://akizukidenshi.com/download/ds/senba/Pir-Am612.pdf), I see that there is a photoresistor (a GL5528) there. Is it somehow adjusting the sensitivity based on the ambient light level? The GL5528 appears to be sensitive to 540nm light (i.e. green light) according to its datasheet
(http://akizukidenshi.com/download/ds/senba/GL55 Series Photoresistor.pdf). I'm not sure that's a trick that the am312 can do. Can it?I just love these Ford vs. Chevy debates.
By the way, where should that photoresistor be positioned? Under the IR lens, or should it have its own window? I'm guessing under the IR lens to keep things "tidy".
-
I just love these Ford vs. Chevy debates.
We are French, we only have Peugeot vs Citroรซn debates, or Renault vs Peugeot
Else @scalz misunderstood what we were talking about, he was just talking about changing the "on" duration of the sensor by software (as it's fixed on the am312). No the sensitivity.
About the photoresistor in the doc is connected to the OEN pin (Output ENable) of the AM612 (one more pin the am312 doesn't have), so that with the reference design it will only trigger and switch on the light when it's dark.
-
I recieved mine today and changed a HC-SR501 on a working Slim node to this but I failed to make it work.
I then tried to remove the voltage regulator (red arrow) and solder the jumper (blue) to power it from the bat but even with fresh batterys... no go! I watched the circuit to make sure i found VCC/GND and out but maybe i understood something wrong.The second i put the old HC pir back that one worked again.
Any ideas?
-
Any chance you hooked up the polarity wrong when you tried it out? I did that to one of my three and completely fried it. It's dead.
Your PCB looks the same as mine, but the silkscreen is different. The polarity you marked on your photo looks correct to me, and it agrees with the "+" sign on your silkscreen. Mine didn't come with a "+" on the silkscreen.
Unrelated to your question, but I notice that yours came with a different lens. Do you have a link to where you bought yours?
-
@NeverDie http://www.ebay.com/itm/262527326905?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
I had two and tested them, maybe I fried them... but i dont think so.
-
Check to see how much current it's drawing when you have it powered up. If it's fried, it will be drawing more than expected.
Also, try connecting a voltmeter between the middle pin and ground with it powered on. When it detects motion, you'll notice a change in voltage.
-
The lens in your photo doesn't appear to match the lens in the ebay listed where you got it from. The lens in the ebay listing is the kind I have, which I'm not happy with. I hope you get yours working, as it would be nice to know if your lens works better than mine.
-
@NeverDie thanks for your tips!
Will try it out and let you know about the lens.
-
I just now threw together a primitive barebones breakout board for the AM612:
It wastes a lot of space because of the large SR501 lens cover that it's meant to go with. Also, it's really just "Plan B", as I'm hoping Version 1 of NCA78's PIR shield will work.
Nonetheless, if anyone wants the PCB files for my primitive breakout board, I can post them.
-
@NeverDie - well both modules draw 12uA and changes to 111uA on motion... reading on VCC. That would suggest they are working... strange I cant get an interupt then... I also see the battery voltage in motion and 0v when not on signal out... so thanks for the tips... the module is working. I just need to figure out why it doesnt trigger the interrupt.
I will work some more on this later... only thing that can trigger a interrupt is me touching the metal pinheader. Tried adding a capcitor but no luck.
-
@sundberg84 said in PIR am312:
@NeverDie - well both modules draw 12uA and changes to 111uA on motion... reading on VCC. That would suggest they are working... strange I cant get an interupt then... I also see the battery voltage in motion and 0v when not on signal out... so thanks for the tips... the module is working. I just need to figure out why it doesnt trigger the interrupt.
I will work some more on this later... only thing that can trigger a interrupt is me touching the metal pinheader. Tried adding a capcitor but no luck.
Maybe your circuit needs a pull-up or pull-down resistor on the interrupt pin to make it work? That's what it sounds like.
-
@NeverDie - A good idea again... just took for granted that was handeled in the sensor since im used to that with the other pirs... silly me. I will give it a shot later.
-
I got my am312 and I confirm the blind spots and a range of about 3 meters. I'll have to try to use a bigger lens from the 501 and see what happens.
PS I also compared side by side with a radar sensor and have to say I am impressed with the sensibility and the "all-around" visibility
-
@sundberg84 Did you get it working? I have exactly the same problem.
I added a 10K pullup resistor but still no luck.
-
@maghac - no and I didnt have time to try the pulldown either. My next step would be a transistor. I see a current reaching 114uA when triggered so the module works but maybe 114uA isnt enough to trigger the interupt? Someone that knows?
-
@sundberg84 said in PIR am312:
@maghac - no and I didnt have time to try the pulldown either. My next step would be a transistor. I see a current reaching 114uA when triggered so the module works but maybe 114uA isnt enough to trigger the interupt? Someone that knows?
I never actually hooked mine up to an atmega328p. I just had it in a test jig, where an nfet turned on/off an LED based on the voltage of the middle pin. That worked fine.
-
So I soldered an am612 to NModule PIR shield, put an SR501 lens but unfortunately I experience a similar behavior with some blind zones where I can move with the PIR bothering to trigger. I'll do more tests (especially when playing with sensitivity, it's supposed to be at max value now) but it is disappointing at the moment
-
If you move across its field of view it triggers without many problems but when moving towards the sensor in those "blind spots" you can get almost in front of it without being detected. Agreed it is very annoying
-
I never actually played around with SR501's. Do they have the same type of "blind spot" issue? I know that for professional grade motion detectors, it's not uncommon to have two PIR's inside them. I had always thought it was for avoiding false alarms, but maybe it's more of a coverage issue.
-
The SR501 I tested at home has actually better range and coverage. I am now testing the radar sensors and they seems interesting as they "see" through walls too
PS of course radar sensors are good only for powered sensors
-
The SR501 I tested at home has actually better range and coverage. I am now testing the radar sensors and they seems interesting as they "see" through walls too
PS of course radar sensors are good only for powered sensors
Yes radar sensors seem great, I have received one (5.8GHz version with 2 PCB boards) and ordered RCWL-0516. I will test them for detection through my false ceiling, but I'm not sure they will be stable when powered using HLKs ?
-
there is only one way to find out.
-
there is only one way to find out.
Yes and I will but I have so much MySensors stuff to finish first, I will have to stay frustrated about that for some time
-
I received the generic lens (on the right), which looks different than the SR501 lens (on the left):
I don't know if it's better or worse, as I haven't yet received my am612's. The good news, though, is that it's a very good fit for my primitive breakout board (shown in the photo on the right). I haven't yet received NCA78's breakout board, but I believe we're using the same spacing on our lens attachment holes.
-
I received my lenses too today. In black color (but should not change the behavior, it's just for aesthetics).
Exactly the same lens design as the SR501 version. i hope your version will give better results as it's very different.I'll still install some AM612 PIRs in my home and see if the "problem" is really one when installed on ceiling to detect presence in a room. Else the next solution is to make a board with 2 PIR's with different orientation/rotation.
-
Have you tried mounting either the am612 or the lens at different heights? It seems we're shooting in the dark a little bit as to whether it's even focused as it should be or not.
It's not clear why this sensor would be worse than others in terms of blind spots. Aren't blind spots an optics issue?
-
For anyone who is interested in this topic, I posted some comments about the am612 on this other thread: https://forum.mysensors.org/topic/5986/pir-am312-412-612
It may have some relevance to the am312.