I live alone in a small house in Shenzhen, and i really I love this graceful and dynamic city. As an software engineer, I have no girlfriend yet, and usually nobody visit my room, I really love this because I do not need to clear my room!
But, I found that I have a, or some, roommates recently: HELLO, my Roommates!
Yes, my new roommate is mouse. The scattered crumbs pasta provides them enough food. I do not see them during the daytime, they always get out for food in the night. But I think as we lived together for such a long time, it is very impolite for not saying hello to each other. Of course I sincerely wish that they are friendly to me.
Miss/Mr mouse, if you are too shy to say hello to me, what about leave me a photo, to let me know who I am sleep with?
So, I planned to use Arduino, and some of the basic modules such as Serial Camera, PIR Sensor, to make a simple automatic camera to take a photo of my roommates.
Step 1: Module Preparing and System Design
The following modules are needed in this project：
PIR Sensor: This module is used to detect the mouse, if mouse detected, Arduino begin to take photo;
Serial Camera：a simple to use camera, take photo for mouse in the detecting area;
Crowduino Uno-SD: An Arduino compatible main board, Compared to the Arduino Uno, there is a SD card socket on the board, to help me store the pictures on the SD card.
Besides, A SD Card is needed to store the mouse picture, and i need some jumper wires are needed to connect these modules, and a LED to help me debugging.
The whole story is: when the mouse get out for food and detected by PIR sensor, the mainboard Crowduino Uno-SD control the serial camera to take a photo, and then stores the picture in the SD card, so I can get these pictures in the next morning.
Step 2: Mouse Detection With PIR Sensor:
A PIR sensor(passive infrared sensor) is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. All objects with a temperature above absolute zero emit heat energy in the form of radiation. This sensor used in my project often detects infrared light that emit by human(36 ℃ to 38 ℃) . As the mouse has the same temperature arrange , this sensor can also detects the mouse. The Sensitivity and detecting arrange can be adjusted, which I will explain in the debugging.
Connect power and GND of PIR sensor to Crowduino, and the SIG to A5 of Crowduino. To help my debugging, I also connected a LED between the D5 and GND, a resistor about 300ohm is need to serial connected to the LED to limit the current.
If the PIR detects mouse, it will send a signal (actually a voltage level) to Crowduino: Hey, I detected the mouse, please go on the next step!
Step 3: Install the Serial Camera and SD Card
As the Crowduino get the message that a mouse is coming, it will told the Serial camera to take a photo. This kind of serial camera is easy to use, after connecting its power and GND with Crowduino, connec it’s input and output(RX and TX) to Crowduino digital pins D1 and D0
The data from serial camera need to be stored. Install the SD card into the socket on the Crowduino.
Step 4: Firmware Download
Download the firmware and implement it on your computer. Select the serial port and “Arduino Uno” to download the sketch the mainboard Crowduino.
Step 5: Camera Focus Adjustment and PIR Sensor Detecting Range Adjustment.
In this step, I need to adjust PIR detecting range. There are 2 knobs on the PIR sensor, the left one is used to adjust the detecting arrange. Simulate the mouse with you hand, and move your hand slowly in the detecting range, adjust the knob to make the PIR sensor detects your hand easily.( the LED would be on as the PIR Sensor detects successfully)
And then, you will also need to adjust the camera focus, this would matter if the photo of my roommates clear. In the previous step, if the PIR sensor detects your hand, then the camera should have taken a photo. Check the image in the SD card with PC, if It is not clear, you can adjust the focus by rotating the lens. It may cost some time to Repeat this. You can also download a tool in the wiki to help you adjust the focus easily.
Step 6: Implement and Start to GO!
it is a good idea to encase the whole system, i use a mini papar case above. cut some holes to make the camera and PIR sensor to get out. connect a 6V or 9V DC power to the power Jack of Crowduino, or you can also use a battery holder and 4 batteries to make it movable。
It is important to implement this system to these places that the mouse like. corridor, Corner of cabinet are usually playground of mouse, implement the system here would works.
Delete the images in the SD card, and, remember not to close the light, because I do not implement a flashlight yet, and go sleep.
Check the SD card in the next morning, to see if the roommates leaved his/her figure!