(SOLVED) Wiring for LCD with keypad and I2C controller

Hello from a newbie in arduino! :slight_smile:

Sorry if this question is already answered, but i search the forum and i didn’t find the solution.

Well i have the following components

  1. Uno
  2. DFRobot LCD 16X2 with keypad

http://www.ebay.es/itm/LCD1602-LCD-characters-input-output-expansion-board-LCD-Keypad-Shield-Arduino-/231570084734?hash=item35eaa7137e

  1. I2C interface

http://www.ebay.es/itm/Modulo-interfaz-LCD-I2C-LCD1602-20x4-2004-2-pines-Arduino-Sensor-Module-R3-/231451137649?hash=item35e3901671

I connect the 4 pins of the I2C with my UNO (5v, ground, a4, a5). Then, i connect the 16 pins of the I2C with the upper 16 pins of the LCD. As a result the I2C interface powers on (light red) but the LCD does not light UP!!! any HELP? I attach a photo of my project.

ps. i tried folding the lcd directly with the Uno and it does light up so there is no problem with it.

Then, i connect the 16 pins of the I2C with the upper 16 pins of the LCD.

From your attached photo it appears that the 16 pins of the i2c adaptor are connected to the 16 pins on the outside edge of the keypad shield which match the 14 digital pins plus gnd and aref pins on the Uno.

The i2c adaptors are designed to connect to the 16 pins of the lcd module itself. The pins of the i2c interface do not map to the pins of the Uno.

I'm not sure you can run one of these button shields with the standard i2c adaptor modules.

Boy have you got it all muddled!

The first item you cite has the LCD already affixed to a “shield”. You would need to unsolder it (not advised unless you have substantial experience with soldering) to attach the backpack.
b87e967069424d054a720f155517f16f04895e31.jpg
The pins that mate with the Arduino do not correspond at all to the pins on the LCD, so what you have rigged up will not work.

Best advice: Either use it on the Arduino, or go buy another display on its own. They are only about $3 US anyway.

Thanks for the prompt answer! :slight_smile:

So there is no way to attach the lcd-buttons shield with the UNO through the I2C interface (or backpack as also called?) Am i right?

Also if i connect lcd-buttons shield directly to UNO can you give me a url to find which pins are used and which are free in order to connect some other sensors?

thank you again very much and excuse me for the naive questions!

Surely you just plug the Shield into the UNO. Then run the example programs.

No, I have no idea where you find the example programs. Just Google DFRobot. Or look on SparkFun's website for "similar" shields. e.g. LCD Button Shield V2 - DEV-13293 - SparkFun Electronics
Or hand-trace which LCD pin goes to which UNO pin.

It looks as if there is a 5x2 male header for you to access the other pins of the UNO. e.g. for attaching sensors or external electronics.

No, I have never used or even seen this type of module. I suspect that you could unplug it from the UNO and drive it via an I2C backpack if you really wanted. It would be a lot of f*rting about. Almost certainly the pins would NOT line up.

David.

groban:
Hello from a newbie in arduino! :slight_smile:

Sorry if this question is already answered, but i search the forum and i didn’t find the solution.

Well i have the following components

  1. Uno
  2. DFRobot LCD 16X2 with keypad

http://www.ebay.es/itm/LCD1602-LCD-characters-input-output-expansion-board-LCD-Keypad-Shield-Arduino-/231570084734?hash=item35eaa7137e

  1. I2C interface

http://www.ebay.es/itm/Modulo-interfaz-LCD-I2C-LCD1602-20x4-2004-2-pines-Arduino-Sensor-Module-R3-/231451137649?hash=item35e3901671

I connect the 4 pins of the I2C with my UNO (5v, ground, a4, a5). Then, i connect the 16 pins of the I2C with the upper 16 pins of the LCD. As a result the I2C interface powers on (light red) but the LCD does not light UP!!! any HELP? I attach a photo of my project.

ps. i tried folding the lcd directly with the Uno and it does light up so there is no problem with it.

I hope you have read the links (RTFM) Have you asked the seller for the software??
The way you have hooked it up - is is not PLAIN (i2c) LCD, you need the “buttons” (i2c) software too!

I would be surprised that vendor would sell an I2C module for “Utilizes the extremely common HD44780 parallel interface chipset” and not have a pin to pin compatibility with the LCD.

I would even say you have done NOTHING wrong in your setup as far as LCD goes , perhaps you did not hooked up the backlight and did not adjusted the contrast.

But the buttons are different story!

My guess is that the I2C controller is ONE way ( LCD) only and not ( off the shelf) capable to read the buttons.

