1602 I2C LCD writing very dull.

External hardware connected to the STM32 board
Post Reply
Buleste
Posts: 43
Joined: Sun Nov 06, 2016 12:19 pm

1602 I2C LCD writing very dull.

Post by Buleste » Sat Jan 21, 2017 4:16 pm

I'm trying to set up my Maple Mini to display on a I2c 1602 LCD and I'm running the Hello World example and it works if I upload but the writing is hardly readable even if I alter potentiometer. I've tried running off USB and 7.5v through VIN.

SDA and SCL are connected to I2C1 and the VCC and GND are connected to the VCC and GND on the Mini. I know the LCD works fine on an Arduino Nano.

fredbox
Posts: 98
Joined: Tue Jul 07, 2015 4:44 pm

Re: 1602 I2C LCD writing very dull.

Post by fredbox » Sat Jan 21, 2017 5:14 pm

The 1602 is a 5 volt display. I would not expect it to work very well from 3.3 volts.
Looking at this data sheet, the allowable voltage range is 4.8 to 5.2 volts.

User avatar
Pito
Posts: 1739
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: 1602 I2C LCD writing very dull.

Post by Pito » Sat Jan 21, 2017 5:48 pm

The 1602 may work at 3.3V fine, what could be the problem is the -Vcontrast, which sets the contrast.
There is a trick with creating small negative voltage (for example -5..-3V), and connect the potentiometer driving the -Vcontrast to it.
You can do it with 2x 1n4148 (or schottky) and 2 capacitors, ie 100n-1uF, provided there is a few kilohertz digi signal somewhere in your circuit available..
1602 Contrast.JPG
1602 Contrast.JPG (17.1 KiB) Viewed 1122 times
Provided as-is, no warranties of any kind :)
Pukao Hats Cleaning Services Ltd.

Buleste
Posts: 43
Joined: Sun Nov 06, 2016 12:19 pm

Re: 1602 I2C LCD writing very dull.

Post by Buleste » Sat Jan 21, 2017 6:06 pm

Yeah. It is the old trying to get a 5v screen to run on a 3.3v device.

I'd hoped there would be an easy answer but it doesn't look like it.

Thanks for your help.

User avatar
Pito
Posts: 1739
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: 1602 I2C LCD writing very dull.

Post by Pito » Sat Jan 21, 2017 6:13 pm

it works if I upload but the writing is hardly readable even if I alter potentiometer
Your 1602 works at 3.3V fine.
The issue is the -Vcontrast.
Try to connect the contrast potentiometer to -3V (ie a coin battery) to check it out. Afaik I did it in past and the 1602-like display worked at 3.3V fine..
Attachments
1602 Contrast -3V.JPG
1602 Contrast -3V.JPG (12.44 KiB) Viewed 1118 times
Pukao Hats Cleaning Services Ltd.

Buleste
Posts: 43
Joined: Sun Nov 06, 2016 12:19 pm

Re: 1602 I2C LCD writing very dull.

Post by Buleste » Sat Jan 21, 2017 6:26 pm

As the potentiometer is built into the I2c board it's not easy to add voltage directly to it.

User avatar
Pito
Posts: 1739
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: 1602 I2C LCD writing very dull.

Post by Pito » Sat Jan 21, 2017 6:30 pm

You have to cut the trace.. :)

Btw, you can run the LCD display on 5V and connect it to 3.3V I2C Maple Mini or BluePill's signals..

So - MapleMini/BluePill's MCU will have 3.3V Vcc as usual, and the LCD module 5V Vcc. It should work fine.

The 5Volt for the LCD should be taken off the MapleMini board. Do not connect external 5Volt (or higher) to Vin on the MapleMini or BluePill when powering MM/BP from the USB (unless you know well what you are doing)..
BPill adn 1602 LCD.JPG
BPill adn 1602 LCD.JPG (22.36 KiB) Viewed 1115 times
PS: It may happen your LCD module has got its own 5V voltage regulator. You have to bypass it when running the LCD from 5V.

No warranties of any kind. Do it at your own risk :)
Pukao Hats Cleaning Services Ltd.

Post Reply