Shop OBEX P1 Docs P2 Docs Learn Events
ARLISS Team NH - Page 20 — Parallax Forums

ARLISS Team NH

1171820222359

Comments

  • Mike NHMike NH Posts: 34
    edited 2010-07-09 05:49
    It isn't over yet Mr. Kibler, it is next sunday, Spain and Netherlands will be playing. Good luck Spain!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Learn to obey before you command."

    -Solon
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-09 14:56
    ROCKETEERS,

    ·· Attached is the data file and three graphs from the July 5th experimental trial. The label on the first graph explains the other two. The data looks good-- it's clear and consistent-- but more importantly it shows that the CO2 sensor did respond to carbon dioxide. Graphs #2 and #3 are sections of the overall data and graph.·They allow you to see more clearly where CO2 was applied to the sensor (by breathing and with the CO2 spray.) Using smaller sections of the graph seems like one way·to·show better resolution but it does not make the CO2 sensor more sensitive. What are your thoughts?

    From Ohio,

    Mr. Kibler
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-09 15:02
    The raw data could not be posted to the forum·because it is in Excel format. I'll work on a fix.

    Go Espa~na!

    Mr. Kibler
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-07-09 17:12
    Mr. Kibler,

    The times that you have designated to when you applied CO2, do seem to have small jumps in CO2 concentration.
    Also, what is the Y-axis labeled as? If it was ppm then it seems to be too high and could pose another problem.. Or is it in mV? That seems more realistic.
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-09 22:41
    Dylan Landry said...

    Mr. Kibler,

    The times that you have designated to when you applied CO2, do seem to have small jumps in CO2 concentration.
    Also, what is the Y-axis labeled as? If it was ppm then it seems to be too high and could pose another problem.. Or is it in mV? That seems more realistic.
    Hi Dylan,

    ·· X-axis is elapsed time (how many hours, minutes, and seconds the ASP-2 ran.) Y-axis is (and correct me if I'm wrong Dr. Allen and Sylvie) millivolts. The millivoltage will be·multiplied·by another number, a·variable, so that it represents·CO2 concentration. This will be done in the program. Where will we get this number, the variable? Where does it come from? HINT: Remember one of the first graphs Dr. Allen had us look at (way back in the first pages of the forum)? Maybe there's an answer there, maybe not. What do you think, Team? Where do we find the variable?

    Mr. Kibler
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-07-10 02:28
    Mark in NH said...


    · This Mark Kibler and I'm one of the educational mentors for the ARLISS/Parallax project. Thanks for joining·the forum.·As you can see we have other excellent mentors guiding us along in the project. They include Tracy Allen and Paul Smith (Sylvie.) Paul and I both have experience with the Team American Rocketry Challenge (TARC). I mentored teams for five years and we qualified for the TARC national finals all five years. One year we placed high enough at the TARC nationals to qualify for the NASA Student Launch Initiative (SLI). Our current project has its roots in the NASA/SLI project (which we actually did for two consecutive years.) That opened another door of opportunity, the ARLISS project (www.arliss.org). ARLISS is a collaboration between Stanford University and Aerospace Research of the Pacific (Aeropac). The TARC team Paul co-mentored, Madison West high school in Wisconsin ("Mad West"), actually won the TARC nationals two years ago. Yea, Paul! Go, Mad-West!

    So where and what·do you teach? How can we help you with TARC?·Are you interested in doing some sort of·a colloborative project? Thanks again for joining "our" forum. We look for your reply.

    Regards,

    Mark and the Rocketeers (Tracy, Paul, et al*. *There is no one named 'Al'.)
    Yikes! I'm not a co-mentor of the Mad West team. I deserve exactly none of the credit for their success. They're mentored by Pavel Pinkas and Brent Lillesand. I did mentor a team at my college for a couple of years participating in the Wisconsin Space Grant Consortium Sounding Rocket competitions, and I've monitored TARC qualification flights, but that's it. It's much more fair to say that SLI teams mentored ME - it was another local effort, by the University School of Milwaukee, that led me to Parallax.

    Re. the graphs, have you used the voltmeter to measure the voltage on TP1 while you're recording those data? You should be able to confirm that it's putting out about 450 mV, if that's what the data represent.

    Also I believe that you will multiply by a constant, not by a variable, to go from mV to some kind of CO2-related units.

    Post Edited (sylvie369) : 7/10/2010 2:34:47 AM GMT
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-07-10 15:37
    Mr. Kibler,

    The way that I know we could find the variable, may not be the most efficient, but it is possible. We could take a mV number that is recorded by the graph, and compare it to its corresponding ppm number. From there we would figure out the formula that they used to convert the mV to ppm.

    I am not sure if this is a trial and error system, but it could work.
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-07-10 16:54
    Dylan Landry said...
    Mr. Kibler,

    The way that I know we could find the variable, may not be the most efficient, but it is possible. We could take a mV number that is recorded by the graph, and compare it to its corresponding ppm number. From there we would figure out the formula that they used to convert the mV to ppm.

    I am not sure if this is a trial and error system, but it could work.

    Dylan,

    I understand what you are saying ... kind of like two-point graphing? If we have any two valid mV/PPM combinations, we should be able to figure out any value for mV/PPM. Does that make sense?
  • Mike NHMike NH Posts: 34
    edited 2010-07-12 18:16
    Dear Andrew,
    You said you sent me a pm, but I never got it... could you resend?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Learn to obey before you command."

    -Solon
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-07-12 18:55
    Mike NH said...
    Dear Andrew,
    You said you sent me a pm, but I never got it... could you resend?

    Oops, it looks like the wording in that message wasn't too good. I was indeed agreeing with what you said, but I intended to say that I sent a PM to 'Lev', not you.

    Sorry for the confusion,
    Andrew
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-12 19:26
    Dylan Landry said...

    Mr. Kibler,

    The way that I know we could find the variable, may not be the most efficient, but it is possible. We could take a mV number that is recorded by the graph, and compare it to its corresponding ppm number. From there we would figure out the formula that they used to convert the mV to ppm.

    I am not sure if this is a trial and error system, but it could work.
    ROCKETEERS (+Tracy and Paul),

    ·· Let me see if I can pose this problem from a different angle. I'm not sure that what I was trying to say was clear. Tracy and Paul, I would appreciate·your comments to help clarify what it is we're trying to get the Rocketeers to figure out.

    First, the data the ASP is giving us·is not CO2 ppm. It is simply millivoltage. Sylvie suggested that we check the voltage at TP1 to confirm that the numbers (data) we're seeing on the computer screen·are the same as what we see on the volt meter. They should be. What you have to figure out is how much millivoltage = how many ppm of CO2. Remember the graph that Dr. Allen posted waaaaaaaaaaaaaaaay back at the beginning of the project (page 2 or·3 of the forum)? This is what it's for (Tracy and Paul, please confirm.)

    I'm on a remote Wifi and my battery is dying.............!

    HOW do you use the graph to calculate a constant (not a variable, thank you Paul!)· Andrew, take the lead here. More later.

    Mr. Kibler
    ·
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-12 19:27
    Andrew and Rocketeers,

    You homework is to calculate the constant!

    Mr. Kibler

    My computer is dyiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing!
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-07-12 21:40
    This is really Tracy's forte again, so you'll really want to hear his plans for how you're going to do this, but here are my thoughts.

    First, I strongly suggest that you go back and read pages 2, 3, 4, and especially 5 of this discussion, where Tracy gave you some VERY good information related to the question you're currently working on.

    You could go one of two ways, as I see it.·The datasheet for the sensor includes a graph (one that Tracy has already discussed with you) showing the expected output voltage for different CO2 contents (measured in ppm and displayed on a log scale). You could compute the equation from those data. The advantage to that is that you already have the data points you need. The downside, of course, is that they're from some test sensors back at the factory, not from your specific sensor. I don't know how consistent the sensors are likely to be: that's Tracy's department. This may be the best choice regardless, simply because you have other assumptions you have to make for the other method that may introduce much larger errors.

    The second option is to measure the voltage output from your sensor for some known CO2 content values. There's the challenge: where do you get "known CO2 values"? A crude method would be to put the sensor in a pure gas containing no CO2, and take that as a zero point. But if you look at the graph in the datasheet you'll see that the sensor has some response to other gases, at least to some that contain Carbon (particularly Carbon Monoxide). Perhaps pure helium would be an available non-reactive gas (remember, the voltage is generated by chemical reactions), and one that won't cause a fire/explosion when you turn on the heater element.

    But having just one point does you no good. You could take as your second point the regular background atmosphere, on the assumption that it will have a CO2 content similar to what you were told many screens of discussion ago when Tracy had you find the values for regular air. Remember that you found a value of about 390 ppm of CO2 for normal air.

    You could then graph the two points, find the line that connects the two points (slope and intercept), and use that as your equation. HOWEVER, that assumes that the relationship between the voltage and the CO2 content IS linear, and with only two points, you have no evidence for that (since there's ALWAYS a line running through two points regardless of whether or not the overall relationship is linear). In fact you have good reason to believe that it's·NOT a linear relationship in this case: the graph in the datasheet is linear _on that semi-linear scale they used_, not on a regular scale. You could find the relationship using the log function (whew...that's Tracy's department again - I'm pretty sure I could figure it out, but here's where "Hey, I'm a psychology professor" comes back into play). In fact, you're going to need to take that into account even if you just use the data from the sensor's datasheet, when you turn that into an equation for your BS2 to compute.
    =============================
    I've graphed the data from the datasheet (below), and used Excel to compute the best-fitting lines for the raw data (CO2 ppm x mV) and for (log CO2 ppm reading x mV). As you can see, the best-fitting line for the raw data isn't that good a fit, but for the log of the CO2 readings, it fits a line quite well. I'll bet that if I were a couple of notches smarter I could tell you what it is about the chemistry of the reaction that makes it respond that way. In my current incarnation I'll just have to be happy with being curious enough to wonder.

    Notice also that when plotted "straight up" (without the log) it looks a lot like there are some limits to the response. It doesn't look like you'd expect the mV reading to go below about 250 no matter how much CO2 was in the sensor. Let's check if that squares with your tests... Be right back. (A minute later[noparse]:)[/noparse] Yup, you don't seem to have any readings below 250 mV.

    You might be wondering how Excel found those lines. That's a matter of some linear algebra and some calculus. Specifically, it's finding two separate equations that relate the amount of error (the sum of [noparse][[/noparse]predicted datapoints - actual datapoints]) to the two variables that define a line, slope and intercept. It solves those two equations simultaneously, using some funky matrix algebra that I used to know but have long since forgotten, to find the values of slope and intercept that minimize the total error. Back when I had more time on my hands I learned to do this by hand, but these days I'm more than happy to let Excel take care of it. But it IS an extremely useful thing to understand: how, given a set of data, do you find the equation for the line (or curve) that best fits those data?

    Post Edited (sylvie369) : 7/12/2010 10:46:57 PM GMT
    513 x 301 - 31K
    513 x 302 - 33K
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-12 22:52
    sylvie369 said...

    This is really Tracy's forte again, so you'll really want to hear his plans for how you're going to do this, but here are my thoughts.

    You could go one of two ways, as I see it.·The datasheet for the sensor includes a graph (one that Tracy has already discussed with you) showing the expected output voltage for different CO2 contents (measured in ppm and displayed on a log scale). You could compute the equation from those data. The advantage to that is that you already have the data points you need. The downside, of course, is that they're from some test sensors back at the factory, not from your specific sensor...
    ·
    I strongly suggest that you go back and read pages 2, 3, 4, and especially 5 of this discussion, where Tracy gave you some VERY good information related to the question you're currently working on.
    ROCKETEERS,

    ·· Sylvie confirms two approaches you can take to calculate the constant. I'm curious how Dr. Allen will advise you...? He was certainly light years ahead of us when he posted the millivoltage-CO2 concentartion graph on the forum months ago. He·seemed to grasp·the whole project long before I could even conceptualize it. Thanks, Dr. Allen. Thank you, Paul.

    Paul, let's assume that we go with your option #1 ("...compute the equation from the [noparse][[/noparse]spec sheet]·data.) It seems fairly starightforward and within the Rocketeer's grasp.·Tracy and I both observed that the relationship is·not perfectly linear, especially as CO2 concentration decreases below 500 ppm. The graph·line (forum page 2) angles upward more sharply below 500 ppm and·I'm hypothesizing·a CO2 concentration much less than that.)·How would you approach deriving a constant from that part of the graph? Would we dare extend "that part" of the graph line and then extrapolate (not interpolate!) the data...?

    +++++++++++++++++++++++++++++++++++++++++++++++

    ESPA~NA WINS! ESPAN~A WINS! I missed the game since I'm out in the hinterland of southeastern Ohio but you must be giddy! It sounded like quite the game too, with a score of 1-0 and the goal coming so late in the game. Viva Espan~a, and congratulations. Sangira is (was?) in order! What's your version of the game (it's OK to embellish a bit. It's your team after all!)

    ===============================================

    I'm here in hot and humid southeastern Ohio for a few weeks doing, among other things, some humanitarian work. This is a really impoverished area, literally the edge of Appalachia, and it's been hard-hit by the economic downturn. Adams County was impoverished (in many ways)·before the economic slide and so it has made things even more difficult for many folks scrathing out an existence here. Lots of the problem stems from poor lifestyle choices, limited education, etc. The upside is that there's a thriving Amish community in the area. Their peaceful, pastoral presence somehow smooths out the area's rough edges and makes " a good lifestyle" seem attainable, if people could simply follow a few of their tenets. Life is good and life is hard. Life is, I believe, what we choose to make of it.

    Mark
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-12 23:03


    ·*Sylvie,

    · So your graph #2, the logarithmic graph, is for the "...The part of the graph line that angles upward more sharply below 500 ppm." Just double checking. The CO2 concentration shown in your graph seems to show that. There are different slope-intercept values, too.

    ++++++++++++++++++++++++++++++++++++++++

    ** ROCKETEERS, take note!· **

    ···· Andrew, please walk your Teammates through how to calculate the slope intercept values for the two parts of the graph line Sylvie and I are discussing (remember y=mx +b? See Sylvie's explanation above.) They (the answers, not your Teammates!) should be similar, if not the same as what Sylvie got. If you're not sure how to,·please ask for help. it's OK. We're here to learn. The next question (and the BIG question) is, "Once you calculate the constant, what do we do with it...?!" We're getting close, guys. Keep up the good work. Don't fade in the fourth quarter... Things are going too well.

    Mr. Kibler

  • sylvie369sylvie369 Posts: 1,622
    edited 2010-07-12 23:39
    Don't go too hog-wild with those equations that are on the graphs I posted. I don't think they're going to be usable for your purposes, because of the log business. I just put it all there to illustrate the relationship and how well the lines fit.

    Also I should have put axis labels on the graphs. The X-axis is the mV reading, and the Y-axis is CO2 ppm. That's backwards from what was in the datasheet. I did it this way because for your purposes, you will have the mV reading in hand, and want to calculate the CO2 ppm. The steep part of the curve is under about 290 mV, where the CO2 concentration gets _higher_, not lower. Remember that regular air is at about 390 ppm CO2, which would be roughly where the leftmost data point in my graph falls. Remember, that's 390 on the Y axis, not on the X axis! The "320" below is 320 mV (about one-third of a volt), not 320 ppm of CO2.

    If the CO2 readings drop with altitude, then you're going to be trying to read voltages up in the 320 mV and above range, off to the left part of the curve, and our previous discussion about extrapolation is going to come into play again, as the leftmost point on the curve of current data corresponds to a CO2 reading higher than anything you'd expect in flight. On the other hand, if the CO2 level increases in that first 10,000 feet or so that you'll be flying in, the curve covers that range nicely.

    At this point, I'm in over my head, and it's Tracy's turn. smile.gif

    =========================
    I'm thrilled that Espana won just as I started getting involved there. I didn't get to see any of the game, as I was co-managing our "Bastille Days" celebration (the biggest 14 Julliet festival in the western hemisphere!) this weekend. But I was in a nice international crowd that cared about the outcome, and got the news right about in real time. I imagine I'll hear some fun stories about the celebrations.

    I occasionally ride my bike through Amish country, and probably will do so again in the next week or two. It's a different world, in a way that clearly has pluses and minuses. I think it's very good for us to see that kind of difference. You certainly don't have to travel to another continent to see a culture with distinctly different, yet fully functional values. Things do not have to be as they are: there are other options.

    I'm more likely to get out where there are no people at all, though. I had a really wonderful kayak trip down the Wisconsin River on Friday, and I'm hoping to go on a shorter trip on a small river on Wednesday. After spending a weekend at a crowded festival, it'll be just what I need.
  • edited 2010-07-13 01:33
    Sylvie and Mr.Kibler,

    I was lucky to catch the Spain game on Sunday. I think I sat up in my room and watch the entire thing for about 2 1/2 hours. It seemed to me the Spain had it in the bag the entire time. They had shot after shot after shot. They just needed to find the back of the net! I was a very sloppy game for the Netherlands in my opinion. They had at least 7 or maybe 8 yellow cards and one player got a red card after he got his second yellow. But Netherlands defiantly had their chances. I think they had 2 or 3 breakaways in which they just kicked it straight at the goalkeeper. It was a very good game, but in the end, I think Spain’s defense won it for them. "Defense wins championships". Or in this case, a World Cup!!!

    Sean
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-14 02:11


    E-mail from Andrew, posted by Mr. Kibler.·Words that are are boldfaced·are my emphasis.·Thank you Andrew. Very well said:

    ·* Let's work as a team to·calculate·the constant (a·number) that converts millivolts to ppm. We need it so we can insert it into·the program.*



    "Project team,

    There are a few things on our agenda that need to be completed quickly, concisely, and accurately. First, we need to finalize the meeting date. I know there has been a lot of discussion back and forth between Saturday the 24th and Sunday the 25th at my house. Please respond with a definite vote for either Saturday or Sunday, or if it matters at all for you. I realize that it is possible no matter what date we choose, there is a possibility that a team member might have something else scheduled.

    Secondly, we need to pay attention to the forum. I can not stress this enough. It's great that *most* of the team has been participating, but we need to have *all* of the team participating. The ASP, as far as physical bits and pieces, is mostly complete. However, without a functioning program, the ASP is completely useless. The finish line of this "race" is within sight, so don't slow down now. Sylvie has recently posted some comments on deriving a constant for the all important equation of converting millivoltage (mV) to the CO2 value (in ppm). While some of his comments may seem overwhelming (even to myself), they are fairly straightforward. Please don't just "skim" posts, as you will not fully understand them, even if you think you do. Think about what is being said while you read each and every post on the forum, and try to figure out how it all fits together (like a puzzle). Additionally, when writing your responses or answers, they should be in your own words. Please don't try to impress anyone by copying and pasting answers. Although you may get the right answer, you wont learn anything for yourself -- and what would the point of participating in ARLISS be?

    Let's get a strong and accurate answer posted from each of you very soon. If you are confused on anything, feel free to ask me before you post an answer or a question.

    Thanks,
    Andrew
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-07-16 01:05
    I am having trouble keeping track of how we are going to get the constant. I have re-read all the content in the thread dealing with this problem and I cannot fully understand the procedure. Could some one post maybe a simpler or a more broken down version of the steps?

    Dylan Landry
  • edited 2010-07-16 09:05
    If you switch to a BS2e then nothing will change (baud, timing, etc.) but you'll get extra memory, including scratch pad memory. You'd have to reorganize your program to fit between multiple slots, but it's not as bad as it sounds and IMHO it's sort of fun.


    _________________________________________________________________

    Post Edited By Moderator (Dave Andreae (Parallax)) : 7/19/2010 10:04:27 PM GMT
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2010-07-16 16:10
    Hi again,

    A lot has transpired since I last checked in, and I'll have to read through and catch up here! freaked.gif

    The math to convert from mV to ppCO2 requires an exponential. One way to do that is to use a lookup table stored in a second slot on the BS2e that you have. Another way is by direct computation of the logarithm or exponential. The lookup table is probably easier to understand. Have you started using the BS2e at all?

    My wife and I went off on vacation (off-line!). We were in Chicago for the 4th of July, and then went up by a tranquil fine sand beach on Lake Michigan for a visit with my sister. Then returned to work with the usual post-vacation catch-up. And watched Spain take the World Cup with a nail-biting, beautifully executed, back and forth last minute gooaaaaaaaaaaaalllllll.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    640 x 480 - 81K
    640 x 480 - 58K
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-16 18:05
    Tracy Allen said...

    The math to convert from mV to ppCO2 requires an exponential. One way to do that is to use a lookup table stored in a second slot on the BS2e that you have. Another way is by direct computation of the logarithm or exponential. The lookup table is probably easier to understand. Have you started using the BS2e at all?
    ROCKETEERS,

    ···Above·are two solutions·from Dr. Allen on·how to convert the CO2 sensor's millivoltage reading·to CO2 concentration (in parts per million, or ppm.) Andrew, please take the lead on tackling this. It would be an excellent way to use the team practice time you have scheduled at your house on July 24th (1:00-4:30 PM.) In order to use the time effectively and accomplish this task·(convert the CO2 sensor's millivoltage reading·to CO2 concentration) you and the Rocketeers will need to do some work on the forum between now and then. A few questions come to mind from Dr. Allen's post that you will want to answer:

    1)· How exactly do you "...use·the lookup table stored in a second slot on the BS2e"?

    2) How do you find conevrt millivoltage to ppm by "...by direct computation of the logarithm or exponential"?

    Ask Dr. Allen and Sylvie to guide you through both methods. I suggest that you have two subsystem teams work on each of the two methods.·Find out who your best mathematicians are and then have them work on Step 2 (above.) The others should work on Step 1.·I will be following along on the forum from here in Ohio. Be sure that you and the Rocketeers·ask for clarification long before July 24th's practice. And be sure and thank Sylvie and Dr. Allen profusely for sharing·their time and expertise. I'm· eager to see what happens from here...

    Good luck!····smilewinkgrin.gif· · The finish line is in sight but·you haven't crossed it until mV = ppm on the flash drive! We want the ASP-2 to be fully operational when we head to Nevada just several weeks from now.

    From the wilds of southern Ohio,

    Mr. Kibler
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-16 18:27
    Tracy Allen said...
    Hi again,

    A lot has transpired since I last checked in, and I'll have to read through and catch up here! freaked.gif

    The math to convert from mV to ppCO2 requires an exponential. One way to do that is to use a lookup table stored in a second slot on the BS2e that you have. Another way is by direct computation of the logarithm or exponential. The lookup table is probably easier to understand. Have you started using the BS2e at all?

    My wife and I went off on vacation (off-line!). We were in Chicago for the 4th of July, and then went up by a tranquil fine sand beach on Lake Michigan for a visit with my sister. Then returned to work with the usual post-vacation catch-up. And watched Spain take the World Cup with a nail-biting, beautifully executed, back and forth last minute gooaaaaaaaaaaaalllllll.

    Hi Tracy, and welcome back to civilization!
    ·· It sounds like you had a great time in Chicago and in Michigan. What are the builidings in the picture? Is the one on the left the 'Sears' Tower (it has a new name, right?) Where were you on Lake Michigan? Sleeping Bear Dunes? Petosky? Nice picture of the fireworks, too!

    So you got to watch Sylvie's team win the World Cup? It sounds like it certainly was a nail-biter... 1-0 and the goal came in the waning moments of the game from what I read. I would liked to have seen it but I am cloistered here in the hinterlands of southeastern Ohio until nearly the end of July. No cell phone reception OR Internet connection where I am...!·It's a real rural and impoverished area and it's literally·the edge of Appalachia.

    ==============================================

    Yes, we're making good progress it seems. The last time I had the ASP-2 wired and operational (in Maine)·it ran like a champ (see graphs in previous posts.) Two things remain from what I can see:

    1) Is there a relatively simple way to gain better resoultion in the data without adding an amplifier, wires, and extensive programming?
    2) We (still) need to figure out how to convert millivoltage to ppm. The information you posted above was helpful and I'm curious to see where Andrew and the Rocketeers go with it, leading up to July 24th's team practice (see my last post to them about it.)

    What are your insights at this point? What else should we be doing that I'm missing? At the next opportune moment I'll re-assemble the ASP-2 and triple check it functionality. Then, once we're 100% certain we have the wiring and current program dialed in we'll solder·the whole apparatus onto·perf board and mount it all on the ASP-2 (at mid-August's team practice.)

    Thanks again for all your help Tracy. This wouldn't be possible without you and Sylvie. You and a kind and helpful person, a rare bird indeed. Welcome back!

    From Ohio,

    Mark

    ·
  • Mark in NHMark in NH Posts: 447
    edited 2010-07-19 23:31
    test test test... is there really capacity on the forum for page 25?
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-07-20 00:56
    It's still on - I hear you. I think we're waiting for Tracy, though. I think I'm at the limit of my ability, and he's going to have to explain how to get the mV --> CO2 ppm conversion going.

    That building in his photo is the Wrigley Building, at Michigan Avenue at the Chicago River at the north end of the Loop. The Sears Tower is WAY bigger. Far far more impressive.

    I found out yesterday that my niece flew into Madrid on the day that Spain won the World Cup. I'm envious, and can't wait to hear her stories.
  • edited 2010-07-20 16:17
    Dr. Allen,

    How exactly do you "...use the lookup table stored in a second slot on the BS2e"? How do you find convert millivoltage to ppm by "...by direct computation of the logarithm or exponential"?

    I was just trying to do this, and after spending about an hour trying, I read some previous posts on the forum, and Mr. Kibler had asked these questions (above). I had realized that I had those exact questions. Also, this is supposed to be in y=mx+b (slope-intercept form) correct? If it is, we need to find the slope and the y-intercept. I have found the y-intercept I believe, but I am having much trouble finding the slope

    Sean
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-07-20 17:09
    Sean from ARLISS-NH said...
    Dr. Allen,

    How exactly do you "...use the lookup table stored in a second slot on the BS2e"? How do you find convert millivoltage to ppm by "...by direct computation of the logarithm or exponential"?

    I was just trying to do this, and after spending about an hour trying, I read some previous posts on the forum, and Mr. Kibler had asked these questions (above). I had realized that I had those exact questions. Also, this is supposed to be in y=mx+b (slope-intercept form) correct? If it is, we need to find the slope and the y-intercept. I have found the y-intercept I believe, but I am having much trouble finding the slope

    Sean

    Sean,

    Great to see you active on the forum again! Hopefully others will follow. Right now, I'm in the same boat as you. I'm somewhat puzzled on Dr. Allen's first method, which involves using "the lookup table stored in a second slot on the BS2e." It makes sense in one way, but admittedly, I don't understand it at the same time. I've looked through all the resources I have including What's a Microcontroller and the BASIC Stamp Syntax Manual but I'm still not sure if I understand it correctly. It sounds simple enough, but I don't know where to begin.

    As for the second method, this makes more sense to me, as this was one of the last topics we covered in mathematics at the end of the school year. As Sean stated in his previous post, using the formula y=mx+b seems reasonable. If I'm remembering this correctly, if you know 'y' or 'x', you can find 'm' and 'b', or vice versa. In other words, if you know either of the two, you should be able to find the other two using the systems of linear equations. Is this theoretically correct, Dr. Allen and Sylvie?

    This problem is beginning to make a lot more sense to me, but like other team members, I believe I just don't know where to start with it.

    Andrew
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-07-20 17:38
    Andrew (ARLISS) said...

    Great to see you active on the forum again! Hopefully others will follow. Right now, I'm in the same boat as you. I'm somewhat puzzled on Dr. Allen's first method, which involves using "the lookup table stored in a second slot on the BS2e." It makes sense in one way, but admittedly, I don't understand it at the same time. I've looked through all the resources I have including What's a Microcontroller and the BASIC Stamp Syntax Manual but I'm still not sure if I understand it correctly. It sounds simple enough, but I don't know where to begin.

    As for the second method, this makes more sense to me, as this was one of the last topics we covered in mathematics at the end of the school year. As Sean stated in his previous post, using the formula y=mx+b seems reasonable. If I'm remembering this correctly, if you know 'y' or 'x', you can find 'm' and 'b', or vice versa. In other words, if you know either of the two, you should be able to find the other two using the systems of linear equations. Is this theoretically correct, Dr. Allen and Sylvie?

    This problem is beginning to make a lot more sense to me, but like other team members, I believe I just don't know where to start with it.

    Andrew
    Don't let the sense of confusion bother you - you're working on a complicated part of the project. I'll be honest: I tried to find a usable equation, came up with something, went back to check it against known values (always a good idea!), and found that it was completely wrong, so I deleted it from my longish post above. I'm not entirely sure that I could figure this part out, and certainly it would take me some time. It's not easy, and it's college-level math.

    The "lookup table" idea involves finding some·values of mV and their corresponding CO2ppm values, putting them together into a table in your BoE's memory, and having the "calculation" just be a matter of finding the CO2ppm value that goes with the mV value you've just measured. In other words, you do all of the calculation in advance, put the numbers into a table, and just have the computer look things up in the table.

    The alternative is to calculate CO2ppm "on the fly" (literally, in fact), through an equation. The "y = mx + b" thing isn't strictly going to work, because the relationship is not linear (see my graph above). It involves a logarithm or exponential, and those are not easy on a BS2. You can't simply do "y = m*log(x) + b", because there is no "log(x)" function in PBASIC.

    Tracy has solutions for both of these methods, and you can read about them on his website, specifically on this page:

    http://emesystems.com/BS2math3.htm

    The material on lookup tables is especially extensive.

    Now, some of that stuff will probably go right over your head. It certainly goes over mine. With concentrated effort I think I might be able to understand it, but my plan is to wait for Tracy to explain it here, and to hang on his every word. I expect to learn something important.

    If you want to move forward on this while you're waiting, I suggest that you read that webpage carefully, and try out the code he offers there.

    The most important thing right now,·I think, is that you understand the problem you're faced with. You have a sensor that (through an ADC) provides your BS2 with readings in mV. Those readings correspond to concentrations of CO2 in the air. The relationship is NOT a linear one, so calculating CO2ppm from mV is not just y = mx + b. The correct calculation will require some math that the BS2 is not strictly able to do...but there are some ways around that limitation.
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-07-20 19:22
    Sylvie,

    I just want to make sure that I am understanding your concept.. So we would upload all the data, sort of like two EXCEL data columns, one with mV and the other one with the corresponding CO2 level, so that when the micro-controller gets a mV reading from the sensor, it will reference to the data to find the correct CO2 ppm?
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-07-20 22:30
    Dylan Landry said...
    Sylvie,

    I just want to make sure that I am understanding your concept.. So we would upload all the data, sort of like two EXCEL data columns, one with mV and the other one with the corresponding CO2 level, so that when the micro-controller gets a mV reading from the sensor, it will reference to the data to find the correct CO2 ppm?

    Dylan,

    I will let Sylvie speak for himself, but that is my understanding of it. Justin and Mike, do you understand any of this?

    Andrew
Sign In or Register to comment.