Baby Care

by AlmogLevi in Living > Kids

3094 Views, 29 Favorites, 0 Comments

Baby Care

BeFunky-collage (1).jpg
Baby Care

Recently we have been blessed with new babies in the family, and we wanted to create a device that will make the parents life much more easier.

Our device brings a brand new and complex features which do not exist in the market today.

we designed our device to deal with 5 scenarios:

1. At night mode, the CPX listens to noises and checks if the baby is crying. It records the sound level and the specific time of the crying in a dedicated google sheets so that the parents can be in control of the baby's sleep quality.
In addition, when the baby cries (at a certain time cycle) the device will try to calm the baby with a pleasant melody and calm lights. If the baby continues to cry, the parent will receive a phone call that will wake him up.

2. To remind the parent to feed the baby during eating hours (every 4 hours), the CPX flashes and plays a unique melody that symbolizes the eating time.

3. Every morning at 8:00 am the parent receives an email that includes the daily temperature, If it's raining today, clothing recommendations, and link to a song that matches this weather.
In addition the CPX displays light colors that match this weather.

4. Allows you to post a "Babysitter needed" message in a group of babysitters on Facebook with a picture of the baby using the CPX.

5. Change the air conditioner temperature according to the room temperature. If the room temperature is too low or too high, the CPX increases/ decreases the degrees of the air conditioner respectively.

Meet the Technologies

WhatsApp Image 2021-07-27 at 14.50.50.jpeg

In the project we use 3 technologies that works together in collaboration:

1. CPX : CPX is a hardware board that has neo pixels, sensors (temperature sensor, light sensor, sound sensor etc) and buttons. In this project the role of the CPX is to measure the temperature and sound, get signals from the user in order to perform actions. in addition it has another role to show data that we get from the internet using it's neo pixels.

2. Blynk: Blynk is a Platform with iOS and Android apps to control Arduino, and the transfer data over the Internet. It's a digital dashboard where you can build a graphic interface for your project by simply dragging and dropping widgets.

3. Integromat: Integromat is a tool that helps you to automate manual processes, without needing code.
It enables one to connect to any API and create complex integrations using built-in apps and tools.

Supplies & Configurations

WhatsApp Image 2021-07-27 at 14.53.18.jpeg

Supplies:

1. Circuit Playground Express

2. Battery Holder

3. 3x AAA Battery

Configurations:

1. Install latest adafruit driver

2. Install Arduino IDE

3. Install Board Manager

4. Download latest Blynk app to your smartphone

5. Create Blynk user

6. Create Integromat user

7. Download Integromat to your smartphone

Create New Blynk Project

creatr blynk proj 1.png
creatr blynk proj 2.png
  1. Press on + button in order to create new project
  2. Change the project name
  3. Under "CHOOSE DEVICE" choose Arduino MKR1000
  4. Press Create

WebHook in Blynk

WhatsApp Image 2021-07-27 at 13.35.09.jpeg
WhatsApp Image 2021-07-27 at 13.35.58.jpeg

1. Press on + button to add a new widget
2. Under "other" section choose WebHook
3. Change the the WebHook name
4. Choose a available virtual pin uder "Output" section
5. Paste the URL of the Integromat's Webhook under "URL" section, for example:
https://hook.integromat.com/fd65o6rjnxwqoqx2gvlr86...
add to the url ?var=/pin/ where var is the name of the variable that you declared in Integromat
6. Press ok

Crying Baby Scenario

cryingBaby.JPG
Crying Baby - IoT project

On Integromat:

1. Create a new scenario on Integromat
2. Add WebHooks, Google Sheets, HTTP, Android/Mac services

3. WebHooks
3.1 Choose WebHooks -> Custom Webhook -> Add -> Change the Webhook name
3.2 Press "copy address to clipboard" and open a new tab on your browser
3.3 Paste the url that you copied on the search bar and add to it: ?sound=52.2&firstTime=1
3.4 Press enter and verify that "accepted" was printed

4. Google sheets
4.1 Add Google Sheets -> Add a row
4.2 Add a connection -> continue -> follow after the instructions
4.3 Choose the desired spreadsheet & sheet
4.4 Click on the first textBox -> choose "Date and Time" tab (at the top) -> choose "formatDate" -> choose your preferred date format
4.5 Click on the second textBox -> choose "Date and Time" tab -> choose "formatDate" -> choose your preffered time format.
4.6 Click on the third textBox -> choose "sound" variable -> press ok

