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


Reply
 
Submit Tools LinkBack Thread Tools
Old 06-16-2008, 12:48 AM   #1 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
2x16 LCD Display issues/discussion

FYI, the displays are a whole nuther discussion, so lets break it out here. I had an annoying failure on mine and another user is having to use an uncommon contrast setting (though there might be more going on there). Andrewj said his isn't working either (any news Andrew?) so lets us focus on that a bit here in a seperate thread. Please do try and be constructive, but we may decide that another LCD would be a better choice, though I will put a 2x16 constraint on it for 1.0. Or we may learn the cause of failure is external, but we need to be exacting in the process, not speculative.

FYI, I sent this of to nkc:
_____
Subject: LCD questions
To: orders@nkcelectronics.com

I've been recommending a single source for the LCDs for a fuel efficiency gauge to minimize compatability issues, and wanted to bounce a couple questions off you.

1. I have a LCD I purchased back on 4/6, that is just now missing column of dots (see picture)
Do you have any sort of knowledge base about what makes these things fail? Or can offer any advice about how to keep them from failing?

2. Another person ordered the same LCD, we are using pwm @500hz for the contrast and I found that on most of the units that an analogWrite(15) made a useable display, but this person needs an analogWrite(100). Is there that much variance between otherwise identical LCDs or is it a sign that something else is going on?

Thanks,
Dave.


(Support Ecomodder.com & get rid of these annoying ads!)      
 

Last edited by dcb; 06-16-2008 at 12:54 AM.
  Reply With Quote
Old 06-17-2008, 08:27 PM   #2 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Heard back from NKC, nothing difinitive on the failure modes or the contrast differences, no suprise, but they offered to ship a replacement LCD , Since we seem to be moving towards CPU control of the lcd controller power, it might last a little longer once we get the timeout working <shrug>
  Reply With Quote
Old 06-20-2008, 12:16 AM   #3 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 123

Scoob - '05 Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Hey a thread about LCD issues... yay. I've gone and been a bad boy and ventured away from the "recommended LCD". My eyes are sensitive to glare, esp. at night, and a bright blue LCD would be unbearable to me, not to mention a distraction while driving. I picked up another HD44780-compatible LCD, the TEG16717, and am having some issues.

After running on the bench for just a couple minutes, the screen seemingly is losing synch (possible timing issue?) and just displays a single scrolling row of garbage: "?0°?█??█/o??█/█0" etc. When running v0.11, the █ blocks would show the custom characters from the 'duino memory so I assume that's where they're coming from in v0.62 from the big characters.

I can reproduce the issue at will by pulling LCD power and putting it back on (loses synch - would need a reset). I have verified via debug that the 'guino is still running, because I added a serial output of the time from the CPU Monitor screen. I can switch between the screens and enable/disable my serial output, even with my LCD corrupt.

