Giter Site home page Giter Site logo

ajs123 / kbikeble Goto Github PK

View Code? Open in Web Editor NEW
18.0 8.0 4.0 3.83 MB

Arduino-based replacement computer for a Keiser M3 spin bike, with industry-standard Bluetooth services and simple display

C++ 68.89% C 31.11%
zwift golden-cheetah keiser-m3 spin-bike kinomap cycling-power fitness bluetooth bluetooth-low-energy keiser-computer

kbikeble's People

Contributors

ajs123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kbikeble's Issues

Pinout not consistent across M3 builds

I got my Keiser M3 working with this code, modified slightly for my display and changes to the I/O. It appears my bike's I/O is different from the pinout identified by KBikeBLE. Below is what I am using for my bike and it is working with RGT Cycling app. Thanks so much for this development.

My Keiser M3 Serial No: 080118 (which means built 2008 - Jan 18)
Keiser M3 interface through the RJ9 4p4c jack:

  Red     - CRANK_PIN - crank switch to ground (dry switch, not Hall effect)
           To a digital input. Transient protection is recommended.
  Yellow  - RESISTANCE_TOP - 10K magnetic brake position sense pot high side
           Use a digital output so it can be turned off to save power
  Green   - RESISTANCE_PIN - magnet brake position sense pot wiper
           To an analog input channel
  Black   - GROUND - magnetic brake position sense pot low / crank switch low side

28Dec2022
Just a note, The Digikey Part Number 1175-2286-ND with description CABLE MOD 4P4C PLUG TO PLUG 7' is the cable I used for this project. It reverses the conductors order from one end to the other. This caused me problems until I figured it out :( The above coloring is referenced at the original cable by the crank.

FTMS support

This software is awesome. I am quite new to programming. In order to get this software to work with the RGT Cycling app, I disabled Advertising of the ftms service. Apparently RGT software didn't like that? Before I disabled it, my board would never connect. After disabling, it connects every time. If I decide to pay for Zwift, maybe I will have to re-enable? Not sure.

Thanks

SEEED STUDIO XIAO NRF52840 compatible

Just an FYI....
I got KBikeBLE's software to work with a SEEED STUDIO XIAO NRF52840 processor, which is quite a bit smaller and less expensive. A few changes I had to make:
Added “static const uint8_t VBAT = PIN_VBAT ;” to Variant.h file so I could use this in bike_interface.h.
In Bike_interface.h, instead of #define BATTERY_PIN A6, changed to #define BATTERY_PIN VBAT
In Arduino IDE, in board manager, added “Seeed nRF52 by Seeed Studio.

I used 1.0.0 of this board library as I believe newer versions don't support the BLE libraries in this project.

.setName for Bluetooth service seems picky

In main routine, if I have the following, Zwift works fine: Bluefruit.setName("K");

However, if I put Bluefruit.setName("KbikeBLE"); in there, the cadence part seems to work fine and lists the service as KbikeBLE, however, the Power Source connection in Zwift show the service as K36. It does connect, but immediately I get a No Signal alert on that service. Speed shows up but Power does not. I didn't pick up the latest release that allow FTMS to be disabled but I believe I have FTMS disabled on my own.
I guess I must have something messed up as I sense that other folks have this working without a problem.

Stuck on log screen when FTMS enabled

I would like to try BitGym which I believe requires FTMS. When I enable FTMS by uncommenting #define PROVIDE_FTMS in options.h, it freezes on the log screen during startup.
IMG_5676

Parts List

I'm a fellow M3 bike user and have been looking for this exact solution for my bike to be able to connect via bluetooth with fitness apps.

I'm new to coding and these kind of DIY projects in general and I thought this was a good real world project to dive into but I'm struggling a little to know which components are necessary and compatible for this project.

I was wondering if you could post a list of the exact Arduino board, display, and other parts for this project that you are using?

Sorry if this isn't the correct forum to ask this, I'm new to Github as well.

I think what you have done is pretty awesome and appreciate you sharing it.

Buying you a coffee

Hello Alan,

How can we buy you a coffee to thank you for developing this.

Photos of hardware connection

Thanks for this awesome project. It would be awesome if you could include or link to photos and instructions for the hardware connection on the M3. I don't have an M3 yet so I want to know what's involved with this before I make the purchase.

Connecting the M3 computer and the Feather at once

Hi - Not sure if you considered this or not. Do you think it's possible to simultaneously connect both the M3 computer and the KBikeBLE? I split the cable to each device. When I do that, everything seems to work except there is no voltage on the resistance pin. I've tried several combinations of pullup and pulldown resisors, with no luck. (very, very newbie here).

Any ideas?

This software and build is really cool! Thank you for sharing it!

Featherwing OLED boot loop

Hi,

Thanks for this awesome project!

I went ahead and purchased the Adafruit feather and featherwing OLED 128X64 as mentioned in HOWTO.md. There is very little information available regarding using the 128X64 SH1107 OLED with U8G2 and I am struggling.

I have altered the U8G2 constructor from:
U8G2_SH1106_128X64_NONAME_F_HW_I2C display(U8G2_R1, /* reset=*/U8X8_PIN_NONE);
to:
U8G2_SH1107_64X128_F_HW_I2C display(U8G2_R0, U8X8_PIN_NONE);

Without the display plugged in, it works as expected BLE etc. When I plug the display in, as soon as the display shows "KBikeBLE" followed by the version, the feather reboots? in a loop: Boot with USB

I am not really sure where to start debugging. I tested the display using the code on this page and it works fine so no issues with the hardware.

Any help much appreciated.

UPDATE: I was just packing up for the night when I unplugged the USB cable so it was just on battery, now it almost works as expected: Boot on battery

  • Interesting that it boot loops when connected to USB
  • Also interesting that there are those faint horizontal lines

Bluetooth Function only

Hello,

I love your work, unfortunately seems a bit complicated for me.

  1. Is it possible to create a version for us that only add the bluetooth function to the Keiser M3, while keeping the original display please!!?
  2. Does the heart beat sensor work here?

Cheers,
York

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.