DIY Smarter Motion Detector With People Counter

Поділитися
Вставка
  • Опубліковано 26 лют 2023
  • What if your motion sensor did more than just notice when someone walked into a room? What if it could tell you how many people walked into the room? In the follow up to the Shelly Motion Sensor breakdown video, I'm going to build a motion sensor that can tell how many people have entered or exited a room accurately.
    Please consider supporting the channel so I can keep exploring and building Smarter Circuits:
    / smartercircuits
    gofund.me/6d4c6348
    Code on the GitHub repo
    github.com/SmarterCircuits/pe...
    If you're interested in the electronics shown in the video, here are the links!
    Passive IR motion sensor
    amzn.to/3J6SujT
    IR Laser
    amzn.to/3ZomD3j
    IR break beam sensors
    amzn.to/3KKgWZl
    Raspberry Pi Pico W
    amzn.to/3KLGZj3
    Sense Hat (C) with temperature and humidity sensor, barometer, accelerometer, magnetometer, color sensor, and ADC
    amzn.to/3kuisnF
  • Наука та технологія

КОМЕНТАРІ • 13

  • @user-wf2ih6vi6q
    @user-wf2ih6vi6q 8 місяців тому +1

    Sorry I am new to this hobby. Could you explain the role of each of the 3 sensors on the device? I am confused why the passive IR motion sensor is facing the wrong direction as well. Thanks!

    • @smartercircuits
      @smartercircuits  8 місяців тому

      The Passive IR is mounted on the side to monitor the room, the break beam sensors pick up a person passing in either direction. The current sensor and photoelectric didn't get implemented, but were originally to detect light levels the way the Shelly does, but really it's even more novel that the device is already and it was a pain to set up, so I skipped it. The IR laser is there to provide scattered light when an object passes in front of it. There are some objects or materials that may not reflect enough light, but that where some modification to the code handling the messages sent by this device could use the motion detection in the room as a backup indicator. This is really just a proof of concept build, you may have more luck with actual break beams if you can get strong enough ones. I have some, but they require much higher power. I first illustrated this concept in this video: ua-cam.com/video/edj6Fn3FFnE/v-deo.html

  • @user-wf2ih6vi6q
    @user-wf2ih6vi6q 8 місяців тому +1

    Hello, what changes would you recommend to make the device smaller?

    • @smartercircuits
      @smartercircuits  8 місяців тому

      If you could get a 3d printed case and find a way to omit the IR laser, place one or two on the other side of the doorway, and use them as normally closed instead of normally open as I'm doing in this video because I'm using the light being detected in the way the beam being broken would normally work.

  • @gnaneshwarreddydyapa5389
    @gnaneshwarreddydyapa5389 6 місяців тому +1

    I am working on a project where i need to detect only one person entering the door as ok and 2 persons entering simultaneously (un leagally) should be warned. I prefer usinf arduino uno and its senors. What would you suggest sir

    • @smartercircuits
      @smartercircuits  6 місяців тому

      There's a few different things you could try, but it will depend on a few things like whether or not there's a door or just a doorway. I would say break beams would be a good tool, but I've had trouble finding ones with the distance required--which is why I used the IR laser and two beam sensors to detect it. But, this isn't perfect. One more dependable solution I can think of is a pad with load sensors under it giving you the ability to calculate the weight on the pad. That way you could say over a certain weight threshold you're likely looking at more than one person--although, even that has flaws with edge cases.
      If you can find good break beams, I think they'll be the best bet for ease of installation, but if someone is actively trying to cheat the system, it wouldn't be that hard. Something a little more complex, but much more accurate and dependable would be to somehow use computer vision and a small camera mounted on the top of the doorframe looking down. You could identify moving masses and determine if there is more than one. I'm not sure if this is possible with Arduino, but I would imagine it is at least to some extent.
      I hope this helps and I wish you luck!

    • @gnaneshwarreddydyapa5389
      @gnaneshwarreddydyapa5389 6 місяців тому +1

      There's no door. It's just an entrance when we need to detect only 1 person entering at a time. If multiple persons enter together it should alarm

    • @smartercircuits
      @smartercircuits  6 місяців тому

      I think computer vision is your best bet. It would too easy for two people to stay close enough together to fool a break beam or even presence sensor. The link below may be a good place to start researching that. Another possibility I thought of is LiDAR, but it's a little pricey and could be finicky to set up, I have a LiDAR module that I've been planning to do something with, perhaps I'll experiment and see if this problem could be solved this way.
      www.robotique.tech/robotics/detection-and-tracking-of-a-moving-object-using-a-webcam-controlled-by-arduino/

    • @gnaneshwarreddydyapa5389
      @gnaneshwarreddydyapa5389 6 місяців тому

      @@smartercircuits thank you sir.... Finally got an practical solution

  • @hectorsalamanca4147
    @hectorsalamanca4147 3 місяці тому

    I would like to make a motion sensor for airsoft so that i can see how many people are there and where they are through goggles or a gadget

    • @smartercircuits
      @smartercircuits  2 місяці тому

      If you mean by setting up sensors in zoned locations before a match and then streaming that data to some sort of reticle or other HUD, I could see that being possible but much more complex than a UA-cam comment section has room for and I would have to sit down and really plan that out. Reliability would also likely depend highly on how much money you spend as well as how much work you put in.
      If you want a device that can "scan" from your location, you're probably looking at something that would be carried in a case and have an array of various sensors and require some minor deployment procedure, but I suspect this isn't what you had in mind. Having a pair of goggles that could find where people are in an almost Call of Duty mini-map sort of way is probably possible to some degree--and the military would be all over it--but also very, very expensive.
      If you have a way to set up the previously mentioned array of sensors, I would recommend a combination of microwave zone sensors--being careful not to get them so close they interfere with one another--and LiDAR. This could also get rather expensive and you risk the units taking fire as they would have to be within height range of the targets and have LOS. I know this isn't particularly encouraging, but it's the best I can think of.

  • @TheFatBastid
    @TheFatBastid Рік тому

    Have you seen the one Everything Smart Home has made? Thoughts on it?

    • @smartercircuits
      @smartercircuits  Рік тому

      I had not until just now. That looks great, and I love the wave detection sensor! I'll look more into this one, but I still like the absolute value of the break beam turn-style thing, though it's easy to bypass as a security device. I'll be building a better case for it, but really it's much more conceptual than prototypical anyway. I hope to inspire those who want to get more hands-on--DIY enthusiasts and the like. I think Everything Smart Home's device is probably much nicer aesthetically and functionally--especially where security might be concerned. I strictly use computer vision and PIR sensors for that at the moment.