Heads up! This is for a school project. and by no means made for a real purpose.
Step 1: Intro
While it may seem intimidating at first, learning how to build a sensor with the help of a Arduino and scrap is fun and easy to do.
In this instructable we provide a step by step guide on how to build a Motion resistor made out of scrap and a pencil.
In addition we provide an overview of important tools and electronics we used.
We hope you will take the time and come build a sensor with us.
Step 2: Tools and Materials
- A Pencil
- A piece of wood
- Copper wires
- Glue gun
- A saw
- A hammer
- A drill
- The Arduino
- A breadboard
- A PC for coding
- LED lights
- Small copper wires
Step 3: Building the Motion Resistor
We begin with a piece wood and start making a small cut in the middle, this is where the pencil will go.
Next we take the pencil and with the help of a razor blade we take out the graphite. Be very careful here with the razor blade. If this sounds too dangerous there are alot of different ways to get the graphite out of a pencil. Or choose something else to replace the graphite with, it must be able the condust electricity though.
Put the graphite with the help of some glue in the cut we just made in the wood. Add 2 copper wires to each end of the graphite. Remember which side you want to use as the positive and negative side ( ground and 5V ).
The next step is to build the assisting piece of wood with the third wire which will slide over the graphite ( see picture ).
First make a vertical cut in wood, this is where you will carefully glue the wire. if you so desire you can attach 2 small pieces of wood or any other material to both sides of the wood. This will prevent the wood from not sliding away and hold it in place.
Now your Pencil resistor is done and ready to use. but hold on, there are two more important step! the arduino and coding
Step 4: Arduino
This is the arduino. You should connect this to the computer to put codes in it.
We connect the red copper wires from both sides of de pencil to each side of the breadboard. between these copper wires and the + / - we connect a resistor, because otherwise the volt output is too high for the breadboard to handle. The - goes in the ground pin and the + goes in the 5V. The blue copper wire goes into the A0 also with a small resistor in between them.
Next we connect 3 LED's to three Pins of choice, it doesn't matter where they go, you just adjust your code to it(for this project we used 9,10 and 11). For the last part we put three resistor from the LED's to - on the breadboard side.
Now the last and most fun step: Coding!
Step 5: Coding
The Picture above is the Code we used for this project. The code is a combination of an excisting code from the arduino project book and the other part is self written.