No announcement yet.

Maximum communication distance from Arduino shield to Display

  • Filter
  • Time
  • Show
Clear All
new posts

  • Maximum communication distance from Arduino shield to Display

    I all, Currently have an automation project at home that an ardiuno is controlling a bunch of lights and managing a Schedular for a pool pump and heater. All of this is was controlled by a uLCD 32PTU-AR display mounted on the wall. The display is some distance, ideally 7m away from the arduino shield.

    I have been struggling with communication between the two, 4m works fine but after that I run into issues. The two become out of sync and lock up. I have since fried the screen and trying to find the best option to fix this. Does anyone have any advise? Different display or would utilising a RS232 MOTG module and run CAT6 cable help with the long distance? If so do I need two MOTG for sending and receiving or only receiving?

  • #2

    Typically it relates to the Baud rate you are using. Are you using 200000 baud as per our demos?
    If you slow down the baud rate you can go a longer distance, and that is the case whether its TTL or RS232. I assume you are just using a longer 5 way cable and the standard TTL signals. If you go to 115200, or 38400, or even 9600, this will likely help considerably.
    This is not ideal for going 7m though but it can be achieved if you use decent cables and/or you slow your baud rate down.
    This can affect the update speed of your widgets though depending on what you are doing/showing etc. You will need to make that decision.

    If you go to RS232 then yes you will need a transceiver at each end. Display <==> RS232 Transceiver <-----------------------> RS232 Transceiver <===> Arduino
    You could do it with a MOTG RS232 with Breadtooth modules at each end since you don't seem to be using gen4 modules (as you mentioned uLCD-32PTU).

    I hope this is of some help.


    • #3

      Definitely wasn’t 200000 as it wasn’t working at 4m with that rate. I did run longer 5 way cable, but thinking now that wasn’t the best idea.

      As the screen has died was thinking of upgrading to gen4 module with a bigger display say 5 or 7”. If I was to do this and run cat5/6cable with MOTG as you said, would this be my best option at achieve the distance reliably?



      • #4
        With a gen4 display and a RS232 MOTG module, going over CAT5 cable to another MOTG RS232 module and Breadtooth (or another RS232 module of your choice) into your Arduino, you should be fine at that distance I would think.


        • #5
          What about wifi or bluetooth 😊 ?


          • #6
            Thanks for you help James, its greatly appreciated.

            In regards to wifi or bluetooth i did think if all that but didn't want over complicate the set up even more with programming and more modules. Not sure how I would program communications over those mediums. This is already been a huge learning curve. ahah


            • #7
              Hi, James

              Mate I can't seem to get the MOTG RS232 module to work on the bench with a short cable. I have set up as you advised above not sure what I'm missing:

              gen4-ulcd 50DT <==> gen4-MOTG-AC1 <==> MOTG RS232<-------> MOTG RS232, Breadtooth <==> Arduino Adaptor Shield

              Baud rate = 19200

              The screen powers up and icons/pages all load which would indicate its getting power but there is no communication with arduino eg relays/clock/temp are not displaying.

              Everything works when i remove gen4-MOTG-AC1 and the MOTG RS232 module's.


              • #8

                Can you please attach a demo problem you are using (zipped from Workshop4) for us to look at?
                Are you definitely using the correct pins/ports in Workshop to point the UART in the right place? You don't have RX/TX backwards or something to that effect?
                You will need to provide more details for us to look into this for you.

                Have you soldered the jumpers on the MOTG RS232 to either MOTG TX or GPIO1, and MOTG RX or GPIO2? Or which is currently selected?
                MOTG TX is connected to PA3, GPIO1 is connected to PA0, MOTG RX is connected to PA2 and GPIO2 is connected to PA1, as per the datasheet, so have you got those set correctly in Workshop to receive/send the data to by UART?
                What environment in Workshop4 are you using? Visi-Genie?
                In Options, Under Genie tab, what is the Diablo com1 pins set as? Are you using COM1? This is set in the Project Tab of your open Workshop4 application, under the Comms heading, you will need to select COM1, which then matches the PAx pins you set in Options - Genie tab.

                Let me know if you need any more help.



                • #9
                  Ok I have checked and changed everything I believe. Definitely not connected backwards. I left jumpers soldered to MOTG TX and MOTG RX. Soldered jumpers to 5v power supply.
                  I am using Visi-Genie, I have changed workshop to COM1 and using MOTG RX to PA2, MOTG TX to PA3 in genie. When I scan COM1 in project it says not responding!

                  I have attached Workshop4, Ardiuno project and some pictures of set up
                  Attached Files


                  • #10
                    With the settings above and using COM 4 in project the display appears in workshop when connected to computer via programming cable to AC1 adaptor module pictured above.


                    • #11
                      There are 2 different things going on here. Programming of the Display from Workshop, and Comms between Display and Arduino.

                      If you are trying to program your gen4 module, then you connect your gen4-PA or 4D-UPA programmer to the 30 way cable, and into the 30 way FFC on the AC1 board marked as Programmer. You then connect the programmer to USB to your computer, and select the COM port of your PC to talk to the programmer, like any normal 4D module. COM1 is not the port you use in your case to program the module, so this 'Not Responding' is not relevant if you are trying to get your comms working between display and arduino. That is relating to the PC trying to talk to the display to program your application into it. You need to select the COM port of your Programmer which is connected to USB, not the COM port which is relating to the UART which genie talks to your Arduino with.

                      If you are trying to talk between your gen4 module va RS232 MOTG's to your Arduino, then that has nothing to do with Workshop programming, to get your application into the module. What I mentioned above was to set up the configuration so the Diablo processor knows where the coms for Genie are coming from, ie to your Arduino. So if you have that set up right, that will be the comms which end up going over RS232 to your Arduino.


                      • #12
                        Also, on your Arduino end MOTG, on the Breadtooth, what have you connected to the RX and TX pins on that? Is RX going to RX on the Arduino, or is it going to TX?


                        • #13
                          RX to RX and TX to TX, I have connected like for like on every connection.
                          Last edited by jonathonchaffey; 10 July 2019, 11:25 AM.


                          • #14
                            eerrrrr right I believe I understand what you are saying. So to be clear my issue is, Comms between Display and Arduino via RS232... NOT Workshop programming, as everything is loaded and runs perfect when screen is connected to Arduino without RS232 module.

                            I think I get lost where you originally said to

                            set in the Project Tab of your open Workshop4 application, under the Comms heading, you will need to select COM1,


                            • #15
                              I have attached two print screen showing what I think I should have set.
                              Attached Files