Modifying fuel pressure signal common rail diesel Aka ArduinoTuningBox

Hi guys im trying to solve a problem i dont have enough knowledge about.

Im fairly new to arduino and programming in general but i do have some experience with arduino. My experience comes from an old BMW with a turbo controlled by speeduino.

But thats not really the topic i need help with. Ive been building a van with a modified engine and now i need more diesel at certain moments in time. Ive been trying to solve this and i have some things going on.

The situation is like this:

The amount of diesel injected is being determined by fuel pressure and the duty cycle of the injectors. Best way to reach what i want is to remap the car but these ECUs are not that easy. Thats why i would like to 'piggyback' the fuel pressure sensor with a ' tuning box'.

The pressure sensor receives ground and 5v from the cars regulated 5v source. i would like to power the arduino from this but i dont think thats going to give problems.

The fuel pressure is being measured in 0-5v (0/4,6 in reality) where 0 = 0 bar and 4,5 about 1600.
This gives a 40 bar increase if i could trim the signal back 0,1V to the ecu. I need to alter the voltage above a certain point and then for safety reasons trim it back to the original value around 4,5V.

Right now i purchased a Arduino Uno R3 and a MCP4725 12bit DAC. I've spent yesterday to try and come up with some code and it seems to work for what i would like to see happening. i can output the incoming voltage minus what I program in the forumula.

Im using a pot meter to simulate the 0/5v signal where blue is the incoming singal and green the modifyed PWM generated signal from the dac.

So put this setup into the signal line and everything is golden? i dont think so i guess the impedance of the circuit is to low so if i place my arduino in between the signal line it will probally burn the in and outputs? The ecu is kinda a black box for me regarding thins like amount of current flowing in the circuit. This is were i need help.

Ive been reading up into op amps to be able to flow more current or is it better to use a digitally controlled potentiometer on the signal line with a feedback to see what te actual voltage going out is?

If things work out and more diesel is injected the next thing woud probally be rescaling and clamping the MAP voltage so the ecu wont go into overboost. But thats another topic and maybe my conrods are already laying on the ground by then.

this is the code i came up with:

#include <Wire.h>
#include <Adafruit_MCP4725.h>
Adafruit_MCP4725 dac;
// Set this value to 9, 8, 7, 6 or 5 to adjust the resolution
#define DAC_RESOLUTION    (9)

int value = 0;
float voltage;
float voltage2;
float state;


void setup(void) {
  Serial.begin(9600);
  Serial.println("MCP4725A1 Test");
  // MCP4725A1 address is 0x62 (default) 
  // MCP4725A1 address is 0x63 (ADDR pin tied to VCC) 
  // MCP4725A1 address is 0x60 (ADDR pin tied to GND) 
  dac.begin(0x60); //I have my ADDR pin connected to GND so address is 0x60
}

void loop(void) {      
  dac.setVoltage((voltage2*4095)/5, false);        //Set voltage to 1V
  delay(0);

value = analogRead(A0);
  voltage = value * 5.0/1023;
  Serial.print("Voltage = ");
   Serial.println(voltage);
  delay(0);

             state = voltage;                           // initial state
   if (value >= 300 && value < 1050)                   // treshold set
             state = voltage - 0.3 +(voltage*0.05);                     // 2nd state / parameters om curve af te stellen


  voltage2 = state;                           
  
  Serial.print("Voltage2 out = ");
  Serial.println(voltage2);
  delay(0);
}

I think this isnt rocket science and some of u probally have the answer im tryin to get to on my own.

Thanks in advance!

Sorry, but I didn't understood what is your exact problem now?

"conrods", has to google that. Thanks, checked off my need tomlearn something (or try) every day.

You can't burn anyhting out on the input end of your device, the input impedance of the a/d should be quite high enough. If you are using the build-in a/d converter, just make sure the input is indeed between 0 and 5 volts.

You may be right to worry about what your output signal is expected to drive.

The step to take is getting a bit more into the black box. Surely the nature of the 0 - 5V signal (or driving voltage) is known.

I don't think adding digital potentiometers and Arduino based feedback is necessary. An amplifier of some kind to boost output drive capability may be useful.

Op amps can be configured as followers, output voltage equals input voltage, and can have power transistors in their feedback loops to achieve high current output.

So you on the right track there I think.

a7

Good to contribute to the knowledge on this forum with my expertise haha.

ok that' s great to hear its not going to burn out on the input. and yes im sure the signal is a fairly clean and stable 0-5V.
Thanks to the discord i got an idea to fill in some of the gaps, the next thing is probably to add a shunt resistor and measure across to determine the currrent thats flowing in the sensor circuit.

So as i'm thinking now maybe i'm done by adding a rail to rail follower configured op amp to the output and feed the ECU with that

Thanks!

I will try to clarify,

I think its mostly because I dont really understand inductance and I am worried about burning out my Arduino or ecu by placing the Arduino in between the existing sensor and ecu on my car.

And i think the Arduino needs a high impedance output circuit while the car has a low impedance circuit. So i think i may need a rail to rail 5v following opamp to transmit an altered signal from the Arduino to the ecu.

So the 5v existing signal comes from the car and goes into the Arduino which alters the signal to what i want and then send this to the ECU of the car.
But im not sure about this.

1 Like

So it got it figured out i think:

still very minimal but later im going to add more diesel a little sooner, for now i have to monitor boost and EGT values.

1 Like

Thats amazing man i am currently attempting to do the same. how do you have the MCP4725 12bit DAC setup to communicate with the arduino

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.