0

I have soldered the pins to my 20x4 LCD display. The soldering is not very good, but this is the best i can do. I have measured the resistance between each of the pins of the LCD with my multimeter to check if the pins are isolated. And they are! So the bad soldering is not the problem...

Last night, the display showed weird results and non-existent characters, all over the 20x4 display. This morning, it showed only full blocks. But now it is showing only 2 of the 4 rows. I think this is weird because i did not touch it in my sleep...

I should see the text 'Welcome', but i only see blocks now.

I dont have a potentiometer any more, so i used a for-loop with a PWM signal to check the contrast i need. This did work the last time for me.

I use the arduino MEGA. Below you see my code, and photo's of my little project.

#include <LiquidCrystal.h>
LiquidCrystal lcd(9, 10, 48, 46, 44, 42);

const int contrastPin = 8;

void setup() {
  // put your setup code here, to run once:
  lcd.begin(20,4);
  pinMode(contrastPin,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:

  lcd.setCursor(0,0);
  lcd.print("Welcome");

  //LOOP TO CHECK TE CONTRAST
  for(int i = 0; i <= 255; i++){
    analogWrite(contrastPin,i);
    delay(30);
  }
}

Top of the LCD Control pins Data pins Screen in for-loop on index 0 Screen in for-loop on index 255 My current project (cigar humidor v0.1)

  • 1
    It may well be the bad soldering. Not short circuits, but dry joints and bad connections. – Majenko Jun 23 '18 at 10:36
  • Okay, i will try it again then... – Rubentje Jun 23 '18 at 11:28
  • 1
    Add some flux to ease your soldering nightmare. – Majenko Jun 23 '18 at 11:35
  • That PWM signal to control the contrast unsettles me. At the very least, use a capacitor to smooth out the voltage. If you google this technique most say not to do it and replace the PWM with a digital pot. But, then, an analog pot would be much easier to implement. – st2000 Jun 23 '18 at 13:41
  • It that water you are pumping around? At the very least, get your electronics away from where water might collect in case of a plumbing failure. – st2000 Jun 23 '18 at 13:49
0

I re-soldered the pins. Also, I used a small resistor between my PWM signal and the VO port. Now it works perfectly.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.