It also seems that sometimes just touching my wires (longest being about 5" from the breadboard to the LCD) will put it into the corrupt state, but other times I can really shake them and nothing will happen. Seems random.

Could it possibly be timing? I don't see any delays in the LCD code such as other 4-bit libraries have, though they seem across the map. I haven't studied the code and HD44780 spec thoroughly enough yet to be sure.

Also, out of curiousity, is there a reason we're not using consecutive pins for the 4 data bits?
  Reply With Quote
Old 06-20-2008, 12:36 AM   #4 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
re: display funnyness, you need to power cycle the board and the LCD. They need to be initialized after being powered up to display correctly, and they (all) have a finicky initialization scheme AND don't like to be initialized twice for a given power cycle. I have updated the code so you can power the LCD pin 2 (and only pin 2) from arduino pin 15 (analog 1) and so the guino will turn it on and off for you and it should be much better behaved after resets and reprogramming. But it sounds like the lcd controller power might somehow be flaky if you can touch a wire and make it glitch.

re: pinout, tried to find a balance between short tidy hookups with the basic arduino layout backed up to the lcd, and a leaving multi purpose pins open for future enhancements (pwm, tx/rx, analog).
  Reply With Quote
Old 06-20-2008, 12:43 AM   #5 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Also note there are delays at the bottom of
void LCD::LcdCommandWrite(byte value){
and
void LCD::LcdDataWrite(byte value){

try upping them to 10 maybe (display will be slower)
  Reply With Quote
Old 06-20-2008, 11:48 AM   #6 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 123

Scoob - '05 Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Yea, maybe my LCD has different power requirements, but hooking up the LCD power pin 2 (no backlight) to 'duino pin 15 won't power up the LCD. Doesn't matter where my ground is (pin 14 or GND).

Fortunately, the package I got had two LCDs included, so I can try the other one, and use a cleaner setup for wiring (maybe I'll use a couple short pieces of cat-5, with 3 or 4 pins used for data each, twisted with a GND.

I also tried inserting delays - in the lcdCommandWrite() I upped the delays from 1 to 2, but will be more aggressive. I also tried adding 50ms delays between all the initialization commands, also to no avail. I also tried bringing the main loop from a half second to a full second. Still no help, thought I didn't really expect it to.

The LCD was working beautifully with the sample codes on arduino.cc, but not with your code. Not sure what's going on. I'd really like to avoid having to rewrite the whole damn thing using one of their libraries. I did spend a couple hours last night with v0.62 printed out studying the code, so I have a decent feel for what's going on if it becomes necessary.
  Reply With Quote
Old 06-21-2008, 12:59 PM   #7 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 123

Scoob - '05 Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Hey, I just thought of something. I'm trying to get this thing up and running for a 2500mile trip I'm taking next week, and since I'm having LCD issues, are there any pieces of software that will display the output of the 'guino's serial print in a small window on the PC? I've already got a nice LCD screen in the car - a 7" TFT touchscreen for my carPC. If I can just get the 'guino to send the data back out to the PC rather than to an LCD, I won't have to worry about all these screen issues nor the fact that my LCD doesn't have a backlight.
  Reply With Quote
Old 06-21-2008, 01:09 PM   #8 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Sort of, if you just uncomment the #debuguino line and connect to the guino via hyperterminal it will spit out the raw instant and current data. Shouldnt be too hard to change those Serial.print lines to print instant.mpg() and/or tank.mpg() or whatever. Run them through the format function first. The arduino IDE has a serial monitor also.
  Reply With Quote
Old 06-21-2008, 07:40 PM   #9 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 123

Scoob - '05 Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Yea, I know about the IDE serial monitor - used it a couple times for added debug, but that's not easy to hide in a corner on the screen (real estate is hard to come by on a 7" screen). I was thinking about hyperterminal, thanks for the confirmation... I'll have to look into it.
  Reply With Quote
Old 06-21-2008, 08:01 PM   #10 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Attached Images
File Type: gif fyi.GIF (20.7 KB, 89 views)
  Reply With Quote
Old 06-21-2008, 08:23 PM   #11 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 123

Scoob - '05 Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Good point.. Though it took me a few minutes to figure out the point of that screen shot lol...

But I'd be trying to integrate it into this:

  Reply With Quote
Old 06-21-2008, 08:35 PM   #12 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Ok, Good luck, lets us get back to LCDs here.

AndrewJ, Whats the status on your LCD?
  Reply With Quote
Old 06-27-2008, 01:23 AM   #13 (permalink)
EcoModding Lurker
 
Join Date: Jun 2008
Location: AZ
Posts: 5

Beater - '93 Metro XFi
dcb, it appears I have experienced an early failure of my lcd tonight. Bummer... right when you posted the things I needed to change with the injector tap and vss number!

My guino power led is on and the other led is blinking as normal, but the lcd is dark. Tried the reset button on the guino and disconnecting and reconnecting power to no avail.

It seems to have happened when I was reconnecting my ground wire, and bounced power a few times as I tightened the screw.

Anything I should check for before writing it off? Do you think they'll send me a replacement like they did for you?

Thanks for all your help and work on this project!
  Reply With Quote
Old 06-27-2008, 01:55 AM   #14 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
See if you can reprogram the chip first. It doesn't like bouncy power. Let me know.
  Reply With Quote
Old 06-28-2008, 11:29 PM   #15 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 123

Scoob - '05 Impreza Outback Sport SE
90 day: 25.28 mpg (US)
Quote:
Originally Posted by dcb;39365 (from workspace thread)
Glad the Mrs. is doing ok. It soulds like your display issues are an order of operations thing and not a hardware glitch per-se. Like you might need to bounce the power to the whole unit after you program it. Shouldn't affect in-car operation as long as you adjust your setup so the LCD is powered and connected to the duino before or at the same time the duino is powered up.
Not following you here. What I had been doing was powering the LCD from the 5V and GND pins on the 'duino (which is powered as soon as the power supply is plugged in). Not sure if its bouncy power on the LCD or if it is a timing thing, but a soft reset always temporarily resolves the issue.

I tried powering the LCD from pin 15, but it wouldn't power. My multimeter shows only ~2.5-3V on that pin (though I know it's being pulsed, I don't think its providing enough power). Haven't yet tried a separate 5V source, but I plan on trying to power both from a computer 4-pin molex - the 'duino from 12V and the LCD from 5V.
  Reply With Quote
Old 06-29-2008, 10:27 AM   #16 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
FYI, the latest version has a little more LCD initialization going on (v0.66), Let us know if that fixes it.
  Reply With Quote
Old 06-29-2008, 02:29 PM   #17 (permalink)
SuperMID designer
 
Yoshi's Avatar
 
Join Date: Mar 2008
Location: Yokohama, JAPAN
Posts: 34
Quote:
Originally Posted by dcb View Post
FYI, the latest version has a little more LCD initialization going on (v0.66), Let us know if that fixes it.
Let me comment some...

The V0.66 init() starts...

void LCD::init(){
LcdCommandWrite(B00000010); // 4 bit operation

This sends (B0000) to DB7-4,
then sends (B0010) to DB7-4.
...

However, the HD44780 chip datasheet shows the 4 bit mode initialization is...

power on
wait for more than 15 msec
send (B0011) to DB7-4
wait for more than 4.1 msec
send (B0011) to DB7-4
wait for more than 100 usec
send (B0011) to DB7-4
send (B0010) to DB7-4 for 4 bit operation

Yoshi
  Reply With Quote
Old 06-29-2008, 02:37 PM   #18 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,235

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Thanks Yoshi, I had an old lcd library I got that from. I "jiggled the handle" a little more in 0.66 and got it to come up reliably on reset. Will examine that sequence more closely for the next version.
  Reply With Quote
Old 06-29-2008, 02:45 PM   #19 (permalink)
SuperMID designer
 
Yoshi's Avatar
 
Join Date: Mar 2008
Location: Yokohama, JAPAN
Posts: 34
Please refer to following 4BitLibrary.
Arduino playground - LCD4BitLibrary

Yoshi
  Reply With Quote
Old 06-29-2008, 09:30 PM   #20 (permalink)
EcoModding Apprentice
 
cmags's Avatar
 
Join Date: Apr 2008
Location: Marietta, GA
Posts: 123

Scoob - '05 Impreza Outback Sport SE
90 day: 25.28 mpg (US)
I thought I had seen some minor differences in the 'guino's initialization code vs. some of the libraries on arduino.cc but I didn't get to really study the specs and codes yet, and figured there were multiple ways of doing it. Maybe the NKC LCD is more forgiving of tolerances than the one I have... I'll try v0.66 and let you know how it goes.
  Reply With Quote
Reply

Thread Tools





Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC5
All content copyright EcoModder.com