Posts with «home school» label

Physics Lab 1: ultrasonic rangefinders

We had the first official meeting of the home-school physics class today.  It was just my son and me. Originally we were going to have a second student, but he was busy with college application essays, and asked if he could start next week instead.  My son compared his and my solutions to problems 1P89, 1P97, 1P98, and 1P117 (all the non-computational problems from Chapter 1 of Matter and Interactions).  We got all the same results, but I had left out the units on one of the intermediate steps on one problem—a bad habit that I will try to break, as I agree with John Burk that one should tell the full story of the number, throughout a computation.

In Physics Lab 1, I outlined the first experiment for my home-school physics students and me to do, using an ultrasonic rangefinder.

Here is what I proposed:

  1. Hook up the rangefinder to the Arduino and program the Arduino to keep taking measurements and reporting them to the serial line.
  2. Calibrate the sensor by placing it at carefully measured distances from a hard wall and recording the readings.  Repeat at several different distances.  (Record temperature, humidity, and barometric pressure, if possible.)
  3. Plot the sensor readings vs. the actual distance.
  4. Do linear regression to get predictor of actual distance given sensor reading.  (Caveat: need to plot distance vs. readings rather than readings vs. distance to get best fit for calibration.)
  5. Modify Arduino code to use the calibration parameters to provide better distance measurements.
  6. Re-calibrate using new code.  What is the accuracy and precision of the measurements?  What range of distances can be measured? Is the accuracy better expressed in terms of absolute error (±1cm, for example) or relative error (±5%, for example)?
  7. Open-ended: Experiment with detecting different targets (maybe flat targets from wall size down to the size of a quarter, maybe targets of different materials, maybe spherical targets).  What effect does target size, shape, material,  … have on range and accuracy of the measurement?

What we actually did:

My son and I each picked one of the rangefinders (I bought a Maxbotix LV-MaxSonar-EZ2 and a Ping))) sensor), and separately wrote Arduino code to read them. He chose to use the Maxbotix in the pulse-width mode, which is uncalibrated, but which has the greatest resolution.  I used the Ping))) sensor, which has a similar pulse-width mode.  The biggest difference is that the Ping))) needs to be triggered, while the Maxbotix repeats the measurement several times a second.  He had to solder a header onto the Maxbotix in order to connect it up, while I could cheat a little and plug the Ping directly into the Arduino board.  We could probably arrange to have both sensors on the Arduino at once, but have not tried that.

Both of us failed to get busy-wait loops with digitalRead() to work, but we both managed to get pulseIn() to work.  He just reported time in microseconds (then he had to go off to his improv class).  I spent a little more time adding a computed speed of sound (with temperature correction, but not humidity correction), to report distances in cm.  The repeatability of the Ping))) seems pretty good: about ±1mm, but I’ve not tried to calibrate the accuracy yet.  I don’t know whether the limit on the resolution is the coarseness of the pulseIn() measurement of time or variation in the pulse width output by the sensor.

For next week:

My son still needs to do more work on the prelab writeup about how an ultrasonic rangefinder works, so I hope that both students will have drafts of that for next week.  Also assigned for next week is a Vpython programming assignment (Exercise 1p123).

In lab next week we’ll compare our programs for 1p123, then do some calibration experiments with the rangefinder, or try using it to record a series of time and distance measurements for a moving object, or try learning to use Tracker to do video analysis.


Tagged: Arduino, engineering education, Matter and Interactions, physics, rangefinder, science education, Tracker, ultrasonic sensor

Physics Lab 1

I asked physics teacher John Burk for advice on putting together labs for homeschooling my son in calculus-based physics using the Matter and Interactions book (see School decisions part 3 on the decision to homeschool).  He was kind enough to pass on my request to the readers of his Quantum Progress blog: The ideal lab experience for a homeschooled student.  He also gave me a suggestion for a piece of lab equipment we could use for a number of experiments in Newtonian mechanics: an ultrasonic rangefinder.

This post is my first attempt at a physics lab assignment for my son. (Note: we are also hoping to use tech writing this year to satisfy some of his English requirements, so the assignment is a bit heavier on the writing than might otherwise be appropriate for a physics class.)  The exploration in this lab is more engineering than physics, but familiarity with measuring tools is a good place to start, I think.

I welcome feedback and suggestions, particularly from those who have taught physics!

Lab 1: ultrasonic range finder

Prelab

Research how an ultrasonic range finder works (note: as of 25 Aug 2011, the Wikipedia article is a terrible stub—other sources will be needed).

Write: Write a paragraph or two explaining how an ultrasonic rangefinder works.  This should be at a reading level and level of detail suitable for replacing the current Wikipedia stub. Explain what determines the precision, accuracy, and range of the range finder.  How frequently can it measure the range? How is the speed of sound involved?  What does that depend on … ? Why do some have one transducer and others have two?  Audience: new robotics club members (technically interested high school students without prior knowledge of physics or electronics).

Bonus audience: if the writeup is good, it can replace the current Wikipedia stub.

Read the product information (and data sheets when possible) for at least 3 different (cheap) range finding modules like the following three four (added one more 1 Sept 2011):

Choose one of the range finders for us to buy.

Write: justify the choice in writing, doing a comparison of the advantages and disadvantages of each choice.  Give URLs as citations for data used in making the choice.

Sketch out in pseudocode the program needed to read the sensor on the Arduino using a simple busy loop.  What will determine the precision and sampling rate of the measurements?  What will the code do if there is no object in range of the sensor?

Advanced option: sketch out pseudocode for using interrupts instead of a busy loop.

The Lab Proper

  1. Hook up the rangefinder to the Arduino and program the Arduino to keep taking measurements and reporting them to the serial line.
  2. Calibrate the sensor by placing it at carefully measured distances from a hard wall and recording the readings.  Repeat at several different distances.  (Record temperature, humidity, and barometric pressure, if possible.)
  3. Plot the sensor readings vs. the actual distance.
  4. Do linear regression to get predictor of actual distance given sensor reading.  (Caveat: need to plot distance vs. readings rather than readings vs. distance to get best fit for calibration.)
  5. Modify Arduino code to use the calibration parameters to provide better distance measurements.
  6. Re-calibrate using new code.  What is the accuracy and precision of the measurements?  What range of distances can be measured? Is the accuracy better expressed in terms of absolute error (±1cm, for example) or relative error (±5%, for example)?
  7. Open-ended: Experiment with detecting different targets (maybe flat targets from wall size down to the size of a quarter, maybe targets of different materials, maybe spherical targets).  What effect does target size, shape, material,  … have on range and accuracy of the measurement?

Tagged: Arduino, engineering education, Matter and Interactions, physics, rangefinder, science education, ultrasonic sensor