1 / 21

Home automation control over Power line Software system design

Home automation control over Power line Software system design. Michael Nist. System Software Design. MCU (2): CY8CPLC20 8-bit 32 KB Flash, 2 KB SRAM Bus Frequency: 24 MHz Memory requirements: Main Controller: 24 KB Flash, 2 KB SRAM Outlet Controller: 24 KB Flash, 2 KB SRAM

aislin
Télécharger la présentation

Home automation control over Power line Software system design

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. Home automation control over Power line Software system design Michael Nist

  2. System Software Design • MCU (2): CY8CPLC20 8-bit • 32 KB Flash, 2 KB SRAM • Bus Frequency: 24 MHz • Memory requirements: • Main Controller: 24 KB Flash, 2 KB SRAM • Outlet Controller: 24 KB Flash, 2 KB SRAM • Resources Used: • Main Controller: 13 GPIO, PLC • Outlet Controller: 5 GPIO, PLC

  3. Main Control unit

  4. Timeslice Kernel - Tasks • Start Task • Key Task • User Interface Task • Transmit/Receive Task • WaitForSlice

  5. Start Task • Initializes the system on startup and sets initial registers. • Execution Time: • 100 mS • Period: • Runs only on startup

  6. Key Task • Recognizes key presses on the push buttons and changes to the state of the user switches • Performs switch de-bouncing • Execution Time: • <5 uS • Period • 20 mS (Sporadic)

  7. UI Task • Handles the user inputs • Maintains the current state of the system • Writes to the LCD • Execution Time: • 5 mS • Period • 100 mS

  8. Transmit/Receive Task • Handles the communication between controllers • Receives power measurement calculations • Transmits instructions to turn the appliance on/off • Execution Time: • 10 mS • Period • 1 Sec

  9. WaitForSlice Task • Fills time between slice periods

  10. CPU Load • L = 5uS/20mS + 5mS/100mS + 10mS/1S = 6.03%

  11. Modules

  12. Data Flow Hardware Button.c Buttons Key Task SwitchEn ButtonUp Main.c ButtonDown LCD UI Task ButtonLeft ButtonRight ButtonOK TogglePower() Powerline TX/RX Task CurrentPower PLC.c

  13. Outlet control unit

  14. Kernel – Outlet Control Unit • Start Task • Key Task • WaitForSlice • Transmit/Receive Task • Power Measurement Task • Switch Task

  15. Transmit/Receive Task • Handles the communication between controllers • Transmits power measurement calculations • Receives instructions to turn the appliance on/off • Execution Time: • 10 mS • Period • 1 Sec

  16. Power Measurement Task • Acquires data from ADC sensing current • Acquires data from ADC sensing voltage • Performs calculations to determine power usage then stores the value • Execution Time: • 150 mS • Period: • 1 sec

  17. Switch Task • Activates or deactivates the relay to switch the outlet on/off if register set • Execution Time: • 10 uS • Period • 1 sec

  18. CPU Load • L = 5uS/20mS + 10mS/1S + 150mS/1S + 10mS/1S = 17.03%

  19. Modules

  20. Data Flow Hardware Button.c Switches Key Task SwitchOn SwitchOverride Switch.c Relay Switch Task PowerState TogglePower() GetState() Power.c Current ADC Power Task Vrms Irms GetPower() Power Voltage ADC SendPower() Powerline TX/RX Task PLC.c

  21. Questions?

More Related