150 likes | 290 Views
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
E N D
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
Military Applications http://robotics.eecs.berkeley.edu/~pister/29Palms0103/ Environmental Monitoring http://www.greatduckisland.net/ http://today.cs.berkeley.edu/retreat-6-03/ Home Automation http://www.smarthome.com 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) Medical Monitoring http://www.eecs.harvard.edu/~mdw/proj/codeblue/ Structure/Building Monitoring http://www.mrr.dot.state.mn.us/research/MnROAD_Project/MnROADProject.asp
Introduction • 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 http://www.xbow.com/ Flexible, hard to program Photo: Jason Hill http://www.dustnetworks.com/ Easy to use, inflexible http://www.smarthome.com
yes/no yes/no Magnetic Contact Switch yes/no yes/no Motion Sensor LED yes/no Toggle yes/no yes/no 2-Input Logic yes/no Electric Relay yes/no yes/no Tripper Light Sensor yes/no yes/no Button yes/no yes/no 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
Magnetic Contact Switch Magnetic Contact Switch Need something to indicate garage open at night – use led We want to detect night – use light sensor Need a function of light sensor output and contact switch output – use Logic Block LED LED A’B’ A’B’ Configure Logic Block to turn led on when it’s night and when door is open We want to know if garage door open – use contact switch 2-Input Logic 2-Input Logic 2-Input Logic Plug pieces together and the system is done! Light Sensor Light Sensor Creating an application with eBlocks • Create an application to detect if the garage door is left open at night
Tripper Magnetic Contact Switch LED A’B’ A’B Motion Sensor Many of these system utilize a logic block Garage Door Open At Night Detector Sleepwalker at Night Alarm 2-Input Logic 2-Input Logic 2-Input Logic 1 2 3 4 5 6 7 8 9 Prolonger Light Sensor Light Sensor Motion Sensor Beeper Beeper Light Sensor Button A+B Motion Sensor 1 2 3 4 5 6 7 8 9 eBlock to Camera Interface 2-Input Logic Motion Sensor Prolonger A+B Motion on Property Detector Animal Videoing System Building eBlocks Systems • The same basic blocks can be used in a variety of applications
A B Output configurable DIP switch Logic Block no no no yes no yes no yes yes no no yes yes yes no yes Motivation • 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]
motion sensor yes = motion detected no = no motion detected Logic block A B light sensor yes = light detected no = no light detected 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
Low success rates -- was it the use of variable names? Detect motion at night? 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. A B Question Truth table with variables (6 students) Detect motion at night? A B’ motion light Gave same truth table quiz (w/variables) to six students in digital design course A’ B motion no light Motion at night 100% A’ B’ no motion light no motion no light Motion 90% Motion at night or no motion in day 90% Motion or night 90% Written Experiments – Truth Table What would be the corresponding equation needed to detect motion at night (i.e. F=ab+a’b)? F =
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
yes no A B B A The output should be yes when: yes no: A is yes, B is yes A is yes, B is yes When the input is the output should be A is yes, B is no A is yes, B is no Combine A is no, B is yes A is no, B is yes A is no, B is no A is no, B is no out Combine Phrased truth table Phrased truth table embedded in sentence yes no yes no When A is AND OR B is then the output is yes Combine Logic Sentence yes no A B A B When the input is The output should be A B A B A B out Combine Colored truth table embedded in sentence Color seems to help truth table based blocks Logic sentence outperforms 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 quiz
yes no yes no When A is AND OR B is then the output is yes Combine Question Colored truth table embedded in a sentence (12 students) Logic Sentence (13 students) Logic Sentence yes no A B A B When the input is The output should be Daytime doorbell (AB) 42% (67%) 92% (100%) A B A B A B out • Had students in second course in programming try out the two blocks interfaces • Logic sentence success rate even more pronounced Combine Colored truth table embedded in sentence • Logic sentence is slightly better • Motion on property, a more difficult problem, shows a better success rate • When consider close to correct responses (1 switch wrong), logic sentence shows better success rate Simulator Experiments • 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
Success rates for separate AND/OR/NOT blocks Question Non-expert students (16 students) Intermediate Students (13 students) Separate AND/OR/NOT blocks Daytime doorbell (AB) 63% (69%) 69% (77%) Nighttime doorbell (AB’) 50% (38%) Motion on property (A+B) 63% (63%) yes no yes no When A is AND OR B is A A out A out out B B then the output is yes NOT AND OR Combine Success rates for logic sentence block Logic Sentence Question Non-expert students (12 students) Intermediate Students (13 students) Daytime doorbell (AB) 47% (71%) 92% (100%) Nighttime doorbell (AB’) 41% (76%) Motion on property (A+B) 65% (71%) Simulator Experiments • 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
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)