Announcement

Collapse
No announcement yet.

Screen goes black and/or freezes when pushing a button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Screen goes black and/or freezes when pushing a button

    Hi,

    I'm having the following issue: When I push a certain button on the uLCD-70DT my screen my screen goes black. It sometimes restarts or freezes.
    This reportevent triggers an output on the Arduino that is connected to a relais that is linked to a motor.

    I thougt, maybe the arduino loses some power on the resetline when pulling that output high so I tried to push it again with the reset disconnected. This solved the issue, the screen didn't go black or freeze. But with the resetline disconnected, I can't change forms or sync the screen with the arduino on start up. So this isn't really a solution, it showed that it's probably something with the resetline.

    Have any of you encountered a problem like this before? Or do you have a suggestion to solve this issue?

    Thank you!

    Kind regards,
    Bert

    www.forestplus.be

  • #2
    Hi Bert

    So you are saying this only hapeens with 1 specific button on the program, or does it happen on a range of buttons?
    If its 1 specific button, then really we need to see your code.

    Can you attach your Arduino code, and your WS4 Application (File - Zip Project, attach the zip here).

    We have seen this before but it was not reset line related, maybe its just a coincidence. Typically this can happen if the button is doing something on the Arduino which causes it to run out of RAM, or if the Arduino is telling the display to do something with an object which does not exist on the display. But its best to have a look at your code to determine 100%.

    The display itself has a pull up on the reset line, so the display should only reset if the arduino shield pulls the line low (via a high command, as it has a transistor on the shield).
    If you are not using a Shield and have it wired directly from Arduino to Display, then your reset logic needs to be inverted.

    Regards
    James

    Comment


    • #3
      Hi James,

      Thank you for looking into this.

      I have the following setup:
      Click image for larger version

Name:	20150618_073905_resized.jpg
Views:	48
Size:	898.7 KB
ID:	45897

      The arduino is plugged onto a "universal controller" which transforms the input voltages from 24VDC to 5VDC and the output voltages from 5V DC to 24VDC, the leds that are high show which in/output is High.

      As you can see on the picture below, the RX, TX, GND and reset are connected with the white shielded cable (<1m length) to the board. These pins on the universal controller run directly to the corresponding ports on the Arduino.

      Click image for larger version

Name:	20150618_085331_resized.jpg
Views:	46
Size:	976.9 KB
ID:	45900


      The 24VDC output signals of the universal controller go to the coil of the following relays: (Lets call these the First Level Relays)
      Click image for larger version

Name:	20150618_073914_resized.jpg
Views:	46
Size:	1.04 MB
ID:	45899

      These (First Level) relays control a 24VAC circuit which is connected to the coil of the following relays: (Lets call these the Second Level Relays)

      Click image for larger version

