3

I'm working on a project similar to a security camera with a Raspberry Pi NoIR Camera Module v2 and a FLIR Lepton 3.5 on a purethermal 2.

I am somewhat new to this and am not sure how to proceed. I need to have the program trigger from a motion detector (PIR) attached to a GPIO pin and activate either the camera or FLIR depending on the time of day. I also need the system to store 5 jpegs a second of the stream while there is still motion. I am currently attempting to run video and use gstreamer to convert certain frames to jpeg because this seems more reliable than the still features. Any help would be appreciated.

Does anyone know how to capture and switch between these cameras as well as continue the stream while there is motion?

Ben0547
  • 31
  • 1

1 Answers1

1

Question

Let me summarize your project.

  1. You have two cameras, one day camera, another, night camera.

  2. You have one PIR sensor, connected to Rpi which gets alerted if a naughty cat comes in.

  3. If it is day time, Rpi switches on camera and starts streaming video, extracts to 5 jegs a second and stops as soon as the thing has left.

  4. Similarly the night camera at night.

Short Answer

Some time ago I used Rpi, Rpi Camera, and also cheap Logitech web cameras to do similar things and found many open software tools and libraries helpful.

Now I have learnt how to use python to interface real time clock DS3231. Perhaps I can do system integration this time, starting with PIR. Perhaps I can also add Google Tensor Flow cat face detection, ...

pir modules

web cam and mon

References

AI to identify cats 2012 and 5000 species 2017 - Dave Gershgorn 2017apr11

Cats vs Dogs Leveraging Convolutional Neural Networks and Google Colab Free GPU - Greg Surma 2018nov18

Edge TPU - cloud google

Coral Local/Offline AI (Mendel/Debian, Tensor Flow Lite, Python) - Google

Edge TPU USB Accelerator (Raspberry Pi, Debian) - USD$74.99 https://coral.withgoogle.com/products/accelerator/ https://coral.withgoogle.com/tutorials/accelerator-datasheet/

Update 2019apr11htk1049

More References

Adafruit PIR Sensor Tutorial - Introducing PIR https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/overview

Adafruit PIR Sensor Tutorial - Connecting to PIR https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/connecting-to-a-pir

Adafruit PIR Sensor Tutorial - Testing PIR https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/testing-a-pir

PIR BISS00012 Micro Power PIR Motion Detector IC Datasheet - Shanghai JX 2005 http://www.ladyada.net/media/sensors/BISS0001.pdf

PIR BISS00012 Micro Power PIR Motion Detector IC Datasheet in Chinese - Shanghai JX 2005 http://www.ec66.com/market/sheet/biss0001.pdf

AliExpress PIR sensor module catalog https://www.aliexpress.com/w/wholesale-pir-sensor-module.html

TaoBao PIR Sensor Module Catalog https://risym.tmall.com/search.htm?q=%C8%CB%CC%E5%B8%D0%D3%A6%C4%A3%BF%E9+&navigator=all&_input_charset=&spm=a21bp.7806943.20151106.1

TaoBao HC-SR501 PIR Module CN„3.60 https://item.taobao.com/item.htm?spm=a312a.7700824.w4002-18130655753.30.569b21fci4bMs6&id=589581993055

Update 2019apr11hkt1210

Smart Home Security System Hardware Selection - Final Version

Now the time has come to do some experiments.

car park, wide angle ccd cameras

PIR Module Configuration Notes

Now I am looking at my PIR module to decide how to config, based on Adrfruit's instructions.

pir_module

This is Adafruit's instruction

PIR Config

Now I know other's modules have two pots, me only one. Other guys have a jumper to set High Low, me no jumper, but soldered as High. I need to check up the chip spec to see what High level configs.

Now I am learning how to config the PIR chip

PIR Module config notes

Arduino, CircuitPython, but no Raspberry Pi!

Lady Ada teaches how to test the PIR, then shows example Arduino code, then CircuitPython code - BUT RASPBERRY PI CODE IS SKIPPED!

I don't know circuit python and I am too lazy to learn. What can I do?

AdaFruit PIR Motion Sensor Arduino and CircuitPython Code Example

/ to continue, ...

tlfong01
  • 4,847
  • 3
  • 12
  • 24