My question is : I know that GPIO is 3.3v in raspi , and mega IO pins is 5v. In my case i want to send data serially from raspi to mega so i will connect tx from raspi as output to rx in arduino as input. if i do that without other connection just this , can i connect them directly ? raspi will send 3.3v output and arduino will recieve it so i think no damage will occur in both devices and the arduino should detect it as HIGH ? and i want to connect common ground between both devices .. so what do u think ?
2 Answers
Note that most Arduinos work just fine when powered with 3.3V, although this is technically out of specification use. However, you only need to do something if you want bidirectional communication: sending a signal from a 3.3V device (such as a Pi) to a 5V device (Arduino) is a very common use case, and virtually all modern 5V devices have no trouble understanding 3.3V signals. Arduino has tons of addons featuring 3.3V ICs, and in many cases there are no level shifters on Arduino inputs of such addon boards.
You can quite safely connect a Pi GPIO output to an Arduino input.
It will probably work, although technically the logic level is marginal.
Level converters are readily available and cheap and can provide reliable bi-directional connection.
-
Good points - If you want to ensure that the signals are interpreted correctly and guarantee that no damage occurs (if you decided that to have the 5V Arduino output be sent to the 3.3V Pi input there will likely be hardware damage if you do not properly down-shift the voltage), just use the bi-directional logic level converters --- they are very inexpensive as well.– PHimmelNov 27, 2020 at 5:09