I have a 12 pair 22 gauge wire.
Can I use 10 feet to connect Mega to my LCD display.
Or do I have to use a I2C
I would use I2C if for no other reason as the wiring will be much easier.
The I2C is designed to connect devices on the same board or are very close. However Folks have reported good luck with the I2C bus at ranges you are asking about.
I would use the I2C but keep the I2C wires away from any power carrying wires.
I am one of the people @JohnRob is talking about, I have I2C working over about 30m.
I do believe that this hobby is about experimenting so I encourage you to try what you suggest and see if it works.
twisted pair
Reason I want to extend LCD from nano is I'm having trouble with the nano and was going to use a mega and it won't fit in case. For some reason the pin D4 and D5 stopped working it's connected to a MPU-6050 (SCL SDA). I know the MPU is ok cause it works on the mega. Can I use two other pins on the nano
I have an i2c laying around so I'm going that way
Looking at the i2c it connects to A4,A5 and thats for SCL, SDA. Im using a MPU-6050 and that requires the same two pins
How does that work
The MPU6050 is an I2C device (assuming you’re using a module). Just make sure they have their own I2C addresses and you will be fine.
Check this out.. pretty good explanation than I can do in a few minutes. How to Connect Multiple I2C Devices to an Arduino Microcontroller
Thanks
I remember awhile back I had two temp sensors that were on the same pin and there was a sketch I used to find the address of each. Is that the same thing I have to do here
Thanks, I have the address
I have read some post where I have to use resistors as pull-ups If I'm connecting more than one I2C's
Another post says that if the sensors are built into a board that the board will have pullups built into them and therefore don't have to use them
You always have to have pull up resistors with I2C, they are part of how it works. Whether you have to add them yourself or they are included in whatever board(s) you have is a different, unrelated question. You have to study the boards you have and their specification to find out if the resistors are there or not, and add them in if not.
One I2C bus needs 2 resistors in total, for any number of slave devices.
I2C has limitations in terms of distance, and the display could be "noisy".
I had a similar requirement and the answer was to use a second arduino at the remote end. Then communicate between arduinos with protocols designed to work over longer distance. Rs485, WiFi, RFM69, etc.
You could also use software serial, but you get common-ground problems over a distance.
Nice solution, RS232 would work fine for 10 ft. Usb would be fine also.
I can't imagine that there is a limit to how far away your LCD is as long as your wire has no resistance, but I do agree with everyone else. an I2C would definitely be easier. If you want to keep the Liquid Crystal Library for your code, you could attach an Arduino Nano to your LCD, and connect the serial lines to your Mega. But as I said earlier, an I2C would just be easier.
The only wire that has no resistance is a super-conductor and I doubt the OP has any of that kicking around in the fridge. Even with zero resistance there is inductance and capacitance to think about, there is noise pick up from the environment and there is transmission line theory to take account of.
I used CAT5 for 12 ft LCD would display properly for a few seconds then a bunch of garbage then a refresh then it would display properly and then again garbage. I'm going to use the I2C
To get more distance with I2C, decreasing the data rate and/or decreasing the pull up resistance (stronger pullup) can help.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.