I would love to see a snippet of your INITIALIZATION code too.
Just the LCD constructor and few lines after.

I do not need all of your code!

Vaclav:
I would even say you have done NOTHING wrong in your setup as far as LCD goes , perhaps you did not hooked up the backlight and did not adjusted the contrast.

You seem very confused about what was happening. It has already been properly explained.

b87e967069424d054a720f155517f16f04895e31.jpg
The arrangement illustrated is totally incorrect and meaningless because the connection is made to the wrong pins. It is not in any way appropriate in any case to have the LCD module connected both to the “shield” and to the I2C backpack even if you used the correct connections as you would be connecting other things together as well, and in particular, you would be connecting the two contrast potentiometers in parallel so that they would clash and potentially even short out the supply.

Thus the correct advice: Either use the shield as is mounted on the UNO, or purchase another display to use with the backpack. It would be not particularly advisable to unsolder the display from the shield just to use it separately (though I actually did unsolder mine temporarily in order to correct the fault detailed in the warning sticky on this topic, which should be studied if using the shield at all).


Use right-click “View Image” to see the illustrations properly.

groban:
Hello from a newbie in arduino! :slight_smile:

Sorry if this question is already answered, but i search the forum and i didn't find the solution.

Well i have the following components

  1. Uno
  2. DFRobot LCD 16X2 with keypad

http://www.ebay.es/itm/LCD1602-LCD-characters-input-output-expansion-board-LCD-Keypad-Shield-Arduino-/231570084734?hash=item35eaa7137e

  1. I2C interface

http://www.ebay.es/itm/Modulo-interfaz-LCD-I2C-LCD1602-20x4-2004-2-pines-Arduino-Sensor-Module-R3-/231451137649?hash=item35e3901671

I connect the 4 pins of the I2C with my UNO (5v, ground, a4, a5). Then, i connect the 16 pins of the I2C with the upper 16 pins of the LCD. As a result the I2C interface powers on (light red) but the LCD does not light UP!!! any HELP? I attach a photo of my project.

ps. i tried folding the lcd directly with the Uno and it does light up so there is no problem with it.

RTFM - this shield HAS I2C controller build-in so either wire it right or just take "team" advise and throw it away. Your choice.

To VALCLAV:

Thanks for the help!

Well my seller is the kind of "sell and goodbye!" :frowning: Moreover, i think that his arduino experience is round to zero thus leading me to the conclusion that maybe the lcd with keypad is incompatible (at least pin to pin) with the I2C interface. And if not incompatible with the lcd, surely with the lcd-keypad combination.

The code used for my experiment is taken from here (the second code titled "Example use of Enhanced LiquidCrystal_I2C library(Not updated)")
http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)

I plug lcd shield directly to UNO and worked fine. (small problems when use other sensors, DHT22, on the remaining pins).

thanks again!

To PAUL__B

thanks again for the answer!

it took me some time to understand terms like un-soldering and backpack but i finally understand your answer!

You are right, i will give up the I2C method and i will use lcd-keypad shield directly to UNO.

thanks again!

groban:
Well my seller is the kind of "sell and goodbye!"

Let me guess. eBay?

Paul__B:
Let me guess. eBay?

you are a prophet! :slight_smile:

Another lesson learned:
"pay a little bit more, but buy branded equipment from trusted sellers!"

groban:
To VALCLAV:

Thanks for the help!

Well my seller is the kind of “sell and goodbye!” :frowning: Moreover, i think that his arduino experience is round to zero thus leading me to the conclusion that maybe the lcd with keypad is incompatible (at least pin to pin) with the I2C interface. And if not incompatible with the lcd, surely with the lcd-keypad combination.

The code used for my experiment is taken from here (the second code titled “Example use of Enhanced LiquidCrystal_I2C library(Not updated)”)
http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)

I plug lcd shield directly to UNO and worked fine. (small problems when use other sensors, DHT22, on the remaining pins).

thanks again!

Somehow I feel you are making fun of me.

To make sure - I’ll just repeat - the shield HAS I2C interface build in.
If you have read the sellers description you would know that you do not need external I2C controller.
That is where “RTFM” came from.
This discussion has given you link to the documentation so you should be able to wire it.

If the seller did not give you this link , complain to e-bay.

If you are unable / incapable to read the doc and unable to wire it, that is a different issue.
By this I mean no offense, just like to play with full deck.
Ether you are able to do this or not.
And since you are going to buy another shield I would gather you are not as capable as you would like us to believe.

Again, take no offense, I hope.

I still like to know how you made it work “directly” with Uno.
Did you actually used the buttons and the LCD display?
Or did the backlight came on and you called it “working”?

Good luck

