Arduino Due and 1602 LCD keypad shield modification

I know the sain smart 1602 LCD keypad shield will not work with Due since it uses 5V. I wanted to know if anyone has modified the sain smart 1602 LCD keypad shield to work with a 3.3 input voltage.

Insert a 7660 voltage pump as U3 and 10uF Tantalums as C1 and C2, open J1. that's it.

Thanks. I pulled the 5V pin out completely from the LCD keypad shield and jumped the 3.3V over to the the 5v on the LCD keypad shield. The board lights up but the software does not display Hello World.

I am using this pin mapping. LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

-phil

Hello weightwatcherphil,

I think your problem lies in your LCDKeypad shield itself. Why? The minimum VDD for logic in the TC1602 is 4.8V, thus with 3.3V it will not work. May be your solutions are either to replace your shield for a 3.3V or to use a logic level converter like:
https://www.sparkfun.com/products/11978 or so.

Regards,
Palliser

Thank you so much. I checked specs on TC1602 and VDD is 5v like you said. I will get another shield.
Does Sain Smart make a LCD keypad Shield that uses a 3.3 volt chip ?
thanks
Phil

Do you think I can take the Sain smart board and pull the TC1602 and replaced it with a HD44780 from sparkfun electronics?

weightwatcherphil:
Do you think I can take the Sain smart board and pull the TC1602 and replaced it with a HD44780 from sparkfun electronics?

I don't see how you can do that. AFAIK, most of the 1602s are glued (epoxied) directly onto the board and for sure both prints (TC1602 and HD44780) will not match. I'd rather recommend you to get a new 3.3v LCD board.
Palliser

i was thinking of using this part

-phil

weightwatcherphil:
i was thinking of using this part

https://www.sparkfun.com/products/9052

-phil

Hi Phil,
I think that should be a right choice (3.3V and HD44780). I must say that so far I have not used DUE with an LCD.
May be someone here in the forum could tell us about it.
-P

I worked very well.
I just used a hot air gun and unsoldered all 16 pins at once on the TC1602 and put in the spark fun board.

but I used software from a post I found on this site however I cannot remember the post at this time.
will see If I can find it.
-Phil

This is the code I used. it came from a post and I am embarrassed that I cannot list the author's name.

/*
LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD
and shows the time.

The circuit:

  • LCD RS pin to digital pin 8
  • LCD Enable pin to digital pin 9
  • LCD D4 pin to digital pin 4
  • LCD D5 pin to digital pin 5
  • LCD D6 pin to digital pin 6
  • LCD D7 pin to digital pin 7
  • LCD R/W pin to ground
  • 10K resistor:
  • ends to +5V and ground
  • wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
modified 24 July 2013 to work with the SainSmart LCD Keypad Shield
by Tim Kirkman

This example code is in the public domain.

*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8,9,4,5,6,7);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("put msg here!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}

this code printed and let me decode the buttons correctly at 3.3 volts.
//Sample using LiquidCrystal library
#include <LiquidCrystal.h>

/*******************************************************

This program will test the LCD panel and the buttons
Mark Bramwell, July 2010

********************************************************/

// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

// define some values used by the panel and buttons
int lcd_key = 0;
int adc_key_in = 0;
#define btnRIGHT 0
#define btnUP 1
#define btnDOWN 2
#define btnLEFT 3
#define btnSELECT 4
#define btnNONE 5

// read the buttons
int read_LCD_buttons()
{
adc_key_in = analogRead(0); // read the value from the sensor
/*
// my buttons when read are centered at these valies: 0, 144, 329, 504, 741
// we add approx 50 to those values and check to see if we are close
if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result
// For V1.1 us this threshold
if (adc_key_in < 50) return btnRIGHT;
if (adc_key_in < 250) return btnUP;
if (adc_key_in < 450) return btnDOWN;
if (adc_key_in < 650) return btnLEFT;
if (adc_key_in < 850) return btnSELECT;
*/

// For V1.0 comment the other threshold and use the one below:
/*
if (adc_key_in < 50) return btnRIGHT;
if (adc_key_in < 195) return btnUP;
if (adc_key_in < 380) return btnDOWN;
if (adc_key_in < 555) return btnLEFT;
if (adc_key_in < 790) return btnSELECT;
*/

// For V3. comment the other threshold and use the one below:
// my buttons when read are centered at these valies: 0, 144, 329, 505, 740
// we add approx 50 to those values and check to see if we are close

if (adc_key_in < 50) return btnRIGHT;
if (adc_key_in < 194) return btnUP;
if (adc_key_in < 379) return btnDOWN;
if (adc_key_in < 555) return btnLEFT;
if (adc_key_in < 790) return btnSELECT;

return btnNONE; // when all others fail, return this...
}

int button_count=1;

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

int i;

void setup()
{
lcd.begin(16, 2); // start the library
lcd.setCursor(0,0);
lcd.print("Push the buttons"); // print a simple message

// initialize the digital pin as an output.
pinMode(led, OUTPUT);

}

void loop()
{
lcd.setCursor(9,1); // move cursor to second line "1" and 9 spaces over
lcd.print(millis()/1000); // display seconds elapsed since power-up

lcd.setCursor(0,1); // move to the begining of the second line
lcd_key = read_LCD_buttons(); // read the buttons

switch (lcd_key) // depending on which button was pushed, we perform an action
{
case btnRIGHT:
{
lcd.print("RIGHT ");
button_count=2;
break;
}
case btnLEFT:
{
lcd.print("LEFT ");
button_count=3;
break;
}
case btnUP:
{
lcd.print("UP ");
button_count=4;
break;
}
case btnDOWN:
{
lcd.print("DOWN ");
button_count=5;
break;
}
case btnSELECT:
{
lcd.print("SELECT");
button_count=6;
break;
}
case btnNONE:
{
lcd.print("NONE ");
button_count=1;
break;
}
}

}