DIY mtb telemetry system

alek-91
Posts
42
Joined
3/12/2021
Location
IT
12/20/2021 7:40am
What sort of format are you using for your suspension data? I got my sensor to write to a .csv file but other than simple graphing...
What sort of format are you using for your suspension data? I got my sensor to write to a .csv file but other than simple graphing applications I'm unable to get my data imported to these motorsport data analysis programs such as "Danas" which you're using.
obviously you need to format your file in a way is readable for the software. In the case of Danas you need to specify some "encoding" at the beginning, suche as name of the channel, position , gain and offset, but if you open the dat file given as example you can get out from there.
For others softwares this can be much more difficult cause they can ahve their own encoding of the file or a given strucutre to import it. Which software are you using?
alexkonakov
Posts
3
Joined
11/9/2020
Location
La Canada Flintridge, CA US
1/7/2022 6:27pm
alek-91 wrote:
obviously you need to format your file in a way is readable for the software. In the case of Danas you need to specify some "encoding"...
obviously you need to format your file in a way is readable for the software. In the case of Danas you need to specify some "encoding" at the beginning, suche as name of the channel, position , gain and offset, but if you open the dat file given as example you can get out from there.
For others softwares this can be much more difficult cause they can ahve their own encoding of the file or a given strucutre to import it. Which software are you using?
I didn't have a particular software in mind when I began working, took a look at Danas and a couple other motorsport-oriented software, but am just now getting to the stage where I have the parts to collect and (attempt to) read data.

If you could give some insight with how you formatted the file to play nice with Danas that would be incredibly helpful, still figuring things out for the first time as this is my first proper project and thought this was a cool idea to try implement on my own bike. Smile
nollak
Posts
53
Joined
11/27/2020
Location
DE
1/8/2022 8:30am
I didn't have a particular software in mind when I began working, took a look at Danas and a couple other motorsport-oriented software, but am just...
I didn't have a particular software in mind when I began working, took a look at Danas and a couple other motorsport-oriented software, but am just now getting to the stage where I have the parts to collect and (attempt to) read data.

If you could give some insight with how you formatted the file to play nice with Danas that would be incredibly helpful, still figuring things out for the first time as this is my first proper project and thought this was a cool idea to try implement on my own bike. Smile
If you are not sure which software to use perhaps a format choosen on the basis of ease of implementation for the data collection would be nice. If timestamps and data are available a simple python script to reformat the data shouldn't be the big problem.
alek-91
Posts
42
Joined
3/12/2021
Location
IT
1/12/2022 2:10am Edited Date/Time 1/12/2022 2:11am
This is the matlab code that i use to convert data to the software format.

% INSERT CHANNELS PARAMETERS
simfile = 'data_20210712_16_30_47.dat';
an1_min = 0; an1_max = 1023;
an2_min = 0; an2_max = 1023;
an3_min = 0; an3_max = 1023;
an4_min = 0; an4_max = 1023;
an5_min = 0; an5_max = 1023;
an6_min = 0; an6_max = 1023;
an7_min = 0; an7_max = 1023;
an8_min = 0; an8_max = 1023;
fwh_circ = 1951; z_spkFF = 16; z_spkFR = 45; rwh_circ = 1980;
z_spkRF = 1; z_spkRR = 1;
gear1 = 26.6; gear2 = 32; gear3 = 40; gear4 = 53.3; gear5 = 80; gear6 = 160;

