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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 11-03-2010, 03:00 PM   #1 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Ontario, Canada
Posts: 35
Thanks: 2
Thanked 14 Times in 7 Posts
New Features for MPGuino?

I've been thinking about adding data logging - perhaps a 24LC128 Serial EEPROM (16 Kbytes), but there is still the problem of attaching a laptop to the official preassembled MPGuino (which has no provision for it).

Also, I have a uLCD-32PT from 4dsystems.com.au (US$79) which I'm just beginning to play with for another project. It is verrry interesting with a touch-screen LCD, integrated microSD card, and it's own processor and software library - not Arduino, unfortunately, but let's not quibble?

A quick glance at the uLCD-32PT specs doesn't convince me that it can replace the Atmega for timing/counting/etc - so the idea is to add I2C slave capability to the MPGuino, with the uLCD-32PT as I2C master taking care of display+data logging. If this is done, a new MPGuino layout is called for, eliminating the matrix LCD - and adding more digital inputs to monitor more engine signals?

I'm lousy at UI design, if someone would design a nice 240x320 layout for MPGuino and post it here, it would be fantastic.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 11-03-2010, 06:00 PM   #2 (permalink)
Left Lane Ecodriver
 
RobertSmalls's Avatar
 
Join Date: Aug 2008
Location: Buffalo, NY, USA
Posts: 2,258

Prius C - '12 Toyota Prius C
Thanks: 79
Thanked 283 Times in 196 Posts
I probably can't help you with development, but I'm interested in this idea. I'd love a low-cost datalogger, and the most interesting data already passes through the MPGuino.
  Reply With Quote
Old 11-03-2010, 11:45 PM   #3 (permalink)
Dartmouth 2010
 
SVOboy's Avatar
 
Join Date: Nov 2007
Location: Hanover, NH
Posts: 6,427

Vegan Powa! - '91 Honda CRX DX
Team Honda
90 day: 66.52 mpg (US)
Thanks: 92
Thanked 114 Times in 82 Posts
Send a message via AIM to SVOboy Send a message via MSN to SVOboy Send a message via Yahoo to SVOboy
Like Mr. Smalls, I can't do much to help you out on development, but this is definitely an idea I can get behind
  Reply With Quote
Old 11-10-2010, 03:22 AM   #4 (permalink)
EcoModding Lurker
 
Join Date: Nov 2010
Location: Monterey, CA
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
+1

I would love a much better/more modern screen.

I'm not sure how I can help with UI design, but I'm willing to learn.

(still a newbie to programming, not so to design though)
  Reply With Quote
Old 12-03-2010, 04:23 PM   #5 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Ontario, Canada
Posts: 35
Thanks: 2
Thanked 14 Times in 7 Posts
I've been making progress on this ... but nothing solid to report yet. I'm debugging some code added for my version to act as a I2C Slave, so the uLCD-32PT module (the I2C Master) can query MPGuino values.

This requires a four-wire connection to an Arduino (5V power, ground, SCL, SDA) but I haven't yet figured out how these will be connected to the MPGuino.

Here's a plug for 4dsystems ... I managed to 'kill' the LCD screen by misadventure, and sent an email to their support forum. They told me about a surface-mount protection diode on the uLCD board and the part number ... ordered one from DigiKey and the board is working again. This also marks my first use of solder paste to solder the tiny (<1/8 inch) part onto the board, with the assistance of a magnifying glass of course!

In the future I shall not hook up wires with the board(s) under power!

Last edited by mluckham; 12-07-2010 at 06:24 PM.. Reason: spelling correction
  Reply With Quote
Old 12-03-2010, 04:31 PM   #6 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Ontario, Canada
Posts: 35
Thanks: 2
Thanked 14 Times in 7 Posts
As for UI design - the uLCD-32PT touch screen display is 320x240 pixels and can display full-colour Windows compatible graphics (BMP, JPG, etc) and fonts. The display area is 48.6 x 64.8 mm.

So the idea is to design a nice-looking display which can be touched to change it - for example a fuel-economy gauge for miles/gallon, and other alternative gauges such as RPM and fuel consumption/hour, etc. The image file is stored on a microSD memory card on the back of the uLCD-32PT screen and loaded onto the screen by program control. Then the program just has to update numbers on the display, or draw gauge pointers.
  Reply With Quote
Old 12-07-2010, 04:12 PM   #7 (permalink)
EcoModding Lurker
 
FalconFour's Avatar
 
Join Date: Sep 2010
Location: Fresno, CA
Posts: 78

