Turn off pull-up of RX pin of Arduino mega 2560


I'm trying to communicate with a drive and an Arduino using serial communication. The drive accept 5v on his RX pin and his TX pin sends 3.3v.

It seems like the arduino is pulling up the 3.3v to 5v (TX pin of the drive), which make the signal unreadable (always above the schmitt trigger I guess).

Here is what it looks like on an oscilloscope. The first image is the TX of the drive when connected to nothing and the second one is the TX of the drive when connected to an Arduino.

I don't really understand what's the issue since the Arduino is supposed to be able to read 3.3v on his RX pin. If you have any idea how I can fix the problem, please tell me :slight_smile:

Try using Serlal1 on pins 18, 19.
There are no resistors there.

The Rx pin does not pull HIGH. That is done by the Tx and I suspect what you are seeing is the Tx of the Atmega 16U2 (which is the USB interface) pulling the Rx of pin 0 HIGH. When the Serial system is idle it holds the Tx HIGH.

For communicating with a 3.3v system (using Serial1 as already mentioned) you should have no trouble interpreting the 3.3v signal on RX1 but you must reduce the TX1's 5v down to 3.3v before connecting to the 3.3v system. A simple voltage divider with a pair of resistors will do the job.