Coder Social home page Coder Social logo

riggtravis / bodgecyclecomputer Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 43 KB

A bodged together bicycle computer for hackers

License: MIT License

Arduino 100.00%
arduino-uno gps-logger-shield bicycle-computer bicycle bicycles arduino arduino-sketch arduino-platform gps gps-location

bodgecyclecomputer's Introduction

Bodgecycle Computer

The bodged together bicycle computer for hackers. A picture of my Bodgecycle Computer

In order to use Bodgecycle Computer you will need the following components:

  1. An Arduino Uno compatible board
  • Just as a heads up, I have recommendations about where and who from to get your Arduino compatible board
  • You can buy official Arduino boards, but as of June 12th, 2017, I no longer recommend them
  • Discussion about why I no longer recommend them are included in the recommendations below
  1. A USB cable compatible with your chosen Arduino compatible board
  2. A SparkFun GPS Logger Shield
  3. An Arduino stackable header set
  4. A 12mm coin cell battery
  5. A micro SD card
  6. A 9v battery
  • I have a few recommendations based on my experience with this project
  • These recommendations come from wisebread
    • AmazonBasics: Cheap. You can replace these a bunch
    • Energizer Advanced Lithium: Long battery life.
    • Duracell Procell: reliable and predictable. (These are now my preferred)
    • EBL High Volume: Rechargable. So that's fun.
    • Duracell Coppertop: Yup.
  1. A 9v battery holder
  2. A sandwich bag for wet rides or some sort of butter tub

I sourced all of these parts except for the sandwich bag from SparkFun. The sandwich bag I got at a Food Lion. When I use a butter tub instead of a sandwich bag, I use an old butter tub that I probably also got at a Food Lion, though it might have been a Kroger, or even a Wades. Also the first 9v battery I had went dead. For a while I used one by JobSmart which is the house brand of Tractor Supply.

These days I am using a Duracell Procell because it can operate under vibrations better than previous batteries I used. Just as a heads up, your bicycle computer is going to get vibrated. The reason for this is that it is on a bicycle. Philosophical discussion of where to source things to come later. The total cost of the parts I used was about $100. Some of the parts I used were unnecessary. The parts that are listed here cost about $91.20. I also used an Arduino Uno, which is perhaps not the cheapest Arduino Uno compatible board. A person using a SparkFun RedBoard and a minimum of parts could probably build a Bodgecycle Computer for $86.20 buying from SparkFun.

Users comfortable with system voltage could likely shave a further $5-8 off the cost of this build by using an Arduino Pro, Diavolino, or Canaduino. Changing boards however is not guaranteed to have same results of the reference Bodgecycle Computer built by Travis Rigg. Users choosing to use a different board will also have to find their own way to power their board. Users choosing to use a different board will also be required to know how to upload code to their board of choice.

It is worth noting that I have done a little bit of testing with a Diavolino. It didn't work for me, but all I did was plug in the shield, see that it didn't work, and then added this statement to this readme file. It's possible that someone less lazy than me who was dedicated to making it work with a Diavolino could do that.

Bottom line, if you want to use a different board, feel free to do so, but don't think it's my responsibility to bail you out, or to accept your fixes to your problems into the Bodgecycle Computer codebase via a pull request. If you create a pull request that doesn't work with the Arduino Uno R3, I'm not going to merge it. If you create a pull request that works with your board and it still works with the Arduino Uno R3, I will probably accept this change. If someone creates a pull request that I merge that breaks another board I don't care about, you're going to be sorta on your own.

Users who are satisfied with the first version of the Bodgecycle Computer can also save some money by getting regular headers instead of stacking headers. This is not recommended however because future updates may require more shields than just a GPS logger shield.

A better way to save some money building this project that could still be expected to work reliably would be to purchase a smaller and cheaper micro SD card. The one I have linked in the parts list above is smaller and cheaper than the one I bought from SparkFun. It should be satisfactory enough.

Users should also feel free to purchase parts from their choice of retailer. I used SparkFun because their website was easier for me to navigate than Adafruit and I wanted to buy everything from one place. SparkFun's miniature version of the GPS Logger Shield was also a big boon. I also, for personal reasons, did want to buy products that supported the developers of the Arduino boards. Certain Arduino clones don't help support Arduino development. Where you fall on that philosophical line is up to you.

I do however ask that users not purchase parts from Tractor Supply. I know I mentioned earlier that I got one of the batteries I used from there, but that was back when they were the only retailer I could get certain products from. I always encourage people not to go there if for no other reason than that I have never been to a Tractor Supply during Chick Days without at least one dead chicken that they refuse to remove and a chick habitat without enough water or food. I have no problem owning animals. I own several in fact. I do have a problem with letting them starve to death.

On Arduino Uno compatible boards

I used an Arduino Uno when I built the first (and as far as I know only) Bodgecycle Computer. At the time this made sense because it was easy to acquire and I wanted to support the continued development of Arduino boards. The Arduino organization has since gone through leadership changes that users should be wary of. I recommend using a SparkFun RedBoard. There are other cheaper boards, but the RedBoard helps SparkFun develop new boards.

Other alternatives incude:

One note that I can share is that buying wholesale from China may require burning a new bootloader onto the chip that comes installed on your board. This isn't difficult if you already have an Arduino compatible board. If you don't, it might be really frustrating.

An added bonus of the recommended RedBoard is that there are no through hole componenets that might accidentally be shorted in a jersey pocket containing something like a bicycle lock key. Not that I ever shorted anything by putting my computer in a jersey pocket with a bicycle lock key. Just be aware that doing that will likely cause a short curcuit which will reset the Arduino.

Assembly