fid=fopen(simfile,'w');
fprintf(fid,'$NEW SESSION\n'); fprintf(fid,sprintf('$SETTINGS,xSuspR,%1.3f,%1.3f,xSuspF,%1.3f,%1.3f,vSuspF,%1.3f,%1.3f,vSuspR,%1.3f,%1.3f,... ANALOG4,%1.3f,%1.3f,ANALOG5,%1.3f,%1.3f,ANALOG6,%1.3f,%1.3f,ANALOG7,%1.3f,%1.3f,%1.0f,%1.0f,%1.0f, %1.0f,%1.0f,%1.0f,%1.3f,%1.3f,%1.3f,%1.3f,%1.3f,%1.3f,%1.0f\n' ,... an1_min,an1_max,an2_min,an2_max,an3_min,an3_max,an4_min,an4_max,an5_min,an5_max,an6_min,an6_max,an7_min,an7_max,an8_min,an8_max,fwh_circ,z_spkFF,z_spkFR,rwh_circ,z_spkRF,z_spkRR,gear1,gear2,gear3,gear4,gear5,gear6,22));
fprintf(fid,'$DATE,0708114\n');
fprintf(fid,'$SESSION_COLOR,142159034\n');
y_new1 = zeros(1,length(xSuspF)); y_new2 = zeros(1,length(xSuspF)); xSuspR = zeros(1,length(xSuspF));
%GPS WRITING
for j = 1:length(time_1hz) fprintf(fid,sprintf('$GPS,%1.0f,A,%1.4f,N,%1.4f,W,%1.2f,%1.2f,\n',time_1hz(j)*100+4752312,LatLon(j,2)*100,...
LatLon(j,1)*100,Velocity(j),counter(j)));
end
%SUSPENSION WRITING
for i=1:length(xSuspF); fprintf(fid,sprintf('$VALUE,%1.0f,%1.0f,%1.0f,%1.0f,%1.0f,%1.0f,%1.1f,%1.1f,%1.1f,%1.1f,%1.1f,%1.1f,%1.1f,%1.1f\n' ,... times(i)*100+4752312,xSuspF(i),xSuspR(i),xSuspR(i),xSuspR(i),xSuspR(i),xSuspF(i),... xSuspF(i),xSuspR(i),xSuspF(i),xSuspR(i),xSuspF(i),xSuspR(i),xSuspF(i))); end for y = 1:length(RI) fprintf(fid,sprintf('$IR,%1.0f,\n',Time(RI(y))*100+4752312));
end
fclose(fid);

1
Primoz
Posts
2611
Joined
8/1/2009
Location
SI
8/4/2022 4:56am
Are there any updates with the DIY kit?
AlexG
Posts
3
Joined
8/4/2022
Location
MY
8/4/2022 7:19pm Edited Date/Time 8/4/2022 8:36pm
I have just stumbled on this thread.... I also had a lockdown project of creating a suspension telemetry system. I used a slightly different approach. I used 2 units each containing a MEMS accelerometer connected to a micro controller (image below of the 2 units). One mounted at the handlebars and one mounted on the brake calliper. I then logged all the data wirelessly at about 1000Hz to an Android phone.

All the challenges highlighted on this thread are the ones which have tripped me up on the way, achieving the data rate, synchronisation of the 3 clocks and then converting the acceleration data into velocity and displacement to a reasonable level of accuracy (I managed to achieve a maximum calculation error of 0.075% displacement for a unit). I have recently got to the point where I am ready to start logging real riding and analysing the data. I have also just had a baby, so the project has been on the back burner, but this thread has given me some ideas and a renewed desire to move it forward!

Alek - If there is anything in the above description which sounds like it could be useful for you, reach out and I can share some code or details of hardware.



2
nollak
Posts
53
Joined
11/27/2020
Location
DE
8/4/2022 11:16pm
AlexG wrote:
I have just stumbled on this thread.... I also had a lockdown project of creating a suspension telemetry system. I used a slightly different approach. I...
I have just stumbled on this thread.... I also had a lockdown project of creating a suspension telemetry system. I used a slightly different approach. I used 2 units each containing a MEMS accelerometer connected to a micro controller (image below of the 2 units). One mounted at the handlebars and one mounted on the brake calliper. I then logged all the data wirelessly at about 1000Hz to an Android phone.

All the challenges highlighted on this thread are the ones which have tripped me up on the way, achieving the data rate, synchronisation of the 3 clocks and then converting the acceleration data into velocity and displacement to a reasonable level of accuracy (I managed to achieve a maximum calculation error of 0.075% displacement for a unit). I have recently got to the point where I am ready to start logging real riding and analysing the data. I have also just had a baby, so the project has been on the back burner, but this thread has given me some ideas and a renewed desire to move it forward!

