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

ARLISS Team NH

1679111259

Comments

  • Mark in NHMark in NH Posts: 447
    edited 2010-06-11 19:51
    Dear Project Team,

    Today after school we·cut and pasted·Andrew's MAWDBOE_w_CO2_June10.bs2 program·with Dr. Allen's "Carbon Subroutine" and his "V_write_record". We·edited the program to include·a column heading·for·the CO2 reading (CO2 ppm). Attached is the program. When high CO2 concentration caused the CO2 sensor's red LED to light up ("Alarm" Status = 1) the digit DID NOT change from 0 to 1 even when·the LED went from on to off.

    *Sylvie and Dr. Allen*: Mr. Kibler just· ordered 5 A - D (analog to digital)·converters from Parallax. So we should have them middle of next week in time for next Sunday's "All team" practice/build session.

    ·We looked at the breadboard and it seems there is not enough physical space for the AD converter. If we take the "Morse" code LED off we will have four PIN I/O's available. We also have two VIN's, two VDD's and one VSS.

    Were you thinking of using the A-D converter to cross from one side of the Breadboard to the other? If so, there doesn't seem to be enough space on the Breadboard. Or were you thinking of·installing it onto·another Breadboard, attaching that breadboard to the ASP, and then running·the wires from the·second·(non-parallax)·to the BOE? As always thank you for your help. Where do we go from here, with the programming and the hardwiring?

    Dylan and Mr. Kibler (After school Friday at 4:30 with Technical support from Derek Smith and my dad

    Post Edited (Mark in NH) : 6/11/2010 8:22:42 PM GMT
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2010-06-11 21:03
    The analog to digital converter (ADC) that Sylvie linked to above would be a good choice. Parallax item code 604-00060 and Microchip part number MCP3202.

    The MCP3202 needs 3 wires to connect to the BOE. You had pins p3, p4, p6 and p14 available, and possibly also p12 and p13 where the LED is now. As it stands, the CO2 sensor is using p4 for the heater and p3 for the alarm status. That leaves p6 and p14 for the ADC, but p3 can also be re-purposed for the ADC, so you have enough. If need be, the LED connections can be shared. Plenty of options.

    Where to locate it is another matter. You may need another small breadboard or a perf board off to the side, right next to the sensor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-11 21:55
    Tracy and Sylvie,

    ·· I ordered·the (5) Parallax #604-00060 AD converters that Sylvie suggested... extra so each Rocketeer will have one for their BOE board at home. We should have them by mid-week. Looks like we'll be installing it·on a small auxillary breadboard close to the BOE because we're out of physical space on the BOE. I assume that we'll simply plug the AD converter into the auxillary breadboard and then run the wires directly to the BOE. Yes?

    Yes,·p6 and·p14 ar still unused and we can always take the LED off, freeing up to more two "P" slots. But we've become·attached to its cheery, blinky "Hello!" (or rather, "Forward", "Back", "Left", "Right") every time we power up the BOE. It gives it character. We hadn't thought of re-tasking the p3 'Alarm' slot. If we do (pardon my ignorance)·what is disabled? The red LED on the CO2 sensor module? The "ALARM" text/ status (1 or 0) on the computer screen? Both?

    We combined Andrew's MAWDBOECO2 program (above) with the two subroutines you posted. Thank you. We then posted the combined program above. When it runs it shows 0's in a new column to the right of the time and sample numbers. But the 0's don't change to 1's when the CO2 sensor's red LED "alarm" light lights up. From the program it looks like it isn't supposed to, pending further changes. Yes?

    Dylan (and a new recruit, Derek) figured out how to add the column heading for the CO2 reading (among other things) today. They stayed until nearly 5:00 PM... after school and on·Friday.·Pretty impressive! Dylan's father also stopped in and watched, amazed. Dylan may be a future Tyler (if you recall Tyler,·our former Student Project Lead). Tyler graduates in a few days and he was accepted early decision at Swarthmore. Did I mention that Mollie (also on previous project teams)·will be studying·engineering next fall?!·My son, Christopher is off to George Washington University in DC where he'll be studying international affairs. He has freshman orientation in just two week.·I wonder where·this year's·Rocketeers will end up...? Thanks so much for your inspiration, guys. You are rare and wonderful birds.

    Mark
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-11 22:09
    Sylvie,

    ·· What were the Blue Angels doing outside your window? Are you near the Kenosha air show?·Would you take the ride in one of those big Blue Birds if they offered...? (see attached.)

    Maybe you could build a "Blue Angels" rocket, powered by quad Aerotech "M" motors. That would be cool. I've seen an large (5-foot long) X-15 model rocket fly on an Aerotech "M" and it was awesome!

    As you see, things are going really well with the ARLISS project. Great participation this year, and excellent learning.

    Mark
    600 x 833 - 33K
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-06-11 22:50
    First, Mark asked "Where do we go from here?". There are several things on your docket:

    - More learning about the sensor you're using. Tracy has big plans, I'm sure, for helping you to understand the range of CO2 content you're going to try to measure, the way that the sensor responds to CO2 all along that range, how temperature and partial pressure of the air you're measuring affects that, and so on.

    - Figuring out how to mount, power, and connect the A/D chip. It looks like the Vdd pin is also the reference voltage. That will be just the standard 5V from your BoE. Here's where your "how long can the wires be?" question is relevant - the wire from the BoE to the Vdd pin on the A/D chip will be a couple of inches long, and it's good, as I understand it, to have a capacitor near that pin to keep the voltage up to the necessary levels. The chip's datasheet does say (section 6.4) that you should use a .1 uF capacitor on the power supply pin, and there's a diagram that also has a 10 uF capacitor there. There's also an "anti-aliasing filter", but I suspect that's not something you're going to need.

    - Learning how to use the A/D chip. I agree that you're going to mount it on either a separate protoboard or a perfboard (to which you would solder parts). Tracy may have some suggestions for coping with the oddities of the chip (non-linearity, temperature effects·etc.), or may decide that they're too trivial to bother with. You will need to decide on a sampling rate -·I assume you'll sample CO2 at the same rate you were sampling other things last year.

    I think that when you get the chips, you should mount one on a protoboard, with the capacitor,·make the connections to the BoE but NOT to the CO2 sensor. Instead, for testing, hook up a 10K potentiometer to provide a variable voltage to the input pin of the A/D chip. It will stand in during testing for the sensor and the variable voltage you get from it. Using a potentiometer will give you control over the voltages you're sending in while you make sure you're able to read them with the A/D chip and the BS2 program. The sample program mentions using 10K pots for testing: run that program and make sure it's working correctly. That will verify that you have the right connections from the A/D chip to the BS2. Remember that you'll need to modify the program where it declares which of the BS2 pins it's using, so that it refer to the pins you have connected.

    When you have that connected, you can use your voltmeter to measure the actual voltage on the A/D chip's input pin: that should correspond fairly closely with the voltage readings displayed by the sample program. You'll also see on your debug screen the digital readings from 0 to 4096 that the A/D chip is reporting to your BS2.
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-06-11 22:59
    Mark in NH said...

    Sylvie,

    ·· What were the Blue Angels doing outside your window? Are you near the Kenosha air show?·Would you take the ride in one of those big Blue Birds if they offered...? (see attached.)

    Maybe you could build a "Blue Angels" rocket, powered by quad Aerotech "M" motors. That would be cool. I've seen an large (5-foot long) X-15 model rocket fly on an Aerotech "M" and it was awesome!

    As you see, things are going really well with the ARLISS project. Great participation this year, and excellent learning.

    Mark

    The Blue Angels are here for an air show on the Milwaukee lakefront this weekend. Would I ride in one? Of course. Now, I have flown aerobatics in a sailplane in Hawaii, and I have no illusions about my ability to handle g-forces. We did loops and split-s and other interesting manuevers, and after about 15 minutes, I was definitely ready to land. Maybe when I was 20 I would have been able to handle it, but I'm 49, and I'm no jet ace. On the other hand, if you offered me a ride, I'd be in that cockpit before you had a chance to change your mind.

    BTW, I understand the Blue Angels do not wear g-suits - they keep the blood in their brains the old fashioned way, by a brute effort that I'd rather not describe. If you think you'd become nauseous in aerobatic flight, let me dispel you of that notion. You'd go into shock well before you had any chance to get nauseated.

    I'm probably not very near to getting my L3 certification - I'm having plenty of fun with I and J motors. Tomorrow I hope to fly my GPS with the Prop-based receiver, though I have some programming and testing yet to do. I could see myself building a heavy, slow rocket for an L3 cert, with the "twist" being a bay full of my own electronics (the telemetry stuff, the GPS). But I can't see myself buying too many $400 motors. L2 is plenty of cert for me. I haven't even flown a large "K" yet - nothing bigger than an AMW K800.

    It does look like the ARLISS project is going quite well, and it's a real treat to see some of the students taking leadership. These projects should, ideally, be largely student-led, but it's very hard to get that to happen.
  • Dylan LandryDylan Landry Posts: 235
    edited 2010-06-12 00:46
    Dear Project Team,

    I have been trying to make a, "Need to Know" paper about the A-D converter. Since the only data sheet is from the manufacturer it has sprung up some problems. The most important one is the fact that since large companies mass order them because to order from the direct manufacturer saves a lot of money. This means that they have people who specialize into reading these so they are much more detailed. Personally for me, it is WAY over my head. I thought it would be like the CO2 sensor's documentation but this, wow. We *will* need help interpreting this. Just pointing this out because i think it will be very important that we ALL know how to wire this within a couple weeks.

    Dylan Landry
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-12 00:52
    Dylan Landry said...
    Dear Project Team,

    I have been trying to make a, "Need to Know" paper about the A-D converter. Since the only data sheet is from the manufacturer it has sprung up some problems. The most important one is the fact that since large companies mass order them because to order from the direct manufacturer saves a lot of money. This means that they have people who specialize into reading these so they are much more detailed. Personally for me, it is WAY over my head. I thought it would be like the CO2 sensor's documentation but this, wow. We *will* need help interpreting this. Just pointing this out because i think it will be very important that we ALL know how to wire this within a couple weeks.

    Dylan Landry

    Dylan and others,

    The 32-page-long specification sheet does seem quite daunting. I guess the important question to ask is, what should we know about the Analog/Digital converter? Also, what is going to be required to integrate it with the program and what is a good starting point?

    Andrew
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-12 01:21
    Rocketeers,

    First of all, good questions. Also, Sylvie makes an excellent point! He explains (and I wholeheartedly agree) that, "These projects should, ideally, be largely student-led..." Simply put, work together as a team to decipher the answers.

    1) So what should we know about the Analog/Digital converter?

    Think about some of the things·you needed to know,or learn,·about the CO2 sensor (and Andrew, about the ASP-1's temperature and humidity sensor, the·real-time clock·chip, and the DataLOgger.) I'm beginning to see a commonality in "the things we need to know." Once you begin to think about "what you need to know" versus "all there is to know", it's not so daunting.

    2) What is going to be required to integrate it with the program?

    My answer is similar·here:·What was required to integrate·the CO2 sensor with the program.

    3) What is a good starting point?

    I hope this answer isn't too cryptic but·a good "starting point" is always the next thing that needs to be done, and the next, and the next, logically and in order. So my answer is,"What are the next things that need to be done, logically and in order?"

    Sylvie and Tracy have already laid the next stepping stones in front of you. All you have to do is read, and then put them in order. The fact that I ordered the AD chips today is a "small" hint, and the others are right there to "find". Sylvie, Tracy, and I are here to guide you (and you are fortunate to have such dedicated, expert·mentors!) As the Mission Director said during the Apollo 13 mission, "Failure is not an option." We will not let you fail, Team. Only you can fail yourself.

    Keep up the good work,

    Mr. Kibler
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-06-12 01:42
    Dylan, Andrew -
    Good news: you can safely ignore most of the technical stuff in that datasheet. The first page is important, as it tells you which pin is which on the chip, how much voltage the chip needs, and the digital resolution (12 bits) of the chip.
    Then there's a lot of stuff you just simply don't need to know. Take a look at page 5. You'll see a timing diagram (Figure 1-1). Pretty technical, right? But the good folks at Parallax have already taken care of all of that stuff when they wrote the PBASIC SHIFTIN and SHIFTOUT commands. Look at the sample code. These commands do all of that timing stuff for you:
      LOW CS                                          ' Enable ADC
      SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%1101\4]     ' Select CH0, Single-Ended
      SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]result0\12]   ' Read ADC
      HIGH CS                                         ' Disable ADC
    

    You can even see some of the correspondence between the commands and the timing diagram. Notice that it begins with LOW CS, and if you look at the timing diagram, sure enough, the first thing you do is to bring the CS (Chip Select) line low. There's a regular pulse on the Clock line - the SHIFTIN and SHIFTOUT commands pulse that line for you at the correct rate. There's more, and you'll need to read up on the SHIFTIN and SHIFTOUT commands, but the good news is that all of that picky timing that those diagrams are trying to show you is taken care of automatically by the PBASIC code. There are a few things you have to specify, but they're easy. The chip expects the most significant bit (MSB) to be first in any communications. You can see the MSBFIRST parameter in the PBASIC code that takes care of that. It's really pretty easy.

    The Performance Characteristics starting on page 7 may make a difference to you - you'll have to find out from Tracy. To my eyeballs, it all looks pretty safe - like you can probably ignore it without getting bad results. But he is the one with experience in this stuff. I'm sure he'll point out any potential snags there, but I suspect you'll be able to just ignore that stuff as well. Figure 2-19 is the one that seems mostly likely to be important - how much does the drop in temperature as you fly affect the output of the sensor? But the answer is "just a small fraction of a LSB" (which is essentially your least significant digit).

    Nothing after that seems important to me until page 13, where the functions of the pins are described. You should read that stuff. It won't mean much to you right now, but it's important information. Page 15 is also very important, especially that equation. It tells you how you're going to convert the reading you get from the chip into a voltage (which you will then convert to a CO2 ppm value). Of course the way it's written, it solves for the digital reading from a known input voltage (from the sensor).

    ** Can you solve that equation for Vin? That's the form of the equation you're going to need in your program.·**

    Then there's nothing you need, I think, until some stuff I've already mentioned on page 20. Then the rest is all packaging and labeling information, which you can just ignore. If you're interested, you might take a look though at the "recommended land pattern" on page 25. I've been designing my own circuit boards since last fall, and this is the kind of information you need in order to design boards using parts like this. I've been spending quite a bit of my time looking over "recommended land patterns" and entering them into the program I use to design circuit boards.

    ====================
    P.S. - I just ordered a couple of the A/D chips to play with to make sure I understand them as well. I was looking through the datasheet where it describes the configuration bits, and it wasn't quite what I thought it was. I think I get it now, but I'll play with them a bit to make sure. The 4 channel version looks like just what I need for a Propeller-based project I'm doing in the fall.

    Post Edited (sylvie369) : 6/12/2010 1:57:36 PM GMT
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2010-06-12 16:56
    As Sylvie pointed out, you will want to install a 0.1 µF capacitor right next to the MCP chip, and you will need the extra circuit board tucked in off to the side. And wire. And I think you will need one resistor (1 k&#937[noparse];)[/noparse] from your kit, to connect Din to Dout. (I think we can do that.) For experiments you will want to build the ADC circuit on one of those white breadboards.

    On in the ASP you might have the option of soldering the ADC chip along with its capacitor and the wires to a small piece of perfboard. Perfboard is a 1/16" thick piece of circuit board material that has holes on a 0.1" grid (like the white breadboard). The holes are plated with copper so that you can solder components and wires to it. If you are comfortable with soldering, that may be an option for the final ASP. Do any of you have experience with soldering?

    Trivia history question: Why is the white block called a "breadboard"?

    The pins p12 and p13 that are used for the LED can be shared and still be used for the LED messages. The MCP3202 requires that the BASIC Stamp send three signals, and one is called "chip select" (CS\) and another is called "clock" (CLK) and another is called "data in" (Din). One of those could be connected to pin p12 and the other to pin p13, shared with the LED. When the signals are sent from the BASIC Stamp to the MCP3202, the LED will flash quickly, but so what? That's cool too, a message to you. You can still use the LED to flash out status messages in Morse Code, and the MCP3202 won't care. This kind of pin sharing is very very often done with micro-controllers. You just have to be sure there are no conflicting signals.

    attachment.php?attachmentid=71118

    See CLK in the diagram? Also CS\SHDN, and Din? I put a backslash instead of the bar over the CS\. When the Stamp makes that pin low, the MCP3202 knows that it is time to get to work. When the Stamp makes that pin high, the MCP3202 sleeps. (Shutdown, SHDN). The Stamp will send a sequence of bits to the Din pin and it will then listen to the Dout pin for a response. The CLK clock pin sets the timing for both sending and listening. Most of you were not involved with setting up the ASP in the two years past, but the method of that data goes back and forth is very similar to the DS1307 real time clock chip and the SHT11 humidity and temperature sensor. You will learn more about that. By the way, when you wire it up, you will connect Din and Dout together via a 1 kΩ resistor and there will be only one wire from those two pins to the BASIC Stamp. Those pins are shared. (There we have it again, pin sharing!) That is possible because the MCP3202 never talks when it is listening.

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

    Post Edited (Tracy Allen) : 6/12/2010 5:23:32 PM GMT
    239 x 133 - 9K
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2010-06-12 17:20
    P.S. I see Sylvie did a great job of describing the pins and how they relate to the SHIFTOUT command. Read what he said carefully. Also look in your program for other instances of SHIFTOUT in connection with the DS1307 and the SHT11.

    P.P.S. If you look at the Parallax code that Sylvie mentioned, you will see that they have 4 connections to the BASIC Stamp, separate ones for Din and Dout. I think the two can be connected together (via the 1k), but I could be wrong about that. I surmised that from a quick glance at the timing diagram in the data sheet. It told me that the chip doesn't talk while its listening and that it does not care about what it hears while it is talking. (is the the same with people?)

    Here is the timing diagram, figure 5-1 from the MCP3202 data sheet:
    attachment.php?attachmentid=71119
    See the time course of Din, where the Stamp is talking, followed by the big grey area that says "don't care"? The talking part is where the Stamp is sending data (4 bits in sequence) to the MCP3202, and the part with "don't care" is where the MCP3202 ignores anything that happens on Din. Also look at the time course of Dout. See the "hi-Z" during the time that the Stamp talks to the MCP3202? "Hi-Z" means that the Dout line is electrically disconnected from the circuit. But on the falling edge of the 4th clock pulse (see it?) the Dout pin wakes up, connects to the circuit, and sends out the data as Sylvie described above. There is an null bit (just to get things going) followed by 12 bits of data. Then it goes back to the Hi-Z state and the chip waits for another command from the Stamp.

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

    Post Edited (Tracy Allen) : 6/12/2010 8:44:21 PM GMT
    486 x 139 - 14K
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2010-06-12 18:29
    I think I see the bug, why the CO2pp does not change from zero to one at the same time as the sensor LED. The reason is that pin p3 had been configured as an output during the program initialization:

    Here is the way it is, with the offending bit highlighted in red:

    Reset:
    ..OUTS = %0001001000000000 ' indicator led is on. rts (p9) high to start, tx (p8) low to start.
    ..'fedcba9876543210
    ..DIRS = %1111001111111101 ' p1 is input for sensirion data, pa and pb input for rx and cts

    And here is the way it should be, with one bit in the DIRS statement changed from 1 (output) to 0 (input).

    Reset:
    ..OUTS = %0001001000000000 ' indicator led is on. rts (p9) high to start, tx (p8) low to start.
    ..'fedcba9876543210
    ..DIRS = %1111001111110101 ' p1 is input for sensirion data, pa and pb input for rx and cts and p3 for CO2

    I don't see anything else in the program that messes with that pin. Doe that resolve the problem?

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

    Post Edited (Tracy Allen) : 6/12/2010 6:34:24 PM GMT
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-12 23:56
    Tracy Allen said...

    I think I see the bug, why the CO2pp does not change from zero to one at the same time as the sensor LED... I don't see anything else in the program that messes with that pin.

    Does that resolve the problem?
    Tracy,

    I think one of the Rockeeters actually asked on Friday, "If voltage is coming out to light up the LED (output), where's the voltage going·from the CO2 sensor? What makes the 1's and 0's appear (input)?" He asked a great questionand now we have a better understanding.

    Something tells me that we'll be slipping into the lab on Sunday to boot up the ASP·and upload·the program fix to find out whether it resolves the "problem" (a.k.a. challenge! mystery!) ... Stay tuned for an update!

    Mark
  • edited 2010-06-13 00:33
    Dr.Allen,

    Another question. What is the difference between having the 1 and the 0. What does the 0 do that makes the program work correctly and/or what does the 1 do that makes the program incorrect.

    Thank you all for your time and effort,

    Sean
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-13 12:50
    Sean from ARLISS-NH said...
    Dr.Allen,

    Another question. What is the difference between having the 1 and the 0. What does the 0 do that makes the program work correctly and/or what does the 1 do that makes the program incorrect.

    Thank you all for your time and effort,

    Sean

    Sean,

    The "1's and 0's" are called binary. Binary code always states a one or a zero; on or off. In addition to using some binary functions in the program code, binary is also what *every* computer program eventually comes down to. So, when you hit that "compile" button, you're translating the words we can understand into words the computer (the BS2 stamp) understands. This is a rather simple explanation, and I believe your book, "What's a Microcontroller?" should explain this concept much better.

    Andrew
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-13 16:30
    Andrew,

    ·· Thanks for a nice, clear, simple explanation of binary code (the 1's and 0's Sean asked about.) Thanks too, for guiding Sean toward reading his "What's a Microcontroller?" book a bit more thoroughly.

    I think I might head down to the science lab in·a while and download Tracy's program fix to see what happens. Tomorrow and Tuesday will be fairly chaotic at school because of graduation and then a field trip. That won't leave·Dylan,Justin, Mike and I·much time to tinker at school.· sad.gif

    I may stop ar Radio Shack to get the capactors for the AD converters when I pick Chrispoher up after work at 4:00 PM. Did you happen to check in your bag of resistors, LED's, etc. to see if we happen to have the right size capacitors and resistors? Where do you think I should get the add-on breadboards: at Radio Shack or through Parallax? Are all breadboards the same (except for size?) Do you think we should get perf-board and actually solder the AD converter, capacitors, wires, etc. to it like Sylvie and Dr. Allen suggested? That would be something new for us to learn and do this year! How would we protect the underside (where everything would be soldered) from short-circuiting?

    Please make a list of everything you will need to clone the ASP-2 see I can send you home with all the "right stuff" after next Sunday's all-team practice.·Please let me know if there is·anythng else we might need·for next·Sunday's practice. As always, Mrs. Kibler will provide cookies!

    Thanks·for the excellent leadership,

    Mr. Kibler
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-13 17:05
    Mark in NH said...
    Andrew,

    Thanks for a nice, clear, simple explanation of binary code (the 1's and 0's Sean asked about.) Thanks too, for guiding Sean toward reading his "What's a Microcontroller?" book a bit more thoroughly.

    I think I might head down to the science lab in a while and download Tracy's program fix to see what happens. Tomorrow and Tuesday will be fairly chaotic at school because of graduation and then a field trip. That won't leave Dylan,Justin, Mike and I much time to tinker at school. sad.gif

    I may stop ar Radio Shack to get the capactors for the AD converters when I pick Chrispoher up after work at 4:00 PM. Did you happen to check in your bag of resistors, LED's, etc. to see if we happen to have the right size capacitors and resistors? Where do you think I should get the add-on breadboards: at Radio Shack or through Parallax? Are all breadboards the same (except for size?) Do you think we should get perf-board and actually solder the AD converter, capacitors, wires, etc. to it like Sylvie and Dr. Allen suggested? That would be something new for us to learn and do this year! How would we protect the underside (where everything would be soldered) from short-circuiting?

    Please make a list of everything you will need to clone the ASP-2 see I can send you home with all the "right stuff" after next Sunday's all-team practice. Please let me know if there is anythng else we might need for next Sunday's practice. As always, Mrs. Kibler will provide cookies!

    Thanks for the excellent leadership,

    Mr. Kibler

    Mr. Kibler,

    I think using a perfboard is the best solution to connect the set of parts required by the A/D converter together. I've got plenty of resistors and some capacitors at home, that may be the correct type. I'll try to figure that out later. However, let's not solder anything to the perfboard until we have it fully operational. Until then, we should probably use a breadboard, which I'm nearly positive the local Radio Shack sells. I know they come in different sizes, but I'm not sure how else they could possibly differ.

    Also, I'll start compiling a list of the parts required by the ASP-2, so each team member can create their own "clone" if desired.

    Thanks,
    Andrew

    EDIT: I've checked my personal supply of parts, and the parts list for the "What's a Microcontroller?" kit, and I have what Parallax calls a ".1 uF mono radial capacitor", among other much larger capacitors. Is this what we need (picture attached)?

    Post Edited (Andrew (ARLISS)) : 6/13/2010 5:21:03 PM GMT
    250 x 250 - 4K
  • edited 2010-06-13 17:45
    Andrew,

    What is the difference between a breadboard and a perfboard?

    Sean
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-13 17:50
    Sean from ARLISS-NH said...
    Andrew,

    What is the difference between a breadboard and a perfboard?

    Sean

    Sean,

    A breadboard is the white piece on your Homework board. It is meant more for temporary connections and prototyping, but we actually permanently mounted the wires of the original ASP to the breadboard using an epoxy. A perfboard is also for prototyping, but is more permanent due to the fact that you often solder your wires and components directly to the perfboard. The website below has a great article that discusses an "original" breadboard, a modern breadboard, and a typical perfboard.

    http://tangentsoft.net/elec/breadboard.html

    Andrew
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-13 20:38
    Sean from ARLISS-NH said...
    Andrew,

    What is the difference between a breadboard and a perfboard?

    Sean
    Sean,

    ·· This is a good question. The "breadboard" is the white, square box in the center of the BOE. It has·rows of holes in it. This is where we "plug in" all the wires (sensors, etc.)·temporarily.

    A "perf-board" (perforated board) is similar to a breadboard. It also has rows of holes in it like a breadboard. But a perf-board is thinner than a breadboard. Think of a PCB (printed circuit board) the same thickness as the BOE. The back side of perf-board has thin, flat,·narrow rows of copper·to which·you can solder parts.

    A breadboard is used for prototyping (temporary testing.) Once you figure out where all the wires, resistors, capacitors, etc.·go you can move everything to a perf-board and sodler everything on permanently so it doesn't get "unplugged" (like it can on a breadboard.) I'll be·sure to have perf-board at next Sunday's practice.·Maybe we'll even be at a point where we can solder a few of the components on. Thanks for your question and thanks for staying up-to-date on the forum!

    Mr. Kibler
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-13 20:44
    Sean,

    ·· Below are pictures of a breadboard and perfboard. They say (whoever "they" is), "A picture speaks a thousand words." Do you see and understand the difference now?"

    Mr. Kibler
    252 x 391 - 53K
    400 x 356 - 40K
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-13 21:02
    Andrew (ARLISS) said...


    ·I've checked my personal supply of parts, and the parts list for the "What's a Microcontroller?" kit, and I have what Parallax calls a ".1 uF mono radial capacitor", among other much larger capacitors. Is this what we need (picture attached)?
    Andrew,

    Here is·Dr. Allen's comment from above:

    "As Sylvie pointed out, you will want to install a 0.1 µF capacitor right next to the MCP chip...· And I think you will need one resistor (1 k&#937[noparse];)[/noparse]..."

    I'm not at all sure whether·your picture of the ".1 uF mono radial capacitor" is the right·one or not. That's beyond my expertise. To be sure, let's do three things:

    1) Check pictures from several different sources on-line to see what a "0.1 µF capacitor" should look like (you and the team.)

    2) Check with Sylvie and Dr. Allen to see if the picture you posted is the right capacitor (you and the team.)

    3) Check at Radio Shack (me).

    (Embedded 'homework' question, Team):

    For "0.1 µF", what does the symbol "µ" mean? What is "F"? What in a "µF" anyway...? My guess is that "F" is·a unit of capacitance (if that's a word.) But I could be wrong. Or right...!

    Mr. Kibler
    ·
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-06-13 21:08
    Andrew (ARLISS) said...

    I think using a perfboard is the best solution to connect the set of parts required by the A/D converter together. I've got plenty of resistors and some capacitors at home, that may be the correct type. I'll try to figure that out later. However, let's not solder anything to the perfboard until we have it fully operational. Until then, we should probably use a breadboard, which I'm nearly positive the local Radio Shack sells. I know they come in different sizes, but I'm not sure how else they could possibly differ.

    Also, I'll start compiling a list of the parts required by the ASP-2, so each team member can create their own "clone" if desired.

    Thanks,
    Andrew

    EDIT: I've checked my personal supply of parts, and the parts list for the "What's a Microcontroller?" kit, and I have what Parallax calls a ".1 uF mono radial capacitor", among other much larger capacitors. Is this what we need (picture attached)?
    I agree with Andrew that a perfboard will be preferable. You will want to securely mount your parts, because of the ejection forces they'll need to withstand. You will also need to be able to mount the board securely to the "sled" in your electronics bay (the board the current parts are mounted on). Perf boards usually have some nice mounting holes in them, and if the one you're using doesn't, you can easily just drill one.

    I also agree that you should set it all up on a protoboard first (a breadboard) to make sure you have it working correctly. I will probably hook one up that way myself.

    I believe that the .1 uF capacitor you have there is just fine.
    =================
    Due to storms, I didn't have the opportunity to fly my GPS rocket this weekend.·I did fly one high power rocket, on an I303 this afternoon, with nothing fancier than a standard altimeter in it. Great fun nonetheless.
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2010-06-13 21:16
    Mark in NH said...
    Andrew (ARLISS) said...




    I've checked my personal supply of parts, and the parts list for the "What's a Microcontroller?" kit, and I have what Parallax calls a ".1 uF mono radial capacitor", among other much larger capacitors. Is this what we need (picture attached)?
    Andrew,



    Here is Dr. Allen's comment from above:



    "As Sylvie pointed out, you will want to install a 0.1 µF capacitor right next to the MCP chip... And I think you will need one resistor (1 k&#937[noparse];)[/noparse]..."



    I'm not at all sure whether your picture of the ".1 uF mono radial capacitor" is the right one or not. That's beyond my expertise. To be sure, let's do three things:



    1) Check pictures from several different sources on-line to see what a "0.1 µF capacitor" should look like (you and the team.)



    2) Check with Sylvie and Dr. Allen to see if the picture you posted is the right capacitor (you and the team.)



    3) Check at Radio Shack (me).



    (Embedded 'homework' question, Team):



    For "0.1 µF", what does the symbol "µ" mean? What is "F"? What in a "µF" anyway...? My guess is that "F" is a unit of capacitance (if that's a word.) But I could be wrong. Or right...!


    Mr. Kibler

    Mr. Kibler,

    After briefly looking online, I didn't seem to find what you would call a "traditional" looking 0.1 µF resistor. Also, I looked up the meaning of "µF". The "F" means "Farad" and is the common unit to measure capacitance. The "µ" means "micro". So, 0.1 µF means 0.1 microfarads. "µµF" would mean micro-microfarads. Even smaller than that is "nF" (nanofarads) and "pF" (picofarads).

    Andrew
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-06-13 22:56
    I'd love to see what you consider a "traditional-looking" capacitor. This is what "traditional-looking" means to me: ·CAP-003D.bmp
    ·It's a disk capacitor. What you have is a ceramic capacitor. Another kind is·electrolytic - those are the "much larger" ones you have, I suspect.

    The ceramic capacitor will be just fine.
  • Mark in NHMark in NH Posts: 447
    edited 2010-06-14 01:25
    Sylvie,

    Attached·is·a picture of what I visualize when I think of "a capacitor" or a "traditional-looking capacitor."·The capacitors we are familiar with are·those·on the BOE and·inside the Parallax parts bag. Although I knew that they came in different "sizes" (based on their capacitance), I really didn't know that they came in so many different shapes. I just·learned something (else!) new.

    I picked up a small·breadboard and·some perfboard today so we can connect the capacitor, resistor,·and AD converter to the BOE when·it·arrives mid-week.

    Mark
    600 x 400 - 119K
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2010-06-14 03:31
    The 0.1 µF capacitor that came with your "What's a Microcontroller" kit will be fine for bypassing the MCP3202. This is a ubiquitous type of capacitor, very common in electronics to serve the "bypass" function.
    attachment.php?attachmentid=71141
    Explain the terms in, ".1 uF mono radial capacitor" for "bypass".
    • capacitor -- can store electrical energy in the form of electrical charge, kind of like a lake stores water that can be drawn upon when needed
    • bypass -- connects across the power supply for a chip (the MCP3202 in this case) and supplies energy quickly to the chip when needed -- keeps its power supply steady-- important for good accuracy. The energy comes from the nearby "lake" of energy stored on the capacitor. When binary circuits switch from 0 to 1 or from 1 to 0, they need a quick pulse of energy to do so. That is the underlying reason for the bypass capacitor.
    • µF a unit of capacitance, microFarad. micro=10-6, nano=10-9, pico=10-12, femto=10-15 micro-micro is the same as pico. The range of capacitance found in electronics for different purposes spans over 15 orders of magnitude.
    • The 0.1 µF value is very common. You will see it marked "104" which is its value in units of pF. That means,
    . . . 10 * 104 = 10-5 pF = 10-1 µF = 0.1 µF.
    • "mono"="monolythic". The capacitor is made as a block of material with many alternating layers of metal conductor and ceramic insulator. The above capacitor has wire leads attached to the sides and it is dipped in epoxy. You will find leadless monolythic capacitors everywhere on surface mounted circuit boards. Those are often tan in color and have metal connections at the two ends, and nothing at all written on their surface.
    • "radial" means that the wire leads come off the sides in parallel, as opposed to "axial", where they come off in opposite directions.
    . . . O====== as opposed to
    O
    . The resistors in your kit are "axial", the capacitors are "radial"

    I agree it will be a good idea to solder the MCP3202 and the capacitor and wires to a perf board--AFTER working it out on the breadboard!!!

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

    Post Edited (Tracy Allen) : 6/14/2010 3:36:59 PM GMT
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2010-06-14 03:53
    Sean asked, "Another question. What is the difference between having the 1 and the 0. What does the 0 do that makes the program work correctly and/or what does the 1 do that makes the program incorrect."

    Andrew gave a good general explanation of binary logic.

    This particular 0 and 1 have a function in relation to the outside world, the BOE input from the CO2 sensor.

    Here is the program statement with the BUG corrected. The particular binary bit we are talking about is the one that is underlined in red. It is a bit connected with the pin p3 on the chip, the one connected to the CO2 sensor alarm signal.

    ..DIRS = %1111001111110101 ' p1 is input for sensirion data, pa and pb input for rx and cts and p3 for CO2

    It is important to understand how this works. DIRS is a binary variable with 16 bits, and each bit corresponds to one of the i/o pins on the BASIC Stamp. Count 0,1,2,3,4,5,...,15 from the right side. Each i/o pin can be either an input or an output (but that direction can be changed at any time in the program). This DIRS statement is near the top of the program, and this one command sets the direction we desire to start with for all 16 pins at once. A 0 in a bit means the corresponding pin is an input. A 1 makes it an output. What do we want for the CO2 sensor? Well the pin has to be an input so that we can read in the CO2 level. That bit should be a zero. The BUG was that the bit had been a 1. That made it an output. The BASIC Stamp was holding that pin at a low level even when the the sensor lit its LED and tried to send a high level, the Stamp did not see it.

    Note that bit 4 is 1, an output. That is the pin that is connected to the heater control on the sensor. That is okay, we want it to be an output.

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

    Post Edited (Tracy Allen) : 6/14/2010 3:32:57 PM GMT
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-06-14 03:54
    It's worth pointing out that you'll simply attach one lead of the capacitor to your A/D chip's Vdd pin, and the other to ground. If you're like me, that'll sound nuts - like you're shorting things out - but it's correct.

    It's also worth noting that the capacitor you have is not polarized - it doesn't matter which lead goes to Vdd and which one goes to ground. That's not true of those larger ones (the ones you referred to as "traditional-looking"): they have a + and a - side, as the photo you linked to indicates.
Sign In or Register to comment.