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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 09-10-2013, 12:54 AM   #51 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2009
Location: terra firma
Posts: 138
Thanks: 4
Thanked 24 Times in 22 Posts
I'm almost ready to test the new button setup. The code is ready, i've checked input values from a breadboard; all that remains is to solder up a button board.

Hardware will consist of 4x switches, 4x 15kohm and 3x 10kohm resistors, one wire to ground, and one wire going to an analog input (with pullup enabled).

The resistors are arranged in something resembling an R-2R resistor ladder. I'm not terribly happy about the range and variability of the 15 input combinations, but there's enough to give me 9 usable:
Left, Down, Up, Right, Left+Right, Left+Down, Down+Up, Up+Right, and Down+Up+Right.

Before tackling this, my intent was to keep the regular 3 assignments, and just add a 4th one off to the left for Immediate Reset of the trip2 data (which auto-resets after 7 min), and a "Down" button during parameter setup. I have since concluded i don't really need a 4th button that badly, but since it's "free", i might as well include it & rearrange things a bit.

I sure would hate to find out that there's a $0.20 chip available to handle the button conversion (DAC?) Also, i haven't done any heat testing on a hot dashboard, to see if the values change at all. My guess is, it won't matter, because we are measuring our position on "the ladder", which should remain proportional at other temps, since the resistors will all fluctuate the same amount.

I'll post the code & jpgs in a separate thread after i verify that it works.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 09-10-2013, 03:55 AM   #52 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 830
Thanked 708 Times in 456 Posts
Quote:
Originally Posted by nickdigger View Post
The resistors are arranged in something resembling an R-2R resistor ladder. I'm not terribly happy about the range and variability of the 15 input combinations, but there's enough to give me 9 usable:
Left, Down, Up, Right, Left+Right, Left+Down, Down+Up, Up+Right, and Down+Up+Right.
I think I understand why, if you're using those resistor values you mentioned in an R-2R sort of circuit, using the internal 20 kohm (or so) pullup resistor for the pin you're going to use.

Nevertheless, I look forward to what you have come up with.

Quote:
Originally Posted by nickdigger View Post
I sure would hate to find out that there's a $0.20 chip available to handle the button conversion (DAC?) Also, i haven't done any heat testing on a hot dashboard, to see if the values change at all. My guess is, it won't matter, because we are measuring our position on "the ladder", which should remain proportional at other temps, since the resistors will all fluctuate the same amount.
That's part of the fun of engineering something - you get to find out what works, and what doesn't.
  Reply With Quote
Old 09-10-2013, 04:32 AM   #53 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2009
Location: terra firma
Posts: 138
Thanks: 4
Thanked 24 Times in 22 Posts
Quote:
I think I understand why, if you're using those resistor values you mentioned in an R-2R sort of circuit, using the internal 20 kohm (or so) pullup resistor for the pin you're going to use.
The pullup is mainly to provide source voltage to the R-2R. The example i was working from had an external 5v source (which i intended to take from the LCD), plus a ground, plus the input wire. The resistor values were mainly just the most convenient ones from my spare parts box. I originally tried to use some SMT 4-resistor arrays, but the soldering was just too hard to stick.

Just a few minutes ago, I noticed my ADC scheduler was wrong, as I was using a stack instead of a queue. That should be fixed now.
  Reply With Quote
Old 06-22-2014, 12:28 AM   #54 (permalink)
EcoModding Lurker
 
Join Date: Dec 2009
Location: Monterey, KY
Posts: 45

The Odyssey - '98 Honda Odyssey
90 day: 24.45 mpg (US)

The Civic - '98 Honda Civic DX
90 day: 32.5 mpg (US)
Thanks: 7
Thanked 4 Times in 3 Posts
Update on this T Vago? Curious if you've made any progress fine tuning your setup.
__________________
  Reply With Quote
Old 06-22-2014, 01:40 PM   #55 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 830
Thanked 708 Times in 456 Posts
The code's been working for a while now. You want to test it?

I remembered that you wanted to be able to measure fuel pressure directly, instead of using an assumed constant value, so as to be able to more accurately measure fuel consumption when you turn off your fuel pump. I built in support for that in the code, but it needs to be tested.
  Reply With Quote
Old 04-20-2017, 03:18 AM   #56 (permalink)
EcoModding Lurker
 
Join Date: Apr 2017
Location: Canada
Posts: 18

Terky - '99 Toyota Tercel CE
90 day: 55.71 mpg (US)
Thanks: 9
Thanked 11 Times in 7 Posts
Hi t vago,

I have been thinking of this and have a couple of questions about the way the correction is performed in the code.

E.G. - Given that:
a) the MAP sensor in my car has a linear relationship of pressure and voltage; and
b) 1 Atmosphere is roughly 3.6 volts for my particular application;

I was wondering (hoping) this would not need me to make further changes to the code to make the correction factor work better. Is the code flexible enough as written to accommodate differently calibrated MAP sensors?

My disjointed thoughts below:

