1 / 17

House of the Future: Network/PC

House of the Future: Network/PC. ECE 345 Summer 1999 Ari Pernick, Michael Upham, Matthew Hinterscher Group #5 TA: Purvesh Thakker. Introduction. Objective: To create a home automation system which can be easily controlled from any home PC.

jania
Download Presentation

House of the Future: Network/PC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. House of the Future: Network/PC ECE 345 Summer 1999 Ari Pernick, Michael Upham, Matthew Hinterscher Group #5 TA: Purvesh Thakker

  2. Introduction • Objective: To create a home automation system which can be easily controlled from any home PC. • Multiple microcontrollers will be used to collect data from sensors throughout the house. They will also be used to control any devices which are attached. • The microcontrollers communicate with the PC via a multi-drop RS 485 serial bus. This allows for up to 31 microcontrollers in the house at a time.

  3. System Components • MC68HC11 microcontroller • accepts inputs from sensors, outputs to lights, doors, etc. • communicates with computer over RS-485 network • RS-232 to RS-485 converter • allows for longer network runs which are useful in a full-scale operation • allows for multiple devices to communicate on the same network • Computer • running Java GUI client and Bus Master

  4. System Layout

  5. Network Adapter • Takes RS-232 from serial port and passes it on to RS-485 serial bus. • Timer only enables drivers for a single character length at 9600 baud. • Otherwise it receives all characters sent. RS 485 Bus RS 232 To Host TTL Serial Data RS 485 Driver RS 232 Driver One Shot Timer Driver Enable Trigger Timer

  6. Microcontrollers • Each microcontroller contains the code for communicating with the PC. • Three microcontrollers connect the sensors to the network. • Each microcontroller contains customized code for the sensors that are attached to it. • 1 - Temperature in Fahrenheit from remote group • 1 - Manual light switches, light outputs, beam entry sensor • 1 - Motion detection and temperature in Celsius

  7. Microcontroller Code Initialize Get sensor and output status Commands in table? yes Send commands to outputs no Communication from PC? ID# match assigned ID? yes yes Send and receive packets to and from PC no no

  8. Memory Table Format Command Table Status Table

  9. Real Time Interrupt • Set Interrupt rate at 71.11 ms • Interrupt Handler • Reads temperature and motion counters and stores values in variables. • Then resets counters to zero to begin next count cycle. • Uses a multiplexor to provide multiple inputs to Port C.

  10. ADP Primary Functions Polling - Standard way of communication between PC and Microcontrollers. Commands and status updates are sent each polling cycle. Microcontroller sends a fixed state each time it is polled by the PC. Probing - Every 15 seconds the PC sends a packet with Device ID zero and payload byte also zero. This is identified by the Microcontroller as a probe signal. It then reports back to the PC with a current list of all devices which are currently connected.

  11. ADP - Packet Structure All 8 bit fields beginning with 0 except Address • Main Header • Device Header • Second Device

  12. Bus Master Architecture Serial Handler Bus Master output Dispatcher ADP Bus timeout control Input Device Message Input Device Message Input Device Message input Input Device Message Java Serial Support Input Device Message ADPDevices Light Running Thread

  13. Client Architecture processADPMessage() generateADPMessage() ADPDevice Dispatcher getControlPanel() Device Light ADPDevice

  14. Problems Encountered • Noise due to unconnected serial lines was causing corrupt data to appear on the network. The problem was solved by adding resistors to load down open lines. • On start-up the computer would occasionally find microcontrollers that were not actually present. This problem is corrected by removing devices which timeout over 25 times in ten seconds. • If a byte was not read properly a microcontroller would stay in a read loop indefinitely. By adding timeouts and transmitting extra zeros this was alleviated. • It was more time consuming then it should have been to write new device support that was similar to existing devices. The objects and supporting code was rewritten to provide rapid device coding.

  15. Development Cost Analysis Parts for Network Adapter (4) $ 10.00 ea. Microcontrollers (3) $ 500.00 ea. Computer (1) $ 2,500.00 ea. Labor (5 hrs a day, 5 days a week) Salary ($30 /hr) (x 2.5) (3) $ 7,500.00 ea. Grand Total$ 26,540.00

  16. Questions

  17. RS485<->RS232 Device

More Related