Difference between revisions of "BOARDLOCK project"

From ESE205 Wiki
Jump to navigation Jump to search
Line 43: Line 43:
 
*This required us to research online and find resources which would help us read this data. We were able to find tutorials which taught us how to call our accelerometer. Originally we were not able to set it up, but the drivers we were directed to made it easy to collect the data it was sending. We also found a youtube video which taught us how to set up our GPS, and linked us to a github which had code to a program which decoded the GPS data into coordinates, speed and other useful information.
 
*This required us to research online and find resources which would help us read this data. We were able to find tutorials which taught us how to call our accelerometer. Originally we were not able to set it up, but the drivers we were directed to made it easy to collect the data it was sending. We also found a youtube video which taught us how to set up our GPS, and linked us to a github which had code to a program which decoded the GPS data into coordinates, speed and other useful information.
  
We struggled for a bit trying to figure out the best way to display all of this data that we were able to collect. It seemed pretty complicated, especially since we wanted to incorporate the accelerometer into it as well. The only way to display data from an accelerometer/ speed from the GPS with specific coordinate points is if we could color each point, or edit it in some way to differentiate each coordinate point so you could tell how fast you were going at that point in time. I researched about this and decided to use Python on my mac, and program a script which would  write to an HTML file and call google maps API. Google maps API is the simplest way to plot data with different shapes of different sizes and colors.
+
We struggled for a bit trying to figure out the best way to display all of this data that we were able to collect. It seemed pretty complicated, especially since we wanted to incorporate the accelerometer into it as well. The only way to display data from an accelerometer/ speed from the GPS with specific coordinate points is if we could color each point, or edit it in some way to differentiate each coordinate point so you could tell how fast you were going at that point in time. We researched about this and decided to use Python on my mac, and program a script which would  write to an HTML file and call google maps API. Google maps API is the simplest way to plot data with different shapes of different sizes and colors.
*This required us to learn a bit of HTML and how the static maps part of google maps API worked. One way to use google maps API is by creating a webpage and calling the google maps API in the HTML script. So I began writing this file strictly in HTML/Javascript, but I soon came to find out that it would be really difficult to pull data from my local drive (the flash drive on the mac which has data written from pi) using strictly HTML. HTML/Javascript doesn’t allow you to simply call a path on your computer. So I decided to use python although I was not really sure how I was going to do this. I stumbled upon a video of a man speaking spanish, explaining how to call google maps api from a python script. What he simply did was write to an HTML file using the python script. This gave me the idea to create a string in python, which would be all the code included in my HTML file. In the python script I would append to the end of the string all the parts of the HTML file which needed to call to my csv file stored in the usb flash drive. This included the information which would be used to create the lines (of different sizes and colors) which displayed the trip traveled on the raspberry pi.
+
*This required us to learn a bit of HTML and how the static maps part of google maps API worked. One way to use google maps API is by creating a webpage and calling the google maps API in the HTML script. So we began writing this file strictly in HTML/Javascript, but we soon came to find out that it would be really difficult to pull data from my local drive (the flash drive on the mac which has data written from pi) using strictly HTML. HTML/Javascript doesn’t allow you to simply call a path on your computer to a local drive. So we decided to use python, although we were not really sure how we were going to do this. We stumbled upon a video on youtube of a man writing an html file from python. This gave us the idea to create a string in python, which would be all the code included the HTML file. In the python script we would append to the end of the string all the parts of the HTML file which needed to call to my csv file stored in the usb flash drive. This included the information which would be used to create the lines (of different sizes and colors) which displayed the trip traveled on the raspberry pi.
 +
 
 
====Using raspberry pi====
 
====Using raspberry pi====
  

Revision as of 02:21, 11 December 2018


Project Overview

Tired of your run-of-the-mill skateboard? Looking to upgrade it to the next level? We present to you BOARDTRACK: a slick skateboard equipped with a battery-powered Raspberry Pi, GPS chip, and accelerometer attached to its underside. Why? We're glad you asked... these small gadgets provide BOARDTRACK with the the capacity for user-friendly tracking of its location, acceleration, and average speed. Once collected, this data is displayed onto a monitor. But wait, there's more -- each display is unique to every trip, enabling you to access how far you have traveled, your speed at any location, and the highest overall acceleration reached. In this project, our team aims to manufacture a unique transportation method of utmost quality, aesthetics, and convenience.

Weekly Log

https://classes.engineering.wustl.edu/ese205/core/index.php?title=BOARDLOCK