5. Add filter on the link between the Webhook and Google sheets -> under condition choose "sound " variable and change the condition to be "Larger than" 70

6. Add a router

7. Android
7.1 Add Android and connect the router to it
7.2 Click on the Android service -> make a call -> connect to your android account -> add a phone number of the parent you want to call to -> press ok

8. Add filter on the link between the Router the the Android -> under condition choose "firstTime" variable and check if it equals to 0 -> press ok

9. HTTP
9.1 Add Http -> Choose "make a request" ->In the URL line enter the following address: http://188.166.206.43/XXXXXXXXXX/update/V4?value=... -> Instead of the X' add your AUTH TOKEN of your Blynk's project -> connect the Android to the HTTP

10. On tools add Sleep trigger -> change the delay to 300 -> connect HTTP to Sleep trigger

11. HTTP
11.1 Add Http -> Choose "make a request" ->In the URL line enter the following address: http://188.166.206.43/XXXXXXXXXX/update/V4?value=... -> Instead of the X' add your AUTH TOKEN of your Blynk's project -> connect the Sleep trigger to the HTTP
11.2 Add Http -> Choose "make a request" ->In the URL line enter the following address: http://188.166.206.43/XXXXXXXXXX/update/V3?value=...> Instead of the X' add your AUTH TOKEN of your Blynk's project -> connect the Router to the HTTP

12. Add filter on the link between the Router and the HTTP -> under condition choose "firstTime" variable and check if it equals to 1 -> press ok

13. Set scheduling switch to on

On Blynk:

  1. Check "WebHook in Blynk"
  2. Add new widget -> under "SMARTPHONO SENSORS" choose accelerometer -> under "OUTPUT" choose virtual pin and change to the desire one -> press OK

Feeding Baby Scenario

feedingBaby.JPG
calender feeding baby

On Integromat:

1. Create a new scenario on Integromat.
2. Choose Google calendar and HTTP services

3. Google calendar
3.1 Choose Google calendar -> search events
3.2 Add a connection -> continue -> follow after the instructions
3.3 Choose calendar id
3.4 Click on start date text line -> choose "Date and Time" tab -> click on "now"

4. HTTP
4.1 Add Http -> Choose "make a request" ->In the URL line enter the following address: http://188.166.206.43/XXXXXXXXXX/update/V2?value=... -> Instead of the X' add your AUTH TOKEN of your Blynk's project

5.1 Add filter on the link between the Google calendar the HTTP services -> set the time that you want the alert work

6. Set scheduling switch to on
6.1 Click on "Schedule setting" -> choose "At regular intervals" under "Run scenario" -> under minutes write down the difference in the baby's eating times -> press ok

Todays Updates Scenario

weather.JPG
Weather - Iot project

On Integromat:

1. Create a new scenario on Integromat
2. Choose Weather, HTTP and Gmail services

3. Whether
3.1 Add Weather service -> choose "Get current weather"
3.2 Write your city name under "City"

4. Add a Router

5. HTTP
5.1 Add HTTP -> Choose "make a request" ->In the URL line enter the following address: http://188.166.206.43/XXXXXXXXXX/update/V1?value=...
(choose temperature variable under favorites tab) -> Instead of the X' add your AUTH TOKEN of your Blynk's project

