RDCD is the Remote Data Collection Device. It is used to collect information on how many people use a certain room inside of your home or business throughout a certain period of time. The RDCD is also used has a small smart home feature that will turn on the lights for you when you come into the room and then turn them off once everyone has left. The device also collects the total number of people that have entered the room and you can pull this information at any time.
Step 1: Materials Needed
1. 1 Breadboard (BB830)
2. 1 NodeMCU
3. 2 Reflectance Senor's (TCRT5000)
4. 1 LED
5. 4 AA Batteries
6. 1 AA Battery pack
7. 1 9 volt battery connector
8. Breadboard wires (male-male, male-female, female-female)
9. Microsoft Visual Studio (application for coding)
10. Popsicle sticks, hot glue, and hot glue gun (optional, you don't need to make the case we did)
Step 2: Put It Together
1. You'll need to know which connections need to be made where on the actual reflectors. In the first picture, the pins have been labeled so you don't forget which is which. They are pretty well labeled on their own, but it's good to have a reminder.
2. For the wiring phase, you'll only need the male-male wires to make connections. In the second picture, we have the pins of the sensor aligned with their corresponding wire connections. We used gray as a signal wire identifier. This wire is plugged to an assigned pin of your choice (We recommend you use D4, D5, and D6). These are the wires that send a signal back to the NodeMCU to perform desired functions. The power wires, which are the other colored wires, are set up as follows: Darker colored wires are ground wires, brighter colored wires are for power (Dark = -, Bright = +).
3. The light receives power from the NodeMCU through the signal port its plugged into. (You'll see in the code that one of the pins is set as an output rather than an input). And the other wire is plugged into the ground port on the side rail.
4. All of the reflectance sensors are powered by the external battery pack which is plugged into the power rail on the breadboard.
5. Follow the pictures and that's pretty much it for wiring.
Step 3: Code
The code tells the NodeMCU when something passes by the first reflector to keep track of that and add one to the counter. When something passes by the second reflector, it tells the NodeMCU to subtract one from the counter. When something passes by the first sensor, it turns the light in the room on. However many times something passes by that first reflector is how many times something will have to pass by the second for the light to turn off.
Step 4: Model and Final Remarks
Model-wise and how you want to implement this is up to you. We recommend using something other than a popsicle model as you saw in the video. The male-female wires and female-female wires the are listed in the materials list are if you wish to make you model larger. You can connect the wires to others, in turn, making them longer. Good Luck!