ARLISS Team NH

145791059

Comments

  • Dylan LandryDylan Landry Posts: 235
    edited 2010-06-04 - 21:51:06
    Dear Project Team,
    SUCCESS! We were able to hook up the CO2 sensor with your code Dr. Allen! Thank you for the code. Also, we where able to calibrate it at the same time. Since we calibrated it we where able to shoot out a small amount of CO2 out of a special air gun and get the red LED to turn on as well! We followed Dr. Allen's wiring scheme with the resistors and made it work. We even added a small DEBUG program (so text comes up on the screen) so that after each 1 its says, "ALARM" and after each 0 it says, "ok"...

    JUSTIN, MIKE and possibly Andrew and Sean: Bring your entire, "Whats a Microcontollor" kit. We will need specific parts like 1kΩ resistors that are contained in your small bag of components in your kit. Make sure you have them. Refer back to Andrew's email on what else to bring. I will attach a picture of the color bands on the resistor. Also I link a website of how to learn how to read a resistor.( it will take a minute or two).. http://www.bcdxc.org/resistor_color_codes.htm

    See you Sunday (1:00-4:00),
    Dylan Landry
    300 x 300 - 11K
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-06-04 - 22:00:25
    Dear Project team,
    I was able to count exactly 10 1k Ω resistors in my bag. Should be the same in yours.

    Dylan Landry
  • sylvie369sylvie369 Posts: 1,618
    edited 2010-06-04 - 22:10:54
    Excellent! The fact that you were able to get it going so quickly suggests that you guys are getting the hang of it as far as hooking these things up and programming them.

    Re. the comments about a voltmeter - I think it's pretty much a given that you're going to need one in order to complete the project you're tackling. I wonder if Tracy would like to recommend a particular model, or particular features. I know he has quite a bit more experience with them than I do. I have a couple of them, but the one I use the most often is a Radio Shack one that was a birthday present from my parents back in about 1978. I imagine RS still sells some, and I know you can get them in hardware stores, Harbor Freight, and probably some automotive supply stores.
    ·
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-06-04 - 22:24:13
    Dear Sylvie,
    Your talking to the right person Sylvie [noparse]:)[/noparse]. My grandfather is an electrician and was able to lend me a very expensive multimeter. It can measure V, mV, V (dc and ac), mV (ac and dc), Ω, -><-, temperature, ~A and mV`,~A upside down "h", Amps (dc and ac) as well in mA, upside down "h"A (ac and dc) and a memory function.. Way more then i could ever use.

    Dylan Landry
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-04 - 23:31:14
    Dylan Landry said...
    Dear Project Team,
    SUCCESS! We were able to hook up the CO2 sensor with your code Dr. Allen! Thank you for the code. Also, we where able to calibrate it at the same time. Since we calibrated it we where able to shoot out a small amount of CO2 out of a special air gun and get the red LED to turn on as well! We followed Dr. Allen's wiring scheme with the resistors and made it work. We even added a small DEBUG program (so text comes up on the screen) so that after each 1 its says, "ALARM" and after each 0 it says, "ok"...

    JUSTIN, MIKE and possibly Andrew and Sean: Bring your entire, "Whats a Microcontollor" kit. We will need specific parts like 1kΩ resistors that are contained in your small bag of components in your kit. Make sure you have them. Refer back to Andrew's email on what else to bring. I will attach a picture of the color bands on the resistor. Also I link a website of how to learn how to read a resistor.( it will take a minute or two).. http://www.bcdxc.org/resistor_color_codes.htm

    See you Sunday (1:00-4:00),
    Dylan Landry

    Dylan and others,

    Good job on getting the sensor to output data! I can't wait to see it for myself this weekend. I'll be sure to bring some extra resistors too, in case we need some more.

    Andrew
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-05 - 00:24:57
    Tracy, Sylvie, and Rocketeers,

    · Attached·as a·program is the CO2·code that Dr. Allen sent to you. It works! jumpin.gif

    Dylan (with help from Derek S.) stayed late after school today-- on a HOT Friday-- and wired the board, put the program together, calibrated the sensor, and got it up and running. We extend·heartfelt thanks to Sylvie and Dr. Allen for figuring out the program code and sequence for us and with us. This leaves us in an excellent·position for Sunday's practice! Think about where we go from here... What's our plan of action for Sunday? I ordered two more CO2 modules and another BS2e stamp today (*don't tell Mrs. K)·so·you can all build the same thing at home by following along on the forum... and experiment a bit, too.

    I tried to attach a digital picture of the CO2 sensor/module which·shows·how the CO2 sensor is wired to the·breadboard/ BOE but the file was too large for my (dreadfully slow dial-up) server. We'll post it to the forum from school on Monday. Let me know if you want the JPEG photos on Sunday and we can put them on your flash drive so you can build your own at home.

    This is where the wires go from the CO2 sensor pins (breadboard.) Thank you·Dr. Allen!

    * "Vin to Vin on your BOE"

    * Com (GND) to Vss

    * CNTL to p4 on your BASIC Stamp, with a 1000 Ohm resistor between p4 and CNTL

    * ALR to pin p3 on the Stamp, also via a 1000 Ohm resistor.

    * Operate the BOE from a power adapter (not a 9V battery, because the power for the heater will suck down the battery really fast!)

    *Execute the program.

    Please be sure to read Sylvie and Dr. Allen's excellent detailed comments that explain exactly how the CO2 sensor and BOE work. Understanding the theory behind how something works is as important as building it.

    You should be very·proud of the educational, productive, and successful·week you've had... good work for our new team members who have never done anything like this before! I wonder what direction things will go in on Sunday? Think ahead and come with ideas. Our time together as a whole team is very limited and we so need to make the most of our time together... no time for idle chat!

    Aim high,

    Mr. Kibler
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-05 - 00:32:36
    Attached is the same CO2 sensor program. with comments added about the CNTL and HSW pins on the CO2 sensor versus the pins on the CO sensor. Also, Dr. Allen calls·the pin marked GND on the CO2 sensor "COM"-- same thing because it still goes to the Vss (and the program works.)

    M. Kibler, Rocketeer
  • sylvie369sylvie369 Posts: 1,618
    edited 2010-06-05 - 02:16:52
    I wonder if you should be thinking now also about how you're going to power the sensor. Tracy notes that you need to turn the heater on and leave it on. The documentation tells you that it draws 160 mA with the heater on, which means that a typical 9V battery is going to last an hour or so (they typically have maybe 140-250 mAH of capacity). You need a supply of at least 6.5 volts. You should easily be able to get a small battery with 7.2V and five to ten times the capacity of a 9V alkaline.

    Also I think you're giving me too much credit on understanding the sensor. Tracy is the one helping you on that - I'm more or less keeping tabs and making sure nothing slips between the cracks. By the time you're done with this, I'll have learned as much from Tracy as you guys will have.
    =========================
    From what I learned last year while trying to help with your project, I'm this close (holds up finger and thumb about 1/2" apart) from having a working self-designed GPS transmitter/locator in my rockets. If the launch were tomorrow I'd be ready to fly, but I've got another week and I'm going to put some time into refining the receiver program to make it as user friendly as possible. The transmitter part - including battery - is going to be less than the size of a deck of cards, and only about $110. The receiver will cost only about $60. Both prices will jump about $10 for a longer-range version. I'm having so much fun with this stuff.
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-05 - 03:27:42
    Sylvie,

    · Yeah, learning this stuff is fun, isn't it? Most of it is still new to me and I'm learning a lot too. But I'll never be at the same level as·Tracy. Some people have a knack for "seeing"·program code, etc.·and they almost intuitively understanding how it all meshes together. I'm certain that it took many, many hours of studying too, and a·lot of focus and commitment. I·admire people who can do what seems like magic to me.

    It's cool that you designed AND built·AND programmed·your own·GPS locator/ transmitter! That's a big accomplishment.·Congrats! What's the (line-of-site) range on your transmitter? I'm eager to hear how well it works.·When are you launching? How high?

    It's fun to watch parts become a whole and to see something work like it's designed to... especially when there is not·pre-determined design to begin with.·It's just as much fun to understand·how and why·things works.

    Seeing kids take an interest and then become immersed in these projects is validating. It's my small contribution to the greater good of what's become a very global community I suppose. The project isn't really a school activity but rather, an activity that's progressed beyond those four walls-- outside the literal and metaphorical box if you will. I'm glad that good·kids who might otherwise languish through the summer are interested and engaged in something worthwhile.

    On that note, do you remember Mollie and Tyler from the NASA-SLI project? They took the lion's share of academic awards at the high school awards night last night, and Mollie chose to study engineering (recruited, with a nearly full scholarship from what I understand.) Tyler was accepted early decision into Swarthmore, and incredibly tough school to get into. He too, earned an excellent scholarship package and the interviewers wanted to know every detail "about that NASA and ARLISS project." You... we... all of helped make the happen, and that's really, really validating and worthwhile. That is my "pay", priceless in my estimation.

    I'm off to to bed Sylvie. I'll see you on the forum. Don't underestimate your contributions to our team. They too are priceless.·And you too, are a Rocketeer!

    Mark
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-05 - 14:39:40
    sylvie369 said...


    ·The documentation tells you that it draws 160 mA with the heater on, which means that a typical 9V battery is going to last an hour or so (they typically have maybe 140-250 mAH of capacity). You need a supply of at least 6.5 volts. You should easily be able to get a small battery with 7.2V and five to ten times the capacity of a 9V alkaline.
    Sylvie,

    ·· I forgot to mention that last year we used a 5,000 mAH rechargeable NiCd battery (from a remote control car.) Our calculations showed that this·*should be*·more than enough power but, like any scientist worth his sodium chloride,·we bench-tested it to be sure. We measured the voltage before we ran the ASP (literally all night) then again in the morning. We did this several times and we got excellent and uninterrupted data. It was also·interesting for the Rocketeers·to see how temperature and humidity changed overnight versus during the day, when·they also ran the ASP non-stop.

    The ASP·might well·be running inside the rocket, pre-launch, for 30 minutes or so before it's launched.·Two of the Rocketeers noted that Black Rock desert is really hot and dry in mid-September (based on last year's ASP data!)·We wondered about maybe not turning the heat switch on at all...? Is it necessary in such an arid environment?

    Thoughts...?
    ·
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-06-05 - 14:57:08
    Dear Dr. Allen,

    If I may ask, what did the BIN1 account for in your program? My guess is that it had the program enter a state of binary. 1 (there is a signal) and 0 (there is not a signal).. My old neighbor as well as my mother worked for BlueHawk, testing their software and I got to learn a bit about it.

    Dylan Landry

    P.S. Remember everyone, bring your, "Whats a Microcontrollor" kits. We will need some of the parts in it.
  • Tracy AllenTracy Allen Posts: 6,516
    edited 2010-06-05 - 17:12:27
    @Dylan, BIN1 is a modifier that tells the program to display a "0" or "1" as text on the DEBUG screen. The BASIC Stamp sends codes to the computer screen to display characters that you can read. (ASCII--American Standard Code for Information Interchange). The ascii code for "0" is 48, and the ascii code for "1" is 49. But the internal value of in1 is either 0 or 1. The BIN1 translates 0 and 1 to 48 and 49 respectively, which display as "0" and "1". Is that clear? They are all numbers, binary patterns, but with computers you have to do a lot of translating so one machine (the Stamp) can talk the language of another (the display screen).

    @programmers,
    In the modified program posted above (good work), there is a statement that does not make sense.
    in1 = 999
    Firstly, in1 is a bit variable that can take on values of 0 or 1, not 999. Secondly, the in1 is what is called, "read only". You can't set it from the program. It's value is determined only by the level on the external input pin, p3.

    I attached another program, CO2sensor_v3.bpe. This removes that statement, and also makes the message appear only when the Alarm goes from low to high or high to low, rather than every time. This is just a fun with programming exercise!

    @Rocketeers, The heat switch will need to be turned on, even out in the desert. I read somewhere (can't find it now) that the temperature of the heater is over 300 degrees Celsius. Even Black Rock Desert is not that hot, lucky for you! The output from the sensor does vary a little bit as ambient temperature changes. You can find a graph of that dependence in the MG-811 data sheet.

    Homework question, to see if you can find and interpret that graph. You see, I really want you to look at that data sheet critically.
    -- In constant CO2 level, does the output of the sensor go up or does it go down, as ambient temperature increases? How about humidity?
    -- Your exhaled air contains both water vapor (humidity) and CO2. Do both of those affect the sensor, and if so, is the effect in the same direction or in opposite directions?

    The instructions say that the sensor needs to warm up for about 5 minutes, but with a 5000mAh battery you should have enough to keep it running throughout. Is it a 7.2 Volt, 5 Ah battery?

    By the way, there is a discrepancy between the Hanwei MG811 data sheet and the Parallax 27929 with respect to the power required by the heater. Let me leave that as homework.
    -- What does each document say about the mA current that the heater requires at 6 Volts?
    -- Do you have any ideas about how to measure the actual current required by your heater, using Dylan's great multimeter?

    The attached program is written for the BS2pe. But you can run it on the original BS2 or on your new BS2e. All of the programs you have written so far should run just fine without any changes whatsoever on the new Stamp. Try it!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com

    Post Edited (Tracy Allen) : 6/5/2010 5:18:03 PM GMT
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-06 - 00:40:37
    Rocketeers,

    · This is where tomorrow's "all team" practice will begin-- by answering these questions that·Dr. Allen posted:

    He·explained,·"You see, I really want you to look at that data sheet critically."

    1) In constant CO2 level, does the output of the sensor go up or does it go down, as ambient temperature increases?

    2) How about humidity?

    3) Your exhaled air contains both water vapor (humidity) and CO2. Do both of those affect the sensor, and if so, is the effect in the same direction or in opposite directions?

    4) Is·the (orange rectangular battery)·a 7.2 Volt, 5 Ah battery?·[noparse][[/noparse]If not, then what are its specifications?)

    5) There is a discrepancy between the Hanwei MG811 data sheet and the Parallax 27929 with respect to the power required by the heater.

    ··· A) What does each document say about the mA current that the heater requires at 6 Volts
    ··· B) Do you have any ideas about how to measure the actual current required by your heater, using Dylan's great multimeter?

    Let's make a good dent in this homework tonight (Saturday) so we can move through and beyond it at tomorrow's practice. This is what I hope to accomplish during·tomorrow afternoon's practice, which begins·at 1:00 PM sharp:

    1) Download, run and experiment a bit with the program Dr. Allen has attached. As he says, it's a· "fun programming exercise!"

    2) Possibly connect the wires from the CO2 sensor to the ASP. What·should·you know before·we·attach the wires? (*The answer isn't singular: there are·several things you should know!)

    Tracy and Paul:

    What are you thoughts about attaching the wires from the CO2 sensor to the ASP?

    What about downloading the program you just posted, cut-and-pasting it into the current operational version of the ASP program, and then·letting the Rocketeers see what they can (or can't) make it do to interface with the ASP program. This would given them·a good taste·of how challenging and time-intensive programming really is, and what lies ahead over the summer.

    From hot and hazy New Hampshire,

    Mark
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-06 - 01:32:21
    Tracy Allen said...

    @programmers,
    In the modified program posted above (good work), there is a statement that does not make sense.
    in1 = 999
    Tracy,

    · This was the Programmers' logic as they explained it to me (re: IN1 = 999). I saw the logic of their logic and·so·they·tried it. It seemed to work... for better or for worse!

    "The program·needed a certain command to·follow a previous·command. One of the choices was ENDIF and part·of the program looked·like it was·binary.·Since 'IN3 = 0" is "off" (no CO2) and IN3 = 1 is "on" (CO2 detected), nothing should happen if we put 999. The program·should just LOOP. 999 doesn't do anything."

    I have no idea what·happens when the program comes to IN3 = 999 and so I can't explain exactly what·is happening "inside the program."·Hmmm... I'm as curious they are (actually more curious.) They were just glad that it made the program LOOP!

    Mark
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-06 - 01:53:31
    Tracy and Paul,

    · I wanted to post this e-mail to the forum so you can see and understand the value of all your help. I hope·Andrew, our Team Captain doesn't mind.·These "kids" are truly growing and becoming leaders right before your eyes. That's the beauty of this project (and last year's, and the year before.) The ASP and the rocket are just vehicles for broader, life-long·learning and some really excellent peer mentoring is going on. Thank you for inspiring·these bright young minds and future leaders.

    Project Team,

    As you may already have seen, we will be holding off from posting answers to the Parallax forum tonight. For those of you who have already sent me your answers and suggestions, I greatly appreciate it. As you already know, the questions posted by Dr. Allen are a fundamental part of programming the ASP2. Dr. Allen and others have spent countless hours assisting us at no cost, and we really need to appreciate that by spending an equal amount of time answering their questions.

    As suggested by Mr. Kibler, we will now be taking a new approach to answering our daily questions. To both spread out the work load and ensure everyone gets a chance to do something, I will be giving individual assignments based on the questions on the forum. This doesn't mean you should only focus on your assignment -- you should also be understanding the project as a whole at the same time. We will try this system for now and see how it works. Below is an assignment for each of you to have done before tomorrow's meeting.


    Question 1: In constant CO2 level, does the output of the sensor go up or does it go down, as ambient temperature increases? How about humidity? ~ Dylan


    Question 2: Your exhaled air contains both water vapor (humidity) and CO2. Do both of those affect the sensor, and if so, is the effect in the same direction or in opposite directions? ~ Justin


    Question 3: What does each document say about the mA current that the heater requires at 6 Volts? ~ Mike


    Question 4: Do you have any ideas about how to measure the actual current required by your heater, using Dylan's great multimeter? ~ Sean


    Additionally, everyone should cross check each others answers. You should assume that no answer is correct and try to find any faults - constructive criticism is good! Post your sources when applicable and always be as detailed as possible.

    See you tomorrow,
    Andrew
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-06 - 20:21:30
    Dr.Allen,

    Here are the answers to the latest questions you posted on the forum:

    Question 1: In constant CO2 level, does the output of the sensor go up or does it go down, as ambient temperature increases? How about humidity?

    Answer: In constant CO2 level, as temperature increases, so does millivoltage (mV). In constant CO2, as humidity increases to 60%, millivoltage stays the same. As humidity increases above 60%, millivoltage drops slightly (2-3 mV).

    Question 2: Your exhaled air contains both water vapor (humidity) and CO2. Do both of those affect the sensor, and if so, is the effect in the same direction or in opposite directions? ·

    Answer: Both the water vapor and the CO2········ in your breath affect the sensor. According to the graphs in the documentation, humidity decreases millivoltage slightly and CO2 also decreases millivoltage. So the effect is in the same direction.

    Question 3: What does each document say about the mA current that the heater requires at 6 Volts?

    Answer: The Hanwei manufacturer’s document shows that the heater uses 6.0 AC or DC volts (+/- 0.1v). The Parallax documentation says that the CO2 sensor requires 6.5-12.0 VDC.

    Question 4: Do you have any ideas about how to measure the actual current required by your heater, using Dylan's great multimeter?

    Answer: You could test the voltage at TP1 and TP2, and TP3 and TP4 with the program running (that is, with the heater on.) Then you could go into the program and turn the heat switch off by commenting it out and testing the voltages again. If there is a voltage difference, that must be the amount of voltage· the heat switch is using.

    We did exactly that at practice today. We observed that with the heat switch on, voltage across TP1 and TP2 was 0.65v. With the heat switch (heater) turned off (“commented out” in the program) it measured 0.0003v. We conclude that the heater draws somewhere around 0.65 volts… but that doesn’t seem like enough voltage to heat the heater to 300 degrees. Is our conclusion correct?

    The Rocketeers (Mike, Justin, Sean, Dylan, and Andrew)
  • sylvie369sylvie369 Posts: 1,618
    edited 2010-06-06 - 22:07:28
    Interesting to see team leadership like that. Again, I'd love to have my students take that kind of initiative. It's very impressive.

    To the rocketeers:

    As far as I can tell, the answers to the first two questions look fine. But questions 3 and 4 were about current, and your answers are about voltage, which is an entirely different matter. It's really important to understand the distinction, and it's not that difficult.

    Voltage
    All of the devices that you're using require a certain voltage to operate. Microprocessors generally work at 5V or 3.3V, for example, and if you don't give them enough voltage, they don't do anything. Too much voltage, and you can fry them. That memory stick datalogger you're using also requires 5V. Servos generally require 6V (I believe). In one of my projects I'm using lights and a buzzer that require 12V, as do the stepper motors that Parallax sells.

    Many of the boards and devices you use have voltage regulators mounted on them so that you can use batteries and unregulated supplies (those wall·plug power adapters) as your power source. Generally the voltage regulators require a little extra voltage on the input side in order to put out the proper voltage to the device, so the Super Carrier Board I have a BS2 mounted on says that it'll take 6-30 volts input to supply 5V to the Stamp. If you gave it 5V input, the regulator wouldn't be able to supply 5V on the output side. Some regulators need very little extra voltage - these are called "low dropout" regulators, and sometimes they need only a small fraction of a volt over the output voltage you're trying to supply.

    Some devices don't have this kind of "on-board regulation", and you have to supply them an already·regulated voltage at the right level. The memory stick datalogger is an example - it needs a 5V input, and 6V would probably not work (the datasheet says 4.75V - 5.25V). If you sent 9V directly into it I think you'd stand a good chance of frying it. That's why you connect it to the Vdd pins of your Stamp board - they supply the regulated 5V output of that board's voltage regulator.

    Current
    Every device also uses a certain amount of current, and every power supply is capable of supplying only a certain amount of current. The amount of current a device needs depends on what that device is doing. Motors (servos, for example) require a LOT, while most integrated circuits require relatively little. That memory stick datalogger requires 25 mA (milliamps, or 25 thousandths of an amp) while operating (that is, while reading a file, or writing your data to a file) and 2 mA in standby (while powered up, but not doing anything). The Parallax (Futaba) standard servo requires 15 mA while not moving, and (according to the documentation) 140 mA +/- 50 mA while moving under "no-load conditions". It'd take more than that - maybe a lot more - if there were some kind of load on the servo arms. The Parallax stepper motor requires even more - about 250 mA each time the motor moves.
    =======================
    When you power your system, you have to make certain that each device in the system gets the voltage it needs to run. Fortunately, Parallax has mostly taken care of that for you, so the devices generally can be run off of the 5V supplied by the Stamp board. But you've already seen that you're going to need a 6V supply to run the heater on your CO2 sensor.

    You also have to make certain that the power supply you're using can supply enough current to the system to handle the needs of all of your devices. The current draws add up. If your memory stick datalogger is drawing 25 mA and your BS2e is also drawing 25 mA, you need to make sure that your power supply can supply 50 mA, which shouldn't be much of a problem. The voltage regulator on the Board of Education can provide up to 1 amp (= 1000 mA) of current, so you have a lot to spare there. If you added high current devices and tried to draw more current than your power supply could provide, bad things would start happening. Your processor would "brown out" and reset, so it'd look like your program was shutting down and restarting right away, over and over again. If you kept trying to draw too much current, you might see some pretty impressive amounts of smoke come out of the regulator for a few seconds, until it stopped working altogether.

    The current draw also determines how long your batteries will last. A 5000 mAH battery has a lot of capacity. A 5000 mAH 9V battery hooked up to a 9V device that draws 100 mA will last just as long as a 5000 mAH 6V battery hooked up to a 6V device that draws 100 mA. The fact that one is 9V and one is 6V doesn't make a difference, really: it's the amount of current drawn.
    =======================
    You wrote
    The Rocketeers said...
    We did exactly that at practice today. We observed that with the heat switch on, voltage across TP1 and TP2 was 0.65v. With the heat switch (heater) turned off (“commented out” in the program) it measured 0.0003v. We conclude that the heater draws somewhere around 0.65 volts… but that doesn’t seem like enough voltage to heat the heater to 300 degrees. Is our conclusion correct?
    No, but this is still good news. You're getting .65 volts at TP1 with the heater turned on. Remember that TP1 is the output of the sensor, and that the sensor is supposed to work properly only when the heater is turned on. When you turned the heater off, you got essentially zero voltage (.0003V is low enough to count as 0), just as you'd expect if your sensor were working properly. You should hook this up again, turn the heater on again, and run some CO2 past the sensor, while watching what happens to the voltage.


    Post Edited (sylvie369) : 6/6/2010 10:12:04 PM GMT
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-06-06 - 23:06:08
    Dear Sylvie,

    Here is a question that i had during our practice... Tps 1 and 2 vary on the amount of CO2 in the air, and it seems that all of the voltage is lost once the heater is off. Which means, lets just think logical for a second, that all of the voltage used (lets say 0.65 V) was taken up by the heater. That means that the heater takes what ever amount of V, depending on the amount of CO2 in the air. If there was a large amount of CO2 in the air that the heater would take more and more and more V depending on the environment?

    Here is another general electronics question that i would also like to ask. Lets say you have a 9v battery. You also have a LED that takes only, lets say, 1V. How would you figure out how much Ohms you need in a resistor so that you don't blow it?

    Dylan Landry
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-06 - 23:55:12
    Dr. Allen and others,

    Today during our meeting, we decided to try to "mash" together the CO2 program with our functioning MAWDBOE program. I took the entire program code from the CO2 program and added it as a subroutine in the MAWDBOE program. I then added the subroutine, titled "Carbon_collect" into the main program. Obviously, this is a stab in the dark and the program does not work properly -- but I wouldn't expect it to after just doing some simple copy/paste work.

    We attempted to run the program on our standalone CO2 board, which lacks the RTC, MAWD, data logger, and humidity/temperature sensor that the program requires. It seems to run, but with mixed results. We do not yet have a CO2 sensor on the ASP, so at this time we are unable to actually test the program. However, the "mash up" program seems promising. Please take a look at the program attached and advise us on what steps to take next.

    Thank you,
    Andrew
  • sylvie369sylvie369 Posts: 1,618
    edited 2010-06-07 - 10:45:46
    Dylan Landry said...
    Dear Sylvie,

    Here is a question that i had during our practice... Tps 1 and 2 vary on the amount of CO2 in the air, and it seems that all of the voltage is lost once the heater is off. Which means, lets just think logical for a second, that all of the voltage used (lets say 0.65 V) was taken up by the heater. That means that the heater takes what ever amount of V, depending on the amount of CO2 in the air. If there was a large amount of CO2 in the air that the heater would take more and more and more V depending on the environment?

    Here is another general electronics question that i would also like to ask. Lets say you have a 9v battery. You also have a LED that takes only, lets say, 1V. How would you figure out how much Ohms you need in a resistor so that you don't blow it?

    Dylan Landry
    These are the kinds of questions that Dr. Allen could answer better than I, but a quick comment on the first one:

    Unless I'm mistaken, the heater circuit is entirely separate, electronically, from the sensor circuit. That's what the diagrams that Tracy posted (from the datasheet) two pages ago in·this thread suggest. Take a look at that diagram, and see how the two "h" connections go through it separately from the "a" and "b" connections? The voltage that the heater circuit needs is unrelated to the amount of CO2 in the air, and the .65V you measured at TP1 is not voltage in the heater circuit (which should be 6V), it's voltage in the sensor circuit.

    If I'm entirely mistaken on this I hope that Tracy will step in and correct these comments, but I think that you should think of the heater and the sensor as two separate electronic devices. The heater is simply that -·a tiny heater that you turn on (6V) and off (0V) by taking the CNTL pin high or low. That's it - that's the entire operation of the heater circuit. The sensor circuit is another device, one that sends a certain voltage out TP1, anywhere from 0V to 3.35V, depending on the amount of CO2 in the sensor. The chemical reaction that makes this work properly needs a certain amount of heat (as Tracy mentioned a page or two ago), so this circuit only works when the heater is turned on. But the voltage that you read on TP1 has nothing to do with the amount of electricity needed by the heater circuit.
    ==================================
    As for the LED question, try this:

    http://led.linear1.org/why-do-i-need-a-resistor-with-an-led/

    A short, more direct answer would be that an LED can handle 20 mA (generally - look on the packaging for a particular LED). If you're putting it into a 9V circuit, then the resistor you need is determined by Ohm's Law:

    R = (9V / .020 A) = 450 Ohms······· [noparse][[/noparse]20 mA = .020 A]

    How big a resistor would you need if you were only using 5V?
  • Tracy AllenTracy Allen Posts: 6,516
    edited 2010-06-07 - 16:16:13
    Sylvie369 explained well the purpose of the heater. It is a separate coil of resistance wire inside the sensor tube, connected from H to H on the schematic symbol. When you apply a certain voltage (6 V), current flows through it and it heats up, and that makes the main chemical reaction happen on the outside surface of the sensor tube, and there are separate connections, "A" and "B" for that.
    attachment.php?attachmentid=70818

    Think about a flashlight battery. If you cool down the flashlight battery -40 degrees (Brrr!) it won't work, because the chemical reactions inside are frozen. The chemical reaction in the CO2 sensor is very much a special little battery, but it is effectively frozen at room temperature and the heater has to bring it up to a much higher temperature to make it happen.

    Look at the schematic symbol and see the four separate connections, H to H and A to B.

    Here are the specifications from the MG-811 data sheet...
    attachment.php?attachmentid=70941

    Note that says that the heater current is 200mA, the heater resistance is 30 Ohms, and the power supply voltage should be 6.0 Volts, and the heater power, 1200 mW. All of that is consistent with Ohm's law, I = E/R. 6 Volts / 30 Ohms = 0.2 Amp. 6 Volts * 0.2 Amp = 1.2 Watt. It is the power that makes the heater hot. That is the math of it and what you can read from the spec sheet.

    But I can see that you really do need to learn some basic electricity facts about EMF, current, resistance and power. Silvie369 saw your confusion too and gave a good explanation of the difference between Volts and Amps. One analogy for voltage and current is to think of a oil pipe. Voltage is like the oil pressure, current is the flow, charge is the total amount of oil that has come out, and resistance is like the size of the pipe, in that with the same pressure, a lot more oil can flow through a big pipe than through a small pipe.

    It is good that you observed that the voltage at the output changed from 0 to 0.65 Volts when you turned on the heater. Did you happen to notice how long it took for that to happen? Like, was it immediate, or did it take a while to build up?

    I'll come back to the wiring of the Parallax 27929 module later, and to the mash-up program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com

    Post Edited (Tracy Allen) : 6/7/2010 4:25:25 PM GMT
    743 x 277 - 27K
  • sylvie369sylvie369 Posts: 1,618
    edited 2010-06-07 - 17:04:29
    Thanks, Tracy. It's worth pointing out to the rocketeers that I knew essentially none of this stuff about 1-1/2 years ago. If you work with these devices, read the forums, and pay close attention, you can learn a lot in very little time.

    Let me try to expose my ignorance here.
    Tracy Allen said...
    You will notice that the two sensors have the same schematic symbol, a squiggly line (the heater, correct) and then two blocks on each side. The two blocks represent the ends of a tiny ceramic tube that is hanging inside the enclosure that you see with the screen mesh on the top. The heater is inside the tube, and when power is applied, it makes the tube hot, really hot. like 300 degrees Celsius (?). The chemical reactions only work at high temperatures. It is like the catalytic converter in a car. Despite the similarity in the schematic symbols for the MQ-7 and the MG-811, the outside surface of the ceramic tube is quite different and the way they need to be interfaced to an external circuit is quite different. This has to do with the fact that carbon monoxide is an reactive chemical, whereas carbon dioxide is very stable. That lack of reactivity make CO2 a much harder gas to measure that CO.

    The ceramic tube in the MQ-7 carbon monoxided sensor is coated with tin dioxide.(SnO2). The CO reacts in a catalytic reaction on the surface of the (SnO2) and in the process the surface resistance changes proportional to the amount of CO present. The sensor is used like a variable resistor in the circuit for the Parallax 27931 CO module. The Parallax module has an amplifier that buffers (!) the output and turns it into an alarm signal that turns on at a certain level that you can set with the on-board control.

    Carbon dioxide, being much less reactive, uses the NASICON substrate instead of (SnO2). Correct, NASICON stands for "SodiumSuperIonicConductor". This stuff is a hot topic for research in many fields today and when you Google it you probably came up with lots of scientific papers about it in different areas as an electronic nose. I just learned about it myself, thanks to you! There is a ceramic matrix that has lots of little interior passageways, and sodium ions are free to move through those passageways. The conduction is by movement of sodium ions, not by movement of electrons as it would be in a copper wire. Now, in the CO2 sensor, there is also lithium. You can read the chemical reaction in the MG-811 data sheet. Lithium is the lightest metal, and lithium is extremely reactive. That is what makes it good for high performance batteries--all that energy potential. It also makes it useful for a CO2 sensor, because it is energetic enough to react with CO2. Again, see the reaction in the data sheet. The reaction produces a current of sodium ions that in turn produces a voltage output from the sensor. But in this sensor you can't allow a current to flow from the sensor (different from the CO sensor). The data sheet states firmly that you have to use a buffer amplifier to measure the voltage of the sensor without allowing current to flow more than one pA (10-12 Amp). {I am getting onto hazy ground now, but I think the reason for that is that the reaction is probably reversable, and allowing current to flow would quickly "poisen" the reaction by locking up the sodium.}
    Okay, several pages back you guys asked about "saturation", and I said something about the physical processes any sensor must use in order to detect whathever they're trying to sense. Here Tracy is explaining the physical processes for the CO and CO2 sensors. I have a shameful lack of college-level chemistry, though I did have two good years of high school chemistry, but I think I'm largely following the explanation. One thing I do remember is that many (most? all?) chemical reactions are either "endothermic" or "exothermic". Endothermic reactions are ones that require external heat energy to occur, while exothermic reactions are ones that give off heat energy when they occur. I assume (stop me if I'm mistaken!) that the reactions that go on inside of the CO and CO2 sensors are endothermic, and that's why they require the heating element. The reactions that go on inside of the·rocket motor are very exothermic, as evidenced by the several feet of hot flame coming out the bottom of a large rocket motor under power. Now, it's quite possible that everything I just said is wrong - I might be wildly misusing those two terms, and I guess it's even possible that the two terms are no longer used, as my high school chemistry would have been back in 1977-1979.

    One big question: if the sensors work by responding to chemical reactions between CO2 and certain substances inside the sensor, won't those substances eventually be used up? How are things being "reset", as it were, so that the sensor can continue to work? Why doesn't it become less and less effective at sensing CO2 the longer you use it? (This isn't a thought experiment - I honestly don't know). ·
  • Mike NHMike NH Posts: 34
    edited 2010-06-07 - 19:29:21
    ... and I had the same question, Paul! Won't the chemical coating inside the CO2 sensor (super-conducting sodium) eventually be used up? How does it "reset"? Does the (CO or CO2) gas temporarily bond to the surface of the NASICON substrate, only to be "released" (that is, to have the chemical bonds broken when heat-energy is applied to the sensor)?

    A thought experiment indeed. I was reminded of Schroedinger and his Cat for a moment·(since I we can't see inside the CO2 sensor...!)

    Mark

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

    -Solon
  • Justin AbbottJustin Abbott Posts: 54
    edited 2010-06-07 - 22:03:18
    Dr. Allen,
    Both a short and long wire (chord) can carry electrical currents. However, we were wondering if a shorter chord would be more effective then a longer chord because longer chords have to carry the current a further distance with a greater amount of mA. Would a greater amount of mA wear the wire out faster? Should we use a shorter or longer chord to connect the CO2 sensor to our prototype board, and then later the ASP?

    Justin
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-07 - 22:48:44
    Justin Abbott said...

    Dr. Allen,
    Both a short and long wire (chord) can carry electrical currents. However, we were wondering if a shorter chord would be more effective then a longer chord because longer chords have to carry the current a further distance with a greater amount of mA. Would a greater amount of mA wear the wire out faster? Should we use a shorter or longer chord to connect the CO2 sensor to our prototype board, and then later the ASP?

    Justin
    Tracy,

    ··· Let me clarify Justin's question, which came from a discussion we had this morning about why you wouldn't necessarily use an extension cord ("chord") to connect·light up a·lamp (etc.) 100 meters away.

    Question: What happens to electricity-- voltage, amperage, impedence, etc-- when it travels a longer·versus a shorter distance (through longer and shorter wires)? Does electricity decrease in power if it travels over a longer distance; is it weaker? "Would a greater amount of mA wear the wire out faster?"

    I think tomorrow we'll connect the CO2 sensor to another BOE/MAWD wired·exactly like the ASP. We'll·attach a 4-pin female·("Molex?") plug-in to the four pins on the CO2 sensor·and·run the four wires into their corresponding BOE slots (P3, P4, etc.) Then we'll run the program that Andrew "mashed together" (as he says. See his previous post.) What he did was cut-and paste the CO2 program into last year's MAWD-BOE program to·"see what happens." And so we will (this is, if you and Sylvie sanction our wild···smhair.gif· experimentation...!)

    Regards,

    Mark
  • edited 2010-06-08 - 01:58:06
    Dr.Allen,

    In your equation, I = E/R, what does each variable stand for? Does the "R" stand for the heating resistor and the "I" the heating current?

    @sylvie
    Yes they do still use those terms endothermic and exothermic. I actually learned about them this year in my 9th grade science class. I am pretty sure that you have them right, but I might have forgotten seeing how we learned this maybe 3-4 months ago.

    Sean
  • sylvie369sylvie369 Posts: 1,618
    edited 2010-06-08 - 02:33:49
    Quick comment re. the "longer wire" thing:

    It probably won't make any difference for the lengths of wires you're likely to use inside of that cramped payload bay. In fact the amount of space you have available will restrict your wire lengths before the electrical issues would, I think.

    That being said...you know the wires that run out from the launch controller to the launch pad when you fly your rocket? If you're using an M motor, you should be launching from at least 500 feet away from the launch control officer's station (LCO). But the electricity used to light the igniter doesn't travel that distance. The battery that powers the igniter·is set up right next to the launch pad, connected to the motor's igniter through a relay box. The wires that run back to the LCO station simply carry a signal that tells the relay to close, so the energy from that battery can travel the 10 feet or so over to the launch pad and light the igniter. If you kept the battery at the LCO station and tried to send that energy all the way out to the launch pad, the resistance of the wires would bring down the current available at the igniter so much that it would not light.

    ·
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-08 - 12:14:12
    Sean from ARLISS-NH said...
    Dr.Allen,

    In your equation, I = E/R, what does each variable stand for? Does the "R" stand for the heating resistor and the "I" the heating current?

    @sylvie
    Yes they do still use those terms endothermic and exothermic. I actually learned about them this year in my 9th grade science class. I am pretty sure that you have them right, but I might have forgotten seeing how we learned this maybe 3-4 months ago.

    Sean
    Sean,

    ··· I believe someone mentioned what I, E and R mean in a previous post to the forum·(page 3 or 4 maybe...?)

    Look up "Ohm's Law" to find the answer:

    http://www.the12volt.com/ohm/ohmslaw.asp

    The web link above also talks about voltage, amperage, power, watts, ohms, etc.... almost everything that we've talked about in our discussions.

    ROCKETEERS: Please read about, and understand Ohm's Law.

    Mr. Kibler
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-08 - 12:23:22
    Justin,

    ·· Based on Sylvie's reply (above) it looks like a reaaaaaaaaaaaaaaaally long wire has more resistance than a much shorter wire. While there is a difference in resistance·in a 5 cm. wire versus a 10 cm. wire, it's minimal. The resistance should be·measurable if we had a sensitive enough "multimeter" (like Dylan's.)

    For our purposes, the length of the wire from the CO2 sensor to the BOE is (and the resistance in·a longer wire) is insignificant. A·5 cm, 10 cm, or·20 cm wire should all work equally as well.

    Mr. Kibler
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-08 - 22:10:29
    Andrew and Rocketeers,

    ·· Let's move ahead with trying to get the new ASP program running. Andrew, I think one thing we need to do is to·"assign" pins #3 and #4 as I/O definitions in the program. Likewise with the "Vin" and "Vss" wires. Here's where they connect to the BOe

    ·· "Vin" pin on the CO2 sensor goes to "Vin" on the BOE

    ·· "Com" (GND) pin on the CO2 sensor goes to "Vss" on the BOE

    ·· "CNTL" pin on the CO2 sensor goes to "P4" on the BOE

    · ·"ALR" pin on the CO2 sensor goes to "P3" on the BOE

    I think, though I'm only 37% certain, that the "HIGH 4" command line has to be replaced or rewritten somehow to make the program activate the pin that runs the heater. That's one reason why you have to·"assign" pins #3 and #4 in the I/O definitions part of the program. Use some of the programming knowledge you acquired last summer at Math and Science Camp.

    Rocketeers, here's where you begin to use the information in the "What's a Microcontroller?" book. Read, think, and·then dive in an offer your ideas about how to·get the program working.·It's time to rock and roll. Tomorrow the·CO2 sensor will be wired to the ASP. I'll look for everyone's ideas and input here on the forum each day.

    Mr. Kibler··
Sign In or Register to comment.