6. Gmail
6.1 Add Gmail -> send an email
6.2 Connect to your Gmail account (follow after this video)
6.3 Add recipient's mail address under "to" , the title of the message under "Subject" and the content that you send under "content"
The content we choose is:
The temperature is {{1.temperature}}. {{if(1.rain = null; ; "This is a rainy day. please take an umbrella")}} {{if(1.temperature > 30; "It's a hot day. It's recomended to wear shorts and t-shirt. http://188.166.206.43/XXXXXXXXXX/update/V1?value=... "; if(1.temperature > 24; "It's a sunny day. http://188.166.206.43/XXXXXXXXXX/update/V1?value=... "It's cold today. It's recomended to wear long cloths. http://188.166.206.43/XXXXXXXXXX/update/V1?value=...

7.1 Set scheduling switch to on

7.2 Click on "Schedule setting" -> choose "Every day" under "Run scenario" -> under time write down the time your want to send the mail -> press ok

Babysitter Needed Scenario

IOT project - create "babysitter" scenario in integromat
WhatsApp Image 2021-07-25 at 21.39.30.jpeg

Important:

1. Allow to integromat to post in the desire facebook group by adding integromat to the group's apps.
for more help, you can follow after this video
2. Upload some photos to google photos that you would like to attach with the "babysitter needed" message

On Integromat:

1. Create a new scenario
2. Add WebHooks, Google Photos, Facebook Groups

3. WebHooks
3.1 Choose WebHooks -> Custom webhooks -> Add -> name it by "babysitter ordering" and press save
3.2 Press "copy address to clipboard" and open a new tab on your browser
3.3 Paste the url that you copied on the search bar and add: ?time=12
3.4 Press enter and verify that "accepted" was printed

4. Google Photos
4.1 Add Google Photos -> Get a Media Item
4.2 Add a connection -> continue -> follow after the instructions

Option1 - upload the same photo without logic:
4.3 Select to get media item "By dropdown
4.4 Select the photo that you would like and Press OK

Option2 - uploads a changing photo depending on some logic:
4.3 Check the photos ID (Do so for every photo you would liketo use)
4.3.1 Select to get media item "By dropdown"
4.3.2 Select the photo that you would like and Press OK
4.3.3 Change the get media item choice to "By Mapping" and copy the ID to some editor
4.4 after you have all the photos ID, Verify that the get media item is selected to "By Mapping"
4.5 add some logic (you can see an example in the video)

5. Google Photos
5.1 Add Google Photos -> Download a Media File
5.2 Select "Base URL" and press OK

6. Facebook Groups
6.1 Add Facebook Groups -> Upload a Photo
6.2 Add a connection -> continue -> follow after the instructions
6.3 Choose the group that you would like to upload the meeasge to
6.4 Choose the "Google Photos - Download a Media File" option at the "source file" window
6.5 Add some message at the "Message" text box that include the time information that we get from the CPX
for example: "Hi all, I need a babysitter to :00 oclock today in Tel Aviv. Is someone available ?:)
- you can see the actual time information under "webhooks - custom webhook" in the side window

On Blynk:
1. Check "WebHook in Blynk"

Change Air Conditioner Degrees Scenario

AirCond.JPG
Change Air Conditioner Degrees

On Integromat:

1. Create a new scenario on Integromat
2. Add WebHooks and HTTP

3. WebHooks
3.1 Choose WebHooks -> Custom Webhook -> Add -> Change the Webhook name
3.2 Press "copy address to clipboard" and open a new tab on your browser
3.3 Paste the url that you copied on the search bar and add to it: ?changedTemp=1
3.4 Press enter and verify that "accepted" was printed

4.On tools add Sleep trigger -> change the delay to 300 -> connect WebHooks to Sleep trigger

5. Add filter on the link between the WebHooks and the Sleeper -> under condition choose "changedTemp" variable and check if it equals to 1 -> press ok

6. HTTP
6.1 Add Http -> Choose "make a request" ->In the URL line enter the following address: http://188.166.206.43/XXXXXXXXXX/update/V7?value=0 -> Instead of the X' add your AUTH TOKEN of your Blynk's project -> connect the Android to the HTTP

7. Connect Sleeper to HTTP

The CPX Side

WhatsApp Image 2021-07-27 at 20.02.04.jpeg

We almost finish :)

For everything to work well, we will need to connect the CPX and the code that we wrote in "arduino":

1. Download the attached arduino code file (with the suffix ino) and make the following changes:

  • In the variable "auth" insert your blynk authentication token (you can see how to get it in this tutorial)
  • In the variable "ssid" insert your wifi network name
  • In the variable "pass" insert your wifi password

2. Connect the CPX to your computer and upload the code in the arduino IDE

3. Disconnect the CPX from the computer and connect it to the battery holder ( you can see picture of this in the Supplies & Configurations step)

4. Place your brand new "Baby Care" device in a designated place in your baby room (preferably in the crib)