WouterJD / FortiusANT

FortiusANT enables a pre-smart Tacx trainer (usb- or ANT-connected) to communicate with TrainerRoad, Rouvy or Zwift through ANT or Bluetooth LE.
GNU General Public License v3.0
143 stars 77 forks source link

Adding Cadence Sensor #450

Closed decodeais closed 5 months ago

decodeais commented 6 months ago

I would like to add the Cadence-Sensor into the Fortius-Ant Software. I think it would be nice without the annoying magnet sensor mounting and adjusting. I would like to add an additional input like the Input for the heartrate-Sensor. With this information I can calculate a pulse frequency to send it via optocoupler to the Fortius candence sensor plug. Do you see special problems? I n which program section should I place the pulse Timer? What do you think about it?

WouterJD commented 6 months ago

Unfortunately that is not possible ; the headunit of the Fortius (and likes) use the cadense sensor ITSELF for proper functioning. FortiusAnt cannot change that.

There is no way to send cadense sensor info TO the headunit through USB

WouterJD commented 6 months ago

Creating an external signal to input to the cadense sensor plug is far more complex than the current simple cadense sensor.

I also guess you might be the only one using the implementation

WouterJD commented 6 months ago

Open for comments

decodeais commented 6 months ago

if I read the Cadence from ta BLE-Sensor, make a correct pulse frequency an a Raspi there would be no difference for the Fortius trainer. The needed hardware would be one resistor and one optocoupler ( 20Cent). The only problem would be the Round display for the Pedal torque. I would get a random phase shift in the simulated sensor signals.

WouterJD commented 6 months ago

I understand getting BLE stable is more a challenge than getting the cadense sensor work. It's a very complex way to replace the magnet driven switch, I think.

WouterJD commented 6 months ago

"it would be nice without the annoying magnet sensor mounting and adjusting"

Is that the problem we're trying to solve?

decodeais commented 6 months ago

May be this feature is too special. I implemented this part of software in a "Nano BLE33" . I will test it this week. I am curious how stable it works. So you can close this request if you like.

WouterJD commented 6 months ago

Agree, but always curious to follow results. Please post here or at the pictures page

decodeais commented 6 months ago

IT works! https://www.strava.com/activities/10428981150 The Low Cadence ist quite normal for me. Thats the reason i bought this part to have a Look on it. Here is the little sourcecode. https://github.com/decodeais/FortiusCadenzBLE Many thanks to Chat.GPT. His support was great.

WouterJD commented 6 months ago

Smart solution, independant of FortiusAnt and doing exactly what's needed.

Regarding the code, I prefer using the struct functions to fill buffers. But if it works, great job👍

decodeais commented 6 months ago

The device makes only sense if you use your normal road bike on the trainer. This solution has the advantatage that it also works together with Fortius-Ant running on a PC . At the end the very simple schematic : Bildschirmfoto zu 2023-12-28 12-22-48

WouterJD commented 6 months ago

So you can close this request if you like.

Done