1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of...
-
date post
20-Dec-2015 -
Category
Documents
-
view
221 -
download
1
Transcript of 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of...
![Page 1: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/1.jpg)
1
External Interfaces and Software Tools for Electronic Blocks
Shawn NematbakhshUniversity of California, Riverside
Thesis Defense
Dr. Frank Vahid, Chairman
Dr. Harry Hsieh
Dr. Walid Najjar
![Page 2: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/2.jpg)
2
eBlocks What are eBlocks?
Single-function blocks that snap together to build useful simple systems.
Each block contains its own microcontroller to process data.
Three types of blocks: Input, output, computation. Current protocol completely binary: YES/NO.
eBlock Project Goals Allow construction of simple monitor/control systems in
a short period of time. Allow inexperienced users to build simple systems that
would otherwise be impossible.
![Page 3: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/3.jpg)
3
Overview
eBlock External Interfacing Internet Telephone PDA
eBlock Software Tools eBlock Simulator Programmable eBlock
Sample Application Parking Lot Monitor
![Page 4: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/4.jpg)
4
eBlock External Interfacing eBlock systems designed to be entirely self-
contained. Sensors, buttons, lights, buzzers, etc all implemented
as stand-alone eBlocks Would be useful to interface with external non-
eBlock systems. Devices and technologies already exist to perform
tasks that would be inefficient to implement as stand-alone eBlocks.
Three interfaces created: Internet, Telephone, PDA.
![Page 5: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/5.jpg)
5
Network eBlock Intended for long-range monitoring of eBlock
systems. Takes input from eBlock system, output to
ethernet interface. On startup gets IP of listening host + gateway
networking information from user. Constantly streams UDP packets with eBlock
status to listening host.
Network
eBlock
![Page 6: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/6.jpg)
6
Network eBlock Listening socket program on host defines behavior.
“Ships” with application outputting date/time of input change to web page.
Users can define own behavior with C API. Many possible applications
Record and display every packet received. Send email when “YES” packet is received. Output packet data to IRC chat channel. Any network application required – completely customizable.
![Page 7: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/7.jpg)
7
Phone Dialer eBlock Takes eBlock input, on startup is configured with a
target telephone number. Connects to telephone line. When ‘YES’ packet is received dialer opens line and
calls target number, waits 30 seconds, and hangs up. Intended for remote emergency alerts such as intrusion
or disaster detection.
DialereBlock
![Page 8: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/8.jpg)
8
Phone Relay eBlock “Reverse” of phone dialer block – takes a telephone
input and outputs to an eBlock system. User dialing in enters code to stream ‘YES’ or ‘NO’
packets to system. Packets sent continuously until next call.
Intended for remote control of eBlock systems Sample application: toggling lights in house while on
vacation to deter theft.
Phone RelayeBlock
![Page 9: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/9.jpg)
9
Palm Logger Palm PDA application used to record history of input
changes. Data saved on Palm system in text file for later analysis. eBlock input fed through converter device to translate
TTL to RS232 for Palm use. Solves problem of automatic monitoring of eBlock
status.
![Page 10: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/10.jpg)
10
eBlock Software Tools
eBlock External Interfacing Internet Telephone PDA
eBlock Software Tools eBlock Simulator Programmable eBlock
Sample Application Parking Lot Monitor
![Page 11: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/11.jpg)
11
eBlock Simulator eBlock simulator allows drag-and-drop layout and
testing of eBlock systems. Simulation-based testing of eBlock systems without
physical construction, saving construction time. Input, computation, and output blocks supported.
Input blocks simulated with user input toggling state. Output blocks simulated with visual alerts. Computation blocks display current state.
Stepwise simulation or real-time.
![Page 12: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/12.jpg)
12
eBlock Simulator As design is layed out, table keeps track of
blocks and connections. Cycles disallowed. Simulation algorithm:
Evaluate() produces block output based on inputs + block type. UpdateDisplay() changes display to reflect output.
Running time: O(V+E) (V=blocks,E=wires) because of topological sort
Simulate(table T[n]): Ordered=TopologicalSort(T). for i = 1 to n do
Evaluate(Ordered[i]) UpdateDisplay(Ordered[i]))
![Page 13: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/13.jpg)
13
eBlock Simulator eBlock Simulator widely used.
Basis for current version in use by over 500 people. Allows worldwide eBlock use without distributing sets of
physical blocks. Simulator useful for testing and feedback.
Allows eBlock designers to judge user understanding of blocks.
Able to test and change block customization without physical construction. Ex: 2-input logic user interface.
Lack of cycles a limitation – certain systems cannot be simulated.
Software simulator generally well-liked by users. What if physical systems could be built using the simulator
interface?
![Page 14: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/14.jpg)
14
Programmable eBlock Idea: Use simulator to layout eBlock system. Replace
multiple computation blocks with a single custom block synthesized to perform the same exact function for implementation.
ProgrammableeBlock
![Page 15: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/15.jpg)
15
Programmable eBlock Tool Design laid out using simulator drag-and-drop interface.
Different input blocks replaced with “INPUT” point. Output blocks replaced with “OUTPUT” point. Represent input and output points into programmable block.
Once design completed, “SYNTHESIS” button is clicked. Ordered table created from user’s design. C struct representation copied into code file along with
static code to step through table. File is compliable using PICC to program onto a
microcontroller without any code needing to be written by user.
Usable by advanced users or engineers without programming experience.
![Page 16: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/16.jpg)
16
Programmable eBlock Tool
const struct block blocks[NUMBLOCKS]={{-1,-1,INPUT,0,0,0,0},{0,-1,SPLITTER,0,0,0,0},{1,-1,TOGGLE,0,0,0,0},{1,-1,INVERTER,0,0,0,0},{3,2,OR,0,0,0,0},{4,-1,OUTPUT,0,0,0,0}};
GetOrdered(table T[n]) Call Simulate(T) Keep Ordered array and output to C code
Step (table Ordered[m]) for i=1 to m do eval[i] = Evaluate(Ordered[i]) output = eval[m]
Algorithm:
GetOrdered runs on PC, produces ordered representation in C.
Step runs on microcontroller once each time a packet is received or timeout occurs. Both O(V+E).
![Page 17: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/17.jpg)
17
Programmable eBlock After C code generation, PIC microcontroller can be
programmed. Zero programming knowledge required by user – simply
compile and download to chip. Programmable block implemented as enclosure with ZIF
socket. Allows easy chip placement after programming.
Problem: One UART per microcontroller. Separate microcontroller needed for each set of inputs and
outputs included. Extra microcontrollers serve only to receive input and send
output. Communicate with single master microcontroller to perform all
computation.
![Page 18: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/18.jpg)
18
Virtual Blocks Blocks in programmable eBlock tool do not
necessarily have to exist at physical level. Blocks implemented in C code for programmable block. No need for stand-alone eBlock implementing the same function.
Size of virtual eBlock library does not have to be limited.
Selecting a virtual block from library as simple as selecting from menu and dragging.
Fine-grained functional blocks can be created without worry of bloat.
Certain blocks requiring user customization are easier to set by computer. Ex: dial-switch timer.
Programmable blocks can be a mix of actual physical blocks and “virtual blocks” which exist only in software.
![Page 19: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/19.jpg)
19
Virtual Blocks
Two additional blocks created for programmable eBlock tool. Sequencer block used for pattern matching of previous
input. Eight previous inputs represented with {‘1’, ‘0’, ‘*’}. Ex: “*****101” outputs ‘YES’ only if previous input was ‘YES’,
previous to that ‘NO’, previous to that ‘YES’. Replaces gate-level pattern matching.
N-Timer block used to monitor time with continuous ‘YES’ packets received.
Value N from 1-59,999 specified by user If only “YES” packets have been received for N continuous seconds then “YES” is outputted for one timeout period (2 secs).
![Page 20: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/20.jpg)
20
Virtual Block Applications Sequencer
Can be used for passcode systems. Also useful for error correction – don’t sound alarm
unless motion sensor detects several consecutive YES inputs. First input may be false alarm.
N-Timer Useful for systems that perform long-range timing. Difficult for users to easily specify large periods of
time on-block: Dial and DIP switches don’t work well for customizing large values.
Best solution is to specify using computer – simply type desired value in.
![Page 21: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/21.jpg)
21
Sample Application
eBlock External Interfacing Internet Telephone PDA
eBlock Software Tools eBlock Simulator Programmable eBlock
Sample Application Parking Lot Monitor
![Page 22: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/22.jpg)
22
Parking Lot Monitor
Meter-free time-limited spaces usually monitored manually.
Chalk tire marks used to determine time elapsed. Labor-intensive: Monitor must constantly walk
around lots. Automate parking lot monitoring using
electronics. Keep track of time elapsed in parking space. Wirelessly alert car driver several minutes before
expiration. Wirelessly alert lot monitor at expiration.
![Page 23: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/23.jpg)
23
Parking Lot Monitor from Traditional eBlocks
Infrared receiver / transmitter placed across parking space. Logic blocks set to trigger when pulse goes low (time
exceeded) and infrared beam is broken (car still in space). Two extended pulse generators performing timing of deadline
time and deadline time minus 5 minutes so driver gets chance to move car before time expires.
IR RxBlock
IR BeamTx
SplitterBlock
Pulse Gen.Block
(deadline)
Pulse Gen.Block
(deadline--)
2-IN LogicBlock (01)
2-IN LogicBlock (01)
WirelessTx Block
WirelessTx Block
WirelessRx Block
(to attendant)
WirelessRx Block(to user)
Buzzer Buzzer
![Page 24: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/24.jpg)
24
Parking Lot Monitor with Dialer Dialer used to send alerts to user and monitor.
Advantage: Replaces six wireless receiver, transmitter, and buzzer blocks with two dialer blocks.
Advantage: Not range-limited like wireless eBlocks. Advantage: Doesn’t require external buzzer to carry
around. Disadvantage: Requires user to have mobile phone. Disadvantage: Requires phone line near parking space.
IR RxBlock
IR BeamTx
SplitterBlock
Pulse Gen.Block
(deadline)
Pulse Gen.Block
(deadline--)
2-IN LogicBlock (01)
2-IN LogicBlock (01)
PhoneDialer
PhoneDialer
![Page 25: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/25.jpg)
25
Parking Lot Monitor with Programmable eBlock
Replaces five blocks used for timing with a single programmable eBlock.
Programmable block created with splitter and two N-Timers.
Advantage: Five to one block reduction. Advantage: Easier to design and understand for user.
IR RxBlock
IR BeamTx
PhoneDialer
PhoneDialer
Split
N-Time
N-Time
blocks[NUMBLOCKS]={{-1,-1,INPUT,0,0,0,0},{0,-1,SPLITTER,0,0,0,0},{1,-1,NCOUNTER,14,16,0,0},{1,-1,NCOUNTER,12,128,0,0},{2,-1,OUTPUT,0,0,0,0},{3,-1,OUTPUT,0,0,0,0}};
Programmable eBlock
![Page 26: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/26.jpg)
26
Parking Lot Monitor from Components
Parking lot monitoring system also implemented with traditional components.
With schematic from web, construction required 8.5 hrs compared to 1.25 hrs for traditional eBlock construction.
Microcontroller programming required for component version, but not necessary for eBlock construction. Component version not buildable for non-programmers.
Component version allows more flexibility, but eBlock design meets all requirements in this case.
![Page 27: 1 External Interfaces and Software Tools for Electronic Blocks Shawn Nematbakhsh University of California, Riverside Thesis Defense Dr. Frank Vahid, Chairman.](https://reader030.fdocuments.net/reader030/viewer/2022032704/56649d4d5503460f94a2c5bb/html5/thumbnails/27.jpg)
27
Conclusion and Future Work Conclusion
eBlocks have been expanded to use external interfaces, allowing a wide range of powerful new systems to be created.
eBlock software tools were created that are being built on and improved today. These tools allow large scale use and experiment on eBlocks, and are the basis for eBlock synthesis.
Future Directions Expand the library of virtual blocks to include many more
functions useful for systems. Improve the synthesis tool to perform advanced optimizations
such as design minimization and partitioning across multiple blocks.