"nano" has come up a couple of times previously in this thread. One in relation to capacitance:
"• µF a unit of capacitance, microFarad. micro=10-6, nano=10-9, pico=10-12, femto=10-15
abbreviated µF, nF, pF, fF.
micro-micro is the same as pico."
Those prefixes are commonly applied to electrical current, along with "milli", 10-3.
Think in orders of magnitude... A Amp.
The battery you have can supply 1A for 5 hours or 0.1A for 50 hours. If the CO2 sensor draws 0.2A, how long could the battery supply its current?
mA milliamp. 10-3
If the USB datalogger draws 25 mA 50% of the time and 90 mA 50% of the time, what is the average current?
If the BS2e draws 16 mA constantly, and the LED is turned on and draws 10 mA constantly, what is the total current for the BS2e+LED?
µa micro=10-6
The real time clock (RTC)draws about 0.3 µA, which is the same as 300 nA. Which has more effect on battery life, the RTC or the BS2e? If the BS2e draws 16mA and the RTC draws 0.3µA, what is the total current of BS2e+RTC?
nA nano=10-9
Again, how many nA does the RTC draw?
pA pico=10-12
The NASICON CO2 sensor is like a little battery, but it can only supply up to 1 pA of current!! Otherwise its voltage will drop like a rock.
fA femto=10-15
The LMC6035 buffer/amplifier on the CO2 sensor module reads the voltage of the NASICON sensor, but it draws only 20 fA from the sensor. Is that more or less than the NASICON sensor can supply, thinking of the sensor as a tiny battery?
We got up really early this morning to watch the USA-Algeria game on the Mexican TV station. Not much of a game, zip-zip, until... 2 minutes into the very last 4 minute overtime and, goaaaaaaalllllllllllllll. USA advances!
Dylan said...
Dylan wrote:
Ive gotten the mAH count for all the components, but I have had trouble reading the BS2e data sheet. Apparently, it is 30 mAH per PIN input/output. I am not sure if I am reading this correctly but that is what I got.
mA requirements of each component:
BS2e= 30 mAH per PIN input/output
Datalogger, Standby= 2mA, running= 25mA
SHT11 = N/A (Checked all sources on Parallax that I could find)
CO2 sensor = ~160 mA (Sense Mode) / ~2 mA (Standby)
1302 Real time clock chip= less than ~300 nA ( If somebody could tell me what nA is? I think it was a typo on their part (This is all I could find that resembled mA)
3202 ADC= 550 µA
I would like someone to double check these due to the chance that they are wrong.
Dylan Landry
Mr Kibler said...
[noparse][[/noparse] Sylvie and Dr. Allen, what are your thoughts about Dylan's answer...? - Mark]
1) 30 mA per pin is not the right spec. You want the total power supply current for the chip, which is around 16 mA. Each pin can supply some current to external devices, for example, the LED. The maximum current a pin can supply to an external device is 30 mA. Current supplied to the external device gets added to the supply current. For example, 16mA for the BS2e, plus 10mA from a BS2e pin to light the LED, equals 26 mA total.
2) datalogger standby=2mA and running=25mA do not include the current drawn by the USB flash drive itself. Maybe another 70 mA (but there is a lot of variation between brands of flash drives). That current has to be added in, so 25mA+70mA = 95mA. It is hard to figure, because the current jumps up even higher at the instant it actually writes the data. To get down to the 2mA current takes special commands to suspend the disk and the monitor, and I don't think the program does that now.
3) The SHT draws about 550µA when it takes a measurement and about 1µA as it sleeps between measurements. The time-averaged current is about 30µA if one sample is taken per second.
4) There is a question of whether the program will need to have the CO2 sensor heater on 100% of the time. If so, the 160mA figure applies. If not, then there will be some X% at 2mA and 100-X% at 160 mA. There is a discrepancy between the Hanwei and the Parallax data sheets. Parallax says 160mA for the heater and Hanwei says 200mA. There are many possible reasons for the discrepancy, but the only way to know for sure is to measure it (if it matters!)
5) You now know what a "nano" is!!!
So, add it up, worst case estimate, what is the total current in mA? Divide that into 5000 mAh, the capacity of the battery. What do you get in terms of hours of operation?
Dear Mentors,
SHT Parallax documentation"Low power consumption (typically 30 μW)"
I am not sure if this is what we would need or not. Email seems not to be the solution on this so I am posting it onto the forums in a last effort to find out if this is correct. I have checked multiple websites and the concept gets more and more vague.
Oh wow. Sorry about that. I have no idea at all how I skipped over that. Uh, thanks! More problems... What flashdrive are you using Mr. Kibler? The flashdrive will be taking up mA but I am not sure on how much.. I am having alot of trouble running all these numbers through my head. With all the changes on what means what it has been a hassle. I know I should be using email but it is not helping. Just too many numbers are crashing together all at once.
Once i get the Flash drive type I should be able to figure this out..
So the only thing we need to worry about with the SHT11 is the supply current correct? Do we need to worry about any of the other parameters? Are any of the others going to make the total voltage go up?
What flashdrive are you using Mr. Kibler? The flashdrive will be taking up mA but I am not sure on how much..
Good question Dylan. We've been using four or five different flash drives·when we work on·the "clone" of the ASP-2. The ASP-2 will ultimately·use the same flash drive as last year: a "Sandisk Cruzer micro 2 GB" flash drive.
Stick with it! All those number rattling around in your head will make sense eventually. When they do, that means you are learning. Then the information become a powerful thing: knowledge. You and your Rocketeers teammates are·gaining knowledge that many kids your age don't acquire until they are high school seniors or college. This knowledge-- and the whole ARLISS experience--·may well help guide your future. So stick with it! Aim high, Mr. Kibler
We have the Voltage requirement for everything now. Just wait about 20 min and ill output the answers to the amp requirements + the answers that Dr. Allen asked us....
We have the Voltage requirement for everything now. Just wait about 20 min and ill output the answers to the amp requirements + the answers that Dr. Allen asked us....
Dylan,
·· Please read the e-mail to the team before you post the answers.
Here·are the answers to your homework questions. They are the results of the Rockteers' excellent collaborative off-line efforts, by e-mail. I won't post all their back-and-forth e-mails to one another but suffice it to say there was some excellent dialogue.·Andrew and Dylan, you did·a fine·job leading and guiding the e-mail discussion! Justin and Mike, it was nice to see you right there in the middle of the discussion.
Go ahead and use these numbers for·the Sandisk flash drive: "Draws·75 mA when writing data to the flash drive." This number·is acceptable. Go ahead and use it.
Now simply calculate (add) the amperage·used by each device, divide 5,000 mAH (the size of our battery) by this number, and you should see how long (how many hours) our battery should last...!
Everyone, please do the calculation below and then post your answer to the forum individually. As we do in class, let's cross-check our calaculations at least three times (by having all the Rocketeers do the calculations individually.) You've heard this in class (those of you who have me as a science teacher, that is): "If we get different answers, can everybody be right? Can everyone be wrong?" If we get different answers, even from ONE Rocketeer, calculate again!
From last night's final e-mail:
"Dear Project Team,
This is what·[noparse][[/noparse]we] have so far for mA requirements... I have looked up the flashdrive... and·haven't found anything.... I would like if anyone else could help me on my search... Anyones help would be greatly appreciated..."
mA Requirements for the current ASP 2...
A) BS2e= 16 mA
Datalogger, running = 25mA,With flashdrive =75·mA·("when writing data to the flash drive")
C) SHT11 = 0.028 mA·
D) CO2 sensor = ~160 mA
E) 1302 Real time clock chip= .0003 mA
F) 3202 ADC= 0.55 mA
Step 1) CALCULATE: Total mA used = A+B+C+D+E+F = ___________________
Step 2) CALCULATE: How long will your battery theoretically last?·Take 5,000 AMP mAH (battery capacity) and divide by the total mA used (answer from Step 1). When you divide, mA cancels out on each side of the equation leaving hours for the unit of measurement.
Step 3) CALCULATE: "3X safety margin" (answer from Step 2 above DIVIDED BY 3)
ANSWER: ______________ hours. This is how long we can theoretically count on our battery to last and record data, with a safety margin of 3. That means it should actually record data three times·as long as your answer to Step 3.)
Excellent·collaboration, Team! Good work, good morning, Mr. Kibler (yawn)·
Below is our team's final compiled answers for the recent questions. Thanks for assisting with compiling them, Dylan! I will also post up that parts list that I promised at our last meeting shortly. It is currently on my desktop computer, which is completely disassembled into countless pieces right now.
Thank you,
Andrew 1.) If the CO2 sensor draws 0.2A, how long could the battery supply its current?
"The battery you have can supply 1A for 5 hours or 0.1A for 50 hours". So 2A must =10
hours, so wouldn't 0.2A=100 hours? Or would it be 2A=2.5 which means 0.2A=25 hours?
2.) If the USB datalogger draws 25 mA 50% of the time and 90 mA 50% of the time, what is the average current?
Here is a formula for calculating the requirement for mA.. (doesn't apply to answer at all, just wanted to see if this formula could be correct)
( T ) = time left on in hours
T / 0.5 * 25 = A
T / 0.5 * 90 = B
A+B = mA needed
_________________________________
If that doesn't make sense here is the ultimate answer....
25 + 90 = A
A / 2 = 57.5 mA per hour
3.) If the BS2e draws 16 mA constantly, and the LED is turned on and draws 10 mA constantly, what is the total current for the BS2e+LED?
By constantly, do you mean, per second, hour?
If it means per hour, then...
16 mA + 10 mA = 26 mA per hour
Per second then....
93600 mA per hour (93.6 A per hour)
4.) The real time clock (RTC)draws about 0.3 µA, which is the same as 300 nA. Which has more effect on battery life, the RTC or the BS2e? If the BS2e draws 16mA and the RTC draws 0.3µA.
16mA= 16 mA and 0.3 µA=0.0003 mA
Therefor the BS2e draws more mA.
4a.) What is the total current of BS2e+RTC?
16 mA + 0.0003 mA = 16.0003 mA
5.) Again, how many nA does the RTC draw?
300 nA
6.) The LMC6035 buffer/amplifier on the CO2 sensor module reads the voltage of the NASICON sensor, but it draws only 20 fA from the sensor. Is that more or less than the NASICON sensor can supply, thinking of the sensor as a tiny battery?
We are somewhat confused by this question. One team member suggested "that 20fA is less than what the NASICON sensor can supply.
>> 20fA=0.000000000000002 and 1pA=0.000000000001."
Below is our team's final compiled answers for the recent questions. Thanks for assisting with compiling them, Dylan!
Andrew,
Looks like we posted at about the same time, moments apart.
Hello down there in Florida! How's the weather? Last night was really hot here in DC... 94 degrees at bedtime.
This is REALLY good team work, Andrew! Please make a conclusion and a·decision for the team about whether we have enough battery power/time·(and how much) so we can move·back into the wiring and programming when I return from DC today.·The Team is·doing wonderful work, don't you think? Involvement this year is so much better than it's ever been!
Be·certain to compliment your teammates and allow them a few days off the forum from time to time so they can "come up for air." This is somewhat challenging for some of the new team members and I think they may have headaches from all the research and math (Mike, Sean, Justin and Dylan: And you thought science class was hard...!)
Step 1) CALCULATE: Total mA used = A+B+C+D+E+F = ___________________
Step 2) CALCULATE: How long will your battery theoretically last? Take 5,000 AMP mAH (battery capacity) and divide by the total mA used (answer from Step 1). When you divide, mA cancels out on each side of the equation leaving hours for the unit of measurement.
Step 3) CALCULATE: "3X safety margin" (answer from Step 2 above DIVIDED BY 3)
ANSWER: ______________ hours. This is how long we can theoretically count on our battery to last and record data, with a safety margin of 3. That means it should actually record data three times as long as your answer to Step 3.)
Mr. Kibler and others,
Below are my answers for the questions. As Mr. Kibler said, everyone should crosscheck *all* answers posted for accuracy.
Total mA count: = 251.578 mA Theoretical battery run-time: 19.874 hours 3x safety battery run-time: 6.624 hours
We "should" find the ASP-2 within 6 hours, don't you think? If not, then we have 3 times that long to find it before the (ASP-2) battery drains.·Regardless, the data is stored on the flash drive as non-volatile data and so we shoud have hours of data...·if we find the ASP! That's why we've included·a redundent shortwave/ GPS transmitter system on the ASP, right?
Get some fresh air and exercise today. Go out and play; you've certainly earned it. Have fun on the beach!
Below are my answers for the questions. As Mr. Kibler said, everyone should crosscheck *all* answers posted for accuracy.
Total mA count: = 251.578 mA Theoretical battery run-time: 19.874 hours 3x safety battery run-time: 6.624 hours
A) I concur: 6.624 hours x 3 = 19.872 (6.625 x 3 = 19.874 because 6.62466666 rounds to 6.625, not 6.624. There's a slight but inconsequential rounding error. )
I concur: 5,000 mAH / 251.578 mA = 19.87455 = 19.874 hours
C)·A and B·assume that the total amperage adds up to 251.578 mA. Does it?
Total mA needed: 251.58 mA
Battery Life: 19.88 hours (rounded)
Safe operating requirements for the battery: 6.63 hours
Mr. Kibler,
You said, "Step 3) CALCULATE: "3X safety margin" (answer from Step 2 above DIVIDED BY 3)"
I am confused by that statement. Now before that we divided the mA supply of the battery by the amount we needed. That came up with how long the battery will last without dying on us. Correct? If we wanted something that can last longer for our safety reasons like on how long will it take to find it, shouldn't we want a LONGER lasting battery? Not something that can last 1/3 as long?
Or where you saying that we want a battery that can last 1/3 longer then our battery for safety reasons?
Dylan Landry said...
Here are my calculations for the mA problems.
Total mA needed: 251.58 mA
Battery Life: 19.88 hours (rounded)
Safe operating requirements for the battery: 6.63 hours
Mr. Kibler,
You said, "Step 3) CALCULATE: "3X safety margin" (answer from Step 2 above DIVIDED BY 3)"
I am confused by that statement. Now before that we divided the mA supply of the battery by the amount we needed. That came up with how long the battery will last without dying on us. Correct? If we wanted something that can last longer for our safety reasons like on how long will it take to find it, shouldn't we want a LONGER lasting battery? Not something that can last 1/3 as long?
Or where you saying that we want a battery that can last 1/3 longer then our battery for safety reasons?
Dylan,
Mr. Kibler was saying that we should assume the battery will die before our expected calculation -- we don't want to go and find a battery that will only last 1/3 the current battery. The current battery is fine.
I am confused by that statement. Now before that we divided the mA supply of the battery by the amount we needed. That came up with how long the battery will last without dying on us. Correct? If we wanted something that can last longer for our safety reasons like on how long will it take to find it, shouldn't we want a LONGER lasting battery? Not something that can last 1/3 as long?
Or where you saying that we want a battery that can last 1/3 longer then our battery for safety reasons?
Think of it·like this:·Let's say you want to drive way up into Quebec to go fishing. The trip from your house to the lake is 500 miles.·The tank on your vehicle·holds enough fuel for a 550 mile trip. This assumes you are traveling at a·steady rate. So:
1) Would you take extra fuel? Probably. The "3X safety margin" on the ASP battery is "extra fuel."
2) Will·your speed·be constant all the way to the lake? That's unlikely. It's also unlikely that the ASP will "consume fuel" (use amperage) at a constant rate. So we'll·include·a safety margin ("extra fuel".) in our calcualtions.
3) How could you take more fuel with you on your trip to the lake? Add a bigger fuel tank and fill it all the way up.·The same concept applies·to the ASP battery. We wouldn't use a 260 mAH battery if·the ASP·uses a "total·of 251.578 mA." If the ASP runs for·just·one hour that would be cutting things way too close. Since we're not 100% certain how the ASP's power consumption will vary during the mission, since we don't know how long it will run inside the rocket before it's launched, and since we really don't know how long it will take to find the ASP after it lands, we'll add a safety margin.
Think of it in a slightly different way: You calculate that you can·just barely make it·to the lake on 1/3 tank of fuel. Would you risk not getting there by not filling the tank all the way? You could, but it would be risky. We won't risk it with the ASP;we want a "full tank of fuel." We could use a smaller (260 mAH battery, a smaller 'fuel tank') and "just barely make it." Or we could use a battery with lots of amp-hours and rest assured that the ASP will be running, even it it takes several hours to locate it. Theoretically we have almost 20 hours to find it (since our 5000 mAH "battery life = 19.874 hours."
Total mA = 251.578 mA
Battery life = 19.874 hours
3x safety margin = 6.625 hours
Do this analogy make sense...? Thanks for a good question!
"...[noparse][[/noparse]were] you saying that we want a battery that can last 1/3 longer·[noparse][[/noparse]than] our battery for safety reasons?
The other way around. What·I meant was we want a battery that lasts 3 times as long as the maximum time we·anticipate it will take to load, launch and then locate the ASP-2. Six hours seems like plenty·of time to do all that.·With·a safety margin·of 3X we should have over 18 hours to find the ASP-2.
Another question we·should be asking and calculating·is, "How long do the batteries in the shortwave/GPS transmitters last...?! (*Why do you think we use TWO transmitter/locators?) These are what we use to locate the ASP when it lands, possibly miles from the launch site. What good is 18 hours of data if we can't find the ASP...?!
I did·saftey margin explanation a bit·"backwards". The "right" way to cdetermine your safety margin is to calculate how much power (amperage) your device needs, then multiply by whatever safety margin you choose (2x, 3x, 10x, etc.)
Assuming (which is risky)that our calculations are 100% correct and that ASP power consumption is constant, the ASP should use 252 mA each hour:
ASP total·power useage = 251.578 mA = 252 mA
We·could· use a 'smaller' 1,000 mAH battery and the ASP "should" run for 3.98 hours (1.000 mAH·divided by 251.578 mA/hour useage.) So·the "safety margin"·would be·3.98.
What kind of battery does the shortwave/GPS transmitter use? Sorry I can't post more right now. I have poison oak, sumak, or ivy (we don't know which) and I can only type with my left hand because of the medicine on my right arm.
I soldered separate wires to the CO2 sensor at TP1 and TP3, ran the (attached) program, and the two voltages and their corresponding numbers·showed up just like before: 5.006 volts - 4095 and 0.055 volts - 255. Both voltages/numbers changed from time to time but with no apparent rhyme or reason.
Here's where it gets curious. I detached the individual wires from the stand-alone breadboard to the BOE, one by one, until they were ALL detached. Guess what? The numbers were still there:·5.006 volts - 4095 and 0.055 volts - 255. As before, both voltages/numbers changed from time to time.·I turned the BOE off and on between every "run" so the numbers weren't 'left over' from the previous trial.
A few things are noteworthy:
1) P3 and P4 are not assigned as inputs/outputs·in the program. Their wires (ALR to P3 and CNTL/HSW to P4) come from the CO2 sensor. The other two wires from the CO2 sensor are: Vss to Vss and Vin to Vin. These four wires are the only wires attached to the BOE. None of the wires from the stand-alone BOE are attached at all, yet the voltage still appears as above when the program is run.
After I post this I'll disconnect each of the four wires from the CO2 sensor, one at a time, to see if I can isolate which wire may be causing the voltage readout. I am somewhat stumped,but it seems one of the four CO2 sensor wires may be the culprit, and the undefined I/O's, p3 and p4.
So other than the obvious home team, the US (and Donovan!), who are we rooting for now in the World Cup?Les Francais are gone. Bye, bye Italia! Italia! and the Kiwis from New Zealand. Likewise with the Danes. Who are we gonna cheer for...?
I used "3X safety margin" merely as an example, to make the point that aerospace engineers typically include a safety margin.
*Is this·explanation·correct, Tracy and Paul? Please feel free to clarify and amend,
Mark
I don't think there's anything mysterious going on there. You figured out what kind of battery life you could expect, using somewhat conservative estimates, as you should.
Then you asked yourself (essentially), "What if I'm off by a factor of three? What kind of time would I have then? Could I live with that?".
You decided that the six hours you'd get in that worst-case scenario was acceptable, and I agree, though, of course, I've never been to Black Rock. But if I'd been searching six hours for a rocket, I'd be done searching and ready to give up.
I think that all of your assumptions are reasonable, and I think you're in good shape, battery-wise.
=====================
Like Tracy, though, I'm concerned about the sensor voltage readings. I suggest that you hook up 5V and ground to the sensor, and connect the voltmeter to ground and TP1, and see what kind of voltages you get there. Then breath on the sensor and see what kinds of changes you see.
=====================
In the World Cup, my favorite remaining team is Spain, where I studied back in February/March. My second favorite team is Chile, where I did some consulting about 2 years ago. The Chileans were the best people I've ever met in the 16 countries I've visited. Being a fan of Les Bleues, I can't say I'm bothered to see Italia ousted (sorry, Tracy).
We had an engineering, or maybe maintenance disaster here today, about 2 miles from my house. On the first day of the big summer music festival, a big slab of concrete broke off of the wall of the parking garage, and fell, killing one and injuring two. We'll find out over time what happened, and I reserve all judgment. But a terribly tragic beginning to the summer here.
·· Paul, I tried your "check the TP1 to Ground wire voltage" troubleshoot this morning and·the voltage did not fluctuate.·So I think we've isolated the voltage dilemma to a couple of possible causes.
First·I disconnected·all·the stand-alone breadboard wires and the CO2 sensor module from the BOE. There are no wires whatsoever connected to the BOE now. The BOE (ASP)·is wired exactly the same as it was last year. That is, it's wired the same as it was before we started with the CO2 sensor and the stand-alone breadboard weeks ago.
Here's what I·see as some possiblities for the erroneous voltage readings:
1) Obvious: Voltage is being read from somewhere on the ASP (since no secondary wires are attached.) From where?
2) The "mash-up" program (two or three posts back)·is flawed. It may be·reading voltage within the ASP and showing·up on the computer screen.
3) "Stray" voltage is "leaking" (?) across wires indirectly and being read as voltage output.
Solutions I will try:
1) Disconnect wires from "last year's ASP", one at a time, to see which wire causes the voltage readings to cease (*this may also cause the ASP to stop working properly... or it may catch·fire or fly across the room!)
2) Read and then "tweak" the part of the program that we added to last year's fully operational program to see if I can fix it (again, this may result in the ASP-clone catching·fire·and flying across the room!)
As you are beginning to see all too well I, like the Rocketeers, am a neophyte programmer. But·things are·making much more sense to me this year, so I will read, tweak, the repeat. I'm starting to better understand the logic of how the wiring works and I (think·I) understand a bit·more about programming. That is no doubt part of the problem.
Boy, the disaster at the music festival is a truly sad way to begin the summer. Were you there? I didn't know you were studying in Spain last winter. That's cool! Where were you in Spain? What did you study? I've never been to Chile, nor to South America. Given the opportunity I would probably go and see what it's·like.
"My" two teams-- the Swiss and the Ivorians (Cote d'Ivoire)-- are still alive in the World Cup, both with a slim chance of winning from what I can decipher. And of course the US had good 'ol #10 with his come-from-behind goal. Will Equipe Etats-Unis gagnez l'or?· Will the US team win the gold? They play Ghana next, right? Who does Spain play. Tracy, who are you cheering for at this point? ·
·· When you can take time from sun-tanning, beach combing, sailing, and scuba diving, could you look at the "mash-up" program and do two things:
1) Run the "mash-up"·program (attached a few posts back) without the CO2 sensor and stand-alone breadboardconnected to your ASP-clone (Phidippides), then report back to the forum and tell us what·happened. I'm curious to see if you get voltage readings like I did (5.006 v - 4096 and 0.055 v·-255.)
2) See if you can find·the part of the "mash-up" program that is causing the voltage readings and then rewrite it to compensate for the voltage radings.
3) Write·a subroutine(s ?)·to make the CO2 sensor and breadboard work once we reconnect them.
4) To do step #3, I think you need to define p3 and p4 as I/O's in the program:
The CO2 sensor's ALM pin wire·goes to p3, CNTL/HSW wire goes to p4 (Vss geos to Vss, Vin goes to Vin.)
Thanks!
How is Florida? What fun things have you been doing? How is your "Brazilian friend"? You aren't running off to Brazil on us, are you...?! If you do, be sure to send us a post card!
I think I may have·found why we're getting "stray" voltage readings, and no voltage·from the ADC chip and CO2 sensor. It seems to be·in the "MCP_get:" subroutine (included in attached program.)
Andrew, please run the program as detailed below and then report back to the forum. Thanks.
Below, in program form, is what happens. I think the "MCP_get:" subroutine may be reading voltage from the RTC clock chip (since the command line reads, "SHIFTOUT (or SHIFTIN) Dataout (or Datain), Clock..." But I could be mistaken.
It seems the voltage glitch is somewhere in the subroutine·because changing a few commands in the subroutine changes what happens with the voltage. NOTE AGAIN: The CO2 sensor and the stand-alone breadboard (ADC chip) are NOT attached to the BOE-ASP when this program is run (yet the "stray" voltage appears and it can be changed by changing the SHIFTOUT, SHIFTIN command lines.)
MCP_get: · · LOW CS····································' Enable ADC · SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%1101\4]···· ' Select CH0, Single-Ended ·················································' Commenting SHIFTOUT, out * TURNS 'HIGH VOLTAGE' (5.006 - 4096) OFF * ················································· ' When the next SHIFTOUT below (Select CH1) is commented out, ················································· ' both 'HIGH VOLTAGE' and 'LOW VOLTAGE (0.055 - 255) appear as 0.0 - 0 · · SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]result0\12]··· ' Read ADC ··················································' Commenting this SHIFTIN, out makes HIGH voltage (5.006 - 4096) ·················································· ' appear as really low voltage (0.015 - 13.) ·················································· ' LOW voltage (0.005 - 215) remains same. ·················································· ' When the next SHIFTIN below (Read ADC)) is commented out, ·················································· ' both 'HIGH VOLTAGE' (0.015 - 13) remains and 'LOW VOLTAGE' ·················································· ' appears as 0.0 - 0 ·
I am open to ideas at this point, Tracy and Paul.·Now I will mow the yard (do the dishes and help with the laundry, as all good Rocketeers do.)
I finally have everything set up here in Florida, only to find out that I brought the wrong type of serial data cable with me! It looks like I won't be downloading the program right now. I just ordered the correct type of serial cable, and it will be here very soon. Nonetheless, I'm looking at and analyzing the program you posted as we speak.
·· Paul, I tried your "check the TP1 to Ground wire voltage" troubleshoot this morning and·the voltage did not fluctuate.·So I think we've isolated the voltage dilemma to a couple of possible causes.
First·I disconnected·all·the stand-alone breadboard wires and the CO2 sensor module from the BOE. There are no wires whatsoever connected to the BOE now. The BOE (ASP)·is wired exactly the same as it was last year. That is, it's wired the same as it was before we started with the CO2 sensor and the stand-alone breadboard weeks ago.
Here's what I·see as some possiblities for the erroneous voltage readings:
1) Obvious: Voltage is being read from somewhere on the ASP (since no secondary wires are attached.) From where?
2) The "mash-up" program (two or three posts back)·is flawed. It may be·reading voltage within the ASP and showing·up on the computer screen.
3) "Stray" voltage is "leaking" (?) across wires indirectly and being read as voltage output.
I'm confused about a few things, I think. First of all, I probably wasn't clear enough in that suggestion about testing the voltage at TP1. For that to work, you'll need this setup:
- Voltmeter red lead to TP1, black lead to ground.
- 5V to the Vdd pin of the CO2 sensor, ground (the SAME ground as above) to the Vss pin of the CO2 sensor. This powers the sensor.
- 6V to the heater pin of the CO2 sensor, with the ground of your 6V supply connected to the same grounds as above.
Now, it occurs to me that you might not have any way of making a 6V supply - I think you're using the program to do that somehow.
That being said, If I'm reading you correctly above, you have the CO2 sensor and 3202 removed from the BoE. If that's the case, there's no way to read voltage, and the 3202 test program will run unpredictably, I'd imagine. It's not reading any voltage of any sort, because the hardware isn't there. It might still display some numbers, but they have nothing to do with any voltage measurements. Your BoE can only measure voltages when the 3202 is attached.
Below you write "Below, in program form, is what happens. I think the "MCP_get:" subroutine may be reading voltage from the RTC clock chip (since the command line reads, "SHIFTOUT (or SHIFTIN) Dataout (or Datain), Clock..." But I could be mistaken. "
In that attached program, "Clock" is a constant referring to pin 14, which I believe you have been connecting to 3202's clk pin (pin 7). The fact that it's named Clock has nothing to do with the real time clock. When you use synchronou serial communications (SHIFTIN/SHIFTOUT), there needs to be a pin used as the clock pin to coordinate the timing of the bits of data sent and received. You have pins 0 and 2 as the clock pins for the SHT11 and the RTC chip, respectively: they're identified as shtclk and dsclk.
So assuming that BoE pin 14 is connected to 3202 pin 7, this is not the source of your problem.
Comments
"• µF a unit of capacitance, microFarad. micro=10-6, nano=10-9, pico=10-12, femto=10-15
abbreviated µF, nF, pF, fF.
micro-micro is the same as pico."
Those prefixes are commonly applied to electrical current, along with "milli", 10-3.
Think in orders of magnitude...
A Amp.
The battery you have can supply 1A for 5 hours or 0.1A for 50 hours. If the CO2 sensor draws 0.2A, how long could the battery supply its current?
mA milliamp. 10-3
If the USB datalogger draws 25 mA 50% of the time and 90 mA 50% of the time, what is the average current?
If the BS2e draws 16 mA constantly, and the LED is turned on and draws 10 mA constantly, what is the total current for the BS2e+LED?
µa micro=10-6
The real time clock (RTC)draws about 0.3 µA, which is the same as 300 nA. Which has more effect on battery life, the RTC or the BS2e? If the BS2e draws 16mA and the RTC draws 0.3µA, what is the total current of BS2e+RTC?
nA nano=10-9
Again, how many nA does the RTC draw?
pA pico=10-12
The NASICON CO2 sensor is like a little battery, but it can only supply up to 1 pA of current!! Otherwise its voltage will drop like a rock.
fA femto=10-15
The LMC6035 buffer/amplifier on the CO2 sensor module reads the voltage of the NASICON sensor, but it draws only 20 fA from the sensor. Is that more or less than the NASICON sensor can supply, thinking of the sensor as a tiny battery?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 6/23/2010 11:27:39 PM GMT
1) 30 mA per pin is not the right spec. You want the total power supply current for the chip, which is around 16 mA. Each pin can supply some current to external devices, for example, the LED. The maximum current a pin can supply to an external device is 30 mA. Current supplied to the external device gets added to the supply current. For example, 16mA for the BS2e, plus 10mA from a BS2e pin to light the LED, equals 26 mA total.
2) datalogger standby=2mA and running=25mA do not include the current drawn by the USB flash drive itself. Maybe another 70 mA (but there is a lot of variation between brands of flash drives). That current has to be added in, so 25mA+70mA = 95mA. It is hard to figure, because the current jumps up even higher at the instant it actually writes the data. To get down to the 2mA current takes special commands to suspend the disk and the monitor, and I don't think the program does that now.
3) The SHT draws about 550µA when it takes a measurement and about 1µA as it sleeps between measurements. The time-averaged current is about 30µA if one sample is taken per second.
4) There is a question of whether the program will need to have the CO2 sensor heater on 100% of the time. If so, the 160mA figure applies. If not, then there will be some X% at 2mA and 100-X% at 160 mA. There is a discrepancy between the Hanwei and the Parallax data sheets. Parallax says 160mA for the heater and Hanwei says 200mA. There are many possible reasons for the discrepancy, but the only way to know for sure is to measure it (if it matters!)
5) You now know what a "nano" is!!!
So, add it up, worst case estimate, what is the total current in mA? Divide that into 5000 mAh, the capacity of the battery. What do you get in terms of hours of operation?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 6/23/2010 11:30:35 PM GMT
SHT Parallax documentation"Low power consumption (typically 30 μW)"
I am not sure if this is what we would need or not. Email seems not to be the solution on this so I am posting it onto the forums in a last effort to find out if this is correct. I have checked multiple websites and the concept gets more and more vague.
The SHT11 current consumption is found on page 4 of the Sensirion data sheet.
Look at www.sensirion.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Once i get the Flash drive type I should be able to figure this out..
Dylan Landry
So the only thing we need to worry about with the SHT11 is the supply current correct? Do we need to worry about any of the other parameters? Are any of the others going to make the total voltage go up?
Thank you all for your time and help,
Sean
Stick with it! All those number rattling around in your head will make sense eventually. When they do, that means you are learning. Then the information become a powerful thing: knowledge. You and your Rocketeers teammates are·gaining knowledge that many kids your age don't acquire until they are high school seniors or college. This knowledge-- and the whole ARLISS experience--·may well help guide your future. So stick with it!
Aim high,
Mr. Kibler
We have the Voltage requirement for everything now. Just wait about 20 min and ill output the answers to the amp requirements + the answers that Dr. Allen asked us....
Dylan Landry
·· Please read the e-mail to the team before you post the answers.
Thanks for all your fine efforts!
Mr. Kibler
Here·are the answers to your homework questions. They are the results of the Rockteers' excellent collaborative off-line efforts, by e-mail. I won't post all their back-and-forth e-mails to one another but suffice it to say there was some excellent dialogue.·Andrew and Dylan, you did·a fine·job leading and guiding the e-mail discussion! Justin and Mike, it was nice to see you right there in the middle of the discussion.
Go ahead and use these numbers for·the Sandisk flash drive:
"Draws·75 mA when writing data to the flash drive." This number·is acceptable. Go ahead and use it.
Now simply calculate (add) the amperage·used by each device, divide 5,000 mAH (the size of our battery) by this number, and you should see how long (how many hours) our battery should last...!
Everyone, please do the calculation below and then post your answer to the forum individually. As we do in class, let's cross-check our calaculations at least three times (by having all the Rocketeers do the calculations individually.) You've heard this in class (those of you who have me as a science teacher, that is): "If we get different answers, can everybody be right? Can everyone be wrong?" If we get different answers, even from ONE Rocketeer, calculate again!
From last night's final e-mail:
"Dear Project Team,
This is what·[noparse][[/noparse]we] have so far for mA requirements... I have looked up the flashdrive... and·haven't found anything.... I would like if anyone else could help me on my search... Anyones help would be greatly appreciated..."
mA Requirements for the current ASP 2...
A) BS2e= 16 mA
Datalogger, running = 25mA, With flashdrive = 75·mA·("when writing data to the flash drive")
C) SHT11 = 0.028 mA·
D) CO2 sensor = ~160 mA
E) 1302 Real time clock chip= .0003 mA
F) 3202 ADC= 0.55 mA
Step 1) CALCULATE: Total mA used = A+B+C+D+E+F = ___________________
Step 2) CALCULATE: How long will your battery theoretically last?·Take 5,000 AMP mAH (battery capacity) and divide by the total mA used (answer from Step 1). When you divide, mA cancels out on each side of the equation leaving hours for the unit of measurement.
Step 3) CALCULATE: "3X safety margin" (answer from Step 2 above DIVIDED BY 3)
ANSWER: ______________ hours. This is how long we can theoretically count on our battery to last and record data, with a safety margin of 3. That means it should actually record data three times·as long as your answer to Step 3.)
Excellent·collaboration, Team!
Good work, good morning,
Mr. Kibler (yawn)·
·
Below is our team's final compiled answers for the recent questions. Thanks for assisting with compiling them, Dylan! I will also post up that parts list that I promised at our last meeting shortly. It is currently on my desktop computer, which is completely disassembled into countless pieces right now.
Thank you,
Andrew
1.) If the CO2 sensor draws 0.2A, how long could the battery supply its current?
"The battery you have can supply 1A for 5 hours or 0.1A for 50 hours". So 2A must =10
hours, so wouldn't 0.2A=100 hours? Or would it be 2A=2.5 which means 0.2A=25 hours?
2.) If the USB datalogger draws 25 mA 50% of the time and 90 mA 50% of the time, what is the average current?
Here is a formula for calculating the requirement for mA.. (doesn't apply to answer at all, just wanted to see if this formula could be correct)
( T ) = time left on in hours
T / 0.5 * 25 = A
T / 0.5 * 90 = B
A+B = mA needed
_________________________________
If that doesn't make sense here is the ultimate answer....
25 + 90 = A
A / 2 = 57.5 mA per hour
3.) If the BS2e draws 16 mA constantly, and the LED is turned on and draws 10 mA constantly, what is the total current for the BS2e+LED?
By constantly, do you mean, per second, hour?
If it means per hour, then...
16 mA + 10 mA = 26 mA per hour
Per second then....
93600 mA per hour (93.6 A per hour)
4.) The real time clock (RTC)draws about 0.3 µA, which is the same as 300 nA. Which has more effect on battery life, the RTC or the BS2e? If the BS2e draws 16mA and the RTC draws 0.3µA.
16mA= 16 mA and 0.3 µA=0.0003 mA
Therefor the BS2e draws more mA.
4a.) What is the total current of BS2e+RTC?
16 mA + 0.0003 mA = 16.0003 mA
5.) Again, how many nA does the RTC draw?
300 nA
6.) The LMC6035 buffer/amplifier on the CO2 sensor module reads the voltage of the NASICON sensor, but it draws only 20 fA from the sensor. Is that more or less than the NASICON sensor can supply, thinking of the sensor as a tiny battery?
We are somewhat confused by this question. One team member suggested "that 20fA is less than what the NASICON sensor can supply.
>> 20fA=0.000000000000002 and 1pA=0.000000000001."
Looks like we posted at about the same time, moments apart.
Hello down there in Florida! How's the weather? Last night was really hot here in DC... 94 degrees at bedtime.
This is REALLY good team work, Andrew! Please make a conclusion and a·decision for the team about whether we have enough battery power/time·(and how much) so we can move·back into the wiring and programming when I return from DC today.·The Team is·doing wonderful work, don't you think? Involvement this year is so much better than it's ever been!
Be·certain to compliment your teammates and allow them a few days off the forum from time to time so they can "come up for air." This is somewhat challenging for some of the new team members and I think they may have headaches from all the research and math (Mike, Sean, Justin and Dylan: And you thought science class was hard...!)
Good morning (again),
Mr. Kibler
Mr. Kibler and others,
Below are my answers for the questions. As Mr. Kibler said, everyone should crosscheck *all* answers posted for accuracy.
Total mA count: = 251.578 mA
Theoretical battery run-time: 19.874 hours
3x safety battery run-time: 6.624 hours
Thank you,
Andrew
We "should" find the ASP-2 within 6 hours, don't you think? If not, then we have 3 times that long to find it before the (ASP-2) battery drains.·Regardless, the data is stored on the flash drive as non-volatile data and so we shoud have hours of data...·if we find the ASP! That's why we've included·a redundent shortwave/ GPS transmitter system on the ASP, right?
Get some fresh air and exercise today. Go out and play; you've certainly earned it. Have fun on the beach!
Good morning,
Mr. Kibler (and Chris, who's still sleeping...!)
··· Mr. Smiley says
> "Wake up, Christo"!
I concur: 5,000 mAH / 251.578 mA = 19.87455 = 19.874 hours
C)·A and B·assume that the total amperage adds up to 251.578 mA. Does it?
·
Total mA needed: 251.58 mA
Battery Life: 19.88 hours (rounded)
Safe operating requirements for the battery: 6.63 hours
Mr. Kibler,
You said, "Step 3) CALCULATE: "3X safety margin" (answer from Step 2 above DIVIDED BY 3)"
I am confused by that statement. Now before that we divided the mA supply of the battery by the amount we needed. That came up with how long the battery will last without dying on us. Correct? If we wanted something that can last longer for our safety reasons like on how long will it take to find it, shouldn't we want a LONGER lasting battery? Not something that can last 1/3 as long?
Or where you saying that we want a battery that can last 1/3 longer then our battery for safety reasons?
Dylan,
Mr. Kibler was saying that we should assume the battery will die before our expected calculation -- we don't want to go and find a battery that will only last 1/3 the current battery. The current battery is fine.
I hope this makes sense ...
Andrew
Here are my calculations:
Total mA=251.578 mA
Battery life=19.874 hours
3x safety margin=6.625 hours
Sean
1) Would you take extra fuel? Probably. The "3X safety margin" on the ASP battery is "extra fuel."
2) Will·your speed·be constant all the way to the lake? That's unlikely. It's also unlikely that the ASP will "consume fuel" (use amperage) at a constant rate. So we'll·include·a safety margin ("extra fuel".) in our calcualtions.
3) How could you take more fuel with you on your trip to the lake? Add a bigger fuel tank and fill it all the way up.·The same concept applies·to the ASP battery. We wouldn't use a 260 mAH battery if·the ASP·uses a "total·of 251.578 mA." If the ASP runs for·just·one hour that would be cutting things way too close. Since we're not 100% certain how the ASP's power consumption will vary during the mission, since we don't know how long it will run inside the rocket before it's launched, and since we really don't know how long it will take to find the ASP after it lands, we'll add a safety margin.
Think of it in a slightly different way: You calculate that you can·just barely make it·to the lake on 1/3 tank of fuel. Would you risk not getting there by not filling the tank all the way? You could, but it would be risky. We won't risk it with the ASP;we want a "full tank of fuel." We could use a smaller (260 mAH battery, a smaller 'fuel tank') and "just barely make it." Or we could use a battery with lots of amp-hours and rest assured that the ASP will be running, even it it takes several hours to locate it. Theoretically we have almost 20 hours to find it (since our 5000 mAH "battery life = 19.874 hours."
Total mA = 251.578 mA
Battery life = 19.874 hours
3x safety margin = 6.625 hours
Do this analogy make sense...? Thanks for a good question!
Back in NH,
Mr. Kibler
Another question we·should be asking and calculating·is, "How long do the batteries in the shortwave/GPS transmitters last...?! (*Why do you think we use TWO transmitter/locators?) These are what we use to locate the ASP when it lands, possibly miles from the launch site. What good is 18 hours of data if we can't find the ASP...?!
I did·saftey margin explanation a bit·"backwards". The "right" way to cdetermine your safety margin is to calculate how much power (amperage) your device needs, then multiply by whatever safety margin you choose (2x, 3x, 10x, etc.)
Assuming (which is risky) that our calculations are 100% correct and that ASP power consumption is constant, the ASP should use 252 mA each hour:
ASP total·power useage = 251.578 mA = 252 mA
We·could· use a 'smaller' 1,000 mAH battery and the ASP "should" run for 3.98 hours (1.000 mAH·divided by 251.578 mA/hour useage.) So·the "safety margin"·would be·3.98.
Our "actual" calculated safety margin is 19.87 (5,000 mAH/ 251.578 mAmps/ hour·= 19.87)
I used "3X safety margin" merely as an example, to make the point that aerospace engineers typically include a safety margin.
*Is this·explanation·correct, Tracy and Paul? Please feel free to clarify and amend,
Mark
What kind of battery does the shortwave/GPS transmitter use? Sorry I can't post more right now. I have poison oak, sumak, or ivy (we don't know which) and I can only type with my left hand because of the medicine on my right arm.
Very itchy,
Justin
OK, here we go...
I soldered separate wires to the CO2 sensor at TP1 and TP3, ran the (attached) program, and the two voltages and their corresponding numbers·showed up just like before: 5.006 volts - 4095 and 0.055 volts - 255. Both voltages/numbers changed from time to time but with no apparent rhyme or reason.
Here's where it gets curious. I detached the individual wires from the stand-alone breadboard to the BOE, one by one, until they were ALL detached. Guess what? The numbers were still there:·5.006 volts - 4095 and 0.055 volts - 255. As before, both voltages/numbers changed from time to time.·I turned the BOE off and on between every "run" so the numbers weren't 'left over' from the previous trial.
A few things are noteworthy:
1) P3 and P4 are not assigned as inputs/outputs·in the program. Their wires (ALR to P3 and CNTL/HSW to P4) come from the CO2 sensor. The other two wires from the CO2 sensor are: Vss to Vss and Vin to Vin. These four wires are the only wires attached to the BOE. None of the wires from the stand-alone BOE are attached at all, yet the voltage still appears as above when the program is run.
After I post this I'll disconnect each of the four wires from the CO2 sensor, one at a time, to see if I can isolate which wire may be causing the voltage readout. I am somewhat stumped,but it seems one of the four CO2 sensor wires may be the culprit, and the undefined I/O's, p3 and p4.
So other than the obvious home team, the US (and Donovan!), who are we rooting for now in the World Cup?Les Francais are gone. Bye, bye Italia! Italia! and the Kiwis from New Zealand. Likewise with the Danes. Who are we gonna cheer for...?
"None of the wires from the stand-alone·BREADBOARD are attached...", not
"None of the wires from the stand-alone BOE."
Then you asked yourself (essentially), "What if I'm off by a factor of three? What kind of time would I have then? Could I live with that?".
You decided that the six hours you'd get in that worst-case scenario was acceptable, and I agree, though, of course, I've never been to Black Rock. But if I'd been searching six hours for a rocket, I'd be done searching and ready to give up.
I think that all of your assumptions are reasonable, and I think you're in good shape, battery-wise.
=====================
Like Tracy, though, I'm concerned about the sensor voltage readings. I suggest that you hook up 5V and ground to the sensor, and connect the voltmeter to ground and TP1, and see what kind of voltages you get there. Then breath on the sensor and see what kinds of changes you see.
=====================
In the World Cup, my favorite remaining team is Spain, where I studied back in February/March. My second favorite team is Chile, where I did some consulting about 2 years ago. The Chileans were the best people I've ever met in the 16 countries I've visited. Being a fan of Les Bleues, I can't say I'm bothered to see Italia ousted (sorry, Tracy).
We had an engineering, or maybe maintenance disaster here today, about 2 miles from my house. On the first day of the big summer music festival, a big slab of concrete broke off of the wall of the parking garage, and fell, killing one and injuring two. We'll find out over time what happened, and I reserve all judgment. But a terribly tragic beginning to the summer here.
·· Paul, I tried your "check the TP1 to Ground wire voltage" troubleshoot this morning and·the voltage did not fluctuate.·So I think we've isolated the voltage dilemma to a couple of possible causes.
First·I disconnected·all·the stand-alone breadboard wires and the CO2 sensor module from the BOE. There are no wires whatsoever connected to the BOE now. The BOE (ASP)·is wired exactly the same as it was last year. That is, it's wired the same as it was before we started with the CO2 sensor and the stand-alone breadboard weeks ago.
Here's what I·see as some possiblities for the erroneous voltage readings:
1) Obvious: Voltage is being read from somewhere on the ASP (since no secondary wires are attached.) From where?
2) The "mash-up" program (two or three posts back)·is flawed. It may be·reading voltage within the ASP and showing·up on the computer screen.
3) "Stray" voltage is "leaking" (?) across wires indirectly and being read as voltage output.
Solutions I will try:
1) Disconnect wires from "last year's ASP", one at a time, to see which wire causes the voltage readings to cease (*this may also cause the ASP to stop working properly... or it may catch·fire or fly across the room!)
2) Read and then "tweak" the part of the program that we added to last year's fully operational program to see if I can fix it (again, this may result in the ASP-clone catching·fire·and flying across the room!)
As you are beginning to see all too well I, like the Rocketeers, am a neophyte programmer. But·things are·making much more sense to me this year, so I will read, tweak, the repeat. I'm starting to better understand the logic of how the wiring works and I (think·I) understand a bit·more about programming. That is no doubt part of the problem.
Boy, the disaster at the music festival is a truly sad way to begin the summer. Were you there? I didn't know you were studying in Spain last winter. That's cool! Where were you in Spain? What did you study? I've never been to Chile, nor to South America. Given the opportunity I would probably go and see what it's·like.
"My" two teams-- the Swiss and the Ivorians (Cote d'Ivoire)-- are still alive in the World Cup, both with a slim chance of winning from what I can decipher. And of course the US had good 'ol #10 with his come-from-behind goal. Will Equipe Etats-Unis gagnez l'or?· Will the US team win the gold? They play Ghana next, right? Who does Spain play. Tracy, who are you cheering for at this point?
·
·· When you can take time from sun-tanning, beach combing, sailing, and scuba diving, could you look at the "mash-up" program and do two things:
1) Run the "mash-up"·program (attached a few posts back) without the CO2 sensor and stand-alone breadboard connected to your ASP-clone (Phidippides), then report back to the forum and tell us what·happened. I'm curious to see if you get voltage readings like I did (5.006 v - 4096 and 0.055 v·-255.)
2) See if you can find·the part of the "mash-up" program that is causing the voltage readings and then rewrite it to compensate for the voltage radings.
3) Write·a subroutine(s ?)·to make the CO2 sensor and breadboard work once we reconnect them.
4) To do step #3, I think you need to define p3 and p4 as I/O's in the program:
The CO2 sensor's ALM pin wire·goes to p3, CNTL/HSW wire goes to p4 (Vss geos to Vss, Vin goes to Vin.)
Thanks!
How is Florida? What fun things have you been doing? How is your "Brazilian friend"? You aren't running off to Brazil on us, are you...?! If you do, be sure to send us a post card!
Good morning,
Mr. Kibler
I think I may have·found why we're getting "stray" voltage readings, and no voltage·from the ADC chip and CO2 sensor. It seems to be·in the "MCP_get:" subroutine (included in attached program.)
Andrew, please run the program as detailed below and then report back to the forum. Thanks.
Below, in program form, is what happens. I think the "MCP_get:" subroutine may be reading voltage from the RTC clock chip (since the command line reads, "SHIFTOUT (or SHIFTIN) Dataout (or Datain), Clock..." But I could be mistaken.
It seems the voltage glitch is somewhere in the subroutine·because changing a few commands in the subroutine changes what happens with the voltage. NOTE AGAIN: The CO2 sensor and the stand-alone breadboard (ADC chip) are NOT attached to the BOE-ASP when this program is run (yet the "stray" voltage appears and it can be changed by changing the SHIFTOUT, SHIFTIN command lines.)
MCP_get:
·
· LOW CS····································' Enable ADC
· SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%1101\4]···· ' Select CH0, Single-Ended
················································· ' Commenting SHIFTOUT, out * TURNS 'HIGH VOLTAGE' (5.006 - 4096) OFF *
················································· ' When the next SHIFTOUT below (Select CH1) is commented out,
················································· ' both 'HIGH VOLTAGE' and 'LOW VOLTAGE (0.055 - 255) appear as 0.0 - 0
·
· SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]result0\12]··· ' Read ADC
·················································· ' Commenting this SHIFTIN, out makes HIGH voltage (5.006 - 4096)
·················································· ' appear as really low voltage (0.015 - 13.)
·················································· ' LOW voltage (0.005 - 215) remains same.
·················································· ' When the next SHIFTIN below (Read ADC)) is commented out,
·················································· ' both 'HIGH VOLTAGE' (0.015 - 13) remains and 'LOW VOLTAGE'
·················································· ' appears as 0.0 - 0
·
I am open to ideas at this point, Tracy and Paul.·Now I will mow the yard (do the dishes and help with the laundry, as all good Rocketeers do.)
Standing by,
Mr. Kibler
I finally have everything set up here in Florida, only to find out that I brought the wrong type of serial data cable with me! It looks like I won't be downloading the program right now. I just ordered the correct type of serial cable, and it will be here very soon. Nonetheless, I'm looking at and analyzing the program you posted as we speak.
Andrew
- Voltmeter red lead to TP1, black lead to ground.
- 5V to the Vdd pin of the CO2 sensor, ground (the SAME ground as above) to the Vss pin of the CO2 sensor. This powers the sensor.
- 6V to the heater pin of the CO2 sensor, with the ground of your 6V supply connected to the same grounds as above.
Now, it occurs to me that you might not have any way of making a 6V supply - I think you're using the program to do that somehow.
That being said, If I'm reading you correctly above, you have the CO2 sensor and 3202 removed from the BoE. If that's the case, there's no way to read voltage, and the 3202 test program will run unpredictably, I'd imagine. It's not reading any voltage of any sort, because the hardware isn't there. It might still display some numbers, but they have nothing to do with any voltage measurements. Your BoE can only measure voltages when the 3202 is attached.
Below you write "Below, in program form, is what happens. I think the "MCP_get:" subroutine may be reading voltage from the RTC clock chip (since the command line reads, "SHIFTOUT (or SHIFTIN) Dataout (or Datain), Clock..." But I could be mistaken. "
In that attached program, "Clock" is a constant referring to pin 14, which I believe you have been connecting to 3202's clk pin (pin 7). The fact that it's named Clock has nothing to do with the real time clock. When you use synchronou serial communications (SHIFTIN/SHIFTOUT), there needs to be a pin used as the clock pin to coordinate the timing of the bits of data sent and received. You have pins 0 and 2 as the clock pins for the SHT11 and the RTC chip, respectively: they're identified as shtclk and dsclk.
So assuming that BoE pin 14 is connected to 3202 pin 7, this is not the source of your problem.