Last week, we tested the control circuit but failed to use the IR emitter and receiver to generate the signal. However we found some solution to this problem.
This week, we firstly finished the work on the program for LPC1768. In this program, we mainly use digital signal as the input signal because for LCP1768, the digital high voltage is the voltage that more than 2.0V, and the digital low voltage is below 0.8V. It is easy to generate the signal. The pin usage of inputs and outputs are as follow:
The basic principle of this program is to get the digital input from the circuit to decide wether there are someone come in or not. There are two pair of sensor in the circuit to test these condition. If no one pass through the door, both two pairs will give digital low to the board and the program will take no action.
If someone come into the room, the first sensor pair will get the pause and give out a digital high, the second sensor pair will give out a digital low, therefore the program can make a proper change to variables that hold the corresponding data.
If someone get out of the room, the second sensor pair will get the pause and give out a digital high, the first sensor pair will give out a digital low, therefore the program can make a proper change to variables that hold the corresponding data.
The program will count the time since the while loop was started and when it reach a significant time, the loop will break, the data will write into a file that saved at an USB and finally, the program was close.
This week, we also tried some ways to solve the distance problem of the IR sensor pair but no progress was made. Therefore we start to consider the design using laser diodes and photoresistors. Using this kind of sensor pair, the distance problem was solved. We will make more efforts on laser diodes and photoresistors but will not give up to use the IR emitters and receivers.
Following is a video link of the laser detector system we built during our testing.
https://youtu.be/YwuHotEfJQ8
Following is a video link of the laser detector system we built during our testing.
https://youtu.be/YwuHotEfJQ8