Click here to Skip to main content
15,881,248 members
Articles / All Topics
Technical Blog

Survival Guide for Great Stunts – Part 1

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
13 Oct 2012CPOL5 min read 12.8K   1   1
Part 1 of this series highlights the model that will be used to introduce the project to the students.

The following is a Rough Draft. Expect a lot of updates over the next few weeks.

Introduction

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

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.

Untitled

Materials

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)
  • String
  • 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:

  1. Food for getting started
  2. When mounted upright – target for the motion detector for vehicle speed confirmation
  3. When mounted flat – a “truck bed” to catch the marble with a great clunk sound
  4. 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.

For example:

  • 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)

 

mdrive17_mdi

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.

mdrive

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.

Untitled

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

IMG_1442

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

IMG_1445

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.

IMG_1438

IMG_1440

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.

09-23-2012 Image001

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.

09-23-2012 Image002

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) LECO Corporation
United States United States
John Hauck has been developing software professionally since 1981, and focused on Windows-based development since 1988. For the past 17 years John has been working at LECO, a scientific laboratory instrument company, where he manages software development. John also served as the manager of software development at Zenith Data Systems, as the Vice President of software development at TechSmith, as the lead medical records developer at Instrument Makar, as the MSU student who developed the time and attendance system for Dart container, and as the high school kid who wrote the manufacturing control system at Wohlert. John loves the Lord, his wife, their three kids, and sailing on Lake Michigan.

Comments and Discussions

 
QuestionBrilliant! Pin
Chris Maunder12-Oct-12 14:55
cofounderChris Maunder12-Oct-12 14:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.