Arduino Micro as "piggyback" fuel controller

Hi guys, its been a while since i purchased an arduino micro and supplies to make a piggyback fuel controller for a car. What i want the arduino to do is read analog voltage from a MAP sensor and output that voltage plus a little more on one of its output pins. I want to be able to adjust the gain which is why i am not using just plain hardware to do this. In order to keep the O2 sensors from reading a "too rich" mixture i will simply feed a small voltage into the ECM of the car to represent an O2 sensor reading of neutral (0.45V).

This probably sounds silly and like there wont be much to gain if anything in terms of power, but i am willing to try this! It is for a friends' race car (more like a "stock" car with a roll cage) and has a couple of minor airflow increase mods so i think a little extra fuel may help him.

A couple of questions before i fry the ECM in my friends car... will the PWM output of the arduino into the ECM acting as a psuedo-MAP sensor cause any damage - ie will a PWM 4V be seen the same to the ECM as the 4V analog signal that the stock MAP sensor provides? This is an older car by the way - 1990ish.

I bought a MAX534 DAC but i have no idea how to use it. I am a noob with programming and i dont even know if i need to convert the signal to analog anyway...

Just to sum it up, the arduino will be reading 1 analog voltage from the car's MAP sensor, outputting a constant 0.45V from 2 separate pins, and outputing a varying 0-5V signal from a 4th pin. Can i use PWM or will i need to use this DAC i purchased?

Thanks

If you want a voltage out you need a DAC.

ok that answers that question. Now to understand how to operate this DAC that i have. I have the MAX534 chip. I dont see much on tutorials for DACs anywhere do you know of any? I have read the datasheet but i find it difficult to actually turn that info into code...

So i have tried to do some more learning, but i am doing something wrong with the code still:

//Program by Jeremy Blum
//www.jeremyblum.com
//Changes LED brightness using voltag input instead of PWM

//Include SPI library
#include <SPI.h>

//When Using the SPI library, you only have to worry
//about picking your slave select
//By Default, 11 = MOSI, 12 = MISO, 13 = CLK
int CS = 10;   //SPI Slave Select

void setup()
{
//Set Pin Direction
//Again, the other SPI pins are configured automatically
pinMode(CS, OUTPUT);
  
//Initialize SPI
SPI.begin();
}

//This will set 1 LED to the specififed level
void setDAC(int reg, int level)
{
digitalWrite(SS, LOW);
delay(1);
SPI.transfer(reg);
SPI.transfer(level);
digitalWrite(SS, HIGH);
}

void loop()
{
int i=B0000;
for (int j=B10101010; j<=B11111111; j++)
{
setDAC(i,j);
delay(200);
}
delay(500);
for (int j=B11111111; j>=B10101010; j--)
{
setDAC(i,j);
delay(200);
}
}

I took one of this guys SPI examples he used for a digital pot and am just trying to get some values out of each of the 4 channels of the DAC chip MAX534. Please tell me what i am doing wrong!

Thanks

hi,
I found an interesting project every thing is explained in this document :
http://www.gt-innovation.gr/downloads/FreeArduinoBoostbox.pdf

I believe, this it what your are looking for ( "read analog voltage from a MAP sensor and output that voltage plus a little more" )

I'm working on a similar project, but I want to change the value according the RPM also , indeed in this example the value is fixed.

Hope this help.