This guide will assume that the user is familiar with soldering and Arduino assembly. There are many guides available online for how to develop these skills. Attempting to produce a new guide or to replicate one of the existing guides would likely not introduce anything useful to the experience of using the Bodgecycle Computer. If anything is unclear about how to proceed, please open an issue on GitHub.

  1. Solder your stackable header set onto the SparkFun GPS Logger Shield. Solder your board
  2. Insert the GPS Logger Shield into your Arduino Uno compatible board. Line up all your pins Push down
  3. Insert your coin cell battery into the Arduino Uno Make sure the positive terminal is facing up
  • Make sure the positive terminal is facing up Push it into the holder

Installation

This guide will assume that the user is familiar with the Arduino environment. There are many guides available online for how to interact with this environment. Attempting to produce a new guide or to replicate one of the existing guides would likely not introduce anything useful to the experience of using the Bodgecycle Computer. If anything is unclear about how to proceed, please open an issue on GitHub.

  1. Install the Arduino IDE
  2. Open bodgecycle.ino in your IDE
  3. Download and install TinyGPS++
  • Follow the installation directions provided by Mikal Heart on his website, Arduiniana
  • Doing this step has been different on different computers, so I can't give better advice than this
  1. Plug your Arduino into your computer
  2. Make sure to select Arduino/Genuino Uno as the type of board you're using Arduino/Genuino Uno
  3. Make sure that the serial port your Arduino is connected to is selected Serial port selection
  4. Upload your code to the Arduino Upload code

Usage

Before you can start recording data, you need to insert the micro SD card into the micro SD card slot on your GPS Logger Shield. I don't really know how to explain how to do that better. If this instruction is unclear, please open an issue on GitHub. The micro SD slot is the one that lines up right above the USB port Push the micro SD card in until you hear it click

Now that your SD card is in place, ready to receive data, you should be able to insert your 9v battery into your 9v battery holder and plug your 9v battery holder into the DC voltage jack on your Arduino Uno compatible board. Once power is supplied to the board, it will start recording data as soon as a GPS signal has been fixed. In order to stop recording, unplug your 9v battery from your Arduino board. Battery and holder Battery inserted Recording data

Now you can take the micro SD card out of your GPS Logger Shield, put it in an adapter of some sort, plug that adapter into your computer, and open the GPX file you have recorded in some sort of GPX visualization software. SD converter More SD converter Into the computer Again, listen for a click

Contributing

You want to contribute? That's great! We would love to welcome you aboard. There are just a few things you should know first. They are laid out in our Code of Conduct and Contributing Guide. Please go and read them before you do anything else.

Limitations

However you take your Bodgecycle computer with you, be it in a sandwich bag, in a butter tub, in an enclosure on your bike, or just loose in a jersey pocket, please make cerain that there are no metal components that may accidentally come in contact with the solders on the back of any through hole soldered components. This is especially important to those using genuine Arduino Unos and clones with through hole components.

A Bodgecycle Computer can only store 10 files at a time. Hopefully, this can represent at least a couple of days worth of rides. For the creator of the Bodgecycle Computer, this represents a little over a week's worth of bike rides. Hypothetically, you could run out of space on your Bodgecycle Computer after a very long series of rides, however, the battery will run out before that becomes a problem. A Bodgecycle Computer with a low battery is a very unstable thing. An easy indication that your Bodgecycle Computer is low on battery is when there are more files for recorded rides than you would expect and the files contain incomplete data.

Users who feel confident in their ability to edit the code of this project can try to use an Adafruit Ultimate GPS Shield instead of the SparkFun GPS Logger shield. That shield is claimed to have a lower battery draw than other similar shields (which as far as I can tell is basically just the SparkFun one). A future update of the Bodgecycle computer may even be based on that shield depending on how this project goes.

There is a very low chance that when you unplug the battery from your Bodgecycle Computer that you will interrupt the writing of data. You don't need to worry about this too much. Your Bodgecycle Computer logs data to the SD card once a second. It has the ability to perform 16 million actions in a second. I estimate the odds at interrupting your Bodgecycle Computer from recording data is about 3:160,000 against. In other words you have a .002% chance of doing that. You shouldn't worry about it too much, but it can happen.

The goal of the Bodgecycle Computer project is to create something that can create data that can be uploaded and stored on the website Strava. This can be done by putting your micro SD card into an SD converter and then using the upload file interface on Strava.

bodgecyclecomputer's People

Contributors

riggtravis avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

sdebby

bodgecyclecomputer's Issues

Low Battery Behavior Unstable

Whenever the battery starts getting low, lots of files are created in quick succession, none of them valid. Ideally we would be able to monitor the battery level and stop recording when it starts getting dangerously low. This is planned for a version 1.0.1 release in the future.

Header not getting closed sometimes

Every once in a while when a user tries to upload their file to Strava they will discover that they have the worst of all possible things: poorly formatted data. This is because the metadata section hasn't been closed and the track segmant section hasn't been opened.

Battery Usage needs optimized

I am logging data every second as well as polling the GPS module a lot to find out when there are enough satellites to start logging. This needs to be remedied so that the platform can be used longer and has more stable behavior.

Real Time Clock

Here's what's going on

When I go for rides sometimes I realize that I need to know what time it is

Here's what should be going on

Wouldn't it be cool if Bodgecycle Computer had a clock function?

Excessive Heat

after rides that aren't actually very long, the device can be very hot. The device does not seem to have any issues operating in these conditions, however, it can be unpleasant for a user to handle it. I would like to look into figuring out how to reduce this heat. There might be software optimizations to be made. Perhaps changing the power source would improve how the device operates. Maybe it would be best to look into adding a heat sink and making that part of the standard hardware setup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.