LCD doesn't display properly with 5v Power supply

I have built a distance sensor with the Arduino board. I am using this from Banggood:

IIC/I2C 1602 Yellow-Green Backlight LCD Display Module For Arduino.
The specs:
Power supply voltage: +5 v
Support the I2C

I have it all working correctly when I use a USB lead from my computer, and it displays any distances between a sensor and an object.

If I use a 5v 2.5 Amp power supply, the lcd only displays gibberish or the letters 'Distance' vey faintly, and won't show the actual distance. Plugging the USB lead again does show the distance and works great.

Am I missing something obvious or what?

I suppose you connected the 5volt supply to the 5volt pin.
Not to the V-in pin or the DC socket.

It might be 'safer' to use a 5volt cellphone charger connected to the USB socket.
Leo..

Wawa:
I suppose you connected the 5volt supply to the 5volt pin.
Not to the V-in pin or the DC socket.

It might be 'safer' to use a 5volt cellphone charger connected to the USB socket.
Leo..

Yes, the power supply has a barrel connector which I plugged in to the barrel socket on the Arduino. I have the 5v socket or pin on the Arduino tied to the +V on the bread board.

The barrel socket needs 6.5- 7V to give a clean 5V for the Arduino and other components to work with.

If you have a 5V power supply it should be connected to the 5V pin NOT to the barrel connector.

Steve

iI's weired tho' as 5volts from my PC through a USB lead works fine, and that is why I bought the 5volt PSU with a barrel connector.

I assume then that there is a diffence between the 2 power sources.

Would a 9volt supply be too much for the LCD.

Hi,
USB power is 5V, so it bypasses the 5V regulator.
The DC socket feeds the 5V linear regulator which needs at least 6.5V input to produce the regulated 5V supply.

When you plug 5V into the DC socket the regulator input is being powered by 5V, which is too low for the regulator to work with.

Tom... :slight_smile:

Ok thanks and well explained.

You could use a 2.1mm DC Power jack to convert your Barrel plug into to a 5V connection to the Arduino. This could be either a jack with "pigtail wires" (probably the easiest):

https://www.jameco.com/z/6FT-245-5X2-1-2-1mm-DC-Power-Jack-to-6-Foot-Pigtail-Wires_2114600.html

or a Chassis mount jack, like one of these:

https://www.jameco.com/z/722A-Switchcraft-2-1mm-Male-Power-Jack-2-Conductor_281851.html
https://www.jameco.com/z/HD2388C-Jack-DC-Power-Male-2-1mm-Plastic-Panel-Mount_2151136.html

or a goodie like this:

https://www.jameco.com/z/CD021-1-Velleman-2-1mm-x-5-5mm-Male-DC-Jack-to-Screw-Terminal-Single-_2227209.html

Or something else -- just make sure it's a "2.1mm x 5mm Male DC Power Jack" [I know..."Male"?!?...shouldn't it be "Female"?...I mean, if you think of the implications of the *plug* being called "Female", it's kind of scary, right?...but, it *is* called a "*Jack*", after all...think of it as a Male recently emerged from some *very cold water*!]

Remove any other power connection, then follow these steps:

  • Connect your Power Supply's barrel connector to the jack, and use a Voltmeter (or Multimeter set to around 20V) and determine the polarity. This is important, as connecting it backwards will probably fry the Arduino.
  • Now that you've determined the polarity, connect the positive side of the jack, to the +5V pin on the Arduino. OR, connect the positive side to a switch, then connect the other terminal (on the switch), to the +5V pin (on the Arduino).
  • Connect the negative side to the Gnd pin on the Arduino.

Voila! You can have your 5V power Supply, and use it, too!!