Project Log #1: Raspberry Pi & Arduino

To be honest, I was not completely sure what I would be doing in my internship here at the Canadian Aviation and Space Museum. There had been mentions of a cool project, but I really had no idea what I was getting into.

On my first day, I arrived and was given a tour of the place by my supervisor, Jesse Rogerson, who is a science advisor for the museum. Next, I was  introduced to one of the coolest projects I have ever done.

The project is to design, code, and build a personal weather station for the museum. A personal weather station is a set of equipment that can collect a variety of data including temperature, humidity and pressure in a desired location. They come with the ability to personalize and extend them to the builder’s desire. Personal weather stations are pretty big in the maker community.

Neither myself nor my supervisor have ever built a personal weather station, so this is going to be a journey for the two of us! The great thing about this project is that it will use and extend my  existing skills, while at the same time building new ones.

In order to get started, I was given a Raspberry Pi and an Arduino Mega. If you have never used either of those, I strongly recommend that you find somewhere that you can play with one. You can think of a Raspberry Pi as a really small computer with CPU, RAM, GPU and storage. An Arduino, on the other hand, is a programmable circuit board. It might seem a little daunting, but it can turn out to be a lot of fun and a great experience.

A Raspberry Pi and an Arduino with Stapler for scale

Photo of Raspberry Pi and Arduino Mega with stapler for scale


 

The first problem I faced was figuring out how to get the Raspberry Pi and the Arduino communicating. I have used both an Arduino and a Raspberry Pi, but never together. The idea in my mind was that the Raspberry Pi would be the brains, while the Arduino would act more as a controller for all the sensors that will be attached. This operates to the strengths of each device. Figuring out how to get them to communicate was an interesting challenge that required a considerable amount of time. The solution lay in remembering that the Raspberry Pi is pretty much a computer.

While there are online resources about getting a Raspberry Pi and an Arduino communicating, it pales in comparison to the amount of resources for having a host computer communicating with one. Reading through various Arduino community forums, the solution seemed to be in using serial communication. Serial communication is the process of sending one bit at a time to a receiver. With an Arduino, it sends back data through a USB cable to the host computer. I ran a few simple programs to ensure everything was functioning correctly, including illuminating an LED and returning an ever-increasing number to the Raspberry Pi.

My first week yielded  some good progress, and set the foundation for the next steps: hooking up the sensors. This, should be a lot of fun!

All the code that has been made can be found at my GitHub page: https://github.com/mebsim/WeatherStation

Author(s)
Profile picture for user Mohamed Ebsim
Mohamed Ebsim

Mohamed Ebsim is an intern at the Canada Aviation and Space Museum, working under Science Advisor Jesse Rogerson. He is also a high school student at Ashbury College.