The following is a Rough Draft. Expect a lot of updates over the next few weeks.
The idea in project-based learning is to, well, learn from working on a project. One project we are working on with High School students involves writing a software application using Kahn Academy’s Computer Science Platform. The student’s application should be helpful to those who want to calculate when a stunt performer should drop from a bridge to land in the bed of a truck passing underneath. This video reinforces the fact that these types of calculations should be taken seriously.
Part 1 of this series highlights the model that will be used to introduce the project to the students. The model will also serve as a verification device at the end of the project. That is, we will provide the students with the ability to demonstrate that their software performs the correct calculations.
The model consists of a controllable vehicle that travels at a known velocity (constant or accelerating) and passes under a drop point. The students calculate where to place an orange pylon beside the track using their software. When the vehicle reaches the pylon, the student drops a marble from a known height and position. If all goes well, the marble lands in the moving vehicle.
The materials we used to construct the model are:
- A Christmas cookie tin (eat the cookies first)
- A Schneider Electronics MDrive 17 (intelligent stepper motor)
- A Schneider Electronics USB Cable
- A 24V power supply for the motor
- A custom pulley for the motor shaft (hug you local machinist)
- Lots of KNEX (perfectly repurposable building toy)
- Four 5-lb. weights (save these for helping work off the cookies later)
- A laptop running Windows 8
- A custom program written using Microsoft Visual Studio Pro in C#
We also employed:
- A Texas Instruments NSPIRE (very cool graphing calculator)
- A Texas Instruments CBR2 (ultrasonic motion detector - that hurts my ears)
The Cookie Tin
The cookie tin serves four purposes:
- Food for getting started
- When mounted upright – target for the motion detector for vehicle speed confirmation
- When mounted flat – a “truck bed” to catch the marble with a great clunk sound
- A reminder of the awesomeness of Christmas
The Stepper Motor
The stepper motor is connected to the laptop using a USB to RS-485 converter cable. Using this command set, the motor can be instructed to spin to a specific position (given as 1/2048 of a revolution) using given acceleration and deceleration factors.
- VM=204800 (Sets the maximum velocity to 100 RPM)
- A=20480 (Sets the acceleration to 10 RPM/s/s)
- D=204800 (Sets the deceleration to 100 RPM/s/s)
- MR 2048000 (Initiates turning the motor 1000 rotations using A, VM, and D as needed)
The Custom Program
We wrote a simple program to control the motor. It allows the user to specify total distance to travel (m), the maximum velocity (m/s), the acceleration rate (m/s/s), and the deceleration rate (m/s/s). Because the motor accepts commands in units of revolutions, we need to provide the program with the diameter of the pulley so it can convert meters to revolutions.
The Go button commands the motor to accelerate at the specified rate until the maximum velocity is reached. The motor will continue to run at the maximum velocity until it is time to decelerate. The deceleration phase is timed to ensure the motor will stop once the specified distance has been traveled – even if the maximum velocity has not yet been reached. The Return button will perform the Go movement, but in the opposite direction. The Stop button will hard-stop the motor and is meant for emergency stopping only.
We calibrated the pulley diameter by marking off 8 meters on the track and commanding the carriage to move 8 meters. We kept adjusting the pulley diameter value until the carriage moved exactly (well, almost) 8 meters.
The logo shows that the application was written expressly for the Niles New Tech Entrepreneurial Academy.
The Track and Carriage
The first student exercise is to confirm the acceleration and velocity of the carriage using the motion detector. We configure the scene by placing the cookie tin in the upright position so it will serve as a target for the motion detector.
In the picture below we have:
- The carriage connected to the top loop of the string
- The cookie tin riding on the carriage, in the upright position
- The KNEX end pulley, 9 meters away from the motor
- Two 5lb weights holding the end pulley against the tension in the string
- Beautiful laminated flooring
In the picture below, we have:
- More laminated flooring
- The motor, 9 meters away from the end pulley
- A nifty KNEX harness holding the motor against the tension in the string
- Two 5lb weights holding the KNEX harness in place
- The motion detector on top of the weights
- The calculator to collect the data from the motion detector
- Wires sneaking off to the power supply and the laptop
In the pictures below we can see the entire length of the track, and a nifty shot of the carriage moving away from the motion detector.
The TI NSPIRE
The TI calculator and motion detector can record the distance to an object over time at 20Hz. The data is available in table and graph form. The calculator can plot distance over time and velocity over time. The screen shot below shows actual data collected as the carriage and cookie tin accelerated at 0.1 m/s/s and then obtained a speed of 0.5 m/s. The data collection was started a bit after the carriage was started.
The TI NSpire comes with computer software that can be used to import the data from the calculator and plot it on the computer. Below is a screenshot of the TI software.