Wireless Sensor Networks (WSN) using Arduino and XBee

I have decided to write my first real post. I’m going to briefly write about a bunch of projects related to Wireless Sensor Networks (WSN) using Arduino boards and XBee modules.

During my 3rd year in the Computer Science degree (2013 - 2014), I coursed a subject called Wireless Sensor Networks (WSN). My teammates, Sergio Barrachina Muñoz and Francesc Wilhelmi Roca, and me did some projects during this course.

During the course, we used an Arduino board (which now outside USA is called Genuino) together with some electronic components (e.g. LED lights or servomotors). The usage of these elements varied depending on the project we did; nevertheless, for the projects involving wireless communication (which was, in the end, the purpose of the course) every team used a pair of XBee boards.

The course followed a pretty different structure from what the students of Pompeu Fabra University are used to. In fact, not only the students, but also people from outside the university could follow the course. To do so, an online course was created at Peer to Peer University (P2PU) called A Hands-on Experience with Wireless Sensor Networks. A website was created to access the PDF course guide and the P2PU course itself: handsonwsn.org.

Each team created a blog in which the members posted their projects (e.g. description, wiring diagrams, videos, …). Our blog (still online) was Getting Into Arduino; there we posted a quite detailed description of everything we did for the lab (including the code which I uploaded some weeks ago to GitHub so as not to loose it). We did not reference WSN in the title name because at that time we did not come up with anything better (and now it is too late to do the change).

Now, I give a brief description of the projects we did and the link to the corresponding post in the blog:

  • Traffic Lights: Implemented a traffic light system. It did not involve wireless communication, it was a project to start getting familiarized with Arduino and its electronics.

  • Chatting with XBee: An XBee connected to a PC sent messages written by the user to another XBee connected to the Arduino. An attached LCD screen displayed the received messages.

  • Melody Selector using XBee: An Arduino + XBee system is used to select a melody number (displayed in an LCD screen). The number is sent to another Arduino + XBee system that will play the melody using a buzzer.

  • Light Based Alarm: A buzzer sounds when the amount of light received by a photoresistor is not enough.

  • Morse Code Player: An XBee sends messages to another XBee connected to the Arduino. These messages are translated to Morse code and played using a buzzer.

  • Activating a Fan Depending on the Temperature: An XBee connected to an Arduino detects the temperature of a room; then, this temperature information is sent to another XBee connected to a PC which determines if a fan should be activated. If the temperature is too high, then the second XBee tells the first one to enable the fan so as to reduce the room’s temperature.

  • Measuring Light Pollution in Barcelona: Light readings made by a photoresistor are periodically uploaded (as JSON) to Xively.

  • Remotely Controlled Car: A control pad with an Arduino and an XBee sends commands to a battery powered car. The car is formed by a pair of motors, and an XBee that receives the commands and powers the motors accordingly.

Just as an interesting project that is done internationally, I wanted to comment the following. During the course, the class visited the Fab Lab Barcelona, where we were explained the Smart Citizen project. As their website says: “Smart Citizen is a platform to generate participatory processes of people in the cities. Connecting data, people and knowledge, the objective of the platform is to serve as a node for building productive and open indicators, and distributed tools, and thereafter the collective construction of the city for its own inhabitants.”. The following video is much more illustrative than the explanation:

And that’s it! By now, it’s my first post. Let me know your thoughts in the comments.