Serial Communication with ATmega2560 using RS485


I am working on a project in which I need to measure vehicle speed using Radar Sensor.

I am using iSYS4002 (innosent GmbH) Radar sensor in my project.

I have connected Controllino Maxi(ATmega2560) using RS485 Interface.

Can anyone help me to find out how can I communicate between ATmega and Radar sensor?

I need to measure speed from sensor and showing as an analog output on controller.

Thank you

The RS-485 standard specifies differential signaling on two lines rather than single-ended with a voltage referenced to ground as you would have with Serial. The right pins need to get into your connector on the arduino side.

Your sensor has a special connector that you need to properly connect to an RS485 interface

then see this article for ideas on the code

Hi J-M-L,

Thank you for your reply.

I made pin configuratation in a proper manner.

I was trying to understand programming part you suggested me.

It is for connection between 2 different Arduino with 2 different programms.

but in my case I have only 1 Arduino and 1 radar Sensor.

Should I configure in same manner or is there any particular method for this type of configuration?

Thanks again.

I have one more doubt.

I have a document with different PIN configuration.

I have configured as:

A(+) —> Rx
B(-) —> Tx

Let me know If I made any mistake.

Always best to load the images directly - here is your image |500x291 (hi resolution source)

The Controllino Maxi has its RS485 interface already wired (with no termination inside) and the driver is connected to the UART3 (TxD3 / RxD3) of the ATmega2560.

so if you have the right cable then you need wires coming into the Controllino Maxi form your sub DB9 pins 2,3 and 5. Connect pin 5 to GND of the Controllino Maxi RS485, pin 2 probably to - and pin 3 to + (verify polarity). I assume they come from the remote connector pin 5/6/7.


then try writing a piece of code listening to what's coming into Serial3

check Nick's web site on RS485 communications