Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Serial I2C LCD 1602 Module (HCARDU0023) 
Author Message

Joined: Thu Jan 14, 2016 3:36 pm
Posts: 12
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
Hi Andrew

In answer to question.

I deleted the library called "HCARDU0023_LiquidCrystal_I2C_V2_1" and just to be sure I recompiled the sketch form the first post at the top of this topic. the compile failed with a "no such library" message.

I then redownloaded the zipped file from the first post at the top, extracted the zipped files into the arduino libraries folder and recompiled and uploaded the sketch from this first post. It compiled and loaded ok; but only the "H" appeared on the top line and only the "*" appeared on the bottom line of the LCD. :)

Have you any other ideas? or should I ask for an LCD replacement?


Fri Jan 15, 2016 11:52 am
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 649
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
If we can't get to the bottom of it we can certainly arrange for a replacement.

I've never seen this type of problem before. The fact that you are seeing something happen does mean there is some form of life but it sounds like it's losing the connection during data transfer for some reason. The only thing left I can suggest is to check the connections, especially the power and ground pins. Make sure you have a good ground connection to your Mega. Also what voltage are you driving the module at and how long are the cables to the module?

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Fri Jan 15, 2016 2:03 pm
Profile

Joined: Thu Jan 14, 2016 3:36 pm
Posts: 12
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
Hi Andrew. Thanks for the prompt reply.


FYI. The cables and connectors have been cannibalised from an old keyboard.
They are approx 30cm for SDA/SCL and approx 10cm for VCC/GND

I have disconnected each one separately and tested the LCD/arduino setup.

With the GND disconnected the screen flashed at approx 1Hz very dimly.
With the VCC disconnected the screen was as dead as a dodo.
With SDA disconnected the screen simply showed the topline as solid characters (i.e. every dot in the matrix switched on. Same thing with the clock line.

Also FYI, my intention is to run the screen maybe 1.5m from the arduino. It will be part of signalling on a model railway. In combination with the signalling programming I plan to measure track power and arduino power with hall effect transducers and output the measurements to the LCD.

Thanks for your help so far.


also driving the LCD from the 5v VCC.


Fri Jan 15, 2016 3:56 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 649
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
I've just taken one out of stock and I can replicate your problem. It's not an issue with the LCD itself, it looks like something in the new version(s) of the Arduino IDE has broken the library. Please bear with me whilst I look into it and figure out a permanent fix.

As temporary fix, if you download one of the older versions of the Arduino IDE (https://www.arduino.cc/en/Main/OldSoftw ... s#previous) it should work fine. I've checked it with V1.05 which is quite old but a newer version like 1.5.x should work too. Just download the ZIP version and you can then run it along side whatever version you have installed version. I'll post here when I have a fix.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Fri Jan 15, 2016 4:49 pm
Profile

Joined: Thu Jan 14, 2016 3:36 pm
Posts: 12
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
andrew wrote:
I've just taken one out of stock and I can replicate your problem. It's not an issue with the LCD itself, it looks like something in the new version(s) of the Arduino IDE has broken the library. Please bear with me whilst I look into it and figure out a permanent fix.

As temporary fix, if you download one of the older versions of the Arduino IDE (https://www.arduino.cc/en/Main/OldSoftw ... s#previous) it should work fine. I've checked it with V1.05 which is quite old but a newer version like 1.5.x should work too. Just download the ZIP version and you can then run it along side whatever version you have installed version. I'll post here when I have a fix.


Hi Andrew thanks for prompt reply.


I am underway with re-install. I will keep you posted :)


Fri Jan 15, 2016 7:35 pm
Profile

Joined: Thu Jan 14, 2016 3:36 pm
Posts: 12
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
Hi Andrew

Success! :D


re-install of IDE was a bit of a pain. Had to have two runs at it. Mea Culpa.

The old IDE is missing the recent sketch option. :roll:

FYI I had done some strange coding to solve my single character problem.
When I tried to recompile my sketch on the old IDE version it threw up all sorts of compile errors.
In fact the code I wrote did not seem to match the arduino coding reference pages.


However you are my new hero.



I have one last question. In one of your replies you mentioned cable length from arduino to LCD. This has spooked me a little as I was planning to make my cable approx. 1.5 meters. Is this a problem?


Fri Jan 15, 2016 8:02 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 649
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
I've now updated the library in the first post. It's working fine with the latest Arduino IDE (1.6.7). Just delete the old library and install this new one. Note that in your sketch to initialise the LCD you need to use lcd.begin() instead of lcd.init().


Quote:
I have one last question. In one of your replies you mentioned cable length from arduino to LCD. This has spooked me a little as I was planning to make my cable approx. 1.5 meters. Is this a problem?


1.5M should be fine.

Quote:
re-install of IDE was a bit of a pain. Had to have two runs at it. Mea Culpa.


Just for information if you download the ZIP versions of the IDE you can run them directly out of the unzipped folder without having to install them. It's very convenient if you want to run multiple versions along side each other.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Sat Jan 16, 2016 10:10 am
Profile

Joined: Thu Jan 14, 2016 3:36 pm
Posts: 12
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
Thanks very much Andrew. Very pleased with outcome.

Have not re-installed IDE yet.

Thanks for tip about running from zip file.

:D


Sat Jan 16, 2016 3:27 pm
Profile

Joined: Thu Jan 14, 2016 3:36 pm
Posts: 12
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
Hi Andrew.

Work proceeding on my arduino on my model railway.

I'm not sure if I asked this, but I'm planning to run my LCD off a separate power supply (5V of course), do I need to tie the ground of this power supply to the ground of arduino?

Is this a good thing to do anyway, viz tie all grounds together?

I ask because I'm planning to connect Hall effect transducers to the analog pinss to measure the amperage through my arduino and through my train controller and I seem to recall a youtube video of someone saying that the ground of the transducer had to be tied to the arduino ground. Is this correct? Please.

Regards TJ


Wed Jan 27, 2016 10:32 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 649
Post Re: Serial I2C LCD 1602 Module (HCARDU0023)
Yes, the digital signals from your Arduino to the LCD need to have a ground reference. Similarly your power supply for the LCD needs a ground return path. As both the Arduino and the power supply will then be both grounded to your LCD, their grounds are effectively connected together.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Thu Jan 28, 2016 9:27 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 42 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD