Activity Forums Questions & Troubleshooting USB feedback from mini causes screen to flicker

  • USB feedback from mini causes screen to flicker

  • Jeff

    Member
    August 5, 2021 at 5:39 pm

    Hi,

    I am controlling relay circuits with the following program through the mini’s usb connection.

    The program works fine but my computer’s screen flickers sometimes when the relay circuits open and close.

    The voltage is a constant 12 volts from the same circuit for the relays and the controller is on a separate 12v circuit.

    Does anyone know what is causing the screen to flicker and how to correct it?

    Thank you!

    Jeff

    from pyfirmata import Arduino,util
    import serial
    import time

    try:
    board = Arduino('COM4')
    D0 = board.get_pin('d:4:o')
    D1 = board.get_pin('d:5:o')
    D2 = board.get_pin('d:6:o')
    D3 = board.get_pin('d:7:o')
    D0.write(1)
    time.sleep(1)
    D0.write(0)
    D1.write(1)
    time.sleep(1)
    D1.write(0)
    D2.write(1)
    time.sleep(1)
    D2.write(0)
    D3.write(1)
    time.sleep(1)
    D3.write(0)
    board.exit()

    except serial.SerialException as e:
    print('error',e)


  • Johi

    Member
    August 6, 2021 at 4:16 pm

    Hello Jeff,

    I am not a phyton expert nor a firmata expert, but I have a decent background in C++ and electrical engineering.

    The first thing I would do is to figure out in what region the flicker is by some simple experiments.
    One of the things hou could do is control a digital IO but not relay with the same code.

    If then if you see no flicker, a power supply topic can be at the base. You could even decide to power your board at 12.5V to have some margin or make sure it can produce enough amps.

    But what kind of power supply do you use, is it a lab supply or something else?

    Anyway: I would control digital IO without load and see what it gives. Pending the result you need to look on the PC side or on the Controlllino side.

    Br.

    Johi.

    • This reply was modified 3 years, 3 months ago by  Johi.
    • This reply was modified 3 years, 3 months ago by  Johi.
    • Jeff

      Member
      August 10, 2021 at 7:48 pm

      Hi Johi,

      Thank you very much for your reply. You steered my in the right direction!

      I controlled the digital i/o without a load and worked without flickering the screen. I then changed out the usb cord and switched ports. It now works fine. I am using a continuous voltage 20 amp power supply.

      • Johi

        Member
        August 14, 2021 at 5:25 am

        Nice to hear that your problem has solved.

        What kind of project are you involved in, just curious to know?

        Best regards,

        Johi.

        • Jeff

          Member
          September 30, 2021 at 9:35 pm

          Hi Johi,

          Sorry for the delay.

          I’m controlling a series of pumps.

          Best,

          Jeff

Viewing 1 - 2 of 2 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now