diy-14 motion sensor

LED Blinking, Walking with Cytron Servo, Displaying RFID, Multi-function Mobile Robot......

diy-14 motion sensor

Postby kitchaiz » Mon Sep 28, 2009 5:06 pm

hi!
wanna ask about if i using 84a in this project,is it the pir sensor works?
i refer to the 84a datasheet, ithink there don have any pin for analog sensor input..
i need some clue..
kitchaiz
Greenhorn
 
Posts: 2
Joined: Mon Sep 28, 2009 4:59 pm

Re: diy-14 motion sensor

Postby sich » Mon Sep 28, 2009 6:28 pm

Yes, It'll work. You no need an analog pin to sense the PIR sensor's signal. It gives discrete (High/Low) signal. Please refer to the datasheet:
http://www.cytron.com.my/datasheet/sensor/PIR_UserManualv1.pdf
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: diy-14 motion sensor

Postby kitchaiz » Sun Oct 04, 2009 2:12 am

hi again,
//Scanning mode
case 2:
temp2+=1;
if(temp2<2500) led=1; //LED blink
else if(temp2<200000) led=0;
else temp2=0;
break;

wanna ask about value for temp2<2500 and temp2<20000, those value if convert to second and how is it? is it depends 876A 20 Mhz...
if i using 84a to setting led blink for 15secs and how shoud i value for temp2?? hope will see ur reply soon.
kitchaiz
Greenhorn
 
Posts: 2
Joined: Mon Sep 28, 2009 4:59 pm

Re: diy-14 motion sensor

Postby sich » Mon Oct 05, 2009 12:00 pm

If you are using assembly language, you may do some calculation from the crystal value you choose to get the time for each instruction cycle and then obtain the number of loops you need to create the delay period. But I think this approach is not so suitable for C language. It's hard to get the exact value.

There's an easy way to do it. You can use the tool provided by MPLAB IDE. Select Debugger > Select Tool > 4 MPLAB SIM. Now a debug toolbar appears. Then select Debugger > StopWatch and a Stopwatch window pops up.

After setting the breakpoints, the stopwatch will calculate the time between two breakpoints for you when you run the debugger.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: diy-14 motion sensor

Postby xfreelifex » Sun Apr 04, 2010 1:04 am

how to attach this project with my webcam so i can record any motion detect??
xfreelifex
Fledgling
 
Posts: 1
Joined: Sun Apr 04, 2010 12:55 am

Re: diy-14 motion sensor

Postby sich » Mon Apr 05, 2010 11:35 am

xfreelifex WROTE:how to attach this project with my webcam so i can record any motion detect??

A webcam needs computer for interfacing.

Basically you'll need to connect this PR project set to your computer (usually is using UART and you'll need to modify the source code), then write a program to run on your computer to read the UART data from PR project set and command the webcam to snap photo when motion is detected.

Anyway, there're many ways to connect the sensor to computer. Another way would be using the PIR sensor (without PR project board) and a USB to UART converter (UC00A). In this case, no embedded programming is needed but you need to detect the signal from the sensor through UC00A. A sample of using UC00A with computer program for this purpose is given here: http://blog.cytron.com.my/?p=1102 Then, you need to find a way to communicate with your webcam and ask it to take photo.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: diy-14 motion sensor

Postby sich » Mon Apr 05, 2010 11:47 am

Some other alternatives:

1. Hack a digital camera and connect the snap button to this PR project with some additional components. No computer is needed and this will be the simplest way that delivers the same result.

2. Using CMUcam2 which is designed for interfacing with embedded system via UART. It has image processing capabilities and is too powerful for your application.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm


Return to DIY Project Set

Who is online

Users browsing this forum: No registered users and 6 guests

cron