Lab 9: Serial Communication/Wireless Control

OVERVIEW:

This lab was broken up in to two sections. For the first serial lab, I sent data from a potentiometer to a program on the computer. The program graphed the output of the sensor on screen. For the second serial lab, I sent data from two potentiometers to control the position of a shape on the computer screen. For the final portion of this lab, my lab partner and I created a doorbell using wireless communication–one Arduino controlled the button, while another Arduino controlled the buzzer.

PROCEDURE:

First, I connected the potentiometer to the Arduino microcontroller just like I’ve done in many other labs previously. I displayed the output of the potentiometer sensor on the Serial monitor of Arduino’s programming environment using the Serial.write() function.

Using Serial.write() displays a bunch of unreadable data. To make it readable, I used a program called CoolTerm that displays the incoming data as ASCII and hexadecimal characters such as this:

Next, I graphed the values I received from the potentiometer sensor using Processing programming language. I used the code given in the lab assignment.

Here is the result:

For the second serial lab, I added another potentiometer to the circuit. I then controlled the position of a simple two-dimensional shape made in Processing using the potentiometer–one potentiometer controls the x position, the other controls the y position. Once again, I used code given in the lab assignment.

Here is the result:

For the wireless communication portion of the lab, my lab partner and I paired up with another lab group–we were the button, the other group was the bell. We used a new (to us) electronic known as the XBee. The XBee allows us to communicate wirelessly to another XBee, thus allowing us to control electronics from far distances. We first had to configure the XBees by using a USB serial adapter board. We followed simple instructions to ensure the XBees were on the same radio signal as each other, much like pairing a remote control car with its controller.

After the hardware was in place for us and the other lab group, we programmed our Arduino to act as the button. We added an LED to our circuit to provide feedback from the bell group back as a “handshaking” confirmation that the communication was successful.

Here is the working result:

Conclusion:

This lab was a gateway to wireless communication possibilities in Arduino project development. I really enjoyed this lab as my mind was reeling the entire time with possibilities for future projects. Overall, this lab was engaging and interesting just as all the other labs. I can’t wait for our final projects!

Leave a Reply

Your email address will not be published.