Showing posts with label lesson plan. Show all posts
Showing posts with label lesson plan. Show all posts

Wednesday, June 20, 2012

Week 2 Day 3

Lots going on today. Here is what we have been working on...

Lori has been working hard on our basic lesson plan. We have a prototype from a group last year but we are extending that and making it more relevant to our particular project. She has continued searching for relevant videos and online activities for to engage the students. She has also been looking at real world applications by looking into what research is going on in Texas streams and rivers with a particular focus on water quality and pollution. She has also begun a  broad search of published lesson plans that might be similar to what we intend. Some of the titles she has pulled so far include:
Springs of Life
Rachel Carson: Sounding an Environmental Alarm
Water Pollution Hot Spots
The Watershed Quest
When Things Heat Up
Water Pollution
Surface Water Model
Biodiversity Debate
What's in the Water

Lori hard at work
Here is a link to one of the videos Lori found. The video discusses the use of water sensors in  ALWAS, Bathy Boats and buoys on the great lakes.  These buoys cost $32k!  The ACT-Aliance for Coastal Technologies is an alliance formed by universities to test all of the aquatic sensors being developed so that  those seeking sensors can go to their site and be able to pick the best sensor needed for testing purposes.

While Lori has been grinding out research on the lesson plan Joe has been hard at work sourcing the materials we will need to build both our table top model stream and the parts to make our sensor cluster.This is a pretty thankless task and he has done a great job with it so far. In addition he also took point on building a skeleton for the research paper we will be putting together. We are still assigning ourselves portions of the paper to work on but here is how it looks so far:
  1. Title Page
  2. Abstract (Joe)
  3. Table of Contents (any)
  4. Introduction (Joe)
  5. Literature Review (Lori)
  6. Methods (Any)
  7. Results
    • Zac -Arduino, XBee, sensor probes, wireless network. Effectively how everything in the sensor cluster works
    • Lori - Real World v. Artificial aquatic ecosystems: How they are currently being monitored and why. How does this tie in with what we did.
    • Joe - Anything and everything to do with the table top model.
  8. Discussion (any)
  9. Recommendation (any)
  10. References (any)
For a quick tutorial on formats and conventions concerning writing a research paper we had a quick seminar with the research librarian at the Discovery Park Library and Joe also found a couple of websites you can check out if you find yourself needing to pound out a research paper.

Mine day has been a mixed back of success and frustration. I started out the morning doing some research trying to figure out what temperature and dissolved oxygen probes we would use in our sensor cluster. I already knew we were using the Atlas Scientific pH probe but that was about it. Based on my research I figured it made sense to go with the temperature sensor and DO sensor that Atlas produced since we had already started down that path. My reasoning was two fold. 1) We were already using an Atlas product so it stands to reason that if we continued using their sensors the underlying logic would be the same and that should simplify coding. 2) The price is actually pretty. It was in line with all the other probes I looked at and actually lower than most. Right as I started to type up an email to Dr. Fu he walked in and handed me an Atlas Scientific temperature sensor and said, "Why don't you try to get this working." Yay logic! So, I started in on the temperature sensor.

You will recall that yesterday I managed to get the pH sensor up and running using this code:

#include <SoftwareSerial.h>                                             //add the soft serial libray
#define rxpin 2                                                                //set the RX pin to pin 2
#define txpin 3                                                                //set the TX pin to pin 3

SoftwareSerial myserial(rxpin, txpin);                               //enable the soft serial port

