LCD doesn't display properly with 5v Power supply

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!!