Name:	20150618_073947_resized.jpg
Views:	47
Size:	1,022.2 KB
ID:	45898

      These (Second Level) relays, contol the 3phases of a 380V motor.


      So, that's the layout. Let me reexplain the problem, I've narrowed it down a little:

      When I push any button on the screen, the motor which corresponds with the button works. But sometimes the screen freezes or goes black. This occurs when I repeatedly turn a motor on and off.

      - When I disconnect the "first level" relays and I repeatedly press the buttons again (I'm actually just testing the comms between the screen - arduino - universal conroller) it works perfect. I see the led that corresponds with the output port light up when it has to light up and the screen doesn't go black or freeze. (So I don't think it's a code issue)

      - When I disconnect the power over the motors, and "first and second level" relays structure still connected. Pushing a button on the screen makes the first level relays go down, which makes the second level relays go down. Which in normal condition makes the motor spin, except that is disconnected now. In this case the screen didn't freeze or go black. It works perfect! (Perhaps some interference of the 3 phase 380V cables that go to the motor? But the RX-TX-GND-RES cable is already shielded and grounded at both ends.)

      - When I disconnect the resetline, with all the relays connected. The motor works fine, the buttons do their job and the screen doesn't freeze. Except, I need the resetline for a proper resetprocedure and I can't switch forms anymore without resetline (?).

      Power supply layout:
      - 220VAC -> 24V DC 2.5A converter (Siemens LOGO!Power). This powers the "Universal Controller" + Arduino (takes a bit less than an 1A), 15 Coils of the "First level" 24DC relays (Finder 34.51.7.025.0010).

      - 220VAC -> 5V DC 1A converter (Velleman Model PSSE10). This powers the 4D uLCD-70DT.

      - 220VAC -> 24V AC 2.6A converter (EATON TR-G2/63-SF). This powers other stuff that's not so important (pneumatic contacts, second level relays and physical buttons).


      My first thought was that The Siemens LOGO!Power doesn't deliver enough Current, which does something to the resetline and cause the screen to freeze? But when disconnecting the motor, and letting every 24VDC component do their job it worked. So maybe some interference problem of the 3phase 220V?


      Sum up of the things I've tried:
      - Shield the cable between the board and the screen. (Didn't make any difference)
      - Disconnect the "first level" relays, and test the interaction between screen - Arduino - universal controller. (Works)
      - Disconnect the 3phase 380V cables but keep the relays structure connected. (Works)


      My code and WS4 files are in the attached zip file :





      Thank you,

      Kind Regards,
      Bert







      Last edited by Bertf; 19th June 2015, 06:50 AM.
      www.forestplus.be

      Comment


      • #4
        Hi Bert

        Interesting problem.

        So this Universal Controller you have things connected to, its bi-directional I assume? Is there a minimum current requirement to successfully trigger a Hi or Lo signal?

        You have shielding on both ends of the shielded cable. I seem to recall it being recommended to only shield 1 end of a shielded cable - but I might be wrong there. Might be something to try.

        You could try putting a pull up resistor at the other end of the cable (non-display end) on the RESET line, to assist it being pulled high to 5V, as for some reason the pull up may be being compromised with the length of the cable, or the noise in the system.

        The power supply you have on the 70DT, can you please measure the voltage at the display end of the cable, and at the power supply end. It will be interesting to see if there is a voltage drop. There no doubt will be, but what level of drop is the key. If its much less than 4.6V at the display end, is there any adjustment on the supply possible? ie make it say 5.2V instead of 5.0V, to attempt to overcome any significant drop the display might see.

        From your testing, it does seem to be related to the complete system being operational - for it to fail. Either case, whether you disconnect the first level relays, or the 3 phase cables, the motors end up being disconnected, and thus the system stays running. So it would seem the motors are causing the problem, and some sort of noise is getting in to the system and causing the display to get upset. A pull up on the Reset line should help. You could try something like a 4.7Kohm to start with, and try to lower it down to about 1K and see how you get on, and if it makes any difference at all.

        If all else fails, what you could do is have your arduino switch a small relay which switches the power of the display, rather than the reset. Take the reset out of the cable (ie disconnect just the reset), and instead of the Arduino resetting the Display at startup, get it to power the relay and thus power the display instead. This would just rule out the Reset being subjected to noise which is no doubt amplified with the cable, and should still give you the functionality you need in terms of being able start everything up nicely and in sync.

        All these are just options for you to try. Sorry I have no smoking gun as every system like this is different, and without having a scope to apply to each signal its a little hard to see what is the issue exactly - but from what you said, it does appear to be related to the motors, and also related to the reset signal.

        See how you get on

        Regards
        James

        Comment


        • #5
          Hi Bert

          Also, the file you attached - you haven't attached the right things for the WS4 Application, there are a number of files missing.
          Please go to File - Zip Project, in WS4. Then attach the zip file it creates to the forum.

          Another question - where is your Arduino located in all of this? Is it near the motors etc?
          Just wanting to confirm 100% that the Arduino is still fully operation when the display goes down, and its not the Arduino resetting which is causing the display to reset. I suspect this isn't the case, but thought I would ask.

          Regards
          James

          Comment


          • #6
            Ah just spotted another thing. You dont seem to be using our Arduino Adaptor Shield, and have it hardwired via a 1K resistor instead.
            In this situation, the 1K may be dropping the strength. You can try to connect it directly without a resistor and see if that makes any difference. Another thing to try.

            Regards
            James

            Comment


            • #7
              Hi James,

              Thank you for all that feedback, please find the correct zip in the attachement

              This is the layout of the machine:
              Click image for larger version

Name:	locations.jpg
Views:	51
Size:	1.81 MB
ID:	45938

              The arrows indicate the positions of the arduino and the motor.

              - I'm indeed not using the adaptor shield because the arduino is already plugged onto the universal controller. I am using the 1K resitor on the resetline.
              - The Arduino doesn't crash, I had implemented a blinking led in the sketch, which kept blinking when the screen went off, so the arduino didn't crash.
              - What do you mean with bi-directional? If it reads inputs and sends outputs? If so, yes, on 24V DC.
              - I couldn't measure a voltage drop on my power supply, it's a steady 5.0V DC. Although I don't know if my multimeter is fast enough to detect a difference (it has some lag sometimes).


              Tests:
              - I did another test with the resetline disconnected, now the problem also occurred.
              - My Screen power supply has the option of ..., 4.5V, 5V, 6V, ... It is now on 5V. When i brought it to 4.5V the problem occurred every time I started the motor.
              - Removing the 1K resitor on the resetline --> This is (for now) the solution! :-)
              --> Without the 1K resistor on the resetline everything worked fine, for now it looks like the problem is solved. But why do we need that resistor if i can remove it?


              Thank you,

              Kind regards,
              Bert

              www.forestplus.be

              Comment


              • #8
                Hi Bert

                The 1K resistor is really there just for extra protection, although its not strictly required. The tolerance on the RESET pin, from memory, is strictly 5V, so if there was to be a spike on the RESET pin then damage could be incurred, however it is likely to be pretty rare. The Arduino Adaptor Shield we have puts a transistor switch on the reset line, which solves this problem, but since you are not using this the 1K resistor is the recommended solution - but if that is causing stability issues then you should be fine to use it without. Even a low value resistor such as 100ohm would be better than nothing.

                If you can try it with the reset line intact, 1K present (you could try 100ohm too), but a pullup of 1K on the arduino end and see if that works, that would be even better.

                You mentioned you did it with the reset line disconnected, and the problem still happened.
                This is a little concerning, as there is obviously noise getting in somewhere, but its not 100% predicable.

                Do you have an oscilloscope?
                If you do, it would be worth looking at the 5V, GND, TX, RX, RES signals when the motor is off, and when its on, and just see if anything obvious can be spotted.

                It looks like your machine is a solid piece of metal. Is the motor and high voltage components in a separate 'chamber' to your low voltage Arduino/display components? If not, is there a way you can separate the high and low voltage gear, with metal partitions or the like? This may help with radiated noise etc.

                There are so many types of noise out there, generated in various ways, by motors and switching applications, its quite difficult to give you a solution. I think its going to be a case of trying a few things until you get a reliable outcome unfortunately.

                With high voltage and switched things, small noise is nothing for them, but that noise when on a 3.3V system, can be significant, and I think that is what you are experiencing.

                Also test with your shielded cable, maybe disconnect one end of the shield and see if that helps, as you may have a loop created.

                Regards
                James

                Comment


                • #9
                  Hi James,

                  Thank you.

                  The removal of the 1K resistor on the res line solved the screen going black issue. However it looks like there is still a sync failure going on. After I use the motor for a couple of seconds, I can't switch forms anymore. The arduino also check the position of a physical button, lets say postion 0 goes to form 1 and position 1 makes the screen go to form 2. (The manual mode and automatic mode form). But the form switching doesn't work anymore after a couple of seconds.

                  The shielded cable is now only shielded on one side but this didn't seem to make any difference.

                  The arduino and the screen are in the same metal case with the relays etc. I'll try to isolate them from radiation noise with a metal casing.

                  I'll also try to get my hands on an oscilloscope this week to test the signals.


                  Thank you,

                  Best regards,
                  Bert
                  www.forestplus.be

                  Comment


                  • #10
                    Hi Bert

                    You have your baud rate set to 200000. For your application you may want to try a lower rate, given the noise in the system.
                    Firstly, try dropping it to 9600 (both Arduino and Display) and see how reliable that is.
                    If its rock solid, try increasing it to 115200, and see how you go.

                    You may find that 9600 works much more reliably as its slower and isn't more 'tolerant' to noise, in a way.

                    Regards
                    James

                    Comment


                    • #11
                      Hi James,

                      Baudrate 9600 didn't solve it.
                      The screen buttons on the active form that switch motors etc. work perfect but after a couple of seconds I can't change forms anymore. The automatic mode also has a step counter. The led digit in that form should show the step that the machine is in but that also stops working after a couple of seconds. Is this some sync failure due to "electromagnetic noise"?
                      I'm now building a metal cage to isolete the arduino, board and screen.

                      Thank you,

                      Kind regards,
                      Bert
                      www.forestplus.be

                      Comment


                      • #12
                        I'm wondering if your uSD card is 'browning out'. What brand of uSD card are you using?

                        I also think the Scope will help a lot here. Does your multimeter have a 'Min Hold' setting?
                        Mark

                        Comment


                        • #13
                          - I couldn't measure a voltage drop on my power supply, it's a steady 5.0V DC. Although I don't know if my multimeter is fast enough to detect a difference (it has some lag sometimes).
                          I'm not sure you quite got what I meant when I asked about this. Yes your DC supply may be a steady 5.0V at the supply, but did you also measure what it is at the display end of the cable?
                          I was trying to determine if there was a voltage drop over the cable.
                          What type of wire (thickness/AWG) is used in your shielded cable too? Just curious.

                          I will try and have a look at your code in detail this afternoon, just in case there is something 'odd' in there which is actually causing the system to loose sync, rather than it being noise related. I am not sure there would be, but you never know.

                          Regards
                          James

                          Comment


                          • #14
                            I am wondering if you have RC suppressors (snubbers) across all of your relays. I have seen relay dvdt reset Allen Bradley PLC's
                            DC relays need diodes across the coils.
                            Maybe you have done all this, just a thought.

                            We have always had best results fixing the source of the noise.
                            Last edited by ccsial; 21st June 2015, 09:16 PM.

                            Comment


                            • #15
                              Mark, I'm using the industrial grade microSD of 4D systems website. I'll try to get a scope this week and my multimeter doesn't have a min hold function.

                              James, with a steady 5V, I also meant 'measured at the display end on the cable'. My multimeter couldn't read a voltagedrop here. I'll check the thickness of the shielded cable tomorrow.

                              Ccsial, I use Finder relays, see the picture below:

                              Click image for larger version

Name:	image_820.jpg
Views:	48
Size:	1.04 MB
ID:	46010

                              The white thing on top, isn't that a RC suppressor? And there is a led (= diode?) on the relays.


                              Update on tests:
                              - When the front panel is closed, so the arduino, screen, and all the relays are in one 'metal box', the sync failure occers immediately when a motor is being started. Closing the metal box magnifies the noise?

                              - I've made cages over the arduino and the screen today, unfortunately this didn't solve the problem. Maybe it's not enough yet to isolate it from the noise?

                              Thank you for the help.

                              Kind regards,
                              Bert
                              www.forestplus.be

                              Comment

                              Working...
                              X