I have been considering this problem as pertains to my vehicle and I was wondering if the code assumes certain characteristics of the MAP sensors that are specific to Chrysler vehicles? I see for example some numbers in the code for MAP floor, ceiling, and offset - might these values change if we have access to a chart of factory MAP sensor behaviour?

I would think that different manufacturers have different calibrations on their MAP sensors, for instance what voltage constitutes 1 atm of pressure, and the slope of the line (rate of change) of voltage against manifold pressure - if indeed hat slope is linear. Some googling appears to come up with an example or 2 of MAP sensors that vary frequency, rather than voltage for the output to the ECU (this last one is not the case of my Toyota but it may be an issue for some others).

Anyway I would be interested to hear your thoughts on this.

Cheers

Last edited by jonzobot; 04-20-2017 at 03:24 AM..
  Reply With Quote
Old 04-20-2017, 09:34 AM   #57 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 830
Thanked 708 Times in 456 Posts
Quote:
Originally Posted by jonzobot View Post
Hi t vago,

I have been thinking of this and have a couple of questions about the way the correction is performed in the code.

E.G. - Given that:
a) the MAP sensor in my car has a linear relationship of pressure and voltage; and
b) 1 Atmosphere is roughly 3.6 volts for my particular application;

I was wondering (hoping) this would not need me to make further changes to the code to make the correction factor work better. Is the code flexible enough as written to accommodate differently calibrated MAP sensors?

My disjointed thoughts below:

I have been considering this problem as pertains to my vehicle and I was wondering if the code assumes certain characteristics of the MAP sensors that are specific to Chrysler vehicles? I see for example some numbers in the code for MAP floor, ceiling, and offset - might these values change if we have access to a chart of factory MAP sensor behaviour?

I would think that different manufacturers have different calibrations on their MAP sensors, for instance what voltage constitutes 1 atm of pressure, and the slope of the line (rate of change) of voltage against manifold pressure - if indeed hat slope is linear. Some googling appears to come up with an example or 2 of MAP sensors that vary frequency, rather than voltage for the output to the ECU (this last one is not the case of my Toyota but it may be an issue for some others).

Anyway I would be interested to hear your thoughts on this.

Cheers
Never really gave it much thought, other than that I never investigated frequency-based MAP sensors for use with MPGuino. I also never considered that any other car manufacturer would implement a returnless fuel system that regulated fuel pressure to a constant pressure above atmospheric rather than regulate fuel pressure based on intake vacuum.

Now, I did make a few assumptions as you mention. One is based on my limited experiences with pressure sensors and their theory of operation, as well as the description of how Chrysler MAP sensors work. So, first assumption was that pressure sensors would generally send out a voltage signal that varies linearly with pressure.

Along with that, I also assumed that voltage-based pressure sensors would have a voltage output corresponding to 0 psia, which would not necessarily be 0 VDC, with a rising slope.

Finally, I assumed that the basic Chrysler MAP sensor would be roughly calibrated, but that manufacturing tolerances would mean that different sensors would output noticeably (but not necessarily significantly) different voltage outputs, given the same atmospheric pressure.

If you had a factory chart that graphed the behavior of your MAP sensor, that'd be good, as I could see whether these assumptions are valid. If not, and if it turns out that your factory MAP sensor does something completely unexpected, like rising as the 4th root of pressure for instance, then maybe instead of trying to tack on more code to MPGuino to handle this exception, maybe it'd just be better to use a separate standalone Chrysler MAP sensor, which only requires +5VDC and a ground.

Clear as mud?
  Reply With Quote
The Following User Says Thank You to t vago For This Useful Post:
jonzobot (04-20-2017)
Old 04-20-2017, 12:51 PM   #58 (permalink)
EcoModding Lurker
 
Join Date: Apr 2017
Location: Canada
Posts: 18

Terky - '99 Toyota Tercel CE
90 day: 55.71 mpg (US)
Thanks: 9
Thanked 11 Times in 7 Posts
Much thanks. I am glad you were able to make sense of that post because it was extremely late.

Anyway, I did consider that as a worst case scenario I could rig up a couple of Chrysler MAP sensors obtained from the junkyard, but of course it would be preferable continue without.

Here is a chart I was able to dig up, and it does indeed appear that your assumptions hold true for my application as well. It looks like a constant slope of 33.333 kPa per volt, with an y-intercept of 0.6 volts at 0 kPa if we extrapolate. Of course behaviour beyond what is shown on the graph may not be perfectly linear, and there may not be reliable readings beyond what is shown here - so the assumption that there is a set voltage reading at 0 kPa may not actually hold true, but it seems like an okay assumption to make anyway as I am sure in practice readings outside the linear portion will happen very rarely.

I'm still a bit fuzzy on how you converted the voltage readings into a correction to the fuel line pressure, but it doesn't really matter - if it works for yours, it should work here given that the assumptions do not impose a specific value for the slope of the line.

Thanks again very much for your help.

Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2017-04-20 09-41-54.png
Views:	195
Size:	29.2 KB
ID:	21562  

Last edited by jonzobot; 04-20-2017 at 01:18 PM..
  Reply With Quote
The Following User Says Thank You to jonzobot For This Useful Post:
t vago (04-28-2017)
Reply  Post New Thread






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