Team Members

  • Amin Bdeir
  • Isabella Zisman
  • TA: Sam Hoff

Objectives

Old Objectives:

  1. Attach ESC to Raspberry pi
  2. Be able to lock board's wheels
  3. Use raspberry pi bluetooth capabilities to lock board wheel from cellphone

New Objectives:

  1. Attach a 3D-printed box to the underside of our Skateboard's deck, containing a portable battery-powered Raspberry Pi, GPS Chip, Accelerometer, and a LED pushbutton
  2. Set up Raspberry Pi
  3. Learning how the Raspberry pi and Python works
  4. Understand how GPS technology works
  5. Get GPS and Accelerometer to send data to Raspberry pi
  6. Program button so that we can begin and end pi program
  7. Program a Python Script which writes an HTML file which displays a heat map of route traveled

Challenges

We anticipated our challenges to mainly be using unfamiliar technology to all group members, including programming in python, the raspberry pi, accelerometer and GPS. In addition to these being new to us, we knew that we also were going to have trouble testing the GPS, especially if we were inside. The GPS specifically caused the most trouble, and was hardest thing to deal with in our project.

New Skills

Programming in python:

We learned how to program a python script to read data from a GPS chip and an accelerometer and write it to a USB flash drive.

  • This required us to research online and find resources which would help us read this data. We were able to find tutorials which taught us how to call our accelerometer. Originally we were not able to set it up, but the drivers we were directed to made it easy to collect the data it was sending. We also found a youtube video which taught us how to set up our GPS, and linked us to a github which had code to a program which decoded the GPS data into coordinates, speed and other useful information.

We struggled for a bit trying to figure out the best way to display all of this data that we were able to collect. It seemed pretty complicated, especially since we wanted to incorporate the accelerometer into it as well. The only way to display data from an accelerometer/ speed from the GPS with specific coordinate points is if we could color each point, or edit it in some way to differentiate each coordinate point so you could tell how fast you were going at that point in time. We researched about this and decided to use Python on my mac, and program a script which would write to an HTML file and call google maps API. Google maps API is the simplest way to plot data with different shapes of different sizes and colors.

  • This required us to learn a bit of HTML and how the static maps part of google maps API worked. One way to use google maps API is by creating a webpage and calling the google maps API in the HTML script. So we began writing this file strictly in HTML/Javascript, but we soon came to find out that it would be really difficult to pull data from my local drive (the flash drive on the mac which has data written from pi) using strictly HTML. HTML/Javascript doesn’t allow you to simply call a path on your computer to a local drive. So we decided to use python, although we were not really sure how we were going to do this. We stumbled upon a video on youtube of a man writing an html file from python. This gave us the idea to create a string in python, which would be all the code included the HTML file. In the python script we would append to the end of the string all the parts of the HTML file which needed to call to my csv file stored in the usb flash drive. This included the information which would be used to create the lines (of different sizes and colors) which displayed the trip traveled on the raspberry pi.

Using raspberry pi

Gantt Chart

https://classes.engineering.wustl.edu/ese205/core/images/7/7d/Ganttchartt.pdf

Presentation Slides

https://docs.google.com/presentation/d/1R9UPc2ogxPKON9jxLcB9qWECYStB06nGXCuJ_GoqvfU/edit?usp=sharing

Night Light design

https://drive.google.com/open?id=14BxDPPlyi2YZkdFCk_n2jNiYaWCCQbUU

Budget

Anker PowerCore 10000 $25.49

Adafruit 16mm Illuminated Pushbutton - Blue Momentary [ADA1477] $6.09

SunFounder MPU6050 Module for Arduino and Raspberry Pi, 3-axis Gyroscope and 3-axis Accelerator $11.99

Adafruit Ultimate GPS Breakout - 66 channel w/10 Hz updates - Version 3 $39.99

Raspberry pi 3B

Total: $83.56

Final Report

Designs and Solutions

Programming:

How to project GPS data onto Google Maps API? Hyperlink created

How to project Accelerometer data onto graph? X, Y, Z coordinates

How to program button to start/stop collecting data? LED light

How to extract data? Stored on USB flash drive


Wiring Connections:

F-F Configuration / Pins

Battery → Pi → button → GPS chip → Accelerometer → USB → monitor


Virtually every aspect of this project was learned from scratch...

How to:

  • Parse/interpret/project data from GPS chip and Accelerometer
  • Based on data collection, program button to respond accordingly


Results

On Demo Day, our team successfully met our goals, though not to the extent we originally envisioned.


Source Code and CAD files

3-D printed box:

Repository: