Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

motion detector, toothPIC

Status
Not open for further replies.

Twins_sasa

Newbie level 5
Joined
Dec 21, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
I had bought a motion detector(Paradox DG55). It has 6 pins: N.C, COM, +i/p. -i/p, 2 pins for anti-tamper switch.

Some info form the data sheet:
Alarm output: Form A relay 100mA/28Vdc, N.C (optional form C relay 500mA/30Vdc, N.C/N.O)
Anti-tamper switch: 150mA/28Vdc, N.C
Voltage input:: +12Vdc

Normally motion detector is connected to alarm. But in my project, my idea is to connect the output of this motion detector to a ToothPIC microcontroller.
So when motion is detected, the motion detector will send an output voltage which is connected to input pin of ToothPIC. Then the ToothPIC will send an signal to a user PDA.

I'm not sure whether this idea is correct or not.
And i want to measure the output voltage of the motion detector(because the input voltage of ToothPIC is only 5-10Vdc).

My prob is i don't know how to connect the motion detector pins(NC, COM, etc) with the ToothPIC.
Can anyone teach me about that?? explain in detail which pin to connect to what.

High appreciation to all of u guys reply and help.
Thanks very much.


i guess it don't have N.O because in the data sheet is stated "N.O optional": Form A relay 100mA/28Vdc, N.C (optional form C relay 500mA/30Vdc, N.C/N.O) , am i right???
 

Twins_sasa

Newbie level 5
Joined
Dec 21, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
from the power supply, i connect the +12Vdc to +i/p, then ground should go to -i/p or COM?

since the sensor only have N.C and COM, i/m wondering does it mean when motion is detected, the N.C relay switch will open and no output voltage will trigger the PIC. Is my concept correct?

pls advise. thanks very much.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
In your case you will be using 4 connections: +12V (+i/p), 0V (-i/p), COM and N/C.
Don't worry about anti-tamper, although you ca conet it in series with COM or N/C contact, so if someone tries to open the enclosure it will also set-off an alarm, but it is optional ..
On the ToothPIC select which input would you like to connect to the sensor: I guess you can use any of AN0-AN11 inputs and configure them as Digital Inputs.
So run two wires from the sensor to the ToothPIC, connect the COM wire to ToothPICs 0V and the N/C to the selectet AN input (you may need to connect a pullup resistor between this input and +Vcc; a 4.7-10kΩ resistor will be a good choice). Remember, that you will be working with NEGATIVE logic, what means that the active state will be when the contact is open .. thats all ..
Regards,
IanP
 

Twins_sasa

Newbie level 5
Joined
Dec 21, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
ya, i followed your way and the sensor can work already.

But when motion is detected, the output of the sensor is very small(<1V), unstable, discontinous and only trigger for around 3 seconds. It's not as the expected +5V. After 3 seconds, it wil back to ready state(0V) again.
This is not enough to trigger the ToothPIC to work properly.

I plan to have a OP-AMP to boost the voltage. But how about the problem of discontinous output?

Any idea or better solution for that?
thank q very much for your advise.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
You can fix the issue of the output response by adding a monostable 555 timer, and set it up to generate 1, .., 3, .. 5 sec (or whatever) pulse ..
This timer can be trigged by the signal from the motoin detector through a transistor driver or a comparator, in both cases signal of 1V from the motion detector will be sufficient ..
(see pictures below)
For more on 555 in monostable configuration goto: http://www.doctronics.co.uk/555.htm
Regards,
IanP
 

Twins_sasa

Newbie level 5
Joined
Dec 21, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
sorry sorry, i made a mistake.
I got the "unexpected output" previously is because i connected wrongly some wiring.

Ya, the output is +5V when moton is detected. It is stable but it only last for 3 seconds, then the sensor will go back to ready state (0V).

How to make the output voltage last longer so that the ToothPIC can have enough time to perform its task? (last 10seconds will be good enough).

Appreciation and Thanks for helping.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
In this situation use 555 timer in the monostable configuration (see circuit below) ..
For 10s pulse: R=100kΩ, C=100µF ( or R=1MΩ, C=10µF , .. )
To make it working correctly you will need to reverse the phase of the signal from the motion detector; add transistor driver described in the previous post and use 10kΩ resistors (between sensor and base, and collector and +5V) ..
C between 5 and GND = 10nF
R between 2 and +5V = 10kΩ
Input C = 100nF ..
Regards,
IanP
 

Twins_sasa

Newbie level 5
Joined
Dec 21, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
Ya, i had tested it.
But the transistor driver is convert the input(+5V) to 0V (or 0V to +5V). And it's not convert from +ve to -ve phase. So, the 555 timer cannot be trigger. Correct?

What do you think about this issue?

Thank you.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
Bear in mind that 555 is trigged at the falling edge of the input signal, and the motion sensor produced 5V when active ..
So, the signal from the motion detector has to be inverted, and this can be done by a single transistor or any CMOS/TTL inverter (NOT gate) ..

Regards,
IanP
 

Twins_sasa

Newbie level 5
Joined
Dec 21, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
Wao! i got it!
I follow your suggestion to set up. But the invertion of motion detector output, i didnt use the transistor driver. Instead, i use a 741 Op-Amp and set it as a inverter circuit.
Then for the 555 monostable timer, i did follow your diagram. But i take out the 10kΩ resistor between 2 and +5V. This is because i cant figure out why we need to connect +5V to pin2 since the desire input to trigger the 555 timer should be the op-amp inverter output.

And i got the result i want already.

Thank you very much IanP, you did help me a lot.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top