EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   OpenGauge / MPGuino FE computer (https://ecomodder.com/forum/opengauge-mpguino-fe-computer.html)
-   -   updating mpguino? (https://ecomodder.com/forum/showthread.php/updating-mpguino-8195.html)

Eddles 05-02-2009 05:57 PM

updating mpguino?
 
Hello all,

I'm going to buy the preassembled version of mpguino soonish. Is there any way for me to update it, or will I have to buy a new chip each time there's a new version?

Thanks for your help in advance!

dcb 05-02-2009 06:44 PM

The preassembled does not use a bootloader anymore for reliability and space reasons. You can reprogram it, because it is just an atmega168 chip in a pdip socket, if you want to get fancy, but the preassembleds mission (and mine) is simple and reliable fuel consumption feedback. You can swap chips with a pdip arduino or use an ISP programmer and adapter. I have a special adapter I made that just pushes onto the chip sitting in the socket and program it with a usbtinyisp. many many many options there, but not something I can support en masse.

I have been offering to reflash for six months from receipt provided the users pay shipping both ways (i.e. S.A.S.E.).

avrfreaks.net is a good resource as well if you want to learn more about isp programming.

oldbeaver 05-19-2009 11:56 PM

How to reprogram MPGuino?
 
Hello Singletree5990,

Very interesting way of calibrating.

However, I am writing to you for the very last part of your posting: if one want to change part of the program of MPGuino, is there a way to do so? I donīt see any port on the MPGuino board I got. Is it necessary to get the chip out and plug it into Arduino, or what?

Thousands of apologies for the question....

:confused:
--------------------------------------

Quote:

Originally Posted by Singletree5990 (Post 104300)
I don't know if anyone has tried this yet, but I had an idea about how to
empirically determine, for a given car, the values of:
- parms[injectorSettleTimeIdx]
- parms[microSecondsPerGallonIdx]

(I've looked through the EcoModder forums a bit, but did not notice anything
regarding it. I apologize if this is old hat.)

A fixed 500usec is currently coded for injectorSettleTime. This variable
is used to compensate for the time difference between;
- the electrical pulse length applied to an injector
- the length of time that the injector effectively squirts fuel.

A more accurate value for injectorSettleTime and microsecondsPerGallon
promises to improve MPGuino tank-to-tank accuracy, as a driver's ratio
of city:highway driving varies.

I haven't tried this yet so I don't even know how well it might work.

If anyone has time, I would ask for your feedback regarding this proposed method:

Step1: Modify the void "doDisplayCustom" as follows, in order to read out the
number of injector pulses.
void doDisplayCustom(){displayTripCombo('N','P',injPuls es*1000
,'S',instantmph(),'G','H',instantgph(),'C',current .mpg());}
(Does the above code look like it would work?)

Next enter best guesses for injectorSettleTime and microSecondsPerGallon.

Then take two very different "trips":
Trip 1) Idle the car for 90 minutes. (short average injector pulse lengths,
might want to bring some reading material for this trip)
Trip 2) Drive the car at max legal speed on the highway for about 40
minutes (long average injector pulse lengths)
(NOTE: Start and end each trip at the same gas station, one located just
off of the highway.)

Before each "trip":
1) top off the car with gas
2) perform an MPGuino "tank reset"

After each "trip":
1) record the total number of injector pulses (injPulses)
2) record the "tank gallons" (from "tank gallons" you can derive the
MPGuino injector "on time".)
3) top off the tank with gas and record the actual gas consumed.
4) perform an MPGuino "tank reset"

Armed with this trip information, the following two equations could be solved
for their two unknowns.

Ton1 + (ISTgi - ISTsf) * Npulse1 = uSPGsf * Gal1 [from trip 1]
Ton2 + (ISTgi - ISTsf) * Npulse2 = uSPGsf * Gal2 [from trip 2]

Where...
TonX = Total injector "on time" for each trip
(equals MPGuino "Tank Gallons" / initially guessed
microSecondsPerGallon)
ISTgi = InjectorSettleTime value guessed initially
NpulseX = Total number of injector pulses (as read from MPGuino after
each trip)
GalX = Total actual fuel consumed for each trip (from fuel gas station
receipt)

uSPGsf = microSecondsPerGallon variable to be solved for
ISTsf = InjectorSettleTime variable to be solved for

One could possibly collect this same data for each subsequent tank of gas
and perform a least squares fit to gain the best values.

Let me know what you think...


(I would like to try this but am still awaiting my MPGuino kit from Fundamental
Logic. I also have not yet attempted to use the Arduino software
development environment, to make sure that I can reprogram the
ATmega168.)


- Singletree5990


dcb 05-20-2009 06:34 AM

Beaver, you have a prebuilt, single is using a kit from spiffie (different animal). The prebuilt is not a "development" board, It is meant to "wire it up and go". But nonetheless the chip can be reprogrammed in a variety of ways. I won't go into detail (that is what AVR Freaks is for as well as Arduino - HomePage ) but I will offer the following.

for hardware I use a homemade adapter like the one pictured in this thread:
http://ecomodder.com/forum/showthrea...er-7311-2.html and a usbtinyisp (google). And I can reflash a chip without needing to use space for a special onboard isp connector.

And compiler is gcc what came with the arduino 0011 installation.

But understand that it is not my charge to teach people how to program atmegas. It is not such a simple thing to learn and requires some hard work and dedication and many options to sort through.

oldbeaver 05-21-2009 03:03 AM

Prebuilt MPGuino
 
Understood.

Tks, some questions on other message.


Quote:

Originally Posted by dcb (Post 105296)
Beaver, you have a prebuilt, single is using a kit from spiffie (different animal). The prebuilt is not a "development" board, It is meant to "wire it up and go". But nonetheless the chip can be reprogrammed in a variety of ways. I won't go into detail (that is what AVR Freaks is for as well as Arduino - HomePage ) but I will offer the following.

for hardware I use a homemade adapter like the one pictured in this thread:
http://ecomodder.com/forum/showthrea...er-7311-2.html and a usbtinyisp (google). And I can reflash a chip without needing to use space for a special onboard isp connector.

And compiler is gcc what came with the arduino 0011 installation.

But understand that it is not my charge to teach people how to program atmegas. It is not such a simple thing to learn and requires some hard work and dedication and many options to sort through.



All times are GMT -4. The time now is 12:12 PM.

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