Hardware components: | ||||||
|
× | 1 | ||||
|
× | 1 | ||||
|
× | 1 | ||||
|
× | 1 | ||||
Software apps and online services: | ||||||
|
||||||
|
STORY
Project Description
The purpose of the project is to monitor what happening in the baby room when we are not present there. To capture the event in the baby room we will use the Cypress CY8CKIT-048 PSoC Analog Coprocessor Pioneer Kit. The kit has a sensor interface composed of a PIR Motion sensor, Humidity sensor, proximity sensor, ambient light sensor and a thermistor. Theses sensors will allow to detect:
- the presence of someone in the room
- the temperature of the room
- the ambient light in the room
- the humidity of the room
Once the data collected by the kit, it will be sent to the Raspberry Pi. To notify the parents we will use:
- OpenHab: which is an open source automation software, will be used as a web server to see the video streaming of what is happening in the baby room.
- GSM module which will allow to send SMS directly to the parents.
Finally, to have a good idea of what happening in the baby room, a Raspberry pi camera will be used to start recording when the sensors will detect the presence of someone in the room.
I2C Configuration
I2C is a very commonly used standard designed to allow one chip to talk to another. So, since the Raspberry Pi can talk I2C we can connect it to a variety of I2C capable chips and modules. So, in our case we will use I2C to connect with the Cypress PSoC board. It is very useful to be able to see which devices are connected to your Pi as a way of making sure everything is working. To do this, it is worth running the following commands in the Terminal to install the i2c-tools utility.
$sudo apt-get install -y python-smbus
$sudo apt-get install -y i2c-tools
To test I2C and see all the connected device you can type the command:
$sudo i2cdetect –y 1
On the GPIO, pins labelled SCL (clock) and SDA (data) can be used for I2C. The pins labelled MOSI, MISO and SCKL can be used to connect to high speed SPI devices.
Analog Coprocessor Configuration
The analog coprocessor is a programmable processor which allows to work with sensors. The kit comes with a software called PSoC Creator, which allows to design circuit using the on-boards module. Thus, you can create your own design using the onboard modules. Furthermore, the kit is composed of in-build resistor, led, amplifier that you can use to model your circuit. For our project, we will use:
- The capacitance module for sensing the humidity
- The voltage module for sensing the motion
- The resistance module for sensing the temperature
- The current module for sensing the Ambient light
- The ADC module to convert the data collect from analog to digital
- The I2C module for the communication between the kit and the Raspberry Pi
The schematic above was realized using PSoC Creator project Examples (Ambient_Light_Sensing, PIR_Motion_Sensing, Inductive_Proximity_Sensing, Humidity_Sensing).
Once the design is done you can do the pin assignment.
Read More: Baby Room Watcher