String inputstring = "";                                    //a string to hold incoming data from the PC
String sensorstring = "";                    //a string to hold the data from the Atlas Scientific product
boolean input_stringcomplete = false;            //have we received all the data from the PC
boolean sensor_stringcomplete = false;         //have we received all the data from the Atlas Scientific product

  void setup(){                                      //set up the hardware
     Serial.begin(38400);                       //set baud rate for the hardware serial port to 38400
     myserial.begin(38400);                   //set baud rate for software serial port to 38400
     inputstring.reserve(5);                     //set aside some bytes for receiving data from the PC
     sensorstring.reserve(30);                //set aside some bytes for receiving data from Atlas Scientific product
     }
 
 
 
   void serialEvent() {                                               //if the hardware serial port receives a char
               char inchar = (char)Serial.read();                        //get the char we just received
               inputstring += inchar;                                          //add it to the inputString
               if(inchar == '\r') {input_stringcomplete = true;}   //if the incoming character is 
                                                                                        //<CR>, set the flag
              }  
 
 
 
 void loop(){                                                                   //here we go....
     
  if (input_stringcomplete){                     //if a string from the PC has been recived in its entierty 
      myserial.print(inputstring);                //send that string to the Atlas Scientific product
      inputstring = "";                                //clear the string:
      input_stringcomplete = false;            //reset the flage used to tell if we have recived a                           
                                                             //completed string from the PC
      }
 
  while (myserial.available()) {                                   //while a char is holding in the serial buffer
         char inchar = (char)myserial.read();                            //get the new char
         sensorstring += inchar;                                               //add it to the sensorString
         if (inchar == '\r') {sensor_stringcomplete = true;}       //if the incoming character is a 
                                                                                          //<CR>, set the flag
         }

   if (sensor_stringcomplete){               //if a string from the Atlas Scientific product has been  
                                                           //received in its entirety
       Serial.println(sensorstring);           //use the hardware serial port to send that data to the PC
       sensorstring = "";                          //clear the string:
       sensor_stringcomplete = false;      //reset the flag used to tell if we have received a 
                                                           //completed string from the Atlas Scientific product
      }
}
Today I did something similar for the temperature sensor. First I wired up the circuit on the breadboard. This one was actually really easy. I could have gone directly into the Arduino but I didn't want to start stripping cable, especially when I was going to need to use a breadboard later to make things work together. I digress. Here is what the circuit looked like:



Once I had that set up I put in the code (from Atlas) and compiled. No errors, so I uploaded it to the Arduino.

//Connect the black lead to GND
//Connect the red lead to pin 4
//Connect the white lead to pin A0

float temp;  //where the final temperature data is stored
void setup() {
  Serial.begin(38400);              //set up the hardware serial port to run at 38400 baud
  pinMode(4, OUTPUT);               //set pin 2 as output
}
void loop() {                       //main loop
  temp = read_temp();               //call "read_temp" and return temp in degrees C
  Serial.println(temp);             //print the temperature data
  delay(1000);                      //wait one second
}
float read_temp(void) {             //the read temperature function
  float v_out;                      //voltage output from temp sensor
  float temp;                       //final temp stored here
  
  digitalWrite(A0, LOW);            //set pull up on analog pin
  
  digitalWrite(2, HIGH);            //turn on temp sensor
  delay(2);                         //let temp stabilize
  v_out = analogRead(0);            //read input pin
  digitalWrite(2, LOW);             //turn off temp sensor
  
  v_out*=.0048;                     //convet ADC points to volts (using 5V)
  
  v_out*=1000;                      //convert volts to millivolts
  temp = 0.0512 * v_out -20.5128;   //convert millivolts to temp
  
  return temp;                      //send back temp in call
}
Success! Here is what the serial terminal showed when we ran the program:

Great. So I have function code for the pH sensor and I have functioning code for the temperature sensor and I know how to wire both of them. How hard can it be to combine those two? Turns out... it's hard. I still haven't managed to make it work when they are combined. The wiring seems to be fine. I can't find an error in it and neither can Yixing. The only change I had to make was moving the on/off signal for the temperature probe from digital pin 2 to digital pin 4 since the pH probe was already using 2 and 3. Here are some pictures of the combination circuit.






