Page 1 of 1

PIR E-Block

Posted: Sun Mar 06, 2011 12:01 pm
by JohnCrow
I recently aquired a small PIR sensor which I thought would made an interesting E-block
PIR E - Block.jpg
PIR E - Block.jpg (74.13 KiB) Viewed 14682 times
The device operates from 12V. (Red Wire)
The output is 5V and goes low when movement is detected. The signal line is connected to 5V via a 10k-ohm pull up resistor. (Black Wire)

To save having to connect both 12V and 5V lines to the programmer, two 3-pin regulators were used.
12V for power and 5V for the pull up signal. This means just the 14V line from the programmer is needed.

Small caps were placed between input & ground and output & ground on both 3 pin regulators - (Value was what I had in stock in a suitable physical size)
Rather than use links on the top of the board, thin insulatated wires were run on the rear of the board.

The output defauts to bit 0, but a jumper allows a patch system to connect to ch1 to 5.

I have found during initial tests I got better operation by reading the output as a voltage on the ADC rather than logic levels.
But the device works as expected. 8)

The 9pin D-Plug caused a bit of head scratching as the 2 rows of pins are stagged and wont fit veroboard.
I cut off pins 6-9 which allowed it to be soldered to the veroboard.(These channels are not required for this application, anyway).
Pin 9, ground, then had a short thin wire soldered to the stub and fed through to the solder side.

Flowcode Test File - ADC
Having tried digital detection with the completed E-Block it now works fine.
Must have been somthing to do with running initally just patched using a protoboard.
Also means a much simpler flowcode program, and can be used on a PIC without ADC.

Flowcode Test File - Digital
SE10 E Block - Simple Digital Detected.fcf
(7.5 KiB) Downloaded 720 times

Re: PIR E-Block

Posted: Mon Mar 07, 2011 11:51 am
by Steve
Looks like an interesting project - thanks for taking the time to post.
JohnCrow wrote:The 9pin D-Plug caused a bit of head scratching as the 2 rows of pins are stagged and wont fit veroboard.
I cut off pins 6-9 which allowed it to be soldered to the veroboard.(These channels are not required for this application, anyway).
Pin 9, ground, then had a short thin wire soldered to the stub and fed through to the solder side.
I'll now shamelessly plug our E-blocks patch board which will help you or others in a similar situation:
http://www.matrixmultimedia.com/product ... PHPSESSID=

There is an associated "protoboard" E-block too for those wanting to play around without too much soldering.

Re: PIR E-Block

Posted: Mon Mar 07, 2011 11:59 am
by JohnCrow
Thanks Steve
I have already used your patch board for a couple of projects.

Re: PIR E-Block

Posted: Wed Mar 09, 2011 11:53 pm
by singhdeol
thx for sharing the project with us

Re: PIR E-Block

Posted: Mon Nov 26, 2012 6:43 pm
by DylanBalloo
Hello there, can you please tell me if we can use the PIR directly in the MIAC?

Re: PIR E-Block

Posted: Mon Nov 26, 2012 7:17 pm
by Enamul
Hi
PIR sensor output 5v signal which can be easily sensed by MIAC

Re: PIR E-Block

Posted: Tue Nov 27, 2012 8:04 am
by DylanBalloo
What will be the input to the miac, input digital or analog?

Re: PIR E-Block

Posted: Tue Nov 27, 2012 9:15 am
by Enamul
Of course digital input..

Re: PIR E-Block

Posted: Wed Nov 28, 2012 4:03 pm
by DylanBalloo
Can you please check this program for me..Its a simple program..I dont know how to use the Digital Input?
If you have a simple program like that I've attached can you please send me.
Thanks
Enamul

Re: PIR E-Block

Posted: Thu Nov 29, 2012 1:52 pm
by DylanBalloo
PIR.fcf
(5.5 KiB) Downloaded 504 times

Re: PIR E-Block

Posted: Thu Nov 29, 2012 2:12 pm
by medelec35
Hi DylanBalloo,

For a single channel digital input your looking for a 0 or 1 (no higher!)

So if you change: LDR > 100
to
LDR = 1

It will then work the way you have intended.

If you use analogue input then:
If ReadAsByte then range is 0 to 255 (8bit)
If ReadAsInt then range is 0 to 1023 (10bit)
With Miac you will need to look at programming guide:
http://www.matrixmultimedia.com/resourc ... -guide.pdf
to check maximum reading as I believe the upper value will be limited due to clamping.

Martin

Re: PIR E-Block

Posted: Sun Dec 02, 2012 6:26 am
by DylanBalloo
Ok Enamul....thanks its working now