CycleOps Pro300 PT to ANT+, Part 7, V1 is back with better software

I’ve received several requests for updates on the V2 hardware. I’ve had a breadboard version of the V2 sitting on my desk for months. I haven’t yet found the advantages of the ESP8266 processor enticing enough to make new PCBs and deal with the new headaches that will come with trying to get everything working as well as it was on the ATmega32U4.

Back to the development on the ATmega32U4, I went off to find a solution to the memory issues. The power meter conversion code is relatively small, the majority of the space was being consummed by the library for the OLED display, while very nice to have it isn’t really needed for the device to function. At the time I was using Adafruit_SSD1306 an excellent library that includes test and image support. For what I was going, text only was just fine. Hunting around GitHub and Google I found the very well designed SSD1306Ascii. While not a drop in replacement for the previous library do the conversion over took me a few hours and memory usage went from close to 90% where I was dealing with random reboot and odd issues to a much more comfortable 44% of program memory being used. Solution found, time to move on to the next issues.

I prefer to bike outside whenever the weather allows but with December here on the East Coast of the US mother nature doesn’t always allow for that. I’ve been using the CycleOps bike with Zwift just about every day and have started to see random spikes of both power and cadence on my plots. This was unacceptable.

I wish I could put out 1000+ watts

Near the beginning of this project I purchased a Saleae Logic 8 logic analyzer. This has turned out to be one of the most valuable tools in my collection of electronic debugging. For a data packet with no noise we can see that the shortest time for any single bit of data is 1.57ms. Any time a bit is less that this we know that must be an error bit

Data Packet with no errors

Looking for when a high signal is <1ms I was able to find a packet with a glitch.

Data Packet with glitch that was causing spikes

Now that the glitch had been identified I was able to write code to check if a data bit was being read while a glitch occurred. If this happened the code will not update power or torque and will wait for the next data packet. The disadvange of this is that power and torque will be updated at a 2 second interval when a glitch is detected rather than the standard 1 second of each packet. This was a minor price to pay for power and cadence data that is spike free. All of these changes can be found in the GIT Repository CycleOpsPro300PTtoANTPlus

CycleOps Pro300 PT to ANT+, Part 6, Update on V2

I’ve received a few emails asking about buying or for help making the Pro300 PT to ANT+ adapter. I wanted to be as candid as possible and say that I would like to complete the development of version 2 before producing any more PRO300 PT to ANT+ adapters.  The primary reason for the V2 is to address the limited memory that is available in with the ATmega32U4 processor.

As I wrote the current code, The Adafruit_GFX and Adafruit_SSD1306 libraries used to drive the OLED display are rather memory intensive.  I found myself resorting to various tricks to get the memory usage of the ANT+ code as small as possible to get the system to run without issues. This did lead me to the neat F() syntax for storing strings in flash memory rather than RAM.

With a basic working system behind me it’s time to switch processors and compile all of my learning into the V2 board. I chose to stay within the Arduino ecosystem as the abundant well tested libraries makes development far easier than when I use to work in CCS PIC.

Processor comparison

 Pro Micro
Program Memory Size (KB)324194 (external flash)
CPU Speed (MIPS/DMIPS)8 (3.3V)80
USB OutputYesNo
Estimated Cost$4.50$2.00

The built in WiFi is a nice addition i’m sure I will find uses for in time. I have plans of turning the Pro300 PT into a smart bike and controlling it via FE-C (Torque control method TBD). I have working software on the V1 prototype board without the OLED display but ran into memory limitation as I tried to pull it all together. Leading down the current path of moving to a new processor.


First Post

I’m going to try to use this word press site as a way of documenting my projects. First step find a good location to post ZIP files for all the PCB circuits (eagle CAD) and other file types that wordpress doesn’t seem to support. I could try to use my dropbox account but I would end up just deleating the files at some point later by accident.

I would like to document some of my past projects first, so things to come

  • Folding wings made for Burning Man 2009
  • Dumb LED coat made for Burning Man 2010
  • Simple home made Li-Ion 3 cell charger
  • -Work in Progress, Smart LED coat for Burning Man 2011

Let the fun begin

Copyright blinkyme 2019
Tech Nerd theme designed by Siteturner