The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
Good Day to all
Ive recently been testing a BMP085 with my Netduino Plus. It was working fine last week but now today when I power up my netduino and try to get data from the unit the numbers are all over the place. Im using the code from forum http://forums.netdui...ch__1#entry4273
See debug data below.
BMP085 Pascal: 99087
BMP085 InchesMercury: 29.26
BMP085 Temp*C: 32.20
BMP085 Pascal: 133558
BMP085 InchesMercury: 39.44
BMP085 Temp*C: -135.40
BMP085 Pascal: 207803
BMP085 InchesMercury: 61.36
BMP085 Temp*C: -58.30
BMP085 Pascal: 97794
BMP085 InchesMercury: 28.88
BMP085 Temp*C: 26.20
BMP085 Pascal: 96959
BMP085 InchesMercury: 28.63
BMP085 Temp*C: 23.60
BMP085 Pascal: 133554
BMP085 InchesMercury: 39.44
BMP085 Temp*C: -135.40
Any ideas? Could the clock be out to lunch? Ive tried a second BMP085 board I have and the results are the same.
What voltage are you supplying the chip? Also, are you using the SparkFun breakout board for the BMP085?
EDIT: And a few other questions. Where are you exactly located, what is your elevation above sea level, and are you shinning bright light on the sensor? What happens to the readings if you run the sensor in complete darkness?
On a side note, I assume you modified my code because you are taking the readings every one second. My code only updated the temperature and pressure values every 30 seconds via a timer.
Something just doesn't seem right with you getting negative celsius temperatures of 135 below zero. I'm kind of leaning towards something wrong in code rather than hardware because you said you tried everything on two different BMP085's and the outcome was the same.
If you could please attached your modified code for the BMP085. If possible, please attach your complete solution. Thanks.
I took out all my other code and just left in a loop for updates because if I run the code as is it will just come back with one reading. See attached photos for code and output results.
BMP085_Code.JPG110.33KB27 downloadsBMP085_Output.JPG99.37KB23 downloads
My altitude according to my GPS is 114m above sea level so around 350ft. I noticed the notes on the light affecting the unit and I have a pretty dark office with one fluorescent but I have both covered the unit and left it alone and still the same results.
I have tried the unit on an arduino and have had no problems, not sure how different the code is. I got the code from sparkfun http://www.sparkfun....xample_Code.pde
Is it possible my SDA/SCL lines are bad? or the analogue lines in general? I have two netduinos and one the code works but gives back the strange data and the other one doesnt give me any data back at all. I am supplying the barometer with 3.3v from the netduino and the netduino is getting its power from the USB. Ive tried the BMP085's on an Arduino I have here and they work fine even though the altitude is showing 200m above where I really am.
Thoughts/concerns?
My first thought is that perhaps the I2C settings are set up wrong...but if it was working fine for phantomtypist on the same hardware that's probably not it. The I2CBus extensions may be skewing results accidentally--but that seems really odd too.
nturpin77: any chance you could put together a diagram (perhaps in Fritzing?) showing your circuit? Also, do the BMP085's currently work on an Arduino?
Chris
The BMP085's do work with the arduino without any problems. Not sure how different the code is but the results are consistently good with it. Im installing Fritzing as I type this so I should have a schematic out in a little bit.
This is the Fritzing Schematic, I had to build my own BMP085 part for it. I couldnt find one online, please excuse the sizing LOL.
Netduino_BMP085.jpg35.25KB60 downloads
nturpin77,
Is this the exact part you bought? If you don't have a logic analyzer to see what is going on, perhaps we can pick up one of the sensors. $20 + S&H and it would be a good learning experience for all.
http://www.sparkfun.com/products/9694
Chris
Hi Chris,
Yeah thats the piece of kit I picked up. Ive seen a lot of people use them so I guessed there was a large knowledge base out there for using it.
I almost wish I had something else here that communicated on the SDA/SCL pins so I could confirm their functionality.
I almost wish I had something else here that communicated on the SDA/SCL pins so I could confirm their functionality.
If you plug an LED into pins A4 or A5 (and GND) and use an OutputPort, you should be able to turn the LED on and off. If that works, there's a ~99.9999% chance that your hardware is good to go.
It's almost definitely a circuit or code issue.
We'll pick up one of these devices from SparkFun. Should be here in about a week.
I have a BMP085, when I was messing around with it a while ago I mistakenly applied reverse voltage to it, and now it generates very similar data to yours...
I would tend to agree that reverse voltage would cause poor results but I can take the same bmp085 and plug it into my arduino and the output is normal,
Gday
So Ive tested both Netduinos with LEDs on A4/A5 and I can light an LED with them. Does this confirm the functionality of SDA/SCL? or just the Analogue pins? I ask because I immediately plugged my BMP085 into both netduinos, well one at a time obviously, and still getting no data on one netduino and the all over the place data on the other. Ive tried all three BMP's and all with the same results. Any ideas on where to go next?
So Ive tested both Netduinos with LEDs on A4/A5 and I can light an LED with them. Does this confirm the functionality of SDA/SCL? or just the Analogue pins? I ask because I immediately plugged my BMP085 into both netduinos, well one at a time obviously, and still getting no data on one netduino and the all over the place data on the other. Ive tried all three BMP's and all with the same results. Any ideas on where to go next?
Hi nturpin,
That confirms that the digital pins (the I2C pins) are working.
If you can, borrow a logic analyzer, take a look at what's actually happening on your digital lines.
Otherwise, in about a week we should have one here...and we can test out your code and the component with a logic analyzer and oscilloscope here. I just got an e-mail from SparkFun saying that they shipped us the one we ordered.
I couldnt find a Logic Analyzer in our dept anywhere so Ive gone ahead and ordered one from SFE. Hopefully will be here next week and I can do some diagnosing.
Have you guys recieved your BMP085 and gotten a chance to play with it? Im still waiting on my logic analyzer. In my hastiness I ordered one from the manufacturer but apparently they were having manufacturing issues and now I have to wait to get mine but if I had ordered from SFE Id have one by now. Oh Murphys Law thank you for existing.....
I have my logic analyzer and Im in the process of trying to get used to it. When I run this code I get an error for unhandled exception.
You cannot create multiple instances of OutputPort for the same pin (without disposing it first). You'd probably need something like
var port1 = new OutputPort(Pins.GPIO_PIN_A4, true);
var port2 = new OutputPort(Pins.GPIO_PIN_A5, true);
while(true)
{
port1.Write(false);
port2.Write(false);
port1.Write(true);
port2.Write(true);
}