Alek - If there is anything in the above description which sounds like it could be useful for you, reach out and I can share some code or details of hardware.



I like the idea! I was thinking about the possibility of doing that with mems sensors some time ago!

Can you share some more information? At least which hardware it is based upon?
Primoz
Posts
2611
Joined
8/1/2009
Location
SI
8/5/2022 12:48am
0,075 % accuracy sounds like very good, but using accelerometers to, at the end of the day, measure travel of the suspension might not be the ideal way to go. Easy to assemble on the bike, but any weirdness in the data can cause much weirder results on the travel side.

It's true that differentiation accumulates the errors (deriving the velocities and accelerations from travel will make the results even more wrong than integrating them from acceleration), but the main issue is, like I mentioned, that we are interested in the travel at the end of the day. So you are going from directly measuring it (with a linear pot or something similar) to integrating it from the acceleration. Besides the synchronisation issues you mentioned.

I think it's not a coincidence all the commercial systems use a linear travel sensor.

My 2 cents of course. Could your platform be adapted to read a linear sensor as well?
AlexG
Posts
3
Joined
8/4/2022
Location
MY
8/5/2022 1:22am
AlexG wrote:
I have just stumbled on this thread.... I also had a lockdown project of creating a suspension telemetry system. I used a slightly different approach. I...
I have just stumbled on this thread.... I also had a lockdown project of creating a suspension telemetry system. I used a slightly different approach. I used 2 units each containing a MEMS accelerometer connected to a micro controller (image below of the 2 units). One mounted at the handlebars and one mounted on the brake calliper. I then logged all the data wirelessly at about 1000Hz to an Android phone.

All the challenges highlighted on this thread are the ones which have tripped me up on the way, achieving the data rate, synchronisation of the 3 clocks and then converting the acceleration data into velocity and displacement to a reasonable level of accuracy (I managed to achieve a maximum calculation error of 0.075% displacement for a unit). I have recently got to the point where I am ready to start logging real riding and analysing the data. I have also just had a baby, so the project has been on the back burner, but this thread has given me some ideas and a renewed desire to move it forward!

Alek - If there is anything in the above description which sounds like it could be useful for you, reach out and I can share some code or details of hardware.



nollak wrote:
I like the idea! I was thinking about the possibility of doing that with mems sensors some time ago! Can you share some more information? At...
I like the idea! I was thinking about the possibility of doing that with mems sensors some time ago!

Can you share some more information? At least which hardware it is based upon?
Sure, I use a ESP32 and an ADXL357 accelerometer - I have gone through a lot of hardware to get to this choice. I just use a standard smart phone for the data acquisition/analysis side of things, seems to be man enough for the job.
1
AlexG
Posts
3
Joined
8/4/2022
Location
MY
8/5/2022 3:42am
Primoz wrote:
0,075 % accuracy sounds like very good, but using accelerometers to, at the end of the day, measure travel of the suspension might not be the...
0,075 % accuracy sounds like very good, but using accelerometers to, at the end of the day, measure travel of the suspension might not be the ideal way to go. Easy to assemble on the bike, but any weirdness in the data can cause much weirder results on the travel side.

It's true that differentiation accumulates the errors (deriving the velocities and accelerations from travel will make the results even more wrong than integrating them from acceleration), but the main issue is, like I mentioned, that we are interested in the travel at the end of the day. So you are going from directly measuring it (with a linear pot or something similar) to integrating it from the acceleration. Besides the synchronisation issues you mentioned.

I think it's not a coincidence all the commercial systems use a linear travel sensor.

My 2 cents of course. Could your platform be adapted to read a linear sensor as well?
The reason I chose MEMS accelerometers was because they are cheap and widely available, and telemetry systems using displacement sensors already exist, things like MotionIQ. What I wanted to develop was something a little different to what is currently available, would be easy to package, would be cheaper, and the system could be scaled to be simplified and reduced in complexity. The downside to using MEMS is they require more computation/data processing to get good data from. The end game is to use this system I am currently working on as a stepping stone to developing a simpler single unit system.

