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.
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.
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.
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):
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!!