Review of PiFace Digital
Evaluation Type: Evaluation BoardsApplication you used the part in: Home Automation
Was everything in the box required?: Yes
Comparable Products/Other parts you considered: No one
Detailed Review:
First of all, sorry for my poor english!
Using the piFace for my project was incredible simple.
The board that element14 provided me for this road test is well engineered and simple to use.
But let me describe the project in detail.
The Project
The project is an home alarm based on a Raspberry Pi as server, a PiFace Digital as the connection with the sensors.
These one are 15 PIR sensors (each one for monitoring a room). To be considered that the PiFace has only 8 free inputs, so for my definitive project i'll need on other board to be stacked.I've also used the relay output in order to activate:
[*]an alarm
[*]a light
So this are the project parts:
1 x Raspberry PI1 x PiFace Digital15 x PIR Sensors (LHI778 probe) as the free inputs are only 81 x Alarm siren1 x High efficiency lamp
For the road test I've used only 4 PIR sensors and the leds on the PiFace digital because this is only a proof of concept for the complete project.
The PIR sensorsThese sensors come from China and are based on the LHI778 chip:
Probe LHI778, high sensitivity.Technical parameters:
[*]Operating voltage: DC5V to 20V
[*]Static power consumption: 65 microamps
[*]Level output: 3.3V, low 0V
[*]Delay time: adjustable (0.3 seconds to 18 seconds)
[*]Blockade Time: 0.2 seconds
[*]Trigger Mode: L can not be repeated, H can be repeated default value H
[*]Sensing range: less than 120 degree cone angle of less than 7 meters
[*]Operating temperature: -15 to +70 degrees
[*]PCB Dimensions: 32 * 24mm, screw hole distance 28mm, screw aperture 2mm sensor lens size: (diameter): 23mm (default)
Features:
[*]automatic induction: when someone enters its sensing range input high, people leave the sensor range automatic delay off high. Output low.
[*]photosensitive control (optional): module is reserved for the location, you can set the photosensitive control, daytime or light sensing. The photosensitive Control optional features not installed at the factory photoresistor. If necessary, please purchase separately photoresistor install it yourself.
[*]3.two trigger modes: L can not be repeated, H can be repeated. Jumper selectable, default is H.
[*]A.not repeat the trigger mode: the sensor output high, the delay time has elapsed, the output automatically from high to low.
[*]B.repeatable trigger mode: the sensor output high, the delay period, if human activities within its sensing range, the output will always remain high until people leave only delay the high level goes low (sensor module detected after every activity of the body's automatic postponed a delay period of time, and the last time activities as the starting point of the delay time).
[*]4.induced blockade time (default setting: 0.2 seconds): sensing module in every sensor output (high to low) followed by set up a blockade of the time, in this period of time the sensor is not receiving any induction signal. This feature can be achieved both of the (inductive output time and the blocking time) interval can be applied to the interval detection products; This feature can effectively suppress the various interference generated in the process of load switching.
[*]5.wide operating voltage range: default Voltage DC5V to 20V
[*]6.micro-power: quiescent current of 65 microamps, particularly suitable for battery-powered electrical products.
[*]7.output high signal: easy to achieve docking with the various types of circuits.
The Realization
The realization was incredible fast and funny.The first step was to update Raspian Weezy software according to the instruction found here: http://www.farnell.com/datasheets/1684425.pdfAfter this I'had to wire all the PIR sensors contact in order to enable the alarm.The connection with the board was very easy because of the screw connectors.In my case I had to wire the +5V on the output connectors and the GND on the inputs.
The Code
Coding the application is very simple.Just a consideration about the sensor.The PiFace input should be gorunded when the buttons are pressed, but the high level of the sensor output is 3.3V.So I've to revert the logic inside the program.The power of the PiFace is the coding: few rows of code and here is an alarm application!
Good
# Alarm program by Francesco Balsamo## Using a PIR sensor with inverted logic#from time import sleepimport piface.pfio as pfiopfio.init()while(True): for pin_number in range(0,4): if pfio.digital_read(pin_number) == 0: pfio.digital_write(pin_number+4,1) # Using only the leds else: pfio.digital_write(pin_number+4,0) # Disabling only the leds
ConclusionsUsing the PiFace Digital for my project was very simple and funny since I needed only a screwdriver, some cabling and few rows of code.Finally, I really like the board and how it is realized.I think that this board is fantastic and it will be the core of many projects that I've in mind for automatize my house.
呵呵,谢谢楼主了~~~~~~~~~~~
static/image/common/sigline.gif
http://pic.yupoo.com/cjzihmxkq_v/BW3GCpT7/medium.jpg
页:
[1]