a logic block enabling logic configuration by non-experts in sensor networks susan cotterell and...
Post on 21-Dec-2015
214 views
TRANSCRIPT
A Logic Block Enabling Logic Configuration by Non-Experts in
Sensor Networks
Susan Cotterell and Frank Vahid*
Department of Computer Science and Engineering
University of California, Riverside{susanc, vahid}@cs.ucr.edu
http://www.cs.ucr.edu/eblocks* Also with the Center for Embedded Computer Systems at UC Irvine
This work is being supported by the National Science Foundation and a Department of Education GAANN Fellowship
2 of 15
Introduction
Sensor networks are emerging as an important general computing domain
Small inexpensive battery-powered sense and compute nodes Tens to thousands of nodes Wired or wireless communication Stringent requirements (power, cost, size)
Military Applicationshttp://robotics.eecs.berkeley.edu/~pister/29Palms0103/
Medical Monitoringhttp://www.eecs.harvard.edu/~mdw/proj/codeblue/
Environmental Monitoringhttp://www.greatduckisland.net/http://today.cs.berkeley.edu/retreat-6-03/
Home Automationhttp://www.smarthome.com
Structure/Building Monitoringhttp://www.mrr.dot.state.mn.us/research/MnROAD_Project/MnROADProject.asp
3 of 15
Potential sensor network application developers may not be computer programmers
Instead, engineers, scientists, office workers, homeowners, etc.
Existing programmable nodes Flexible, but require programming
Existing off-the-shelf end applications
Specialized, so hard to customize Expensive due to small volumes
Our solution – eBlocks Enables non-programming users to
create simple but useful customized sensor network applications
Introduction
Photo: Jason Hillhttp://www.dustnetworks.com/
http://www.smarthome.com
http://www.xbow.com/
Flexib
le,
hard
to p
rogra
m
Easy
to u
se,
inflexib
le
4 of 15
eBlocks Overview
Function of each block is pre-defined
Block types: Sensors – motion, light, contact,
etc. Output – led, electric relay, beeper,
etc. Compute – logic, prolong, toggle,
etc. Basic configuration required (dials,
switches) Communicate – wireless point-to-
point link Boolean Blocks
Outputs yes/no/error Future implementations - Integer
Users connect blocks to create working customized application
CODES/ISSS’03, SECON’04, DATE’05, SPOTS’05, HCII’05
Light Sensor
yes/no
Magnetic Contact Switch
yes/no
Button yes/no Motion Sensor
yes/no
2-Input Logic
yes/noyes/no
yes/no
Tripper
yes/noyes/no yes/no
Toggleyes/noyes/no
Electric Relay
yes/noLEDyes/no
5 of 15
2-Input Logic
Configure Logic Block to turn led on when it’s night and when door is open
A’B’
Need a function of light sensor output and contact switch output – use Logic Block
2-Input Logic
Creating an application with eBlocks
Create an application to detect if the garage door is left open at night
Light Sensor
We want to detect night – use light sensor
Light Sensor
Magnetic Contact Switch
We want to know if garage door open – use contact switch
Magnetic Contact Switch
2-Input Logic
A’B’
LED Need something to indicate garage open at night – use led
LED
Plug pieces together and the system is done!
6 of 15
Building eBlocks Systems
The same basic blocks can be used in a variety of applications
2-Input Logic
A’B’
Light Sensor
Magnetic Contact Switch
LED
Garage Door Open At Night Detector
Motion on Property Detector
Motion Sensor
Motion Sensor
2-Input Logic
A+B
Prolonger
1 2 3 4 5 6 7 8 9
Beeper
Sleepwalker at Night Alarm
Tripper
Motion Sensor
2-Input Logic
A’B
Light Sensor
Button
Beeper
Animal Videoing System
Motion Sensor
2-Input Logic
A+B
Prolonger
1 2 3 4 5 6 7 8 9 eBlock to Camera Interface
Light Sensor
Many of these system utilize a
logic block
7 of 15
Original logic block was simply a truth table
Select desired output for each input condition, by moving a switch
Informal experiments to test general usability of eBlocks
Users unable to configure the logic block successfully
Need for a better logic block interface
Blocks must be self-explanatory Users prefer exploratory learning
[Gammon, 1999][Sikorski, 1998]
Motivation
A B Output
no yesno nono yesno yesno yesyes nono yesyes yes
Logic Blockconfigurable DIP switch
8 of 15
Written Experiments – Truth Table
Written experiment given to students
Typical majors include psychology, business, etc.
Randomly distributed 3 different versions of quiz
Each contained same introduced and asked students to configure the logic block
motion sensor
light sensor
Logic blockB
A
yes = motion detectedno = no motion detected
yes = light detectedno = no light detected
9 of 15
Low success rates -- was it the use of variable names?
Used English instead of variables – slightly better, but results still poor.
Also checked to see if writing out the equation helps -- still yielded poor
results.
Written Experiments – Truth Table
Question Truth table with variables (11 students)
Truth table with English(9 students)
Boolean equations (9 students)
Motion at night 36% 22% 11%
Motion 0% 56% 0%
Motion at night or no motion in day
0% 22% 0%
Motion or night 0% 11% 0%
Detect motion at night?AAA’A’
BB’BB’
Detect motion at night?motionmotionno motionno motion
lightno lightlightno light
What would be the corresponding equation needed to detect motion at night (i.e. F=ab+a’b)?
F =
Gave same truth table quiz
(w/variables) to six students in digital
design course
90%Motion or night
90%Motion at night or no motion in day
90%Motion
100%Motion at night
Truth table with variables (6 students)
Question
10 of 15
eBlock Simulator
Developed eBlock simulator to aid in testing
Enables wider participation
Allows students to test resulting behavior of configured system
Self-contained instructions, to prevent variations due to administrator
11 of 15
Logic sentence outperforms table based
blocks
Color seems to help truth table based blocks
Simulator Experiments
Defined new “improved” versions of the logic block
Simulator instantiated blocks, users simply needed to configure logic block
Students were non-engineering majors
Comprised mostly of business, history, dance, etc.
Allotted 15 minutes for quizQuestion Phrased truth
table (33 students)
Phrased truth table embedded in sentence(30 students)
Colored truth table embedded in sentence(32 students)
Logic sentence (32 students)
Daytime Doorbell (AB)
15% 20% 22% 38%
Garage open at night (A’B’)
16% 13% 25% 19%
A B
Combine
A is yes, B is yesA is yes, B is noA is no, B is yesA is no, B is no
The output should
be yes when:
yes no:
Phrased truth table
yes no
the output should be
A B
When the input is
outCombine
A is yes, B is yesA is yes, B is noA is no, B is yesA is no, B is no
Phrased truth table embedded in sentence
yes no
The output should be
When the input is
out
A B
A BA BA BA B
CombineColored truth table embedded in sentence
Combine
AND OR
yes no
When A is yes no
B is
then the output is yes
Logic Sentence
12 of 15
When consider close to correct responses (1 switch wrong), logic sentence shows better success rate
Logic sentence is slightly better Motion on property, a more difficult
problem, shows a better success rate
Simulator Experiments
yes no
The output should be
When the input is
out
A B
A BA BA BA B
CombineColored truth table embedded in sentence
Combine
AND OR
yes no
When A is yes no
B is
then the output is yes
Logic Sentence
Tested top two designs on students in an introduction to programming course Simulator instantiated blocks, users
simply needed to configure logic block
Allotted 15 minutes for quiz
Question Colored truth table embedded in a sentence(15 students)
Logic Sentence(17 students)
Daytime doorbell (AB)
47% (47%) 47% (71%)
Nighttime doorbell (AB’)
33% (52%) 41% (76%)
Motion on property (A+B)
33% (33%) 65% (71%)
92% (100%)42% (67%)Daytime doorbell (AB)
Logic Sentence(13 students)
Colored truth table embedded in a sentence(12 students)
Question
Had students in second course in programming try out the two blocks interfaces
Logic sentence success rate even more pronounced
13 of 15
Simulator Experiments
63% (63%)Motion on property (A+B)
50% (38%)Nighttime doorbell (AB’)
69% (77%)63% (69%)Daytime doorbell (AB)
Intermediate Students(13 students)
Non-expert students(16 students)
Question
Success rates for separate AND/OR/NOT blocks
65% (71%)Motion on property (A+B)
41% (76%)Nighttime doorbell (AB’)
92% (100%)47% (71%)Daytime doorbell (AB)
Intermediate Students(13 students)
Non-expert students(12 students)
Question
Success rates for logic sentence block
Also considered the use of separate AND/OR/NOT blocks versus a single logic block
Users had to instantiate these blocks within simulator
Comparable to best table based logic blocks
Logic sentence block preferable for physical implementation -- only 1 block needed
Separate AND/OR/NOT blocks
out
A
B
AND out
A
B
OR
outA
NOT
Combine
AND OR
yes no
When A is yes no
B is
then the output is yes
Logic Sentence
14 of 15
Conclusions and Future Work
Presented a variety of logic block interfaces Logic sentence best performing Incorporating color in truth table
improved table success rates; table has advantage of generality
Present/Future Work Continue usability testing Extend eBlocks to integer domain Gain experience with use of
eBlocks in real applications with variety of users Pro-active healthcare (w/ Intel) Agricultural monitoring (w/ Isca) Environment monitoring (w/
UCR/UCLA)
15 of 15
Thank you for your attention.