It could use a displacement sensor, and the wireless data acquisition/synchronisation parts of the code/hardware would be useful for that. But for the time being I will probably stick with accelerometers and maybe use a displacement sensor for verification.
1
alek-91
Posts
42
Joined
3/12/2021
Location
IT
12/1/2022 6:10am
AlexG wrote:
I have just stumbled on this thread.... I also had a lockdown project of creating a suspension telemetry system. I used a slightly different approach. I...
I have just stumbled on this thread.... I also had a lockdown project of creating a suspension telemetry system. I used a slightly different approach. I used 2 units each containing a MEMS accelerometer connected to a micro controller (image below of the 2 units). One mounted at the handlebars and one mounted on the brake calliper. I then logged all the data wirelessly at about 1000Hz to an Android phone.

All the challenges highlighted on this thread are the ones which have tripped me up on the way, achieving the data rate, synchronisation of the 3 clocks and then converting the acceleration data into velocity and displacement to a reasonable level of accuracy (I managed to achieve a maximum calculation error of 0.075% displacement for a unit). I have recently got to the point where I am ready to start logging real riding and analysing the data. I have also just had a baby, so the project has been on the back burner, but this thread has given me some ideas and a renewed desire to move it forward!

Alek - If there is anything in the above description which sounds like it could be useful for you, reach out and I can share some code or details of hardware.



Sorry to not answer for very long time, but i was not hecking this post anymore. I am using the device time to time with the bicycle and also with the motorbike, but unfortunately with the second one is much less reliable due to vibration problems.
I am very interested in you logging with the phone, in particular how you communicate / store the data from accelerometer to the phone, cause i had several problem with bluetooth communication (mainly cause i am not so good in writing the app for the phone). 
Feel free to write me a private message  so we can exchange some mails.

 

2/19/2023 5:43pm

Hey Folks, 

I too have begun working on a version of this project. I went with a Sparkfun Openlog Artemis as a brain. This has the benefit of coming with some open-source logging firmware out of the box. I'd like to move towards something like the nrf52840 eventually, to take advantage of Bluetooth functionality as alek-91 mentioned. So far, I'm using two ICM20948 IMUs and two  VL53L1X Lidar sensors. 

image-20230219173834-1

image-20230219173850-2

image-20230219173858-3

I haven't gotten a GPS wired in yet, but looking to do that next. I'm looking to add steering angle and bike pose to the mix, alongside suspension.

Here are a few of my datalogs:

image-20230219174240-4

image-20230219174318-5

So far I've just viewed and edited my logs in excel, but I'm very interested to try the Danas software. 

@alek-91, do you happen to have any files in the format Danas needs? I'd like to take a look and see if I can convert my data. 

 

Thanks!

Devin

3
Big Bird
Posts
2020
Joined
2/1/2011
Location
Oceano, CA US
2/19/2023 9:12pm

Great job reviving the thread. Onwards!

2
nollak
Posts
53
Joined
11/27/2020
Location
DE
2/22/2023 2:46am

Next one trying to revive this thread.

 

I still need to build holdes to attach the potentiometers to the bike but that should be done during the next couple of days.

1E580DFF-A0BE-463F-AA27-3526A9C27B47

Currently only reading the potentiometer data and GPS.

Everything is running on a RasPi Pico with uSD card adapter and ublox GPS module.
Currently working on downloading the data via wifi.

 

5
alek-91
Posts
42
Joined
3/12/2021
Location
IT
3/3/2023 8:20am
Hey Folks,  I too have begun working on a version of this project. I went with a Sparkfun Openlog Artemis as a brain. This has the...

Hey Folks, 

I too have begun working on a version of this project. I went with a Sparkfun Openlog Artemis as a brain. This has the benefit of coming with some open-source logging firmware out of the box. I'd like to move towards something like the nrf52840 eventually, to take advantage of Bluetooth functionality as alek-91 mentioned. So far, I'm using two ICM20948 IMUs and two  VL53L1X Lidar sensors. 

image-20230219173834-1

image-20230219173850-2

image-20230219173858-3

I haven't gotten a GPS wired in yet, but looking to do that next. I'm looking to add steering angle and bike pose to the mix, alongside suspension.

Here are a few of my datalogs:

image-20230219174240-4

image-20230219174318-5

So far I've just viewed and edited my logs in excel, but I'm very interested to try the Danas software. 

@alek-91, do you happen to have any files in the format Danas needs? I'd like to take a look and see if I can convert my data. 

 

Thanks!

Devin

Hey Devin, in the post where there is the amtlab script you basically have all the info to convert to final file. You just need to save everyting in .dat file. If you want to have an example file you can download form i2m website.

I need to say that now there are a lot of user friendly webapp or customable dashboard to look at the data than a specific software is not needed anymore. Take a look at tableau or powerbi. You can use the free version for personal use.

I am working less on this project. My objective is to run everything wireless with bluetooth but require much more time (and money) than before, so everything is proceeding slowly

alek-91
Posts
42
Joined
3/12/2021
Location
IT
3/3/2023 8:21am
nollak wrote:
Next one trying to revive this thread.   I still need to build holdes to attach the potentiometers to the bike but that should be done...

Next one trying to revive this thread.

 

I still need to build holdes to attach the potentiometers to the bike but that should be done during the next couple of days.

1E580DFF-A0BE-463F-AA27-3526A9C27B47

Currently only reading the potentiometer data and GPS.

Everything is running on a RasPi Pico with uSD card adapter and ublox GPS module.
Currently working on downloading the data via wifi.

 

Nice to see someone that is working on the same stuff... Sharing information is always useful. If you arrange how to download data via Wifi it will eb awesome cause than you can customize a proper app on the phone.

3
nollak
Posts
53
Joined
11/27/2020
Location
DE
3/5/2023 5:59am
nollak wrote:
Next one trying to revive this thread.   I still need to build holdes to attach the potentiometers to the bike but that should be done...

Next one trying to revive this thread.

 

I still need to build holdes to attach the potentiometers to the bike but that should be done during the next couple of days.

1E580DFF-A0BE-463F-AA27-3526A9C27B47

Currently only reading the potentiometer data and GPS.

Everything is running on a RasPi Pico with uSD card adapter and ublox GPS module.
Currently working on downloading the data via wifi.

 

alek-91 wrote:
Nice to see someone that is working on the same stuff... Sharing information is always useful. If you arrange how to download data via Wifi it...

Nice to see someone that is working on the same stuff... Sharing information is always useful. If you arrange how to download data via Wifi it will eb awesome cause than you can customize a proper app on the phone.

Yeah, currently I am running into problems with Wifi. After the SDK update the initialization of the Wifi Chip on the RPi Pico seems to crash. Don't know why but I think there will be a fix for this.

Although the progess will slow down as I started a new job at the beginning of march and currently there are a lot of different things I need to get my head around.

 

Source Code and documentation can be found here if anybody is interested. 

https://github.com/n0ll4k/bahama-mama-telemetry

Ideas/Critic/etc. is highly appreciated.

2
nollak
Posts
53
Joined
11/27/2020
Location
DE
5/22/2023 11:09am

Yeah that is a pretty complete system.

Found that guys repo on Github while doing some research and starting my project.

Mine is unfortunately a bit delayed as I started a new job and have been quite busy. I tried measuring some data on the weekend but ran into issues with my front sensor.

1
5/23/2023 1:19pm
dolface wrote:

This guy has a working system, posting here for wider exposure: https://www.mtbr.com/threads/sufni-suspensiont-telemetry-an-open-source…

Yeah that system is super tidy! I came across that last year sometime and hes made some nice progress since then. I really like the dashboard layout he's used - its nice and clean with stacks of info available at a glance without getting messy. The rotary encoders are a great idea - especially at the back end, but also a novel way to do the fork. Linear pots are at the wrong end of the price vs durability scale so its cool to see some alternatives being tested

2

Post a reply to: DIY mtb telemetry system

The Latest