That looks reasonable and everything seems fine. It's not though. I don't know why. Here is the code I currently have slapped together for the combination circuit. I will warn you now that it is haphazardly commented and that it is essentially garbage judging by the output I am getting (it's all over the place). I am too fried to figure out what my mistake is right now and Yixing didn't see it either. I might have to sleep on this and try again tomorrow. If any of you readers spot the error(s) or have suggestions for more elegant (and functional) code I would love the feedback.

#include <SoftwareSerial.h>                                             //add the soft serial libray
#define rxpin 2                                                                //set the RX pin to pin 2
#define txpin 3                                                                //set the TX pin to pin 3

SoftwareSerial myserial(rxpin, txpin);             //enable the soft serial port

String inputstring = "";                                   //a string to hold incoming data from the PC
String sensorstring = "";                                 //a string to hold the data from the pH probe
char input;
boolean input_stringcomplete = false;           //have we received all the data from the PC?
boolean sensor_stringcomplete = false;        //have we received all the data from the pH probe?
float temp;                                                  //where the final temperature data is stored

  void setup(){                                          //set up the hardware
     Serial.begin(38400);                            //set baud rate for the hardware serial port to 38400
     myserial.begin(38400);                        //set baud rate for software serial port to 38400
     inputstring.reserve(5);                         //set aside some bytes for receiving data from the PC
     sensorstring.reserve(30);                 //set aside some bytes for receiving data from pH probe
     pinMode(4, OUTPUT);                        //set pin 4 as output for temp probe
     }
 
   void serialEvent() {                                            
 //if the hardware serial port receives a char
               char inchar = (char)Serial.read();                               //get the char we just received
               inputstring += inchar;                                           //add it to the inputString
               if(inchar == '\r') {input_stringcomplete = true;}     //if the incoming character is a <CR> flag it.
              }

 void loop(){                                                                  
   
  if (input_stringcomplete){                    
//if a string from the PC has been recived in its entierty
    input = inputstring.charAt(1);
    if (input = "c" || "C") {
      temp = read_temp();
      Serial.println(temp);
      delay(1000);
        myserial.print(temp);
      }
      else {
      myserial.print(inputstring);                                        
 //send that string to the pH probe
      inputstring = "";                                                        //clear the string:
      input_stringcomplete = false;                                   //reset the flage used to tell if we have    
                                                                                 //recived a completed string from the PC
      }
     }
 
  while (myserial.available()) {                                    //while a char is holding in the serial buffer
         char inchar = (char)myserial.read();                                  //get the new char
         sensorstring += inchar;                                               //add it to the sensorString
         if (inchar == '\r') {sensor_stringcomplete = true;}  //if the incoming character is a <CR>,
                                                                                      //set the flag
         }

   if (sensor_stringcomplete){       //if a string from the pH probe has been received in its entirety
       Serial.print(sensorstring);     //use the hardware serial port to send that data to the PC
       sensorstring = "";                                                      //clear the string
       sensor_stringcomplete = false;   //reset the flag used to tell if we have received a completed  
                                                          //string from the pH probe
       delay(1000);
      }
}
float read_temp(void) {                                                        //the read temperature function
  float v_out;                                                                 //voltage output from temp sensor
  float temp;                                                                  //final temp stored here
  
  digitalWrite(A0, LOW);                                                      //set pull up on analog pin
  
  digitalWrite(2, HIGH);                                                      //turn on temp sensor
  delay(2);                                                                   //let temp stabilize
  v_out = analogRead(0);                                                      //read input pin
  digitalWrite(2, LOW);                                                       //turn off temp sensor
  
  v_out*=.0048;                                                          //convet ADC points to volts (using 5V)
  
  v_out*=1000;                                                                //convert volts to millivolts
  temp = 0.0512 * v_out -20.5128;                                             //convert millivolts to temp
  
  return temp;                                                                //send back temp in call
}
Joe's Journal


Friday, June 15, 2012

Week 1 Day 5

Yay Friday! We are almost done with our first week working with UNT RET. It has been a lot of fun so far. The resources UNT has made available to us are impressive and the learning experience is exciting. The group that I was assigned to has definitely become a team with each of us taking point on different tasks. Each Friday we are supposed to take a small step back from our project so that we can look at it as teachers instead of students. The whole idea here is two fold. One is to get us back into research mode to remind us what it's like being a student and to sharpen our research skills. The other is to produce useful lessons that we can take back into our class rooms. That is a big part of what we are doing on Fridays. It is not the whole thing, though. If all we did was sit and write lesson plans there is a solid chance we would go a little crazy. So, here is what we are working on today...

We started the day with a quick briefing on the format and style that RET would like our lesson plans to fit. Pretty standard, so no worries there. Then they let us know that they would like us to create a web page for our lesson plans and a blog to chronicle our journey. Surprise! Team 1 was already all over that! Actually it wasn't a surprise. Every one was pretty aware that we were doing that. The good news for me was that I got to lead a quick workshop this morning giving the other teachers a run down on how to set up a blog using Blogger. I had a blast doing it and every one seemed to get something out of it so that is good. We even had some good discussion on how we could utilize blogger with our students as a form of presentation. It would allow them to keep a journal of their activities through out the process of a project (much like we are doing here), it would let the teachers keep track of how they were progressing and it would allow the various student groups to see how their peers are doing and to provide feedback through comments. I spent a good portion of the rest of the day tweaking our blog and trying to get all the logos permanently displayed for the organizations that have made this experience possible (turns out that is way harder than I expected) and typing up our posts. I have also been bouncing around from group to group helping put out fires as other teams pull their blogs together and start uploading content. As they come online I will add them to the RET Blog list on the right side bar of our blog. That isn't all that has been going on, though!

Place holders for our set up

As a group we met before lunch to tinker with our design for the model stream we plan on building in our class rooms. Our current plan is to use the free bins we got yesterday (see the day 4 blog). We are thinking the best idea is to have the bins connect by long lengths of either pvc or gutter and keep the angle as shallow as possible so there is still flow but not so strong that small fish and snails couldn't travel up the current if they felt like it. Exactly how steep the channels can be is going to take some trial and error but we are currently thinking we will have the first tub 3 inches of the ground, the second 2 inches off the ground, the third 1 inch of the ground and the last one on the ground. See the pattern?

We worked all that out using random objects to make models. That nonsense looked something like this:




Here we go... We start with tub number 1. It is three inches off the flat surface that it rests on. There is a channel that will go from tub 1 to tub 2 and we are shooting for an angle of about 5-10 degrees. There will also be a small tube feeding water into tub 1 from a pump, but we will come back to that later.


Tub two and three are similar. Tub two will be 2 inches off the flat surface and will have a channel coming in from tub 1 and one going out to tub 3. Tub 3 will be an inch off the flat surface and will have a channel coming in from tub 2 and one going out to tub 3.



Tub 4 is the end of the line for the channels that will become our riffles. There is a channel running in from tub 3, but not one going out to tub 1. this way there is a beginning and an end to our "stream" and the fish can choose their habitat by swimming up or down the current.


So, why won't tub 4 overflow and flood the room? I'm glad you asked. There will be a pump sitting between tub 1 and tub 4 in a small over flow bucket (role played here by our stand in, the cup) with an inflow tub in tub 4 and outflow into tub 1. 


So now we have the tubs sort of configured and in place. We aren't sure exactly how much space we will need between the tubs to get a proper drop for a useful level of flow but here is what we are going to start with:




In addition to doing the spacing, Joe also took the time to mark out the lines we will need to cut to make the notch to mount the gutter channel.


So lets put all that together and see what that looks like...



Clear as mud? Yeah, looking at a model of a model of a model isn't always the best way to understand something. Luckily Joe has spent most of his time today getting an autoCAD program (specifically AutoDesk Inventor) installed and running so he could put together a 3D model of what we are planning to build. That should be done soonish so the image will likely be loaded on Monday.

What has Lori been doing this whole time? Well, she has taken our disjointed, scatter shot notes that we have been tossing around and she is collecting them into an organized lesson plan that might make sense to some one other than the three of us. She is also including videos and enrichment activities that she is digging up online. Here is the first draft for the lesson plan.

Lori also found this website:
Good research site:
Simulation of an aquatic ecosystem
http://www.jstor.org/stable/10.2307/2528872


Joe's Journal
(Now you're complaining it's out of focus...? What do you people want from us?!)