ajs123 / kbikeble Goto Github PK
View Code? Open in Web Editor NEWArduino-based replacement computer for a Keiser M3 spin bike, with industry-standard Bluetooth services and simple display
Arduino-based replacement computer for a Keiser M3 spin bike, with industry-standard Bluetooth services and simple display
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.
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
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.
I modelled a calibration tool for those with 3D printers. Dimensions taken from a genuine Keiser tool. Model available here:
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.
If setting #define GEAR_DISPLAY false in options.h, on startup the label GEAR rather than RES % is used. Toggles correctly when moving resistance lever to the top.
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.
I am having trouble to connect to zwift on ipad. Can connect to the power via bluetooth but when click on cadence it found nothing.
Hello Alan,
How can we buy you a coffee to thank you for developing this.
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.
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!
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
Hello,
I love your work, unfortunately seems a bit complicated for me.
Cheers,
York
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.