Introduction: ET Smart Baby Monitoring System
ET Smart Baby Monitoring System is a system that aims to add convenience to parents or caretakers taking care of babies. The monitoring system will keep track of the baby's temperature and if goes beyond normal, a SMS will be sent to parents' or caretaker's phone to alert them. In addition, when the baby cries, the sound sensor will detect it and sound the buzzer. This is especially useful at night when parents or caretaker are sleeping. The LED light can be turned on and off remotely on the website and a picture of the current situation can also be taken with the click of a button on the website. Thus, the ET Smart Baby Monitoring System helps keep track of the baby's well-being and at the same time, make the experience of taking care of babies much easier.
For a more detailed tutorial, look into the pdf file provided.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Summary of Step to Be Discussed
- Overview of Set-up
- Hardware Requirements
- Setting Up Smart Baby Monitoring System
- Test Run
Step 2: Final Hardware Setup
Step 3: Hardware Requirements
330Ω Resistor (1)
10kΩ Resistor (1)
I2C LCD Screen (1)
Step 4: Setting Up Smart Baby Monitoring System (part 1)
Setting up Raspberry Pi components
The images shown are step-by-step procedures on how the hardware setup looks like. After setting up the hardware, you can download the source codes from the link below.
Source code link: https://github.com/nje0527/IOTAssignment2/tree/master/assignment2
Step 5: Setting Up Smart Baby Monitoring System (part 2)
Setting Up AWS
- On AWS console, click on Services.
- On your AWS dashboard, type "IoT Core" to access the IoT Core service
- On the welcome page, click on Get Started
- On AWS IOT dashboard, click on Manage -> Things
- Click on Create a Single Thing
- Give a name for your Thing, then click Next at the bottom
- On the next page, click on Create certificate
- There will be four download links, download each of them
- Move your certs to a new folder and rename them accordingly
- Click on Activate and almost immediately, you should see “Successfully activated certificate” and the Activate button changes to “Deactivate”
- Click on Attach a policy at the bottom
- Click on Create a policy
- Define policy name and authorized actions then click Create
- Go back to IOT dashboard select Secure -> Certificates then click on certificate menu to attach policy
- Select the policy you just created and click attach
- Click on certificate menu again, click Attach thing to attach your thing to your certificate
- On IOT dashboard, go back to Manage -> Things then click on the Thing you just created
- Select Interact at the side navigation then copy and paste your REST API Endpoint to a notepad
Step 6: Setting Up Smart Baby Monitoring System (part 3)
Installing necessary libraries
This step contains the necessary libraries required to be installed in order to run the programs on your Raspberry Pi.
1. Install Flask with the following command
sudo pip install flask
2. Install the AWS Python library with the following command
sudo pip install AWSIoTPythonSDK
3. Install the AWS Command‐Line Interface Client on your Raspberry Pi
sudo pip install awscli
4. Install Boto, the Python library for AWS on your Raspberry Pi
sudo pip install boto3
5. Install the rpi-lcd library with the following command
sudo pip install rpi-lcd
6. Install the Mosquitto broker and clients on your Raspberry Pi with the following command
sudo apt-get install mosquitto mosquitto-clients
7. The AWS Python SDK has dependency on paho-mqtt, so make sure it is installed on your RPI.
sudo pip install paho-mqtt
8. Run the following command on your Raspberry Pi to install the AWS Command-line client on your Raspberry Pi
sudo pip install awscli--upgrade--user
Step 7: Setting Up Smart Baby Monitoring System (part 4)
SMS will notify parents if temperature goes beyond normal.
DynamoDB and S3
DynamoDB stores temperature and its timestamp. S3 store images captured by PiCam.
We will be using AWS MQTT to subscribe and publish to temperature values.
Step 8: Setting Up Smart Baby Monitoring System (part 5)
Step 9: Setting Up Smart Baby Monitoring System (part 6)
Ensure you are in the directory where the server.py is.
To test the web browser, run the following command:
sudo python server.py
To test the mqtt code, run the following command:
mosquitto (done on raspberry pi 1) sudo python mqttpublish_temp.py (done on raspberry pi 1) sudo python mqttsubscribe_temp.py (done on raspberry pi 2)
To upload to DynamoDB, run the following command:
sudo python aws_pubsub.py
To run the sound sensor, run the following command:
sudo python sound_sensor.py
Source code link: https://github.com/nje0527/IOTAssignment2/tree/ma...
Step 10: Done!
Thank you for reading!
We hope this tutorial was helpful to you and have fun coding!