Introduction: Digital Stud Finder
Stud Finders are a simple concept. Two Capacitive sensors:one sending a pulse wave the second receiving and measuring the voltage decrease across material in between the two plates.
In an attempt to advance this design, this project was set out to make a home made stud finder that is capable of creating blueprint that a homeowner or contractor can use for renovation designs without drilling into walls to find surprises.
Using an Arduino Uno, TFT Screen, SC Card Reader, Copper Plate and Optical Mouse Sensor this project achieves that goal.
Step 1: Supplies
TFT Screen with SD Card
PS2 Optical Mouse
1 MegaOhm Resistor
3.5mm Center Ground Plug
Cardboard Box and more cardboard pieces for mounting
Plastic Piece to hold copper plate
Step 2: Building the Box
Base of Housing Box:
-Cut a hole in the bottom of the outer box in the shape of the copper plate and plastic piece which will house this elements.
-Cut an additional hole to hold the base of the optical mouse sensor base.
-measure a piece of cardboard that can slide fully inside the box. Cut 3 pieces this size.
-place the first sheet into the box
-cut through the bottom of the housing box to match the size of the capacitor plate hole and the optical mouse hole.
-Attach a second piece of cardboard over the capacitor plate to prevent sliding and cut around the optical mouse circuitry.
-Apply using Hot Glue
-Add a third sheet, with the same cut outs. This will be used to move the Arduino Uno closer to the interior top of the box.
Front of Box:
-Cut a small strip the size of the 40 pin terminal on the TFT Screen.
-Add a small hole on either end to attach a power strip.
Step 3: Mounting Pieces
Attach the Optical Sensor the following way:
Orange- CLOCK (Digital Pin 6)
Brown- DATA (Digital Pin 5)
A Single Lead should be connected to the capacitor plate. This lead will be connected to a resistor. On the same side of the resistor a lead she connect to the sensing pin (Digital 2).
The other end of the 1 MegaOhm Resistor is connected to Digital Pin 3.
Before inserting the mounting plates into the housing box, connect the 9V battery to the switch and the 3.5mm plug to the Arduino Uno.
To enable access to the SD card reader and secure the box together, the screen is mounted from the exterior of the box.
Allign the 40 pin terminal through the hole made in the previous step.
Press the TFT screen into these ports gently.
Step 4: Coding
Arduino code is broken down into 4 parts: Capacitance reading, motion tracking, GUI, and writing to SD.
The capacitor plate uses the CapacitorSensing library. You initiate the capacitor plate and don’t have to worry about it until motion is tracked.
The Optical sensor is more complicated, the numerous functions required of the mouse are necessary to initiate the clock cycle and ensure the Arduino is capable of decoding the binary system of pulse transmitted data.
The Graphical User Interface displays the capacitance rating, distance traveled, a plotted value point (color designated) and outputs a rough estimate of what material may be there. Download the UTFT Library here: http://www.rinkydinkelectronics.com/library.php?id... Information from your screen provider will lead you to select which screen model and pinouts you will need to utilize.
Lastly the SD card prints each new data point to a text file that can be inserted into a PC to do higher level computations inside an Excel sheet. This requires the SD.h and SPI.h libraries. These can be found through an Arduino search under "Include Libraries....."
Code is attached below:
Step 5: Excel
Using VBA, I created a blueprint generator script which can read in all of the CSV values from the Arduino and display them scaled to size on a plot. This plot comes with a scale so that it can be enlarged to 36 inch paper for contractors to use.
The Embedded Excel Worksheet and an example graphic are below:
Step 6: Conclusion
Overall I had a fun time exploring capacitance sensing concepts and hope any help to approve upon the sensor in this design will be shared across the Instructable Community.
Below is a video of the working device finding metal studs and electrical wiring.
Participated in the
Microcontroller Contest 2017