Difference between revisions of "Open Source Welcome Door Report"
From Microduino Wiki
(→Other Materials) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
| | | | ||
==Outline== | ==Outline== | ||
− | * | + | *Project: Microduino open source welcome door report |
− | * | + | *Objective: Use Microduino module to build welcome door human body detection system |
− | * | + | *Difficulty: Medium |
− | *Time- | + | *Time-consumig: 2 hours |
− | * | + | *Maker: Peng |
*Introduction: | *Introduction: | ||
**Welcome door human detection system detects whether there is someone near the 3 meter range through heat release sensor. | **Welcome door human detection system detects whether there is someone near the 3 meter range through heat release sensor. | ||
Line 58: | Line 58: | ||
|} | |} | ||
|} | |} | ||
+ | [[File:welcomebom1.jpg|900px|center|thumb]] | ||
==Principle of the Experiment== | ==Principle of the Experiment== | ||
*Welcome door human body detection system is mainly divided into '''detection''' and '''control''' two parts. | *Welcome door human body detection system is mainly divided into '''detection''' and '''control''' two parts. | ||
− | *'''Detection part''' | + | *'''Detection part''': |
**Use infrared pyroelectric sensor '''[[Microduino-PIR]]''' to detect the nearly infrared characteristic signal of the body. | **Use infrared pyroelectric sensor '''[[Microduino-PIR]]''' to detect the nearly infrared characteristic signal of the body. | ||
**The working principle of the sensor '''[[Microduino-PIR]]'''. | **The working principle of the sensor '''[[Microduino-PIR]]'''. | ||
***Human body certain wavelength about 10um, the infrared ray which can be detected by pyroelectric sensor and passive infrared sensor. | ***Human body certain wavelength about 10um, the infrared ray which can be detected by pyroelectric sensor and passive infrared sensor. | ||
− | ***The infrared rays of human body gather on the infrared probe after the enhancement of Finel filter, and the temperature of the pyroelectric element in the probe will change and release electric charge outside. After the subsequent | + | ***The infrared rays of human body gather on the infrared probe after the enhancement of Finel filter, and the temperature of the pyroelectric element in the probe will change and release electric charge outside. After the subsequent circuit's processing it can produce addressable electrical signals. |
− | *'''Control part''' | + | *'''Control part''': It's divided into sound and light control. |
**'''Shine''' units adopt '''[[Microduino-Color LED]]''' module, which can let the LED presents beautiful color. | **'''Shine''' units adopt '''[[Microduino-Color LED]]''' module, which can let the LED presents beautiful color. | ||
− | **'''Sound''' part processes audio files through '''[[Microduino-Audio]]''' module. '''[[Microduino-Amplifier]''' module the power amplify module drive the horn to produce sound. | + | **'''Sound''' part processes audio files through '''[[Microduino-Audio]]''' module. '''[[Microduino-Amplifier]]''' module the power amplify module drive the horn to produce sound. |
[[File:Doorwelcome1.jpg||600px|center]] | [[File:Doorwelcome1.jpg||600px|center]] | ||
Line 79: | Line 80: | ||
*Overlay '''[[Microduino-Core]]''' and '''[[Microduino-USBTTL]]''' together. | *Overlay '''[[Microduino-Core]]''' and '''[[Microduino-USBTTL]]''' together. | ||
** Use the USB cable to connect '''[[Microduino-USBTTL]]''' and prepare to upload. | ** Use the USB cable to connect '''[[Microduino-USBTTL]]''' and prepare to upload. | ||
− | ** | + | **Note: Please upload programs before stacking all modules together. |
*Open Arduino IDE for Microduino environment (The reference to set up:'''[[AVR Core:Getting started]]''') | *Open Arduino IDE for Microduino environment (The reference to set up:'''[[AVR Core:Getting started]]''') | ||
*Click '''[Tool]''', and confirm '''board card(Microduino-Core)and processor(Atmega328P@16M,5V)''' selected rightly, and select the corresponding '''port(COMX)'''. | *Click '''[Tool]''', and confirm '''board card(Microduino-Core)and processor(Atmega328P@16M,5V)''' selected rightly, and select the corresponding '''port(COMX)'''. | ||
− | *Click '''[File]'''->'''[Open]''', browse to the project program address, and click ''' | + | *Click '''[File]'''->'''[Open]''', browse to the project program address, and click '''"WelcomeBodyDetector.ino"''' to open the program. |
*After all these items are correct, click '''"→"''' button to download the program to the development board. | *After all these items are correct, click '''"→"''' button to download the program to the development board. | ||
− | == | + | ==Assembly== |
{| border="0" cellpadding="10" width="100%" | {| border="0" cellpadding="10" width="100%" | ||
|- | |- | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | *'''Step1''' | + | *'''Step1''': |
− | **'''As the following | + | **'''As the following figure shows''', fix '''[[Microduino-Cube-S1]]''' on the floor '''structure A2''' with '''nylon screws''' and '''nylon studs''' . |
− | + | **Stack the modules on the floor '''[[Microduino-Cube-S1]]''' in the following order. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ** | ||
***'''[[Microduino-Core]]''' | ***'''[[Microduino-Core]]''' | ||
***'''[[Microduino-USBTTL]]''' | ***'''[[Microduino-USBTTL]]''' | ||
Line 106: | Line 98: | ||
***'''[[Microduino-Amplifier]]''' | ***'''[[Microduino-Amplifier]]''' | ||
***'''[[Microduino-Sensorhub]]''' | ***'''[[Microduino-Sensorhub]]''' | ||
+ | **Then take out '''structure B4''' and join in the corresponding position of '''structure A2'''. | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | [[File: | + | |
+ | [[File:Welcome11.jpg||500px|center|thumb]] | ||
|} | |} | ||
{| border="0" cellpadding="10" width="100%" | {| border="0" cellpadding="10" width="100%" | ||
|- | |- | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | *''' | + | *'''Step2''': |
− | ** | + | **'''As the following figure''', insert '''structure B6''' into the '''baseboard''' and fix the horn. |
− | **''' | + | **Use '''nylon screws''' and '''nylon nuts''' to fix the two sensors '''[[Microduino-PIR]]''' on the two '''structure B1''' respectively. |
− | **Insert '''structure | + | **Insert '''structure B1''' into the '''baseboard'''. |
+ | **Connect the '''horn''' to the interface of the module '''[[Microduino-Amplifier]]'''(no difference sequence). | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | [[File: | + | [[File:Welcome21.jpg||500px|center|thumb]] |
|} | |} | ||
{| border="0" cellpadding="10" width="100%" | {| border="0" cellpadding="10" width="100%" | ||
|- | |- | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | + | ||
− | * | + | *Connect the two sensors '''[[Microduino-PIR]]''' to the interfaces '''D4/D5''' and '''D6/D7'''('''which are marked in blue in the figure'''). |
− | + | *Connect '''[[Microduino-Color led]]''' to the '''A0/A1''' interface ('''which is marked in red in the figure'''). | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | * | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | [[File: | + | [[File:Welcome6.jpg||500px|center]] |
|} | |} | ||
{| border="0" cellpadding="10" width="100%" | {| border="0" cellpadding="10" width="100%" | ||
|- | |- | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | *''' | + | *'''Step3''': |
− | **'''As | + | **'''As the following figure''', insert the 3 '''structure B3''' into the '''baseboard''' ('''structure A2'''). |
− | + | **'''As the following figure''', use '''nylon screws''' and '''nylon studs''' to fix '''[[Microduino-Color led]]''' on the '''top cap(structure A1)'''. | |
− | |||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | [[File: | + | [[File:Welcome331.jpg||500px|center|thumb]] |
|} | |} | ||
{| border="0" cellpadding="10" width="100%" | {| border="0" cellpadding="10" width="100%" | ||
|- | |- | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | *''' | + | *'''Step4''': |
− | ** | + | **Fix '''structure B5''' on the indicating interfaces as the figure shows, and the welcom door detector is completed. |
− | |||
− | |||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | [[File: | + | [[File:Welcome41.jpg||500px|center|thumb]] |
|} | |} | ||
==Operating Instruction== | ==Operating Instruction== | ||
− | *When '''[[Microduino-PIR]]''' sensor has detected the someone is near within the range, '''[[Microduino-Color LED]]''' module will change color, and Auido module will broadcast | + | *When '''[[Microduino-PIR]]''' sensor has detected the someone is near within the range, '''[[Microduino-Color LED]]''' module will change color, and Auido module will broadcast "welcome to come" or "good-bye". |
==The Instruction of the Code== | ==The Instruction of the Code== | ||
Line 198: | Line 182: | ||
== FAQ== | == FAQ== | ||
− | * | + | *Q: '''Which interface of the [[Microduino-Amplifier]] module dose the horn will be inserted into?''' |
− | ** | + | **A: The horn does not have to distinguish between the left and right interfaces, any interfaces will be OK. |
− | * | + | *Q: '''Why do we think the reaction of the [[Microduino-PIR]] is slow?''' |
− | ** | + | **A: Because the [[Microduino-PIR]] sensor has 2.3 seconds' delay, the sensor doesn't work during the 2.3 seconds after detecting the people. |
− | * | + | *Q: '''Why does it say welcome and good-bye in the other way around?''' |
− | ** | + | **A: You can change the position of the [[Microduino-PIR]] sensors. |
Latest revision as of 06:28, 30 September 2016
ContentsOutline
Bill of Material
Principle of the Experiment
Program Download
Programming
Assembly
Operating Instruction
The Instruction of the Code
{
//First passing D4, then passing D6 is entering.
if((digitalRead(body_pin) == 1) && (digitalRead(body_pin2) == 0))
{
FLAG_1 = 1;
delay(200);
}
if((digitalRead(body_pin) == 1) && (digitalRead(body_pin2) == 1) && (FLAG_1 == 1))
{
colorWipe(color[random(1, 10)]);
audio_choose(1);
Serial.println("COMING IN");
FLAG_1 = 0;
delay(1300); //1300
}
// First passing D6, then passing D4 is leaving.
if((digitalRead(body_pin) == 0) && (digitalRead(body_pin2) == 1))
{
FLAG_2 = 1;
delay(200); //2000
}
if((digitalRead(body_pin) == 1) && (digitalRead(body_pin2) == 1) && (FLAG_2 == 1))
{
colorWipe(color[random(1, 10)]);
audio_choose(2);
Serial.println("GOING OUT");
FLAG_2 = 0;
delay(1300); //2000
}
} FAQ
|