Nano (Classic) with MAX485 board as receiver - no upload

Starting off - I'm able to upload various sketches to the Nano when it's not connected to anything or to simple LED outputs, so I know the Nano is working fine. I'm using the USB port for power in all of this, presently. I intend to use a buck converter to Gnd+5V for the running setup.

Then: I am trying to use one of the cheap MAX485 half-duplex boards. (I've tried 3 different boards and have the same issue with all.)

The connection is as shown in many tutorials, that is:

MAX485 -> Nano:

  • VCC to 5.0
  • Gnd to Gnd
  • DI to TX1
  • R0 to RX0
  • DE to Gnd
  • RE to Gnd
  • A & B pins are currently disconnected.

Once I make these connections and reconnect the USB cable, I'm not able to upload a sketch, not even a blink example, to the Nano. I get the typical:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

For 10 tries.

If, however, I set up the MAX485 as transmitter by connecting RE and DE to 5v, it is able to upload sketches just fine.

I'm not very knowledgeable about the electronics side of this issue, so I'm wondering what might be going on. I am going to guess I can probably upload sketch while disconnected from the MAX485 and then reconnect the MAX485 and run, but that will be a "painful" way to test/debug the setup.

Can anyone shed a clue on this for me?

I am using Linux version of Arduino 2.0 software, although the problem seems to exist with PlatformIO as well, so I don't think it's software.

There is the likely cause of the problem

The Rx and Tx pins of the Nano are used to upload code to the board and also by the Serial monitor

That does seem to help, and I kind of wondered about that. Given the number of examples using this MAX485 board, I'm a little surprised.

I'll see if I can figure out how to use a different pair of pins for Serial. (I'm sure it's possible, I just don't know how yet. :slight_smile: )

Consider using SoftwareSerial on pins of your choice

1 Like

You can't move serial to other pins.

Question is if you need it in the final product? If not, you can try to live with the disconnect/connect :wink:

See @UKHeliBob's post #4; be aware of the limitations of SoftwareSerial (e.g. baudrate). Alternatively, get a board with a serial port that is not used for the USB. Similar form factor to the Nano are the Arduino Micro and SparkFun ProMicro; Arduino Nano Every is also an option but not all libraries are compatible with it so it depends omn your project.

Thanks; my data needs are miniscule, just accepting simple status information from a PC and toggling some LEDs. I'll see if I run into any issues with SoftwareSerial and go from there.

I'm surprised no one has mentioned simply disconnecting the serial connections while you upload to the Nano, then reconnecting for actual operation(obviously, no Serial printing can be done when using the MAX485, but that's a software fiddle away from being dead simple).

See post #5 and implied in post #2. And OP seems to have gotten the point according to post #3.

Not so much, unless he's already experienced enough to have known what was being implied. But you have your reality, I have mine. All good.

It's working fine now using some alternate pins and SoftwareSerial. As I mentioned, the needs are very small, like 1 byte every 250ms, one-way.

As far as disconnecting/reconnecting -- I plan to solder interconnects in the final (prototype) variation, so I'd like to be able to update it as I go along.

"It's all good". Thanks for the help, people.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.