Saturday, April 12, 2014

First Two Sensors: LSM303 and BMP180

This week our goal was to get the first two sensors up and running. We got the circuit wired up for the BMP180 (the pressure sensor), and tried to find it on the Pi using "i2cdetect -y 1". We hadn't soldered the pins into the breakout board yet, so our information was shotty, but after soldering we got things working.

Below: That "77" there means it detected the device. Woohoo!

In order to start collecting readings, we downloaded the Adafruit Raspberry Pi Python Code Library onto the Pi. There wasn't a library for the BMP180, but there is a library for the BMP085, which is a similar board, so we used that, and it seems like it worked.

Below: Data from the BMP180. The errors came from some loose wires.

I was happy to find that this same library included code for the LSM303 sensor as well. We wired that in parallel with the other board into the I2C connections and then...

We have something! But.. It seems like the Magnetometer isn't working quite right as it won't change from its "-4096" value. It stays here even when we put a magnet near it. I'm still not to sure how to read the accelerometer data, but it seems like it is responding logically as I move it around. We will have to come back to this later to figure out what is wrong.

Nonetheless, we finally have two chips wired in and communicating with the Pi. This is good! The pressure sensor seems to be giving reasonable data, and the LSM303 is well... communicating. Of course, we will need to figure that problem out. Eventually we will need to make a program that will take both of these data readings, along with the GPS readings and  both camera pictures, and store them in a sort of a table. When the balloon goes up, we want to be able to run this program that will keep collecting data every few seconds or so. Then we will need to be able to extract this data so that we can analyze it in a practical way.

Next step.. try to get the GPS up and running, and then the cameras. I think I will table the LSM303 problems for now until I can talk to some computer scientists who are willing to help. When we have all that going, then we can do some programming to interface them all together to be able to continuously take data.

Monday, April 7, 2014

First Steps...

I was previously only familiar with the Arduino, so it was a bit of a shock to me to find out that the Pi is more of a computer than a micro controller. I had not concidered that I would need a mouse or keyboard, so this took some figuring out.

I started the process of installing the operating system at home on my TV. I used an RCA cable for video, and this worked for a little while, but once Raspbian had finished installing, I got a black screen. I figured this had something to do with the cable type, so thankfully the friendly folks at the LTS Help Desk loaned me an HDMI to DVI cable, so that I can connect to the school's monitors. Once I got hooked up to the school's monitors, I was in action.

My first step was to place a disk image onto the SD card. I followed the instructions according to the Raspberry Pi Quick Start page. I installed Raspbian and set  Linux to boot into the graphical user interface (GUI) that makes the home screen look very similar to a windows screen.

I followed instructions on this page in order to use the I2C bus to take data from our sensors. All looks good so far... Can't wait to get some sensors running and take some IR photographs!

Saturday, April 5, 2014

The Beginning!

Hello World! This is a blog that will document my adventure into the Raspberry Pi world. With the help of Dr. Hupy from the University of Wisconsin: Eau Claire's geography department, we will be sending a Raspberry Pi armed weather balloon up into the stratosphere to take some data and bring back some killer pictures from over 110,000 feet in the sky.

To put into perspective how high 110,000ft really is, an average pressurized cabin commercial airline flight is at 30-40,000 ft. The pressure at this height is .162psi (compared to about 14psi at ground level). At this pressure, human blood will literally boil at our body temperature. The temperature is about -51 degrees Fahrenheit... not a great place for people. But it is a great place for electronics!

Starting this project, I have absolutely no experience with the Raspberry Pi. In fact I have very little experience with electronics all together. I haven't done research before, nor have I done any serious computer programming outside of a class. I've never built circuits outside of a breadboard that have been used for any practical purpose. I expect to learn a lot from this project about electronics, computing, and research in general! I do however have some experience from a couple of Physics classes in circuits and electronics.

So here is what we have to start. A lot of stuff!!

Raspberry Pi Board
Raspberry Pi Camera Board
Pi NoIR Camera Board
Small Breadboard
perma proto board
Pi Cobbler
LSM303 Compass/Accelerometer
BMP 180 Pressure Sensor
Adafruit Ultimate GPS v3.1
GPS antenna
SMA to uFL #851 (not sure what this does yet)

I am noticing that I don't have any sort of I2C temperature sensor. It might be fun to build my own...




Here is a post straight from the Pi. It is fascinating how powerful this little thing is.