Welcome to the Thornlea NoCO2 Project Site

Welcome to the official website for the Thornlea Secondary School, NoCO2 Launcher Project. For first time visitors, please start from the bottom of the blog and read your way up, doing so will allow you to read "up" to where we are today. There is also a convenient Archive of posts on the right sidebar under "Blog Archive". There are options to subscribe to the blog at the bottom of the page.

Enjoy,
-Calvin

Monday, April 29, 2013

I have a couple of pieces of preliminary WORKING code for the ARDUINO part of the design:
I'm using an Arduino Uno.


The First is the LED's timed out, there is no working Red in this, as it is just simple mock up with variable times.


void setup() {


// Pin 13 has an LED connected on most Arduino boards:
pinMode(1, OUTPUT); //Prestage Light(s)
pinMode(2, OUTPUT); //Stage Light(s)
pinMode(3, OUTPUT); //Yellow LED 1 (Top Amber)
pinMode(4, OUTPUT); //Yellow LED 2 (Middle Amber)
pinMode(5, OUTPUT); //Yellow LED 3 (Bottom Amber)
pinMode(6, OUTPUT); //Green LED (GO! Light)
pinMode(7, OUTPUT); //Red LED (Fault/ Falsestart Light)
pinMode(13, OUTPUT); //reset Light


 digitalWrite(1, HIGH); // 5 second Pre Stage
delay(5000);
digitalWrite(1, LOW); // PreStage LED turns off
delay(5);
digitalWrite(2, HIGH); // 3 second Stage LED
delay(3000);
digitalWrite(2, LOW); // Stage LED turns off
delay(5);
digitalWrite(3, HIGH); // Yellow led 1 on 0.5 second
delay(1000);
digitalWrite(3, LOW); // Yellow LED 1 turns off
delay(5);
digitalWrite(4, HIGH); // Yellow Led 2 on for 0.5 second
delay(1000);
digitalWrite(4, LOW); // LED turns 2 off
delay(5);
digitalWrite(5, HIGH); // Yellow Led 3 on for 0.5 second
delay(1000);
digitalWrite(5, LOW); // LED turns 3 off
delay(5);
digitalWrite(6, HIGH); // Green Led on for 15 seconds
delay(15000);
digitalWrite(6, LOW); // Green LED turns off for 5 minutes before sequence restart
delay(300);
}

void loop() {
 
  digitalWrite(13, HIGH);
  delay(250);
  digitalWrite(13, LOW);
  delay(250);
  }

