Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 08-07-2008, 09:55 AM   #11 (permalink)
EcoModder
 
Join Date: Jul 2008
Location: North Central Alabama
Posts: 569

Big Salsa - '04 Toyota Sienna LE

Silver - '10 Toyota Prius III
Thanks: 107
Thanked 116 Times in 67 Posts
3D mapping

You can make 3D maps in code pretty easily (it's time consuming, but easy enough). You first have to have something to base your graphs on, like LOTS of data points. I attached a picture of a graph that I have done. I would give the code, but it was done for work, and i don't think it's exactly the kind of stuff we can release, but the picture should be fine. This graph took nearly 100 lines of code to get in place, and that doesn't include the skipped lines and the lines for comments. As you can see, quite complex, but this is a 3D curve with some pretty incredible fidelity, all originating from an old scanned image. If you could get me data points, or if you could get me a picture of the graph with actual numbers somewhere, I could produce you a series of curves in the same manner that I produced this curve (in code form even), and you would be responsible for getting it into the Arduino program (since I really haven't dealt with that before).

Attached Thumbnails
Click image for larger version

Name:	Bruhn_Graph_1.jpg
Views:	48
Size:	93.0 KB
ID:	1386  
__________________
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-27-2008, 05:35 PM   #12 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2008
Location: UK
Posts: 104

Fizz - '06 Skoda Fabia Combi
TEAM VW AUDI Group
90 day: 56.62 mpg (US)
Thanks: 3
Thanked 9 Times in 7 Posts
OK, so I've got my MPGuino working! It's a freeduino-based version.

After many attempts I think I now have the right connections for speed and injector.

I set the speed pulses to 16000 to get a correct mph. For the injector calibration I set it to a very large number, for now.

At a steady speed it displays a believable mpg. However if I accelerate mpg goes very high, and if I idle mpg drops. I reckon this is because the injection pressure is varying so much. So around town it's of limited use as it stands, but most of my miles are on open roads so we shall see!

This is the signal that the mpguino sees for the injector. Sign is reversed; positive on the scope was connected to ground on the arduino. Is this going to be OK,given that it does not return to zero volts, and there are effectively 2 "leading edges" per injection?

2.0HDi injector pulse at about 1900rpm (after 100k resistor)

Last edited by ecoxantia; 08-28-2008 at 04:15 AM..
  Reply With Quote
Old 08-27-2008, 08:46 PM   #13 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location:
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 157
Thanked 264 Times in 207 Posts
That is sweet!!!

Question, does the spacing of the main pulses vary with rpm? The fuel pressure is supposedly RPM dependent, so you might be able to do it all in software from this point.

Edit: Let me change that, the pulse spacing had better change with RPM This ain't TBI.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 08-27-2008 at 09:03 PM..
  Reply With Quote
Old 08-27-2008, 09:51 PM   #14 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location:
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 157
Thanked 264 Times in 207 Posts
I recon, one of the next tasks is to figure out the PSI to RPM Map. I don't suppose you have a 20,000 PSI pressure gauge? No? Ok, for now lets assume that 200 BAR is at idle, and 1350 BAR is redline, and that it is just a linear function.

I think the next step might be to figure out the RPM from the injector pulse, then figure out a "pressure multiplier" (linear function based on RPM) to combine with the usPerGallon figure, and I think you will be in the ballpark.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 08-28-2008, 04:14 AM   #15 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2008
Location: UK
Posts: 104

Fizz - '06 Skoda Fabia Combi
TEAM VW AUDI Group
90 day: 56.62 mpg (US)
Thanks: 3
Thanked 9 Times in 7 Posts
Thanks dcb.


This is the injectors at idle, 800rpm.
The picture in my previous post is at about 1900rpm.

So yes, you can see spacing varying with rpm.

The system does have a fuel pressure gauge! From the data I have it looks useful too - 0.5 volts at 100bar, 1.3 volts at 300 bar and assuming it's linear then 5 volts is about 1300bar, corresponding to max pressure.

I think this is the best solution since pressure is not quite linear with rpm, as there is a switchable 3rd piston in the injection pump. This is the "high presssure" piston. The idea is to only use highest pressures when necessary, so this 3rd piston is switched off in certain conditions. You can see why - 1300 bar don't come for free!!

So, next step - get the Arduino to grab the pressure. I have not even looked at the code so that's next...I seem to remember the memory is pretty full already, no?
  Reply With Quote
Old 08-28-2008, 06:17 AM   #16 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location:
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 157
Thanked 264 Times in 207 Posts
Oh, a gauge, ok Can you confirm the voltage range of the pressure sensor @ 1350, and the correlation of voltage to displayed pressure?

It is just an analogRead to convert a 5 volt signal to a value from 0 to 1023. Recommend Analog Pin 2.

At the top of the loop, for a quick test anyway, you can do an

int press = analogRead(2) + 1;

then multiply the instant.injectorHiUS by press after copying it from temp but before updating the other trips.

Fudge microSecondsPerGallon to taste.

press *might* need an offset and a scaling factor, don't know yet.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 08-28-2008, 12:48 PM   #17 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2008
Location: UK
Posts: 104

Fizz - '06 Skoda Fabia Combi
TEAM VW AUDI Group
90 day: 56.62 mpg (US)
Thanks: 3
Thanked 9 Times in 7 Posts
According to some literature I've read (which was wrong on the connections for Vss but it's the best I have!!); yes it's a 0 to 5V signal, from a strain gage based sender. So that's good news.

Thanks a lot for the coding tips.

Do I need a resistor and diode in the circuit like the Vss and injector? I'd have thought as this is taking an analog value, it's unnecessary. Presumably the input impedance of the Arduino is high so I should not upset the voltage the car's ECU sees.

I'll try and implement! This is a lot of fun...
  Reply With Quote
Old 08-29-2008, 06:47 AM   #18 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2008
Location: UK
Posts: 104

Fizz - '06 Skoda Fabia Combi
TEAM VW AUDI Group
90 day: 56.62 mpg (US)
Thanks: 3
Thanked 9 Times in 7 Posts
So I've got the pressure input on pin2, and modified the code.

It doesn't work well! Instant mpg is zero, current is 999. What have I done wrong? CPU is at 500%...

This is part of the modified code, I've added 2 lines.
--------------------------------------------------------
#define looptime 1000000ul/loopsPerSecond //1/2 second
void loop (void){
if(newRun !=1)
initGuino();//go through the initialization screen
unsigned long lastActivity =microSeconds();
unsigned long tankHold; //state at point of last activity
while(true){
unsigned long loopStart=microSeconds();
int press = analogRead(2) + 1; //press is common rail pressure approx in bars
instant.reset(); //clear instant
cli();
instant.update(tmpTrip); //"copy" of tmpTrip in instant now
tmpTrip.reset(); //reset tmpTrip first so we don't lose too many interrupts
sei();

instant.injHius = press * instant.injHius; //correct injector for pressure variation
  Reply With Quote
Old 08-29-2008, 07:48 AM   #19 (permalink)
Master EcoModder
 
wagonman76's Avatar
 
Join Date: Jun 2008
Location: Northwest Lower Michigan
Posts: 1,006

Red Car - '89 Chevrolet Celebrity CL 4 door
Team Chevy
90 day: 36.47 mpg (US)

Winter Wagon - '89 Pontiac 6000 LE Wagon
90 day: 28.26 mpg (US)
Thanks: 8
Thanked 16 Times in 15 Posts
Did you possibly get the VSS and INJ wires switched around? I did even after checking quite a few times. Others have too, seems like a common mistake.
__________________

Winter daily driver, parked most days right now


Summer daily driver
  Reply With Quote
Old 08-29-2008, 07:59 AM   #20 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location:
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 157
Thanked 264 Times in 207 Posts
Can you declare press in global scope (right before loop) and modify:
void doDisplayInstantCurrent(){displayTripCombo('I','M' ,instant.mpg(),'S',instantmph(),'C','M',current.mp g(),'D',current.miles());}

to
void doDisplayInstantCurrent(){displayTripCombo('I','M' ,instant.mpg(),'S',instantmph(),'C','X',press,'D', current.miles());}


and see what you are getting for press in the lower left corner?

__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Reply  Post New Thread


Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mopar to offer Diesel Swap kit for Wranglers Red EcoModding Central 8 08-09-2011 06:23 PM
VX Info...WARNING: lots of info! TomO Off-Topic Tech 1 01-05-2010 12:39 PM
Video: first high voltage power up: Mazda RX-7 with homebrew controller MetroMPG Fossil Fuel Free 1 02-10-2008 10:17 PM
D15Z1 injectors? StorminMatt EcoModding Central 4 02-08-2008 06:46 PM
Better injectors for better FE tasdrouille EcoModding Central 6 01-31-2008 05:29 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com