Week 12 – Electronics, GPS shield, motors, MIT App Inventor

Time for some fun with the electronics!

We are making use of an Arduino Mega board, together with a Sparkfun GPS Shield Starter Kit. We intend for Imp Bot to be able to log GPS coordinates of where it collects water samples from. The video below shows the testing of the GPS Shield, as per the tutorial on Sparkfun’s website.

By using the the class TinyGPSPlus (shown in the aforementioned tutorial), we are able to retrieve information on latitude, longitude, and even time. The GPS Shield, by default, outputs its data on digital pins 2 and 3. As the GPS Shield sat on top of an Arduino Mega board, some slight re-routing of pins had to be done. The Arduino Mega board does not support change interrupts on all its pins, and this so happened to include 2 and 3, detailed here.

Another problem we faced with the GPS Shield was that it did not sit very tightly on the Arduino Mega as the USB upload port was blocking it slightly. This did not affect performance, however.

The next thing to do was to program a mobile phone app using MIT App Inventor to program an app to control the Imp Bot. The following 2 images show the user interface for the app.



The text under vessel status changes based on information sent from the Arduino board. It acts as a sort of live update of what the vessel is currently doing.  Of course, in the background came in all the block code which handled all the logic behind the buttons and told each one what to do when clicked.

Upon getting the app communicating with the Arduino board successfully, next came hooking up the motors to it. For now, we used transistors to act as gateways to tell the motors to turn on or off accordingly.

IMG-20160108-WA0009 IMG-20160108-WA0013 IMG-20160108-WA0007

Once we connected the motors and all the transistors, resistors and diodes, it then came down to configuring the Arduino program to be able to activate the correct motors upon the respective signal being sent, an example of which is shown below.


After programming and testing we took a final video of all the components in action.

Now that all the components worked very elegantly, the electronics is all set to be showcased during the technical prototype review in a few days.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s