previous page
<<Previous page   ˆˆTop pageˆˆ   This page   Next page>>   Click here for all of the manuals
Megasquirt2_Setting_Up-3.4 page 81

Megasquirt-2 Setting Up

 4:Advanced topics

Offset = 75

4.9.8 Example Settings - other devices

Information request - if you have settings that work with other standard Megasquirt devices, please post on 
the 

www.msextra.com

 forum, so that information can be included here.

4.10 Reading and Datalogging an Additional Sensor

The Megasquirt-2 ECUs typically have two 'spare' ADC (analog) inputs that you can use to read and datalog 
an additional analog sensor. e.g. pressure, temperature. (For reference, the configuration in Megasquirt-3 is 
far simpler.)

4.10.1 Wiring

Refer to the Hardware Manual for your product for details on how to wire in an additional analog sensor. The 
processor requires a 0-5V signal.

4.10.2 TunerStudio custom.ini

The additional sensor signal is converted to a digital number (0-1023) by the Megasquirt-2. To convert that 
raw number into something more meaningful, you need to create or edit a file called "custom.ini" that 
instructs TunerStudio to process that number. You can then display a gauge on your tuning computer and 
record the value in datalogs.

Before you start, make SURE that you turned off the option to "Hide known file extensions" in Windows.

Use a text editor (e.g. Notepad on Windows) and create some custom configuration. The 'custom.ini' file 
uses a kind of programming language. The equations are case sensitive and can silently fail if you get the 
case wrong!

e.g.

The above example reads from the two spare analogue inputs:

adc6 = JS5 / SPAREADC

adc7 = JS4 / SPAREADC2

The variables 'adc6' and 'adc7' are already defined in the main 'ini' file and are equal to the raw ADC count 
from the analogue inputs.

The [OutputChannels] section gives definitions of new variables. Here 'OilTemp' is defined as a table lookup 
from a provided lookup table file "ntcbosch.inc". 'Oilpress' is a linear equation.

The [Datalog] section specifies what additional fields should be added to the datalog.

(c) 2014-9 James Murray

2019-01-11

Page 81/117

<<Previous page   ˆˆTop pageˆˆ   This page   Next page>>   Click here for all of the manuals
previous page