Friday, December 26, 2014

The current setup - December 26, 2014

This is the current setup of my Raspberry Pi. The white band connects the camera, and the smaller blue block is the temperature sensor.

My next big task is to get a pressure sensor.  Just doing some quick browsing, I found this one:
It looks like it is simple to use, just like the temperature sensor. Then I can just use the hydrostatic equation to translate pressure into height:
My brother also suggested another option some time ago:

Another option is to use a GPS:
Slightly more expensive, but also a good option.

Either way, my decision is based on this question: How do I get the equipment to disconnect from the balloon once it reaches 2km?

Tuesday, December 23, 2014

Temperature Sensor

Today's project was playing with the temperature sensor. In order to get it to work, I needed to learn about GPIOs for the Raspberry Pi. I only delved in enough to get the basics. But once I had those, the rest came so easily.  For reference, here is the picture showing the placement of the pins in a RPi-B+:



The temperature/humidity sensor I am using is a DHT11. <http://www.amazon.com/gp/product/B00BXWUWRA/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1>

The basic directions I followed were on the Adafruit website:
I didn't use the 4.7K-10K resistor they recommended, and it worked fine. I still want to try this method using the resistor, just to see if there's a difference.

Here are the python commands I used to get it to work (python has to be run using sudo, since we need su access to use the GPIOs).

*********************************

>>> import Adafruit_DHT
>>> sensor = Adafruit_DHT.DHT11
>>> pin = 4
>>> humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
>>> humidity
46.0
>>> temperature
24.0
>>> 

*********************************

I currently have it set up using the breadboard. However, I got a reading earlier using connections directly with the GPIO in the Pi. That's not working now, however. It's something I'll have to look at later.

It looks like I can run this program anywhere as long as the file "Adafruit_DHT.py" is in the same directory (obviously, since the file needs to be imported).

I have seen some reviews showing preferences to the DHT22, so if I ever need to get a second temperature sensor, I can consider that one.

Camera for the Weather Balloon

I got the camera on my Raspberry Pi working.  It was rather simple. Using Raspbian, I just had to enable the camera (run sudo raspi-config), then figure out the code.  Here is a simple program I wrote, just to record the commands for the camera:

*******************

import time
import picamera

camera = picamera.PiCamera()

# Use to view current picture from camera on screen connected to
# the Raspberry Pi. Not for use with ssh.
#camera.start_preview() 

# Use when ribbon of camera is on the top of the camera. Make 'False'
# if the ribbon is on the bottom of the camera.
camera.vflip = True
camera.hflip = True

camera.brightness = 60

# Capture a single image
camera.capture('image.jpg')

# Capture a video
camera.start_recording('video3.h264')
time.sleep(5)                # Length of video
camera.stop_recording()


*******************

Saturday, December 20, 2014

What are those dark lines in the clouds?

If you look at this cloud closely, you will see a couple of dark lines. These are not distrails (dissipation trails). So what are they?
Look beneath the cloud, on the patch of blue sky. You notice a couple of contrails just left of the shadows. Even farther to the left you see a bright spot where the sun is. As the sun on the left shines on the contrails in the middle, the contrails form a shadow on the main cloud layer. This is an awesome picture showing how 3-D our atmosphere really is.

Reason for this Blog and QuESST 2014-2015

As an employee of Daytona State College, I have been working on improving my teaching. One program that I have been accepted to participate in toward that goal is QuESST (Query, Exploration, Service, Scholarship, and Teaching). In this program, we create groups to help each other as we work on some project to improve our courses.

I was accepted into the QuESST program last September for the 2014-2015 school year.  I have been working on a project to build, test, and fly a weather balloon to a height of 2km, and then recover the instruments.  I have a lot of concerns for the project, but at least I will be learning a lot from the experiment.

The plan is to get a Raspberry Pi <http://www.raspberrypi.org/products/model-b-plus/>, and attach temperature, humidity, and pressure sensors. As a bonus, I am also planning to attach a camera to take a video of the flight.

I have made a lot of progress on the balloon. However, I am starting to realize that I need to get myself a little more organized and keep a Journal of my experiences.  I can include programming code, instructions, etc., so that if something should go wrong, I have all the information here.  That is the goal of this blog...to keep a record of my projects through my career, not just Daytona State College.