NOTES:
The "delay" is the time in milliseconds that the light is active for. then the "digitalWrite (#, LOW)" turns off the LED (with the # being the Arduino pin that the LED (positive leg) is connected to).


------------------------------------------------------------------------------------------------------------

The next is the LED's with buttons which is the same code as above, however with two button 's connected to the 11 & 12 pins as prescribed in: http://arduino.cc/en/Tutorial/Button


//Set pin numbers
const int buttonPinL = 12;     // the number of the pushbutton pin for Track Right
const int buttonPinR = 11;     // the number of the pushbutton pin for Track Left

void setup() {

  {
    // Pin 13 has an LED connected on most Arduino boards:
    pinMode(1, OUTPUT); //Prestage Light(s)
    pinMode(2, OUTPUT); //Stage Light(s)
    pinMode(3, OUTPUT); //Yellow LED 1 (Top Amber)
    pinMode(4, OUTPUT); //Yellow LED 2 (Middle Amber)
    pinMode(5, OUTPUT); //Yellow LED 3 (Bottom Amber)
    pinMode(6, OUTPUT); //Green LED (GO! (L)ight)
    pinMode(8, OUTPUT); //Green LED R
    pinMode(7, OUTPUT); //Red LED Left Lane (Fault/ Falsestart Light)
    pinMode(10, OUTPUT); //Red LED Right Lane
    pinMode(13, OUTPUT); //reset light
    pinMode(buttonPinR, INPUT); //Right Track button input
    pinMode(buttonPinL, INPUT); //Left Track button input

    digitalWrite(1, HIGH); // 5 second Pre Stage
    delay(5000);
    digitalWrite(1, LOW); // PreStage LED turns off
    delay(5);
    digitalWrite(2, HIGH); // 3 second Stage LED
    delay(3000);
    digitalWrite(2, LOW); // Stage LED turns off
    delay(5);
    digitalWrite(3, HIGH); // Yellow led 1 on 0.5 second
    delay(1000);
    digitalWrite(3, LOW); // Yellow LED 1 turns off
    delay(5);
    digitalWrite(4, HIGH); // Yellow Led 2 on for 0.5 second
    delay(1000);
    digitalWrite(4, LOW); // LED turns 2 off
    delay(5);
    digitalWrite(5, HIGH); // Yellow Led 3 on for 0.5 second
    delay(1000);
    digitalWrite(5, LOW); // LED turns 3 off
    delay(5);
   
}
}

// variables will change:
int buttonStateR = 0;         // variable for reading the pushbutton status
int buttonStateL = 0;


void loop() {

  buttonStateR = digitalRead(buttonPinR);
  buttonStateL = digitalRead(buttonPinL);

  {
    // check if the pushbutton is pressed.
    // if it is, the buttonState is HIGH:
    if (buttonStateL == HIGH) {
      // turn LED on:  
      digitalWrite(7, HIGH);
    }
    else {
      // turn LED off:
      digitalWrite(7, LOW);
    }
    {
    // check if the pushbutton is pressed.
    // if it is, the buttonState is HIGH:
    if (buttonStateR == HIGH) {
      // turn LED on:  
      digitalWrite(10, HIGH);
    }
    else {
      // turn LED off:
      digitalWrite(10, LOW);
    }
  }
  {
    digitalWrite(6, HIGH) ; // Green Led on for 15 seconds
    digitalWrite(8, HIGH);
    digitalWrite(13, HIGH);
   }
 
  }


}

NOTES: the times for the tree have been changed, as well, now the buttons work, the next piece of code will move the buttons to the Analog Input's on the arduino board to save precious PWM pins. Keep in mind, Pin 1 can't be used, i've tried.


Wednesday, April 24, 2013

The programs open source nature will follow the Open Source Initiative GPL 3.0 licence available at http://opensource.org/licenses/GPL-3.0

 All Code and programs posted herein will follow these guidelines

As stated in GNU GPL 3.0 Section 15:
Neither I (Calvin Ing) nor my educational facility (Thornlea Secondary School) will support nor provide any warranty for the program released into the public domain. However this should not hamper your ability to comment or engage in conversation about the code or express concern in a public manner.

"THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION."

As well as GNU GPL 3.0 Section 16:
Neither I (Calvin Ing) nor my educational facility (Thornlea Secondary School) will be held liable for any damages caused by our code, or any modified code. You as the end user of the code will bear all liability in the use of the code which is provided "As-Is". However this should not hamper your ability to comment or engage in conversation about the code or express concern in a public manner.

"IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."

Tuesday, April 23, 2013

Thornlea Secondary School in Thornhill, Ontario, Canada is looking to replace their aging CO2 cartridge launch system attached to their modular (up to 64' maximum in pre assembled sections) Model Drag Racing track. The project calls for a new system to be built that will be powered off of a air compressor to reduce the cost of launching the model drag cars. This change will allow for the testing of the model cars prior to race day, which was previously prohibited due to cost of cartridges. This will make it possible for teams to improve their car designs with working prototypes on the actual track they will be racing on.

The Criteria for the updated launch system are as follows:

-Use Compressed air from portable tank style air compressor
-Safe for students to use
-Durable and Reliable (will withstand many years of abuse from students and thousands of launches, working every time)
-Allow for testing of model cars (Cost factor of the CO2 cartridges, calculated to be approx. $0.78 per cartridge, prevented students from the ability to test their cars prior to race day)
-Ability to launch only one side of the track, or both sides with as little delay as possible
-Must be easy to maintain


More criteria may be added and some removed as the project goes along, for example, one of the requirements added as of recent is that all code must be open source. The racetrack also has a KelAccell race timing unit installed which this project shall not damaged or interfere with the operation of.

Calvin Ing