+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 5
    Points: 87, Level: 1

    Join Date
    Feb 2019
    Posts
    9
    Helped
    0 / 0
    Points
    87
    Level
    1

    Arduino to Arduino using Serial through MAX232

    Hi, I have an application where I need 2x Arduinos to communicate together using Serial. Sure enough its easy RX to TX and TX to RX however I have 3 questions.

    1. I will need to pass the cables in the same trunk along with other 230V AC wires (can I solve this problem using twisted pair)?
    2. I need at most 15 metres of distance
    3. Assuming 2 separate power sources one on each end of the arduino, will I also need to ground the 2 supplies together?


    I did some research and it looks like it is possible using RS232 and so I tried to focus on MAX232 being very common and all that. However I simply cannot find a simple circuit to help me understand how to connect them which has now made me doubt if I am on the right track.

    I need some guidance as to where to look for more information. Is this the way to go? Will the MAX232 help me achieve long distance serial communication between 2 arduinos? and finally if I use twisted pair will it help with interference from the 230vac?

    Thanks a lot

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 75,525, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,310
    Helped
    3487 / 3487
    Points
    75,525
    Level
    67

    Re: Arduino to Arduino using Serial through MAX232

    Hi,

    1) twisted pair: Then itīs not RS232 anymore.
    --> use RS422/RS485

    2) did you read RS232 standars about cable length?
    --> If not: do it. Also read the RS422/RS485 standards.

    3) Do a little research on your own. Every reliable document about RS232 connections will show that you need at least: RxD, TxD, GND

    I simply cannot find a simple circuit
    This is nonsens.
    --> Every reliable document will show the connections, every RS232 IC manufacturer will provide those informations (datasheets, application notes), the RS232 standard shows it, and millions of documents in the internet..

    I need some guidance as to where to look for more information
    * read the standards
    * look at the IC manufacturers (they want you to buy their ICs, thus they give you a lot of assitance in form of documents)
    * look for reliable informations in the internet. Mainly sources like Wikipedia, institutes, universities...

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisement

        
       

  3. #3
    Super Moderator
    Points: 79,832, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,073
    Helped
    4372 / 4372
    Points
    79,832
    Level
    68

    Re: Arduino to Arduino using Serial through MAX232

    I'm with Klaus on this, twisting the wires alone will serve no purpose and twisting RS232 signals will make things worse. RS232 also requires a common ground between the two ends.

    In a situation where noise is high, such as being parallel to Ac power wires, the best solution is to use two twisted pairs, one for transmit and one for receive, this is typically implemented as RS422 standard. It is differential so it cancels noise emission and pick-up and the receiver end works on the principle of the difference between wires rather than the difference to ground so it allows SOME difference in ground voltage between the two ends. There are still limits to ground voltage differences so be careful with power supplies at each end.

    There are many RS422 drivers/receivers on the market, even ones with them both combined in an 8-pin package and because the signals are at 5V level, they do not need the extra charge pump capacitors that a MAX232 requires.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisement

        
       

  4. #4
    Newbie level 5
    Points: 87, Level: 1

    Join Date
    Feb 2019
    Posts
    9
    Helped
    0 / 0
    Points
    87
    Level
    1

    Re: Arduino to Arduino using Serial through MAX232

    As always thank you Klausst and betwixt for your time to explain things. I am doing further research and am not ready yet to close this topic. Will keep you updated. Cheers



--[[ ]]--