Introduction: Smart Walkway Lighting System- Team Sailor Moon
Hi! This is Grace Rhee, Srijesh Konakanchi, and Juan Landi, and together we are Team Sailor Moon! Today we will bring you a two part DIY project that you can implement right in your own home. Our final smart walkway lighting system includes a ultrasonic sensor, PIR Motion Sensor, Light to Frequency Converter, OLED screen, SD Card Read/Writer, IR Remote/Receiver, Humidity and Temperature Sensor, and a Photoresistor, three of which can be tested in our environmental model.
This walkway lighting system is a prototype designed to minimize light pollution through creative shielding methods(in the shape of a crescent moon, in honor of our team name), gather many different types of data and record it, and be aesthetically pleasing to the viewer. We wish you the best of luck with this project, and have lots of fun!
Team Sailor Moon
- For the environmental model:
- Multiple foam boards
- Construction paper
- Arduino Mega 2560 R3
- Tons of wires
- OLED screen
- Ultrasonic sensor
- IR receiver/remote
- Exacto knife
- Popsicle Sticks
- Dowel Rods
- Arduino Mega 2560
- 3d Printer
- Double-Sided Tape
- Hot Glue Gun
- SD Card Reader/Writer
- OLED screen
- Half Breadboard and Mini Breadboard
- A couple of yellow LEDs
- Male x female wires and male x male wires
- Wire strippers and custom wires (not necessary)
- Infrared Remote and Reciever
- Ultrasonic Sensor
- Light to Frequency Converter
- Humidity/Temperature Sensor
Be sure to download the .zip file at this link:
Step 1: Optional Side Project: Environmental Model
Now, let's say you want to test out the capabilities of our walkway lighting system, but you want to know what you're getting into before you get into it. Well, an easy option is to make our environmental model, which displays a select few features of our prototype in order to showcase how the lights may function out in the real world.
To get started, reference the supply list in our introduction, and lay out the materials such that all of them are easily accessible.
Cut the foam boards into two 17 x 17 cm squares and two more of the exact same size, except with a triangle at the top to create a house shape. Hot glue all of these together. This will create the model house to house all of your electronics, and keep them out of sight. Cut a square in the side of one of the squares to let the Arduino cable pass through.
Now, cut two foam boards into 51 x 44 cm rectangles. These will form the base of your project. Position the house so it's 17 cm away from the shorter side, and create a walkway leading up to the door. This should help you simulate someone walking up to the house later on. Do not glue the house down yet.
Walkway and Lights:
Cut out a walkway that's 17 cm long out of construction paper and glue it down, starting from the shorter edge (44 cm). This should help you position everything.
For the lights, cut out two strips of paper from a strip that is 2.5 cm (or an inch) thick. They should be 3 cm and 2 cm in length (1.25 and 0.75 in. thick).
Take the longer one and divide it into fifths (0.25 in. each) as shown in the picture. Fold along these lines and glue the overlap. It should now look like a rectangular prism, as illustrated in the next picture.
Once the glue dries, mark off a spot 0.25 in. from the top and make a cutout of only that side. This should ensure the LED can shine through.
Now, take the second strip of paper and mark out a curve as shown in the picture to cut out. Wrap the other end around the three sides of the lightpost that don't have the cutout and squash the top over the opening, ensuring that it covers the opening fully. The creases you are left with should be like the ones marked out in the picture.
Glue this all down, and tinker with it until you like it! Repeat as many times as you need.
Step 2: Environmental Model: Putting Together the Circuit
The circuit itself is rather straightforward, but be careful about rigging the wires correctly. After connecting everything to the breadboard and the arduino, cut out two holes in the base of the project. Run the LED wires through one hole, and the OLED and Ultrasonic sensor through the other.
For the LED, cut out as many square slots as you need, and poke the LEDs through them. Secure it with tape, and slip the lighting tops over it. We decided to conceal the ultrasonic sensor with a popsicle base, but feel free to get creative! Just make sure to position it at the very start of the walkway, without any items to block it. For the OLED screen, position it somewhere where it can easily be seen. We positioned it at the base of the project. The IR receiver and the photoresistor were placed by the windows we cut out of the house.
Step 3: Environmental Model: Troubleshooting and Code
After you're done with the electrical build, upload the code that is attached and run it. Hopefully it will work, but if it doesn't, troubleshoot! Once everything's working, proceed to cut the dowel rods you have into 3 cm. pieces, and glue it to the four edges of the base. This is a final move, so make sure everything is finalized before you do so.
Congratulations! You've finished the technical aspects of this build! Now all you need to do is jazz it up to your liking. We hoped you enjoyed this mini model :)
Step 4: Final Model: Creating the Circuit
Step 5: Final Model: Uploading Code to the Circuit
After installing the .zip file from the google drive link above, you should be able to find the coding folder. In it, you have the code for both the environmental build as well as the actual unit.
Open the one that you want to upload, then just press the upload button on the Arduino IDE. Make sure that the cables are correctly placed, and you should be able to run the program successfully.
All of the code is commented, so feel free to take a look around as to how it all works together. You can also see a diagram as to how the OLED screen was coded to use a number state system to display the text that you see.
The LED lights control uses if statements to change the brightness of the LED depending on the situation in which it is in.
Step 6: Final Model: Troubleshooting Help
You can encounter many issues while building any Arduino structure. If you run into any issues, it is more than likely for it to be an electrical issue, as that is where a lot of our own errors came in. We will list a number of common issues that we have encountered in order to help you spot them quickly.
- Data isn't being read:
- Double-check that all the pins are correctly placed from one pin to the other on both the breadboard and the Arduino Mega
- Code Doesn't Upload:
- If you have a busy port or just an uploading error, then most often than not, there has been a short circuit. This means that one of your ground (GND) or voltage (VCC) pins were not properly placed, causing a short circuit which interferes with the uploading process
- Code Uploads, but doesn't do anything:
- In the code, the first thing that it checks is whether or not the SD card is detected, so if it isn't detected, then the program will not even exit the setup. In this case, check that all the SD card pins are correctly placed and the power pins are also correct
If you still aren't able to get that to work, then pull up the Serial Monitor on the Arduino IDE and switch the BAUD rate to correspond with what it says in the code. From there, you can add some Serial.println(data); lines to check where the program stops or whether or not it is receiving values from the sensors.
Step 7: Final Model: 3D Print .stl Files
Please make sure to level your bed. These are very lengthy 3D prints and we would hate for them to possibly go wrong anywhere. Most of it does not need supports either. I printed it out in 0.28 for higher speeds, but 0.16 and anything in between are also perfectly fine if you want more detail. These prints for me took about 20 hours, and I had set them on 250% on my Ender-3.
Step 8: Final Model: Mount Circuit to the Interior
We just used the stickie back of the breadboard and mounted it directly to the back of the casing. It will be a very difficult fit inside, we highly recommend you use custom cabling as it makes it easier, but in our case, you can see it was a bit too tight. Also, at the bottom, please put in the power supply module with the battery within the casing. In this image, we had taken it out so it would be easier to view the contents within the case. Additionally, if you are not using custom cabling, use zip ties or hair ties to wrap the cables, it is a very tedious job, but it will make the insides look much better and more spacious for you to work in.
Step 9: Final Model: Close Up Light Fixture
We temporarily closed it up with some tape, but we highly recommend to use hot glue or a magnet fixture. The reason of our usage of tape was incased we needed to do any electrical troubleshooting. This did happen for us, but by using this method, we were quickly able to fix the solution. We don't recommend the tape for the final project, but until you are completely confident, don't make the side panel permanent affixed, or else troubleshooting becomes incredibly difficult.
Step 10: Final Model: Fix the Crescent and Attach It.
We drilled medium-sized holes on the sides of the housing and the crescent for wires to go through. Additionally, we drilled holes in the crescent shape for the LEDs. We drilled 9 holes but only used 4 of those holes because the LED,s were bright enough together. Additionally, we hot glued the crescent onto the box and affixed it there. Our crescent has 5 major holes that we used, 4 for LED's, and one for attaching to the mainboard. Once your wiring is complete, make sure to fix it on the top coving for the crescent.
Step 11: Final Model: Test It Out and Gather Data
This is a graph of two photoresistors over the course of the night. The blue line is the photoresistor that has nothing connected. It is a bare resistor. But the red line is lower, and that is because it is a snap circuits photoresistor and it has a black cylinder to point in only one direction. That would give us more accurate readings and take out the light from any other direction. To do this yourselves, you can take the sd card and open up the excel sheet. From there, select the time and any other column(s) you would like. It is very easy to graph and change what you would like to see from it. Hopefully, as light pollution gets better, we can see darker nights and lower values!
Step 12: Conclusion and Acknowledgments
And... that was it from Team Sailor Moon!
We hope that you were able to accomplish what you were looking to do, and hopefully you liked it enough to consider implementing our prototype in your own house ;)
But we couldn't have gotten here all alone- we would like to give credit where credit is due.
First of all, to our wonderful mentor, Jesus, who was there every step of the way- we are so thankful to you and for all that you have done for us in setting up this amazing program.
We'd also like to thank Ken, Geza, Kelly, Chris, and Cynthia for all the times they popped into the meetings and worked with us, giving us much needed feedback which helped us improve, or background knowledge on the subjects we were working with.
Thank you to Elenco for supplying all of the participants in the workshop with snap circuit sets- they came in very handy during the construction of our project.
And to the donors who made this program possible, we thank you for your support in this workshop. Without you, none of this would've been able to happen.
Finally, to Emily, Aanika, Anika, Sneha, Mary, Jessica, Megan, Lissette, and Leilani, our fellow participants, thank you for all of your support and for creating such a welcoming environment. We loved getting to know you over the past three weeks, and let's stay in touch!
-Team Sailor Moon
PS. We have added an extended version of the video above where we share more of our troubles that we have gone through to create this project. We hope you enjoy our rambles!
Participated in the