Good Sleep – Your Sleep Assistant

Get the best night’s sleep by using Alexa and Arduino to monitor the conditions in your bedroom, make suggestions and help you sleep better.

Good Sleep - Your Sleep Assistant

Things used in this project

Hardware components

Arduino MKR1000
Arduino MKR1000
× 1
Amazon Echo
Amazon Alexa Amazon Echo
× 1
SparkFun MEMS Microphone Breakout
× 1
DHT11 Temperature & Humidity Sensor (3 pins)
DHT11 Temperature & Humidity Sensor (3 pins)
× 1
Arduino SD Card Adapter
× 1
Photo resistor
Photo resistor
× 1
Resistor 4.75k ohm
Resistor 4.75k ohm
× 1

Software apps and online services

Alexa Skills Kit
Amazon Alexa Alexa Skills Kit
Arduino IDE
Arduino IDE
AWS Lambda
Amazon Web Services AWS Lambda
AWS DynamoDB
Amazon Web Services AWS DynamoDB
AWS API Gateway
Amazon Web Services AWS API Gateway

Story

Demo

Introduction and Idea

Everyone deserves a good night’s sleep. Without good sleep, it’s difficult to function at full speed and face the day ahead. A restless night can happen for many reasons, and it’s hard to diagnose. That’s where Good Sleep comes in.

With Good Sleep, I paired a WiFi Arduino-powered monitoring system that tracks the qualities in a bedroom environment that are essential to sleep well, the temperature, humidity, light and sound levels, with an Alexa skill that interprets the data. Alexa will offer suggestions for how to improve your sleep and produces graphs so you can see how the environment in your room changes over the night.

Before you go to bed, check in with Alexa and she’ll tell you if the room is ready to go, or what needs to change for the perfect night’s sleep.

If you remember waking up in the night but aren’t sure why, then check the graphs and find out if the room became too cold, there was a loud noise outside or maybe there was too much light leaking through your curtains.

Building the Device

Final circuit board layoutCircuit board reverse

Birds eye view of the circuit

I decided upon the Arduino MKR1000 to power this project due to its built-in WiFi capability and a large number of GPIO pins for a reasonable cost. The WiFi chip enables the device to run its own access point as well as connect to existing networks, and it comes with the comprehensive WiFi101 library that also allows access to the realtime clock.

I combined this with the DHT11, an all-in-one chip for temperature and humidity, the SparkFun MEMS Microphone for audio detection and a photocell to detect light levels.

Finally, I added an SD card adapter for Arduino for the storage solution.

Making a Great Initial Experience

Schematics

Code

Good Sleep Codebase

Code and Setup Plans for Arduino, Alexa and web services

Good Sleep – Arduino and Alexa powered sleep monitor — Read More

Source : Good Sleep – Your Sleep Assistant


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top