A student had an idea in grade 12 two years ago. Then passed it down to a grade 11 in 2016 , then went to a group of grade 12 in 2017. This project is meant for our school, this project is a display, so when a person walks by it will sense an object then there will be panels that will spin. It will rotate 180 degree. On one side of the panels it will have our school's name and mascot and the other side will have a mirror.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Choicing a Design
Each version of the project went and got a design change, so our design will be flush with the wall. The display will be placed near the front door of the school. This wall is in the shape of a trapezoid. So we planned to have have the design that continues with the trapezoid so it will be flush with the wall. The Design is divide in to 3 key parts a left triangle, a right triangle, and a Central rectangle were the the panels will be held. All 3 of these parts will match with the wall. The drawing is a example of the idea.
We also made a prototype the prototype is just he center part and the panels. We will teach you step by step how to make a prototype.
Step 2: The Materials
The material need are
Arduino Mega 2650(1)
Jumper cables(not car jumper cables) (alot both male and female )
ultra sonic sensors (2)
Cardboard or Foam-board
Glue (wood glue and hot glue)
If you want only one spinning sign use arduino uno and the code for it will be a bit different
We made our prototype out of wood so it can be strong .but you can make out of something else
Bill of materials for final project
Step 3: Starting the Prototype
(they wood can be switch with something else)
For making the box of the prototype, here are the steps.
Step 1. Cut the top/bottom and side to 52'' and 12'', the thickness of the board should be 3/4''.
Step 2. The top and bottom piece will be connected by a butt-joint. mark dots on both sides from 1'' from the edges and one in the middle. mark it for the top and bottom piece.
Step 3. Drill out the marked dots on both piece. then place both piece on the side pieces to mark out the holes for the top and bottom.
Step 4. Now drill the marks on the side pieces, then assemble the box together with screws.
Step 5. Cut out four squared triangles by 8'', 8''. pre-drill and screw on the back corners of the box, make sure to avoid the existing screws on the box.
Step 4: Part 2 of Making Prototype
Here are the Steps to make the holder for the servos.
Step 1. Cut out two sticks that are 8'', then cut two more sticks that are 46.5''.
Step 2. Glue the 8'' sticks 3'' below from the top of the box. then mark 2.3'' in the middle of the sticks, this is the servo length.
Step 3. Glue the 46.5'' outside of the marking on the 8'' sticks.
Step 4. Cut a piece of foam board to 45'', place the servo between the holder and pin the panel onto the servo.
Step 5: Program
The program for this was made in arduino the code was also made by a different group. The first thing we did was try and understand the code. The second was trying to upload the code. When we did upload the code we faced a bug. The first bug was that it wasn't working. That was fixed over time we also add a feature to the code. This feature is that if someone is too close to the sensor it will not run.
They can be broken down into couple parts the parts are setup,restart, main loop and the sensor code.
the link for the code
Step 6: Program Setup and Restart
The setup part code is the most basic part of the code it starts by defining pins for the sensors and creating variables for the servo and setting up attachment to the servos. The next part is making the define pins into inputs or outputs. This part will also set up all the variables need.
The next part is restart this part of the code will happen every time the circuit is turned on it will zero the servos.
Step 7: Program Main Code and Senor Code
The next part is the main loop. It starts by figuring out how far the closest person is. This is done by going into the sensors method which is located in the sensors part of the code. It checks if the person is in a certain distance away from the sensors if so the server will spin. It will spin 180 degree and wait 5 seconds to go back to its original location by spinning to zero degrees then waits for 5 sec and does it again and waits another 5 secs and go back to normal. After that it will go back to the top of the loop. (This can be simplified by a for loop there.)
The last part of the code is the part the figures out the distance it gets value from the sensors by sending a signal to the ultrasonic and then receive. This signal has an integer value, the value will divide by 2 then divide by 29.1 to get the distance.
Step 8: Circuit
The circuit that we used for the project we didn't make, It was made by the group before us. So we don't know what they did to make it, so are main job was to figure it out and fix its main problem. The main issue was that it would overheat. The solution
(The steps that I will be explaining are as if it was on a breadboard but for the final modal it will be on a copper board)
Step 9: Circuit Buliding Part 1
Connect the top and bottom power rails with a wire
And do the same with the ground rails
also you will need to hook up a voltage regulator
Put the regulator somewhere on the board
Then put a black wire connected to the middle pin and put it to ground
Next is the right pin get a red wire and connected it to the positive rails
Last the left pin will be left unconnected till we hook up power
Step 10: Circuit Buliding Part 2
From the arduino you will be hooking up the pins (2-9) to the breadboard this is for the servos
(If you can try to use white wire for organizational reasons)
Step 11: Circuit Buliding Part 3
Servos (You must use 180 servos for this)
For the servos you will need:
1 white wire
1 black wire
And 1 red wire
Then attach the wires to their corresponding colors ports on the servo.
Now hook up the red to positive rails
The black to ground
And the white to the same line as the other wires that are attached to the arduino
repeat it this 8 time on different pins
(Also try to keep them in order and spread out so the wires don't tangle)
Step 12: Circuit Buliding Part 4
Ultrasonic sensors (You will need 2 for this)
For the Ultrasonic sensors you will need to use
1 red male to female wire per sensor
1 black male to female wire per sensor
And 2 male to female of any other colour per sensor
Then hook up the red wire to the pin on the Ultrasonic sensors labeled Vss
After that hook up the black one to the pin labeled ground
Then the 2 random coloured ones to the pins labeled trig and echo
Next plug the red and ground wires in to there rails on the breadboard And hook up the trig and echo pins to pin 22 and 23 for one Ultrasonic sensors And 24 and 25 for the other
Step 13: Circuit Buliding Part 5
Power (last step)
Hook up the black wire to ground
And the red wire to the left pin on the regulator
Step 14: The End
after all those steps you should be done a prototype
Participated in the
Homemade Gifts Contest 2017
Participated in the
Arduino Contest 2017
Participated in the
Epilog Challenge 9