• DIY Chronograph

    Using an Ardiuno and laser break beams, I created a device which could measure the displacement of something that travels through it.
  • DIY Chronograph

    25/03/2019

    Purpose

    The reason this was created was as it was required for an assignment. The assignment was to assess the impact on friction down inclined planes. Applying some basic intuition will tell us the something moving down a ramp with high friction will taken longer than something with low friction, for example skating across ice and tarmac. Using this intuition we know that the velocity at the bottom of the inclined plane will be lower hence measuring the final velocity of the object down the ramp is an easy was to measure the impact of friction of objects down an inclined plane.

    Results

    Obviously friction works! Surfaces with higher friction proved to be slower. Although I will not be presenting results due to my inexperience in Year 7. Although the device worked almost perfectly.

    My Device

    My device had one limitation which would impact its ability to make readings being that I used Infrared break beam lasers in directly sunlight it would fail to activate due to the infrared light from the sun.

    How I Made It

    I made it by first designing a sort of gate which spaced two pairs of sensors exactly 7.5cm apart. 7.5cm was chosen simply because it would be long enough to remove any large variation is the final average of the velocity will still being small enough to observer the final velocity. The design was made such that the gates would be press fit into the model. 3D File Here.

    Code

    #include <SPI.h> #include <Wire.h> #include <LiquidCrystal.h> #define SENSORPIN1 7 //Sensor 1 is on the right #define SENSORPIN2 8 //Sensor 2 is on the left // Initiate LCD LiquidCrystal lcd(12, 11, 5, 4, 3, 2); long end_time; // When Sensor 2 is triggered long start_time; // When Sensor 1 is triggered long elapsed_time; // End time minus start time float mms; //mm per second float kph; // Speed calculated int trigger1 = 0; // Sensor 1 int trigger2 = 0; // Sensor 2 int sensor1State; // Sensor 1 status int sensor2State; // Sensor 2 status void setup() { pinMode(SENSORPIN1, INPUT); // Sensor 1 as input digitalWrite(SENSORPIN1, HIGH); // Turn on the pullup pinMode(SENSORPIN2, INPUT); // Sensor 2 s input digitalWrite(SENSORPIN2, HIGH); // Turn on the pullup Serial.begin(9600); lcd.begin(16, 2); lcd.print("Lynden's"); lcd.setCursor(0,1); lcd.print("Science Project"); delay(500); lcd.clear(); lcd.print("By Lynden"); lcd.setCursor(0,1); lcd.print("Wiesenhaan"); delay(1000); lcd.clear(); } // Function to determine speed void speed() { // subtract end time from start time to get total time elapsed_time = ((end_time - start_time)); // convert kph kph = 75 / (elapsed_time / pow(60,2)); lcd.print(kph); lcd.print("Km/h"); lcd.setCursor(0, 1); lcd.print(elapsed_time); lcd.print(" us"); //μs is the short for microseconds //but μ cannont be displayed on a LCD hence is subsituted with u Serial.print(kph); Serial.println("km/h"); Serial.print(elapsed_time); Serial.println(" us"); delay(5000); lcd.clear(); lcd.print("Ready"); delay(500); lcd.clear(); } void loop() { // Read the state of the IR sensor 1: sensor1State = digitalRead(SENSORPIN1); // See if IR beam of sensor 1 has been broken if (sensor1State == LOW) { // Check to make sure both sensors have not triggered if (trigger1 == 0 && trigger2 == 0) { // Save time when sensor 1 was triggered start_time = micros(); // Prevent sensor 1 from triggering again trigger1 = 1; } } // Read the state of the IR sensor 2: sensor2State = digitalRead(SENSORPIN2); // See if IR beam of sensor 2 has been broken if (sensor2State == LOW) { // Check to make sure sensor 1 has triggered but not sensor2 if (trigger2 == 0 && trigger1 == 1) { // Save time when sensor 2 was triggered end_time = micros(); // Run speed function speed(); // Prevent sensor 2 from triggering again trigger2 = 1; } delay(1000); // Reset both sensors trigger1 = 0; trigger2 = 0; } }