In this lesson, students will use the Microbit and Smart Home Kit to create a system that can be used to reduce energy use around the home. Students can use any combination of the sensors and Microbit functions for their project. The included handouts demonstrate the set-up and the code for two different smart home features.
The first of the projects is for a smart light. In this set-up, a light turns on when it is dark and turns off when it is light outside. This is an easier project to do, but can be expanded by dimming the brightness depending on the light intensity.
The more challenging of the projects is for a smart fridge. In this set-up, the crash sensor is used to indicate when a fridge is left open. If the fridge is left open for an extended period of time, an alarm is triggered to remind the home owner to close their fridge. These are two sample projects and depending on the level of comfort with coding, students can either follow these projects or create their own smart home prototype.
(1) If daylight gets too dark, turn on lights according to a program
Uses built-in light sensor; LEDs or lamps
(2) Vary lights to make it look like someone is home
Uses LEDs or lamps or Neopixels, copper tape or wire
(3) Turn on outdoor lights if someone approaches using a PIR motion sensor
Same as above + PIR sensor
(4) Arm a security alarm if all doors and windows are closed. If armed and door opens, sound alarm& sonalert, and send message to an Internet dashboard.
Copper tape, aluminum foil, sonalert,
(5) Water plants if they get too dry
Moisture Sensor, 5V pump
(6) If temperature exceeds a preset level, turn on a fan
DC Motor, propeller
(7) Open a door with a Bluetooth remote control
Servomotor
(8) Play music upon voice request( via https://microbitai.inventor.city/ )
Chromebook
(9) Unlock a door using facial recognition( via https://microbitai.inventor.city/ )
Chromebook
Gumball LEDs + Resistors
DC Motor +Propeller
Servomotor
Wiring
Terminal Strip