Vaclav:
Somehow I feel you are making fun of me.

To make sure - I'll just repeat - the shield HAS I2C interface build in.
If you have read the sellers description you would know that you do not need external I2C controller.
That is where "RTFM" came from.
This discussion has given you link to the documentation so you should be able to wire it.

If the seller did not give you this link , complain to e-bay.

If you are unable / incapable to read the doc and unable to wire it, that is a different issue.
By this I mean no offense, just like to play with full deck.
Ether you are able to do this or not.
And since you are going to buy another shield I would gather you are not as capable as you would like us to believe.

Again, take no offense, I hope.

I still like to know how you made it work "directly" with Uno.
Did you actually used the buttons and the LCD display?
Or did the backlight came on and you called it "working"?

Good luck

Well as i previous mentioned i am a newbie to Arduino (not however to programming).

I explain to the seller the project i want to create and HE suggest and send the items. So, it was not my decision to buy an additional I2C interface. The seller send it to me.

I was bought the parts from internet, outside of ebay. During my after-sale contacts with the seller he told me that he is incapable of providing me further technical support. So, there is no way to get help from him. I tried to get help from internet and i founnd the url http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)

How i managed to play with the shield?

I plug the shield directly to my UNO and i used the code of the url mentioned previously. The lcd worked fine displayed the messages and recognized the buttons (i push a button and the corresponding message displayed). In specific, i used the older version values for the analog input as they are mentioned in the code.

that's, in short, my current journey to the world of arduino.

I am trying to learn, not to joke anyone, not even myself!

groban:
I explain to the seller the project i want to create and HE suggest and send the items. So, it was not my decision to buy an additional I2C interface. The seller send it to me.

Clearly inappropriate.

groban:
During my after-sale contacts with the seller he told me that he is incapable of providing me further technical support.

No doubt. No doubt at all! :roll_eyes:

groban:
Well as i previous mentioned i am a newbie to Arduino (not however to programming).

I explain to the seller the project i want to create and HE suggest and send the items. So, it was not my decision to buy an additional I2C interface. The seller send it to me.

I was bought the parts from internet, outside of ebay. During my after-sale contacts with the seller he told me that he is incapable of providing me further technical support. So, there is no way to get help from him. I tried to get help from internet and i founnd the url http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)

How i managed to play with the shield?

I plug the shield directly to my UNO and i used the code of the url mentioned previously. The lcd worked fine displayed the messages and recognized the buttons (i push a button and the corresponding message displayed). In specific, i used the older version values for the analog input as they are mentioned in the code.

that's, in short, my current journey to the world of arduino.

I am trying to learn, not to joke anyone, not even myself!

Thanks for reply, so the last question - if it worked plugged in the "mother" board why did you decided to insert the I2C control hardware and wired it as plain LCD - controls and data ?

I know I'll sound as "everybody is a general after the battle", but you had the shield doc / schematic which shows ALL of the connections required , not just the LCD.
The "buttons" are analog, I2C is connected to proper port on the "mother" board and there are actually no data connections to the LCD - all done via I2C etc.

Not to moralize - but next time read the manual , schematic, open the software and ASK questions before you plug it in.

You need to keep the smoke in, you got lucky this time!

Good luck

Vaclav:
Thanks for reply, so the last question - if it worked plugged in the "mother" board why did you decided to insert the I2C control hardware and wired it as plain LCD - controls and data ?

I know I'll sound as "everybody is a general after the battle", but you had the shield doc / schematic which shows ALL of the connections required , not just the LCD.
The "buttons" are analog, I2C is connected to proper port on the "mother" board and there are actually no data connections to the LCD - all done via I2C etc.

Not to moralize - but next time read the manual , schematic, open the software and ASK questions before you plug it in.

You need to keep the smoke in, you got lucky this time!

Good luck

I decided to use the I2C interface because:
a) i believed that seller knows better in order to include it in the order
b) i considered that using shield through I2C will leave more un-allocated pins on UNO
c) my capabilities in reading wiring diagrams are limited

Thanks for all the help!

Just in case someone else wanders in here with the same problem the way I did: How to connect the I2C backpack to the 1602 keypad shield is described here:

Definitely an exercise is "creative head-banging"! :astonished:

Over three years ago, but I am surprised I did not pick up on the repeated assertion:

vaclav:
Somehow I feel you are making fun of me.

To make sure - I'll just repeat - the shield HAS I2C interface build in.

It is in fact, entirely clear that the "LCD Keypad Shield" simply does not include an I2C interface for the LCD - or anything else. It would have been a better design if it did, and also did not have the fault discussed here.

However vaclav is long gone!