spare adc dot

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

Post Reply
apex
MS/Extra Newbie
Posts: 6
Joined: Fri Feb 01, 2013 12:27 pm

spare adc dot

Post by apex »

I would like to use the spare acd 6 for my front shock position. I can do that but i would like to have the DOT position . How i can do that.

Thank
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: spare adc dot

Post by LT401Vette »

It really depends on your MS version and firmware version.
If your firmware supports bring the adc 6 value to TunerStudio in any form, you can transform it into a meaningful value with a custom.ini
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
apex
MS/Extra Newbie
Posts: 6
Joined: Fri Feb 01, 2013 12:27 pm

Re: spare adc dot

Post by apex »

I use the ms2 extra 3.2.1 firware. Now, i use the spare adc6 for my shock position (0 inche to 4 inches). But i don't know the code and syntax for convert in positionDot. I'm not a programmer !!!!

Thank
smokeysevin
Experienced MS/Extra'er
Posts: 349
Joined: Mon Nov 07, 2011 8:14 pm

Re: spare adc dot

Post by smokeysevin »

I have no input but shock position is a cool function to log.

Sean
2005 Kawasaki STX-15f Jetski
1498cc I-4
12.5:1 CR
46mm throttle bodies
ported head
Ferrea valves
38# injectors
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: spare adc dot

Post by LT401Vette »

So what would you like to convert the output into?
What normally comes from ADC6 is an ADC, 0-1023 10 bit value representing 0-5v.
I a custom.ini file you can turn that int pretty much anything it needs to be as a real world number, but you do need to know what the conversion is.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

Re: spare adc dot

Post by pit_celica »

As I understand it, the OP already has a sensor connected to ADC6 that is giving the stroke of the front shock from 0 to 4 in. He now wants the derivate over time of this signal. It's maybe not the good syntax, but here's the idea taht can be done in MLV :

strokeDOT = (stroke - (stroke-1))/(time-(time-1))

This will give a variable in "in/s" (assuming the ADC6 is already converted from 0-1023 to 0-4 inch).

Sam
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: spare adc dot

Post by LT401Vette »

Here is the MLV syntax of that for a custom field assuming you have the "stroke" field logged:

Field Name: strokeDOT
Formula: ([stroke] - [stroke-1])/([time]-[time-1])
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
apex
MS/Extra Newbie
Posts: 6
Joined: Fri Feb 01, 2013 12:27 pm

Re: spare adc dot

Post by apex »

Thank you guys for yours answer. Yes, i put a linear sensor to my left front shock. In my custom.ini file, i convert my count with a factor and a offset ( count adc6 x factor - (offset)) = shock position

I create a new gage in tuner studio from my custom.ini file and i add this new data in MLV. The only thing i was not able is to introduce the derivate. :yeah!:

Thank a lot guys.
econ
Helpful MS/Extra'er
Posts: 48
Joined: Wed Feb 20, 2008 11:24 am
Location: Finland, Oulu

Re: spare adc dot

Post by econ »

Hello!
I know this is old post, but anyhow:
I would like to calculate spare adc_dot at Microsquirt ECU (MS2Extra comms340vU ) and send the value to TunerStudio MS over serial communication.
Do I neet to modify and recompile ECU files and what more?

I'm familiar of mathematics of this and have some programming experience, mainly in Python.
- Ford Taunus Duratec 2.5 Turbo MS2Extra
- Suzuki GSX 750 ER Turbo Microsquirt Module based Sequential
- Suzuki GSX R750W 1993 Microsquirt 3
- MB W124 200E MS1Extra
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: spare adc dot

Post by LT401Vette »

You can do all the calcs in your custom.ini or using the Custom Channel Editor in TunerStudio MS Ultra.

adc6 / adc7 will give you the raw 10 bit adc, from there you can do what ever you need in TS.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
econ
Helpful MS/Extra'er
Posts: 48
Joined: Wed Feb 20, 2008 11:24 am
Location: Finland, Oulu

Re: spare adc dot

Post by econ »

I am logging suspension positions with ShadowDash MS.
I can get the channels work using calculation below:

Code: Select all

[GaugeConfigurations]
RearSuspGauge     = rearTravel,      "SuspRear",   "mm",       0,   120,     -1,     1,   110,  115, 0, 0

[OutputChannels]
rearTravel       = { 145.6 - 26502.7/adc7 }    

[Datalog]
entry = rearTravel,      "RearTravel", float,  "%.1f"


But because nonlinearity of the position sensors, I would like to use INC-files instead.
However I cannot get INC-files to work, so what I'm doing wrong here:

Code: Select all

[OutputChannels]
rearTravel       = { table( adc7, 'rearSusp.inc')  }

rearSusp.inc

Code: Select all

; Kirjoitettu WriteINC.py -python-koodilla
0	0.00
2	0.00
.
.
.
184	0.00
186	0.11
188	1.63
190	3.11
192	4.57
194	5.99
196	7.38
198	8.75
200	10.09
202	11.40
204	12.68
206	13.95
208	15.18
210	16.40
212	17.59
214	18.76
216	19.90
218	21.03
.
.
.
1024	116.72
Code is written to mainController.ini file and INC-files are in inc-folder (Edit: written to mainController.ini, not firmware.ini)
- Ford Taunus Duratec 2.5 Turbo MS2Extra
- Suzuki GSX 750 ER Turbo Microsquirt Module based Sequential
- Suzuki GSX R750W 1993 Microsquirt 3
- MB W124 200E MS1Extra
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: spare adc dot

Post by LT401Vette »

It is best to put your ini updates in custom.ini in that same projectCfg folder. That way your stuff stays separate and won't get stompted when you upgrade firmware.

The format of your inc file looks like it should be ok for format 1 if that is a \t between ADC and the value.

Seeing that it looks as though you have all 1024 lookups, you could use format 2 instead and replace the ADC numbers with DB

http://www.tunerstudio.com/index.php/ma ... le-formats
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
econ
Helpful MS/Extra'er
Posts: 48
Joined: Wed Feb 20, 2008 11:24 am
Location: Finland, Oulu

Re: spare adc dot

Post by econ »

I made a custom.ini and channels work now.

Thanks :)
- Ford Taunus Duratec 2.5 Turbo MS2Extra
- Suzuki GSX 750 ER Turbo Microsquirt Module based Sequential
- Suzuki GSX R750W 1993 Microsquirt 3
- MB W124 200E MS1Extra
Post Reply