RooDe - A "reliable" PeopleCounter



  • Today is finally the day where i write about my lovely project: RooDe.
    RooDe is a fairly low price reliable PeopleCounter using the MySensors library for communication. The project started as a university project about 2 years ago. I started with a scientific research about exisiting products, people counting techniques and so forth.
    The main goal was to built a low price but reliable people counting system for door ways. I tried a lot of diffierent methods and sensors and ended up with a good combination (two SHARP IR sensors). The system is working very well for me and i use it (passive) nearly every day since then.

    After the university project i continued the development, fixed a lot of bugs, made the system even more reliable, modular and cleaner. At the moment i am switching to fairly new sensors, the VL53L0X which are much better for that prupose due to the non analog interface (which caused a lot of problems...). I refactored the whole project and created a new repository on GitHub: https://github.com/Lyr3x/Roode

    Features:

    • Configurable Setup
      • Different measuring sensors
      • OLED support (displaying the counter and boot up Info)
      • PIR for wakeup after sleep
      • Push-Button support for manual counter change on the hardware itself (not finished yet)
    • Calibration system for your own environment
      • Threshold calculation using standard deviation
      • Recalibration via Domoticz
      • Update Counter via Domoticz
    • Domoticz setup to control Roode and automate things
    • BatteryMode - With a pair of 18650 i used the system for about 3 month.
      • Battery management can be improved though!
    • STL files for a 3D printable enclosure (Available via GitHub)

    Hardware used:

    • Any Atmel 328P AVR (Arduino Pro Mini 5V is working well)
    • 2x VL53L0X/VL53L1X or SHARP gp2y0a02yk0f 20-150cm (dont use them anymore!)
      • The VL53XXX are using I²C and are much more reliable up to 2m/4m
      • The Sharp Sensors are analog sensors which causes a lot problems.
    • HC-SR501
    • 1x NRF24L01+ incl. Power Adapter
      • Alternative: RFM69 or ESP8266
    • 1x CP2101 Micro USB TTL Adapter and used as power supply
    • 1x 128x32 OLED Display (Optional)

    I have a lot more ideas and plans how to improve RooDe and hope some guys will test the system and give me some feedback. I would really appreciate some feedback about the code itself. I think there is a lot to improve.
    Feel free to open issues and contribute to the project!

    Some of my ideas where i would really appreciate some support:

    • Developing one PCB with all the stuff integrated to make the whole system much smaller and less messy -> If anyone with experience wants to help me to achieve this i would very appreciate a message.
    • Developing support for the VL53L1X
      • These new sensors support programmable ROI position -> Its possible to define two ROI's to count people with one sensor or we can cover 4 ROI's with two sensors to make it possible to count 2 people entering simultaneously. Need to get two sensors to implement this.
    • OTA update mechanism (Not sure if this is a good idea though)

    I'll attach some pictures of the development process. Hope you like the idea and implementation Cheers!
    RooDe latest changelog:
    You will always find the lates changes on GitHub. Check always the dev branches!

    Changelog v0.9.6

    • added full VL53L0X support
    • measruing speed improvements
    • Fixed receiving and sending message issues
    • Added OLED brightness config option
    • general bug fixes and improvements

    Thread Changelog:
    2.12.18:

    • Removed the old Circuit plan as it is maybe confusing
    • Updated Goals
    • Added a few more pictures

    The first self soldered circuit (was working good) prototype
    1_1543592637580_Platine_klein_oben.jpg
    This is the first iteration of enclosure without the OLED panel
    0_1543592637579_Gehaeuse_montiert.jpg

    The new design preview with the VL53L0X-Sensors
    0_1543592812633_be99e35c-d576-41f1-8f38-3001addd06da-image.png



  • Interesting. Is it really foolproof? What happens is two people go through side by side?


  • Mod

    @alowhum then it will cut them down with a frickin laser beam



  • @alowhum @mfalkvidd is totally right. You will get 4 (straight cutted) people parts.

    Because the system needs to be mounted in a doorway or sth. like that it is only possible to count one person at a time. For me it is not a real world problem because i never enter a room with a second body next to me, do you?

    Regarding foolproofnes: It is more or less. The system itself should be plug and play (due to the self calibration function) and the domoticz part (a how to setup guide is included) isnt that complicated.



  • @mfalkvidd said in RooDe - A reliable PeopleCounter:

    @alowhum then it will cut them down with a frickin laser beam

    Doorways are space constrictive, and a lot cheaper to run 😉
    Plus cheaper to clean up the mess of severed limbs



  • @zboblamont Wouldn't it throw the count off if the people are in multiple pieces?



  • @Kai-Bepperling I used to teach about the design of smart technology, and the people counter was a classic. Students would always build concepts on top of the idea that they could reliably count how many people were in a room, or if an elderly person had fallen, etc.

    These things never were as reliable as they needed to be. There were always edge cases. People waltzing into the room. two people carrying a large packet together. People coming in through the window. People walking out halfway, changing their mind and walking back in. Children that are too short to be counted. The list is endless and more importantly, impossible to completely predict. You only know your own culture, but in other cultures there are even more edge cases.

    So "reliable" is something I'm very interested in, but it's also a term that is totally relative. No people counter will ever be 100% reliable.



  • @alowhum Well you are totally right there are many edge cases and situations where people counter cant work realiable. But if you think about your home automation universe, how often these edge cases coming along?
    To clarify: Reliable in this context means the system is capable to count one person at a time walking through a doorway or any two walls in range of 4 meters.

    These things never were as reliable as they needed to be.

    That depends on your expectations. At least two persons walking every day through a Roode setup and of course it happens every week that i need to tune the counter manually via the domoticz app. I tried multiple methods and sensors to count people. In my opinion you dont need a 100% reliable people counter covering every edge case and scenario.

    People coming in through the window.

    Seriously?

    This project is not an industrial standard system, which should used as an alarm system or sth. like that. It's counting people to turn your fan and lights on. But if you entering your rooms through the window put another system behind your window...

    People walking out halfway, changing their mind and walking back in

    Is covered.

    Children that are too short to be counted.

    If possible adjust the size. Everything between hip and shoulder works fine.

    Summary:
    The system is built to use in a private smart home stuff scenario, where you don't enter your room and jump out of the window. If you carry something out of room and you don't do that every day the system will give you a huge benefit in laziness and don't bother you with unreliability.
    I don't cover gigantic doorways where crowds entering a room simultane. There are also cats and birds who are not countable too.

    No people counter will ever be 100% reliable.
    To be hones. No sensor every will be.

    I got your points and you are right, but in my opinion you should adjust your expectations within the context. I did not advertised a 100% reliable but a reliable system. But i added some "" to make the title not to confusing


  • Admin

    @Kai-Bepperling I have been wanting to make something like this for years. I keep getting sidetracked so I have never completed anything. I am excited to try this method at some point. I have a few rooms where this would work much better than the motion sensors I have now. Thank you for posting this.



  • @petewill Very happy to hear that you are interested! If you have any questions feel free to ask.

    I was very productive this weekend and i have some pictures of the new enclosure for you guys. The enclosure is made to use an Arduino Pro Mini (top right), an NRF24L01+ with adapter (top left), OLED Display (top center), PIR, center and two VL53L0X

    2_1543782371321_WallMount.png 1_1543782371321_Inside_with_electronics.png 0_1543782371319_Complete.png


 

388
Online

8.0k
Users

8.8k
Topics

94.3k
Posts