Sunday 4 September 2016

Interface PIR Motion Sensor and USB Camera with LabVIEW.

Objective:

Interface PIR Motion Sensor and USB camera with LabVIEW.

  • By using motion sensor activate a hardware LED as well as a software LED to ON and OFF the LEDs when there is no motion.
  • Acquire the image by an USB camera by a front panel button and save the clicked images inside a folder with random names.
  • Then design the VI that will click the image when a motion is detected.
  • Design the front panel as shown in the fig.



Apparatus Required:
  • USB Camera
  • NI USB 6008
  • Breadboard
  • PIR Motion Sensor
  • Jumper wires

Procedure:

  • Connect the +5V and Gnd pin of the PIR sensor to the corresponding pin of the DAQ.
  • Connect the Dout pin of the PIR sensor to any analog input port of the DAQ.
  • connect the USB cable of the DAQ to the PC.
  • open the LabVIEW, right click over the block diagram and take the DAQ Asst from express vi function. 
  • Configure the DAQ Asst to acquire analog voltage of range 0-5V in RSE mode with sample on demand.
  • Then acquire the signal and glow the front panel LED when a motion is detected.
  • Now connect an USB camera to the PC.
  • Right click over the block diagram of the LabVIEW and go to "vision and motion" function palate and use the functions under NI IMAQdx . 
  • The sequence functions to capture image will be open camera ------ > configure ----> start ------- > snap ------ >Stop ------ > unconfigure ------> close.
  • To save the image use IMAQ write file function. get it from vision utilities ------ > files.
  • Use a front panel button to take image first. 
  • Then replace the button by the signal acquired when a motion is detected.




2 comments:

  1. I really like your blog and I also recommend you to check out PIR Sensor in Bengaluru. Thank you

    ReplyDelete
  2. Starrbot, a Patna-based motion sensor manufacturer, delivers top-quality, reliable sensors for enhanced safety and energy-efficient lighting solutions."https://starrbot.com//"> hdpe pipe manufactur in up

    motion sensor light

    https://starrbot.com/

    ReplyDelete