LEAF - '11 Nissan LEAF
Thanks: 4
Thanked 9 Times in 7 Posts
Quote:
Originally Posted by mluckham View Post
This requires a four-wire connection to an Arudino (5V power, ground, SCL, SDA) but I haven't yet figured out how these will be connected to the MPGuino.
That's easy, even the prebuilt MPGuino can do it. +5v and ground, those are easy to find. SCL and SDA are, unusually enough, usually tied to analog pins. There just so happen to be (at least) 2 unused analog pins on the MPGuino. Just tie in to those, add code accordingly.

(Maybe I'm making it sound too easy? I dunno how much you already know about it...)
  Reply With Quote
The Following User Says Thank You to FalconFour For This Useful Post:
mluckham (12-07-2010)
Old 12-07-2010, 06:23 PM   #8 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Ontario, Canada
Posts: 35
Thanks: 2
Thanked 14 Times in 7 Posts
Quote:
Originally Posted by FalconFour View Post
That's easy, even the prebuilt MPGuino can do it. +5v and ground, those are easy to find. SCL and SDA are, unusually enough, usually tied to analog pins. There just so happen to be (at least) 2 unused analog pins on the MPGuino. Just tie in to those, add code accordingly.

(Maybe I'm making it sound too easy? I dunno how much you already know about it...)
Yes thanks, analog pins 4 and 5 on an "Arduino" ... I've already had two Arduinos connected with those pins in a successful I2C Master / Slave test.

But according to the MPGuino schematic those pins are used already for two of the front panel buttons and read using register PINC (PORTC input bits, tied to ANA0-5).

It may be that the Wire library for I2C, and the ANA4/5 pins connected to the buttons, can co-exist as long as the buttons aren't pressed ... do you think so? If not, then that's the reason my LCD's protection diode was killed!
  Reply With Quote
Old 12-07-2010, 07:04 PM   #9 (permalink)
EcoModding Lurker
 
FalconFour's Avatar
 
Join Date: Sep 2010
Location: Fresno, CA
Posts: 78

LEAF - '11 Nissan LEAF
Thanks: 4
Thanked 9 Times in 7 Posts
There are 6 analog inputs.

There are 3 buttons attached to the analog inputs on the MPGuino.

That leaves 3 unused analog pins on the MPGuino board.

And since the analog-input pins on the ATMega are directly connected to the pins on the Arduino board... that means you can just directly attach to them and address them.

I guess since you needed me to clarify this, you'll also need me to clarify which pins on the ATmega to solder to... :P



Bam. Connect SCL and SDA to analog pins 1 and 2, and use the standard Wire library, far as I can figure. No need for all that direct port access stuff... plus, PORTA...PORTC are direct access to the digital pins, I think something else is used to interact with the analog pins... and I think data is "written" to the analog inputs by switching the pull-up resistors on and off. I think.
  Reply With Quote
Old 12-07-2010, 07:23 PM   #10 (permalink)
EcoModding Lurker
 
Join Date: Feb 2009
Location: Ontario, Canada
Posts: 35
Thanks: 2
Thanked 14 Times in 7 Posts
Quote:
Originally Posted by FalconFour View Post
Connect SCL and SDA to analog pins 1 and 2, and use the standard Wire library, far as I can figure. No need for all that direct port access stuff... plus, PORTA...PORTC are direct access to the digital pins, I think something else is used to interact with the analog pins... and I think data is "written" to the analog inputs by switching the pull-up resistors on and off. I think.
Thanks again

It may be you are correct, but I think the Wire library will need some modification to use the different pins - pins 4 and 5 in the PORTC register are hard-coded, and the TWCR register is used by the Wire library for the processor's native two-wire serial interface support ... can it be connected to pins other than 4 and 5? Is it even possible? Maybe so, I have not dived so deeply into two-wire serial support and would need to do so to arrive at the answers. But I suspect a bit-banged version of Wire would be needed to use ANA1 and ANA2.


What I proposed before was to leave Wire alone and dual-purpose the ANA4 and ANA5 pins for the two buttons and I2C. I can see how to handle it in software, but electrically - I don't know. The MPGuino code turns on the pullups but defines the pins as inputs.

  Reply With Quote
Reply  Post New Thread


Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Source 6Kw Charger. Who Whats What Features? adamj12b Fossil Fuel Free 58 06-30-2014 08:08 PM
What features on your ULTIMATE fuel economy instrumentation? MetroMPG Instrumentation 41 05-12-2012 01:14 PM



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