Introduction: Gravity Acceleration Value Tester

Based on kinematics, this project measures the value of the gravity acceleration constant (the ‘g’) by measuring the free-fall movement data.

By the guide of the LCD screen, an object (such as wood ball, glass ball, steel ball, etc.) falls freely from someone’s hand through the main body of the system (a long vertical cylindrical tube) from the top end to the bottom. Any initial velocity or height are accepted. Then the system will automatically give the calculated ‘g’ value, and show them through a LCD screen.

Feature list:

1) Test light intensity and get default value for the test in any light condition;

2) Provide operation instructions and error correction for tester by LCD;

3) Accurate time measurement by using 3 phototransistor-LED groups;

4) The ‘g’ constant calculation and display by LCD

Step 1: How to Use

Step 1: Preparation.

Follow the instructions on the LCD screen. At the beginning, LCD will prompt:

"WELCOME TO GAME, BEGIN WITH PRESS";

Step 2: Environmental Testing.

When the switch is pressed, the system prompts:

"PLEASE WAIT ..."

The system will take 3 seconds to prepare for the test.

Step 3: Ready and Waiting for Drop.

This step system may show the following two results:

1) if everything is normal, the system shows:

"PLEASE DROP SOME THING ON THE TOP"

Then the system will go to the step 4;

2) if there is an accident, for example, during the environmental testing there are very strong light changes, the system will prompt:

"WOW! FLASHING, PLEASE TRY AGAIN"

After 1.5 seconds the system returns to the first stage of preparation;

Step 4: Drop Test.

When the tester drops the test object, the system will show two results:

1) if the test is normal, the system prompts:

"NICE TRY! G =XX";

System give the result of test, display for 10 seconds, and go back to step 1;

2) if the test has problems, for example, failed to capture the movement of objects, the system will display:

"SOMETHING WRONG! PLEASE TRY AGAIN"

Displaying for 6 seconds, the system returns to the step 1; Now the test operation circle is completed.

Step 2: Parts List

Step 3: Connection

Step 4: The Code and Description

The code includes 3 parts: variables declaration, action definition, and main program.

1) Variable definition section: There are totally 30 arguments defined in this part. 15 variable arguments: 6 for light sensor, 6 for time, 1 for switch state, 1 for system state, and 1 for g value calculation. 15 constant arguments: 2 for distance, 1 for sensitive value, and 12 for PINs (including 6 LCD interface-related PINs);

2) Action definition section: The whole precession is divided into 3 different system states according to different actions, which use the five action programs respectively: ‘sensorread ()’, ‘lighttest ()’, ‘drops ()’, ‘gvalue ()’, and ‘printall ()’.

3) Main program section: The three system states are named as ‘sysState 0, 1, and2’. 1) The sysState0 starts the system with showing the welcome message. If the switch is pressed, call the lighttest () function, and returns the state 1 or state 0 after running; 2) In sysState1, the drop () and printall () functions are called repeatedly, and return state 2 or state 0 after running; 3) In sysState2, call gvalue () function and returns the state 0;

In addition, sensorread () function will be called twice in the main program;

Step 5: Assemble Photoes