Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Grade Simulator for Indoor Bike Trainer - ANT+ RxScanMode Question

Rank

Total Posts: 16

Joined 2018-10-23

PM

Hi all,

generally I'm facing an challange with how to sniff Data Page 51 (0x33) – Track Resistance which are transmitted via ACKNOWLEDGED DATA (0x4F).

Let me first describe my project idea and come back than to my request again. I would be happy If I find interests here and maybe some help.
Thanks

The goal is to build up by self a Grade Simulator for Indoor Bike Trainer, which reacts automatically onto Grade given by a Bike Simulator Software like Zwift or others.
The idea is inspired by the Wahoo Kickr Climb (https://eu.wahoofitness.com/devices/bike-trainers/kickr-climb-indoor-grade-simulator?stay), but unfortunately it cost round about 500$ and it requires finally a Wahoo Bike Trainer, otherwise you just can manually adjust the grade.


The concept is:
1. Create an software which is sniffing ANT+ Traffic (in detail the grade) from a Bike Trainer Simulation such as Zwift.
2. The specific grade-Value needs now transferred to an mechanism who raise/lower the front of the bike.
I’m having this already get working for less than 100$ of equipment cost, some programming and working skills.
The project could be solved in different ways. Means which programming language is used, which system to raise/lower the front of the bike, how to transmit and sniff data.

Actual State
Actually I’m sniffing the important ANT+-Traffic via AntWare II Software (available via https://www.thisisant.com) out of the generate LogFile.
The sniffed grade data transmitted than to an Arduino Uno Board which is controlling a 12V Linear Actuator.
That’s all!      
Rank

Total Posts: 16

Joined 2018-10-23

PM

Ok, i got it solved! smile

I dived deeper into the ANT+ Documentation especially into the OpenScan Mode.

As the OpenScanMode Demo not worked in Visual Basic I copyed CodeSnipes into the DEMO_DLL from AntLibary.

Finally with getting more in touch with C++, I got it right now working... smile

Now its just more understanding ANT+ and C++ to clean up code and understood what I was doing. wink      
Rank

Total Posts: 2

Joined 2017-09-16

PM

Hi Steffen,

I am just looking at the Grade info. Did you work out what the scale is? It seems to consist of 2 bytes that make up the grade.

I am trying to figure out to convert this back to a gradient.

     
Rank

Total Posts: 16

Joined 2018-10-23

PM

Hi Zaddo,

as written the Grade is send via: Data Page 51 (0x33)

Its quite good described in the: ANT+ Device Profile Fitness Equipment, finally on page 58: 8.8.4

Data Page 51 (0x33) – Track Resistance

> It seems to consist of 2 bytes that make up the grade.

Yes you are right!

> I am trying to figure out to convert this back to a gradient.

This is the part in Script which calculate it back:
// HEX Werte umrechnen in STEIGUNG
int testint1 = int(stMessage.aucData[ucDataOffset + 5]);
int testint2 = int(stMessage.aucData[ucDataOffset + 6]);
float grade = ((testint2 * 256) + testint1) *0.01 - 200;      
Rank

Total Posts: 2

Joined 2019-01-23

PM

Great topic. Excellent answers by experts.      

Signature

Rank

Total Posts: 1

Joined 2018-09-04

PM

Hi Steffen,

Could you provide details on the linear actuator? ie, manufacturer & model, max load, max speed, max travel.

Thanks,

Stu