Enhancements to MPGuino code -- bargraph display, etc.
I have been playing with the MPGuino code, and I've made a number of usability enhancements:
Other things I am thinking about:
Okay, the above is all fine and dandy. Now the bad news. The bargraph display will not fit into the existing ATMEGA 128 or 168. I bought a 328 (about $5), which has plenty of room, and I'm using it with Arduino-0015. More on the bad news side -- this represents a departure from the official project, which has moved away from the Arduino framework and is moving toward straight gcc. This raises the bar of entry for most casual hackers, who probably don't want to install gcc and take the time to get the project compiling. The good news: I've made all of the features above available at compile-time, so you can turn on or off various features above until you run out of room. I will be tough, however, to get the bargraph display without upgrading to the ATMEGA328 (about $5). All of that said, I have talked with dcb about these things, and in general I am making changes for my own benefit, and with zero regard for selling 'prebuilt' units with any sort of guarantee. I do, however, think that the changes I've made make the code more maintainable, and in most cases will reduce RAM and executable requirements. I am not trying to be disruptive of the project. On the contrary, I'm trying to (and I am, in fact) help add value to the project. This is what I see as the *point* of open source. Open source has no guarantees. Use at your own risk. But also, the beauty of it all -- feel free to crack open the cover and poke around. I offer up the above as an 'alternative' firmware based on version 0.75. It will not be in lock-step with dcb's changes. Obviously this work is all free of charge and the changes are donated back to the community. I will figure out a way to post the source(s) if anyone is interested in such changes/features. |
It's good stuff, it just hasn't made it to the top of my list yet (and we hit the wall in arduino).
I think you would do well to just make a "Skellys arduino based mpguino mods" wiki page with the code embedded in it to cut and paste into arduino. I can add a pointer to it from the top of the pde file in googlecode for the adventurous sorts. And of course a pointer from the code hacks page. Also, you might want to incorporate the changes for .75, some fundamental accuracy fixes in there, and of course keep an eye on the mpguino update thread if you are going to try to keep it current. This way I know there is a well tested version published on the main site, but there is a path forward the adventurers. I just can't personally help them much these days, and they are good at getting into trouble :) Thanks, Dave. P.S.: the prebuilt does not come with any guarantees either, but I do try extra hard to make sure it works :) My reputation is worth something to me. |
I'm very interested in your code - the bar graph doesn't look too useful to me, as I'm pretty much always watching the screen anyway, so I at least have a general idea of how I've been doing. But, the storing of tank data, fuel cut indication, and DTE look very useful.
I think putting the code up on the wiki would be great, with some sort of disclaimer that adding all the extra code will take up more space, and may not fit on different Atmega chips. |
Quote:
Let's think about the best way to store the source, as I've broken it into multiple source files: Code:
"lcd.h" |
Quote:
|
Looks like good stuff! I wish I was more near to my car to play around. Looking forward to what you do and how it is when I get home. Maybe when I get my second mpguino up I will compare side by side :P
|
More changes
I like the ideas for your mods. I'm actually thinking of other mods for my personal needs. I'm working on data logging capabilities so that I can analyze data on my PC. I'm installing an I2C eeprom on my IDuino board to store the data.
I realize this is blasphemy here but I also autocross my car (Honda Del Sol) so I also want to log my lap times so this will serve double duty. The last reason I want to log speed, etc. is for when my son borrows the car so that I can make sure he isn't getting stupid with it. Doug |
for the last one, not that I'm offering to write it, or that there is space for it, but you *could*, without using a separate computer:
1. initialize the guino with the odometer reading 2. have it track max speed (store it and odo in eprom) 3. have it reset max speed/update odo with password (up to 10 digit number for password would be easy) So you can track max speed (or some sort of average) confidently, or your kid will figure out how to hack it, it's all good :) |
Good ideas. I'm not worried about my kid hacking it. I don't even plan to tell him that it logs. :)
The next trick will be to get the CD down below .35... |
skelly,
Where have you posted this code? I really wanted to check out distance to empty. I made a function for it, but it takes up too much memory and won't fit. Thanks |
Quote:
I have not figured out a place to put the code yet. Any ideas? I did not try Here is essentially the code for DTE. You will need to add a #define somewhere: Code:
#define DTE_CFG 1 /* 0=Off 1=On */ Code:
pFunc displayFuncs[] ={ Code:
displayFuncNames[x++]= PSTR("Custom "); And here is the function. The 'safety factor' there is if you want to subtract a gallon or so to ensure that even when DTE says zero, you still maybe have a gallon left. Code:
#if (DTE_CFG == 1) Code:
#define MAX(value2, value1)\ |
Not sure if this is the right thread to ask this question, but I haven't seen a more appropriate place. I'm interested in logging data to a PC so that long trips can be profiled and routes analyzed. PC logging would be helpful in coast down tests too. Would adding a serial output to the MPGuino require substantial coding? or is it just a matter of finding someone who is familiar with these sorts of electronics to add that physical interface? Do you know of anyone who's done this or is working on it? Thanks.
|
Quote:
Does the prebuilt unit have a USB plug on it? If so, and you are running at least version 0.75 of the MPGuino software, what you are asking for is already there. |
Thanks for the response, skelly. I have not yet purchased the prebuilt unit -- just shopping right now. If it has the USB plug you describe, my shopping will be done. I can't really tell from the picture on the web site. Can anyone here confirm that there is a USB plug on the prebuilt? Thanks.
|
Nope, the usb was an addition on the spiffed kit (arduino legacy), was never part of the original mpguino except when built from an arduino or clone, though the data is still being transmitted on pin 3 of the cpu for the adventurous sorts (wire in a max232 or bluetooth or ft232rl, or just do straight uart to a large display or ???).
|
So pretty much all you did was just swap out the chip and put in a higher capacity one? Did you have to reflash it at all or na?
|
Skelly you are onto something here. I am planning a 328 upgrade to make room for more programming. I would also like to see your code as I have some ideas of my own and I like your gals to empty idea a lot. I can not trust my fuel gauge so I am always filling up to soon. This would help. I do use the gal used but a direct screen would be nice.
Thanks for your post Hugh |
A few features I think would be cool are 1) and rpm feature based on injector pulses per minute (as already suggested by someone else). And 2) a 1/4 mile time set up so a screen would display a timer that starts when the vehicle speed increases from 0, and stops when the odometer reaches 0.25. It would also display the speed you were at when the timer stopped. You're 1/4 mile time and top speed could be used to get a rough estimate of horsepower from calculators online. It'd be interesting to see how our fuel economy mods change the horsepower output of the engine.
|
Quote:
Arduino-bootloader speedy 2x upgrade chip (Atmega328) - $6.00 : Adafruit Industries, Unique & fun DIY electronics and kits You just plug it in, and then I use the Arduino-015 platform to reflash it. |
Are there any issues with using the earlier versions of arduino?
Can you just flash the chip with the older versions of the code like .75 Quote:
|
Quote:
If you plug the MPGuino into your computer, and then fire up the Ardunio IDE, you should see the data appear in the debug window there. |
HI! I know its been a while, but where can i find a full code for MPGuino? With full, I mean, all code hacks, this tank memory thing, distance to emty etc etc... i am not very advanced with programming so my code hacking is quite unsuccessful :(
can someone post a fully modified code? or send me e-mail to burritto AT inbox DOT lv very much appreciated ;) |
Even though its now 2 years late, but does anyone have the code for this? The bar graph and saving to eprom sounds interesting.
|
I and others are working on implementing this into the new firmware, check the release 2 workspace thread
|
I've been gone for a while. I sold my Mazda Protege5 a couple of years ago and bought a 2010 Corolla. The Corolla already had a fuel economy readout so the MPGuino was rolling around in my glovebox for a couple of years.
I just bought a '06 Wrangler and I resurrected the MPGuino a couple of days ago. It is installed and working like a champ. I've posted all of the code changes from this original thread to github: https://github.com/skelliam/mpguino_fork So what is going on with MPGuino, is dcb still around and active with it? One thing I learned after installing the MPGuino is how to get into fuel cut mode. In my Mazda Protege5 with manual trans it was quite easy, and you could hear and feel when it was happening. Jumping to the Corolla, it was also really *really* easy to get into fuel cut mode, even during cruise control if you were going SLIGHTLY downhill you could feel fuel cut happening. My Wrangler, not so much. I had it for about a week before installing the MPGuino and I had definitely the suspicion that it was not entering fuel cut mode at all. After installing the MPGuino I could confirm that suspicion -- but also I learned that it *WILL* enter fuel cut mode but only under very extreme conditions, like very high engine rpm off throttle. In 5th or 6th gear, coasting, it simply won't enter. Anyhoo, enough rambling, fork and hack away on my github repo if you are so inclined. Sorry it has been so long. |
I think you still have the brightness settings in debug mode on github. The brightness array doesn't have 0 as the first element. Other than that, I was able to load it up, and I'll see how it works tomorrow. Good work, and thanks!
|
Quote:
|
All times are GMT -4. The time now is 04:07 AM. |
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