The bodged together bicycle computer for hackers.
In order to use Bodgecycle Computer you will need the following components:
- 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
- A USB cable compatible with your chosen Arduino compatible board
- A SparkFun GPS Logger Shield
- An Arduino stackable header set
- A 12mm coin cell battery
- A micro SD card
- 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.
- A 9v battery holder
- 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.
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:
- Canaduino Uno
- Sanjay Technologies ST1
- SainSmart Uno
- CT Uno
- Freetronics Eleven
- Alorium XLR8
- Wholesale from China
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.
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.
- Solder your stackable header set onto the SparkFun GPS Logger Shield.
- Insert the GPS Logger Shield into your Arduino Uno compatible board.
- Insert your coin cell battery into the Arduino Uno
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.
- Install the Arduino IDE
- Open bodgecycle.ino in your IDE
- 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
- Plug your Arduino into your computer
- Make sure to select Arduino/Genuino Uno as the type of board you're using
- Make sure that the serial port your Arduino is connected to is selected
- Upload your code to the Arduino
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.
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.
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.
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.
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.