Hi,
I am trying to connect multiple arduinos (or in general ATMEGAS) to a PC via the RS485 connector. As far as I know, I need to use a RS485 to TTL converter inbetween to cope the different voltage levels. I found this device here: "TTL to RS-485 module" (https://www.amazon.de/MAX485-module-RS-485-TTL-MTS1EU/dp/B017A676EY/ref=sr_1_4?ie=UTF8&qid=1538492552&sr=8-4&keywords=MAX485), which also seems to be the only suitably device for this purpose. Do you know alternative devices?
What do I have to consider beside the things I mentioned? Did I forget something important? I read about some end-resistors that are needed between the datalines of RS485, what about that? Is the device I mentioned suitable for any microcontroller with 3.3V / 5 V TTL or does this only work with arduino? Thanks.
the TTL to RS485 module is ok.
When you check the schematic of the device (even in your amazon URI!!!) you can see the 120 Ohm resistor between A and B as R7
This resistor is ok for the first and the last module in your bus. Remove that resistor for all modules between first and last module.
Looking at MAX485 datasheet
https://datasheets.maximintegrated.com/en/ds/MAX1487-MAX491.pdf
Vcc is input voltage and needs to be between 4.75V and 5.25V. The datasheet list some models that work with 3.3V. Boards with a MAX485 chip can be expected to work with any 5V microcontroller. There are ways to level shift between 3.3V logic and 5V logic.
DIY projects with the MAX485 are not easy. One problem is figuring out how to do the software so that only one MAX485 is driving the A/B lines at any time, it is just to easy for a little software mistake to damage the transceiver(s).
I am working on my own board to do this sort of stuff, it has a chip (74LVC07A) that level shifts for the microcontroller. Look at it as a reference, I have not tested it yet (soon I hope).
The main idea is to set things up so there is no way to self-destruct the transceivers while trying to figure out the software. It is still possible to wire A/B lines wrong but with luck, the lack of operation will point out the problem before any damage occurs.