Hi, with this instructable I want to show you an open source pendulum that can compute and process the measured oscillation period to find the gravitational acceleration of the earth (~9,8 m/s²)! It's the most powerful of all, discover it!

The project is based on the Arduino platform, but it contains a DIY PCB. The structure is made from an AutoCAD 2016 drawing that has been laser cutted. If you haven't got a ball, there's a 3D-printed ball file in my site.

To check the position of the ball I used three infrared break beam sensors from Sparkfun (tutorial): they are really sensitive but they can't work with a lot of light (if they don't work anything, turn off the lights in your room).

You can download all the files and view them using the preview function in my site.

YouTube video (part 1)

Step 1: Laser Cutting & Assembling

As you can see in the viewer under this step, the AutoCAD project is really simple: with less than fifteen minutes you can make your own pendulum by using a 4 millimeters-thick plywood layer.

Then assemble the pieces: it's easy! Put the components on the panels and fix them (back and lateral) with some nails and Vinavil glue.

YouTube video (part 2)

A360 preview:

Step 2: The Structure

Nothing of difficult... a 27,5*16*1 cm wood layer and a 5*27,5*2 cm splint.

In my website there is the 3D model of the structure, to see it visit the project page.

Step 3: Ball and Finishings

The ball is a .stl file, download it and start the printing (you can also use an iron ball, it's the best).

For this step you need some iron hooks and a fishing wire. Smooth the corners and a tie rod if the splint is a bit bent, two if it isn't.

Now, an engraving for the USB port (you'll spend a lot of time for it...).

Step 4: DIY PCB

This is the less expensive method to create an homemade PCB from low cost things:

  • Laser printer (>600 dpi)
  • Photo paper
  • Blank PCB
  • Muriatic acid (10% of HCl)
  • Hydrogen peroxyde (10% solution)
  • Clothes iron
  • Acetone
  • Steel wool
  • Safety googles and gloves
  • Sodium bicarbonate

The first thing is clean the board with the steel wool under the water. If the copper appears a bit oxidized, you have to wash it with vinegar. Then, scrub the copper side with a paper towel soaked in acetone that will remove any remaining dirt. You must rub very hard on every square millimeter of the copper. In this procedure you mustn't touch the copper with the hands!

Print the PCB.pdf file (you can find it here) on the photo paper using a laser printer and don't touch it with the fingers. Cut at the correct size and allign the image on the copper side and press it with the iron (it must be really hot but without vapor) for about five minutes. Let it cool with all the paper, then remove the paper really slowly under a lot of water. If there's no toner on the copper, repeat all this procedure; if these's all the toner correctly but a small zone hasn't got any trace of it, use a permanent marker.

Be careful! In a plastic box put three glasses of muriatic acid and one of hydrogen peroxyde; you can also try with equal amounts for a powerful etching. Put the PCB in the solution and wait about ten minutes. When the etching is finished remove the board from the solution and wash under water. Put two spoons of bicarbonate in the acid and throw in the WC.

Now you must make all the holes manually with a drill press. Then you are free to remove the toner by using acetone and alcohol. Congratulation! The work is finished!

Step 5: Components

To solder the components, please download the .SCH and .BRD files in my website and open them using Eagle by CadSoft.

Step 6: LCD, Buttons, Switch...

Now you must mount all the components of the panels, like the LCD, the buttons, the sensors and so on...

Step 7: Sensors

Add the sensors as showed in the pictures, then make wood caps by a wood splint using a rotary tool to cover and protect them.

Step 8: Arduino Firmware

By using the official USB 2 Serial adapter, you can upload the sketch like an Arduino UNO.

To learn about the sketch, download it. Problems? Preview.

Step 9: Companion & VB .NET

The companion program for JustAPendulum is programmed in Visual Basic .NET using Visual Studio. It contains a lot of tools to command the Arduino core: sensor calibration, wire lenght adjustment and data feedback. This program isopen source as the firmware: download the source code and edit, remix and adapt it but you must respect the Creative Commons license.

There are some interesting functions: the simulator, the ball tracking and the charts. When the companion receives the oscillation period the "simulator" starts by trying to simulate the oscillation period using three frames I made with Paint. The other one, the "ball tracking", send a command to the pendulum and receives the current position of the ball: turn on it and release the ball! The charts are displayed at the second measurement and they can help you to see the changes with the tables. Other functions can be found in the other sections: "Controller" has got two buttons: one to start the measurements and another to reset the microcontroller. "Advanced" contains the ADC monitor and a calibration panel; the other one called "About me" displays the logo, the Creative Commons license and the version information.

Code preview

Step 10: Calibration Function & Sensors

JustAPendulum use three sensors with a minimal configuation to detect objects across the IR beam. The circuit is really small and easy to make. It returns an analog value that can be readed on A0, A1 and A2 pins. Why three sensor? I used three sensors to track the ball on the screen of the companion program.

JustAPendulum companion has got a function called "Calibration". The MPU needs a calibrated value to calculate the oscillation period: in base to the light in your room the three sensors that I used change the analog values. 1000/1023 is the standard value for a room with a dim light. Note that these sensors can't run with a big light near them!

The calibration cannot be made without the ADC monitor: turn on it and observe the values. Then put a hand on the first sensor. Are the values changed? If no, turn off the lights in your room. If they're changed, look the current value and press the "Manual calibration" button. In the text box write it with some approximation. For example if the new values are 1005, 1007, 1010, ecc... you must write 1000 and then press enter.
To adjust the lenght of the wire (default 74 cm) press "Wire leght" and write the value. Then you have to set the measurement error, in base to the used tool: if you're using a tape measure the sensitiveness is 1 mm.

Note that for a better result, the room should be dark.

All the values will be stored in the EEPROM of the ATmega328p microcontroller.

Step 11: Charts and Tables

The companion can show charts and tables, look at the photos. You can also export Excel files!

Step 12: Formulas

Physics! Look at the pictures!

Step 13: Use It!

Congratulation! Your pendulum is ready!

To see it in action please watch my video or website!

I really hope you like this project...

<p>Don't throw the used etching fluid in the toilet! It's toxic and needs to be deposited properly! We have only one environment.</p>
HCl (muriatic acid) + H2O2 + sodium bicarbonate = you can throw it in the toilet. Ferric chloride = really toxic. I asked this question to my chemistry teacher!
<p>You forgot the absorbed copper. That's what making it toxic. So you can throw it in the toilet as long as it is unused. But the copper ions will make it chemical waste.</p>
<p>Oh, thanks... Why it is so toxic?</p>
<p>It's not a strong toxin (see <a href="https://en.wikipedia.org/wiki/Copper_toxicity">https://en.wikipedia.org/wiki/Copper_toxicity</a>). But we should get used to be responsible for what we do. Though a little waste may not harm, many little wastes will lead to pollution. So collect the waste and bring it to your local refuse disposal. </p>
<p>Thanks! I'll say it to my teacher!</p>
<p>See also this one: <a href="https://www.instructables.com/id/Stop-using-Ferric-Chloride-etchant!--A-better-etc/">https://www.instructables.com/id/Stop-using-Ferric-Chloride-etchant!--A-better-etc/</a> Looks like you actually don't need to throw it in the gully at all ;-)</p>

About This Instructable




More by SquareBoot:Android edition for JustAPendulum JustAPendulum: open source electronic pendulum RoverBluetooth: Arduino-based Bluetooth car 
Add instructable to: