FSIO ported from old wiki and cleaned up a little. (#65)
* Fix for Home page and future features page added * Update Acceleration_Compensation.md * Update Fuel_Overview.md * More fuel info * More X-tau * Ongoing Tasks list Free for all list for people to update as they change track * Update Ongoing_Tasks * Hidden names on pages and multi-spark page * Update X-tau_Wall_Wetting.md * Update * Update AlphaN.md * Update Speed_Density.md * Fuel control overview improvement, added wide band page * Update Wide_Band_Sensors.md * Update Fuel_Overview.md * Update MAF.md * Update MAF.md * Update rusEFI_console_directory.png * Delete rusEFI_console_directory.png * Delete wall_wetting.md * Fuel Index + Formats Also old wall wetting page kill * Update Pages_Fuel.md * Update Pages_Fuel.md * Create Pages_Hardware.md * Update Pages_Hardware.md * Sensor and Actuators index * Start of Ignition Index * Create Fuel_Injectors.md * Moved file * Added PNP72 jumper info * More updates + Software pages * Update MREAdapter72.md * Create Roadmap_Fuel.md * Created Kit Instruction link * Dev_Hardware_Guidelines * Images and links update * Update Dev_Hardware_Guidelines.md * Update Dev_Hardware_Guidelines.md * Update .gitignore * Ignition FAQ and start of what we cannot do * found by **Serching the forum** update * Searching at top of side bar * Photo fixes * Create Vault_Of_Ignition_Parts.md * Update Pages_Ignition.md * Update FAQ_Ignition.md * D is for DISTRACTION * high-speed * high-speed * Updated Vault_Of_Ignition_Parts (markdown) * stuff * Added Pages_FAQ_and_HOWTO * Update Dev_Status.md * Created Useful-Linux-Commands (markdown) * Updated Useful Linux Commands (markdown) * Updated Useful Linux Commands (markdown) * Updated Useful Linux Commands (markdown) * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * #60 * Update Dev_Status.md * Update Dev_Status.md * Updated do_i_need_wideband_oxygen_sensor (markdown) * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * Update Dev_Status.md * docs * Stefan says 12v not 5v * 5A recommendation * Updated Home (markdown) * FSIO Co-authored-by: rusefi <rusefillc@gmail.com> Co-authored-by: rusefi <rusefi@users.noreply.github.com>
This commit is contained in:
parent
b65d7eb936
commit
0e800396e7
|
@ -2,6 +2,8 @@
|
|||
|
||||
## Wiring
|
||||
|
||||
ETB could easily consume 5A of current. A larger wall power supply would provide that while smaller 2A-3A units would not be enough.
|
||||
|
||||
TODO
|
||||
|
||||
## Calibrate Sensors
|
||||
|
|
245
FSIO.md
245
FSIO.md
|
@ -1,3 +1,20 @@
|
|||
# FSIO
|
||||
|
||||
The content below is from 2018 and is in the process of being updated.
|
||||
|
||||
Flexible Logic is the fanciest-schmanciest feature of rusEfi.
|
||||
|
||||
For FSIO, rusEfi console provides a better user experience due to automated human to RPN conversion.
|
||||
|
||||
Flexible Logic allows advanced users to get unprecedented level of configurability for custom outputs and engine control. rusEfi supports up to 16 flexible outputs, each of these could be either an on/off or PWM signal. In case of a PWM signal the frequency is defined in the configuration and the duty cycle is dynamically controlled by the evaluated expression.
|
||||
|
||||
---
|
||||
|
||||
# RPN notation
|
||||
|
||||
At the moment FSIO uses Reverse Polish Notation for technical reasons, so you would need to convert human-readable popular Infix notation to RPN using relevant rusEfi console features.
|
||||
|
||||
|
||||

|
||||
|
||||
rusEFI console now has build-in decoder of RPN form, for example:
|
||||
|
@ -13,6 +30,232 @@ and
|
|||
|
||||
It would show a filing to parse message with a list of some known functions.
|
||||
|
||||
---
|
||||
|
||||
## Rev limit logic
|
||||
|
||||

|
||||
|
||||
FSIO setting 6 has been configured for an adjustable RPM limiter, this can be configured as shown above, the first number (2000) is the limit that will be active when the signal is on, the second (7000) is the standard limiter when the switch is deactivated.
|
||||
|
||||
---
|
||||
|
||||
# See [legacy wiki](https://rusefi.com/wiki/index.php?title=Manual:Flexible_Logic) content below.
|
||||
|
||||
Fuel pump is already using this mechanism - see https://github.com/rusefi/rusefi/blob/master/firmware/controllers/system_fsio.txt
|
||||
|
||||
Here are some commands to try:
|
||||
|
||||
eval "2 + 3"
|
||||
|
||||
Prints the result of "2 + 3"
|
||||
|
||||
|
||||
See [legacy wiki](https://rusefi.com/wiki/index.php?title=Manual:Flexible_Logic)
|
||||
eval "max (rpm, 100)"
|
||||
|
||||
Prints the result of "max(100, rpm)"
|
||||
|
||||
|
||||
eval "if(1, 200, 100)"
|
||||
|
||||
Prints the result of "if(1, 200, 100)"
|
||||
|
||||
|
||||
set_fsio_expression 1 "rpm > fsio_setting(4)"
|
||||
|
||||
Turn output #1 hi if rpm is greater than fsio setting #4
|
||||
|
||||
|
||||
set_fsio_output_pin 1 pd11
|
||||
|
||||
Tells output #1 to use pin PD11
|
||||
|
||||
|
||||
See https://github.com/rusefi/rusefi/blob/master/firmware/controllers/core/fsio_impl.cpp for list of available methods
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Contents
|
||||
1 [More Examples](##More-Examples)
|
||||
2 [FSIO parameters](##FSIO-parameters)
|
||||
3 [FSIO digital inputs](##FSIO-digital-inputs)
|
||||
4 [FSIO analog inputs](##FSIO-analog-inputs)
|
||||
5 [Case study #1: shift light](##Case-study-#1:-shift-light)
|
||||
6 [Case study #2: A/C compressor control](##Case-study-#2:-A/C-compressor-control)
|
||||
7 [Case study #3: digital inputs for extra devices](##Case-study-#3:-digital-inputs-for-extra-devices)
|
||||
8 [Case study #4: boost controller](##Case-study-#4:-boost-controller)
|
||||
9 [Case study #5: solenoid exhaust cam actuator](##Case-study-#5:-solenoid-exhaust-cam-actuator)
|
||||
10 [See aslo](##See-aslo)
|
||||
11 [Pin naming usability issue](##Pin-naming-usability-issue)
|
||||
|
||||
---
|
||||
|
||||
## More Examples
|
||||
set_fsio_output_frequency 1 100
|
||||
|
||||
Tells FSIO channel #1 to output 100Hz PWM
|
||||
|
||||
|
||||
set_fsio_output_frequency 1 0
|
||||
|
||||
|
||||
Now, let's assume we want duty cycle to be 10% if rpm is below 1000, 90% if rpm is above 5000, and have it grow linearly from 10% to 90% between 1000 rpm and 5000 rpm. The human-readable expression for that would be
|
||||
|
||||
min(0.9, max(0.1, (rpm - 1000) / 4000 * 0.8))
|
||||
|
||||
|
||||
We can use
|
||||
|
||||
eval "min(0.9, max(0.1, (rpm - 1000) / 4000 * 0.8))"
|
||||
|
||||
to validate and then
|
||||
|
||||
set_fsio_expression 1 "min(0.9, max(0.1, (rpm - 1000) / 4000 * 0.8))"
|
||||
|
||||
|
||||
Another version of the same logic would be
|
||||
|
||||
|
||||
if (rpm < 1000, 0.1, if (rpm > 5000, 0.9, 0.1 + (rpm - 1000) / 4000 * 0.8))
|
||||
|
||||
TODO
|
||||
|
||||
---
|
||||
|
||||
## FSIO parameters
|
||||
FSIO expressions could be customized using 16 user-defined 'settings' which are stored within the configuration. To change a setting from dev console your command is set_fsio_setting INDEX VAlUE
|
||||
|
||||
To access for example setting #3 your FSIO expression is
|
||||
|
||||
fsio_setting(3)
|
||||
|
||||
---
|
||||
|
||||
## FSIO digital inputs
|
||||
These feature allows you to pull toggle switches state from your fsio expressions.
|
||||
|
||||
work in progress
|
||||
|
||||
---
|
||||
|
||||
## FSIO analog inputs
|
||||
As of Aug 1, 2018 only one analog input is implemented:
|
||||
|
||||
rpn_eval "fsio_analog_input 0" or set_fsio_expression 0 "((rpm > fsio_setting(4) & (fsio_analog_input 0 < fsio_setting(5)) | rpm > fsio_setting(1) | (coolant > fsio_setting(2) > | (vbatt < fsio_setting(3)"
|
||||
|
||||
where input would be assigned via FSIO analog input #1
|
||||
|
||||
---
|
||||
|
||||
## Case study #1: shift light
|
||||
We want to turn on a warning light if RPM is above 4500
|
||||
|
||||
In order to set an output, three commands have to be invoked, also user has to decide which FSIO unit between 1 and 16 to use. Separate commands are used to set duty cycle, output pin, and condition. All three commands referencing the same FSIO index. This is poor usability and one day someone would improve this somehow.
|
||||
|
||||
First we need to configure user output, let's use pin PE5 and index #3 for this example:
|
||||
|
||||
set_fsio_output_frequency 3 0
|
||||
|
||||
this would disable PWM on channel #3 and set this port to simple digital output mode
|
||||
|
||||
set_fsio_output_pin 3 PE5
|
||||
|
||||
Now we will set FSIO expression to control this output pin:
|
||||
|
||||
set_fsio_expression 3 "rpm > 4500"
|
||||
|
||||
here 3 is the index of the output pin
|
||||
|
||||
A configurable version of same would be
|
||||
|
||||
set_fsio_expression 3 "rpm > fsio_setting(3)"
|
||||
|
||||
set_fsio_setting 3 4500
|
||||
|
||||
---
|
||||
|
||||
## Case study #2: A/C compressor control
|
||||
Say we want to use PE0 as A/C toggle button, and we want A/C compressor logic to be 'if (rpm > 1200 AND A/C button is depressed) then output 200Hz @ 80% duty cycle on PB1 else output nothing on PB1'.
|
||||
|
||||
First we need to configure A/C button input pin which is currently implemented as analog input (that's a temporary hack) - see engineConfiguration->acSwitchAdc
|
||||
|
||||
set_fsio_output_pin 3 PB1
|
||||
|
||||
Configure output #3 to use pin PB1
|
||||
|
||||
set_fsio_output_frequency 3 200
|
||||
|
||||
Configure output #3 to use 200Hz PWM
|
||||
|
||||
And finally set the expression:
|
||||
|
||||
'set_fsio_expression 3 "0 80 rpm 1200 > ac_on_switch AND IF"'
|
||||
|
||||
Which is RPN for if(rpm > 1200 AND ac_on_switch, 80, 0)
|
||||
|
||||
---
|
||||
|
||||
## Case study #3: digital inputs for extra devices
|
||||
TODO
|
||||
|
||||
|
||||
First we need to configure A/C digital input pin, we will use index 0:
|
||||
|
||||
set_fsio_input_pin 0 PE0
|
||||
|
||||
---
|
||||
|
||||
## Case study #4: boost controller
|
||||
Solenoid-controlled boost controller would need variable duty cycle.
|
||||
|
||||
For example, let's use fsio table #3 to define the desired duty cycle:
|
||||
|
||||

|
||||
|
||||
|
||||
Let's set PE11@300Hz as FSIO output #4
|
||||
|
||||

|
||||
|
||||
And now the tricky part, let's set FSIO expression on that output using the following command
|
||||
|
||||
set_fsio_expression 4 "rpm map 3 fsio_table 100 /"
|
||||
|
||||
Do not forget writeconfig
|
||||
|
||||
|
||||
fsioinfo could be used to monitor output value
|
||||
|
||||

|
||||
|
||||
|
||||
As for the magic expression, that's RPN for "fsio_table (3, rpm, map) / 100".
|
||||
|
||||
---
|
||||
|
||||
## Case study #5: solenoid exhaust cam actuator
|
||||
Let's assume we want to turn on 200Hz solenoid at 80% duty cycle if RPM is above 6000.
|
||||
|
||||
Here is how this would look in Tuner Studio:
|
||||
|
||||
That's RPN notation for "(rpm > 6000) * 0.8"
|
||||
|
||||
See https://github.com/rusefi/rusefi/blob/master/firmware/controllers/system_fsio.txt see https://github.com/rusefi/rusefi/blob/master/firmware/controllers/system_fsio.h
|
||||
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## See aslo
|
||||
set debug_mode 23 https://rusefi.com//wiki/index.php?title=Manual:Debug_fields
|
||||
|
||||
https://www.youtube.com/watch?v=nrIrtdn-Nc0
|
||||
|
||||
https://www.youtube.com/watch?v=eA4clVtklZ8
|
||||
|
||||
---
|
||||
|
||||
## Pin naming usability issue
|
||||
We have a usability feature with microRusEfi where stm32 pin names are hidden from users. Unfortunately for FSIO these smt32 pin names are needed. Those are visible in https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/microrusefi/mapping.yaml
|
2
Home.md
2
Home.md
|
@ -1,6 +1,6 @@
|
|||
### Click on the image below for the latest builds and downloads!
|
||||
|
||||
[](https://github.com/rusefi/rusefi_documentation/wiki/Download)
|
||||
[](https://github.com/rusefi/rusefi/wiki/Download)
|
||||
|
||||
Hello and welcome!
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 243 KiB |
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
|
@ -1,4 +1,5 @@
|
|||
|
||||
High-side jumper should be set for +12v.
|
||||
|
||||
Created for 1989-1995 Mazda Miata NA6 and early NA8. Would also work on Mazda Protege, Ford Festiva, Ford Escort GT and probably other relted vehicles.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Mazda Miata MX5 NB2 2001-2005 Standalone
|
|||
|
||||
[microRusEFI](Hardware_microRusEfi) should be set for Hall
|
||||
|
||||
High-side jumper should be set for +12v
|
||||
High-side jumper should be set for +12v.
|
||||
|
||||
[Some versions of Miata may need a jumper set on the board, See detail here](PNP_72_Jumpers)
|
||||
|
||||
|
|
Loading…
Reference in New Issue