Grin logo
de en es fr
Shop
GRIN Website
Publish your texts - enjoy our full service for authors
Go to shop › Computer Science - Programming

Smart Home Applications realized with Scratch

Title: Smart Home Applications realized with Scratch

Bachelor Thesis , 2017 , 37 Pages , Grade: 2,0

Autor:in: Claus Zöchling (Author)

Computer Science - Programming
Excerpt & Details   Look inside the ebook
Summary Excerpt Details

For many years, smart home applications have played a major role in our households. Real-time monitoring everywhere via the web, retracting the awning at sunset or lighting tasks by movement: the versatility and flexible adaptation is normally reserved for more expensive systems.

The aim of this thesis is to develop a radio board that offers the possibility to integrate all devices in the frequency range of 433 MHz due to a learning function except modules using rolling code or hoping code. Furthermore, a software interface to the programming language Scratch was developed, with which children and programming beginners can already program simple smart home applications without prior knowledge.
In addition to the hardware and software requirements, the design of the circuit on a breadboard, the test of the prototype and the implementation of the software are described in this thesis. Finally, a simple smart home scenario will be programmed with the visual programming language Scratch.

Excerpt


Table of Contents

1 Introduction and Motivation

2 Concept and technical Requirements

2.1 Concept

2.2 Hardware Concept

2.3 Software Concept

3 Technical Demands

4 Implementation

4.1 Hardware Construction on the Breadboard

4.1.1 Communication Atmel – Raspberry Pi

4.1.2 Transmission of Radio Signals

4.1.3 Comparison of Radio Receivers

4.2 Prototyp

4.2.1 Printed Circuit Board

4.2.2 Testing Prototyp

4.3 Software Implementation

4.3.1 Implementation on the Rasperry Pi and Usage with Scratch

4.3.2 Implementation on the ATmega328P

5 Application Scenario

6 Summary

Objectives and Topics

This thesis aims to develop a manufacturer-independent radio board in the 433 MHz frequency range, integrated with a Raspberry Pi to enable smart home control via the visual programming language Scratch, specifically designed to make home automation accessible to children and programming beginners.

  • Development of a radio board with a learning function for various 433 MHz devices.
  • Implementation of a software interface between Scratch and hardware via Python.
  • Hardware design, including circuit construction on a breadboard and prototype PCB realization.
  • Demonstration of smart home scenarios, such as lighting control, door bells, and automated heating.
  • Protocol visualization using the 'Funkgraph' function for advanced analysis.

Excerpt from the book

4.1 Hardware Construction on the Breadboard

The 8-bit microcontroller ATmega328P is the main part of the radio board. With its 23 IO pins, a 10bit Analog Digital Converter (ADC) and a UART, I2C and SPI bus system, it offers all requirements for this project. Although an internal oscillator can be used for the clocking, a 16 MHz crystal has been used for this requirement to guarantee a consistent clock rate, even at faster clock rates of different bus transmissions. To realize a basic circuit for using the ATmega328P with an external quartz and an ICSP socket to program the microcontroller on the board, a minimal circuit has to be used, as shown in the Figure 4.

In addition to a 10 kOhm pull-up resistor at the reset pin, two 22 pf capacitors at the quartz pins - which are intended to help the quartz to oscillate - and another 100 nF blocking capacitor - to prevent voltage dips - must be placed close to the supply pins. In order to program the microcontroller on the board without having to remove it every time, a 6pin ICSP socket is installed. For this socket, attention was paid to use the common ICSP pin assignment of all microcontrollers from Atmel to provide compatibility with all programming devices available on the market. The SPI protocol is used for this ICSP programming, which means that, in addition to the voltage supply, one need four further pins (MOSI, MISO, SCLK, SS). These pins can also be used for other tasks during operation. The MySmartUSBlight programming device - which already provides the power supply during programming - was used for this project (see Figure 5 (I)).

Summary of Chapters

1 Introduction and Motivation: Defines the scope of the project, focusing on creating a flexible, manufacturer-independent smart home system accessible to non-professionals using the Raspberry Pi and Scratch.

2 Concept and technical Requirements: Outlines the necessity of a radio board that works with multiple manufacturers' protocols and details the hardware and software choices made.

3 Technical Demands: Explains the requirements for a radio-based system that can read and store protocols without specialized equipment like logic analyzers.

4 Implementation: Describes the hardware construction, the prototype development, and the detailed software implementation on both the Raspberry Pi and the ATmega328P.

5 Application Scenario: Demonstrates how the system is used in practice for various automation tasks like light, temperature, and garage door control via Scratch.

6 Summary: Reviews the project results, confirming the successful development of the radio board and the viability of the software interface for smart home applications.

Keywords

Smart home, radio board, Raspberry Pi, Scratch, ATmega328P, 433 MHz, automation, UART, I2C, Python, radio protocol, microcontroller, PCB, prototype, programming interface

Frequently Asked Questions

What is the core focus of this research paper?

The paper focuses on developing a radio board that integrates various 433 MHz smart home devices from different manufacturers, allowing them to be controlled through a user-friendly interface.

Which primary technology stack is used to achieve the goals?

The system utilizes a Raspberry Pi as the main computer and an ATmega328P microcontroller for radio frequency tasks, with Scratch serving as the visual programming environment.

What is the main objective of the proposed system?

The primary goal is to provide a low-cost, flexible, and easy-to-use smart home solution that is accessible to children and programming beginners.

How is the communication between the hardware and the software handled?

A Python script running on the Raspberry Pi serves as the interface, translating Scratch commands into radio protocols sent to the microcontroller via UART.

What topics are covered in the implementation chapter?

The chapter covers hardware setup on a breadboard, the development of a printed circuit board (PCB), testing the prototype, and writing the software logic for signal processing.

Which specific keywords best describe this project?

Key terms include Smart home, Raspberry Pi, Scratch, 433 MHz, radio board, and automation.

How does the system handle lost remote controls?

The system includes a 'set_protocol' function that allows users to manually enter protocol data into a file on the Raspberry Pi, which is then stored on the EEPROM.

What is the purpose of the 'Funkgraph' function?

It allows users to visualize invisible radio protocols as graphs, enabling easier comparison and analysis of different radio signals without needing an oscilloscope.

Excerpt out of 37 pages  - scroll top

Details

Title
Smart Home Applications realized with Scratch
College
University of Applied Sciences Technikum Vienna
Grade
2,0
Author
Claus Zöchling (Author)
Publication Year
2017
Pages
37
Catalog Number
V371088
ISBN (eBook)
9783668491939
ISBN (Book)
9783668491946
Language
English
Tags
smart home radio board Raspberry Pi Scratch
Product Safety
GRIN Publishing GmbH
Quote paper
Claus Zöchling (Author), 2017, Smart Home Applications realized with Scratch, Munich, GRIN Verlag, https://www.grin.com/document/371088
Look inside the ebook
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
  • Depending on your browser, you might see this message in place of the failed image.
Excerpt from  37  pages
Grin logo
  • Grin.com
  • Shipping
  • Contact
  • Privacy
  • Terms
  • Imprint