Page 4 of 4 FirstFirst ... 234
Results 31 to 35 of 35

Thread: Sketch to keep lights lit when no in sequence?

  1. #31
    Join Date
    Dec 2012
    Location
    Hudson MA
    Posts
    2,296
    Post Thanks / Like

    Default Re: Sketch to keep lights lit when no in sequence?

    Here is a bit of info on frame capacity. I am using the common baudrate of 57600 bits per second.

    1 byte takes 1 start bit + 8 data bits + 2 stop bits (worst case) = 11 bits for one byte of data

    57600 / 11 = 5236 bytes per second

    A frame rate of 25ms = 1 / 0.025 = 40 frames per second

    5236 / 40 = 130 bytes per frame.

    Since one channel uses one byte of data, you get 130 channels per frame. The practical limit is a bit lower than this. If you work with 100 channels per frame then you should have no issues.

    2017 adding 2 more candy canes, 7 Mid trees and a Halloween show. Removing most 2812 strips and replacing them with bullet pixel mounting strips. Replacing many buck converter waterproof bags with printed boxes.

  2. #32
    Join Date
    Nov 2017
    Posts
    39
    Post Thanks / Like

    Default Re: Sketch to keep lights lit when no in sequence?

    Quote Originally Posted by MartinMueller2003 View Post
    Here is a bit of info on frame capacity. I am using the common baudrate of 57600 bits per second.

    1 byte takes 1 start bit + 8 data bits + 2 stop bits (worst case) = 11 bits for one byte of data

    57600 / 11 = 5236 bytes per second

    A frame rate of 25ms = 1 / 0.025 = 40 frames per second

    5236 / 40 = 130 bytes per frame.

    Since one channel uses one byte of data, you get 130 channels per frame. The practical limit is a bit lower than this. If you work with 100 channels per frame then you should have no issues.
    Very well broken down, thank you. The person who showed me how to build my controller advised to set the baud rate to 9600. Is there any reason why I would set it that low, or should I change it to 57600? I am running an Arduino Mega 2560 with two 8 channel SSRs.

  3. #33
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,471
    Post Thanks / Like

    Default Re: Sketch to keep lights lit when no in sequence?

    Quote Originally Posted by darko886 View Post
    Very well broken down, thank you. The person who showed me how to build my controller advised to set the baud rate to 9600. Is there any reason why I would set it that low, or should I change it to 57600? I am running an Arduino Mega 2560 with two 8 channel SSRs.
    The reason you would set it to a certain baudrate is to ensure that a microprocessor has enough time to do other things. So if 9600 baud allows you to view your display in sync with Vixen sequence without flicker then that's all you care about. Sending it faster will give more time between frame rates. As you add more pixels then more time is spent updating those pixels. Hence the need for faster updates to keep a minimum display refresh rate to avoid flicker.

  4. #34
    Join Date
    Dec 2012
    Location
    Hudson MA
    Posts
    2,296
    Post Thanks / Like

    Default Re: Sketch to keep lights lit when no in sequence?

    There are pros and cons to the lower baudrate:


    • Lower baudrate allows you to use lower capacity (AKA Cheaper) CPUs. The AT-MEGA line is not a very powerful CPU but it is not in the severely underpowered category. It should handle 56K. Especially if you are only sending 16 bytes of data.
    • Lower baudrate carries fewer channels.
    • Lower baudrate has higher latency. Does not matter because mechanical relays are very slow.
    • Lower baudrate is horrible for dimming (mechanical relays cannot dim so this does not matter to you).


    Higher baudrate is not needed because relays cannot keep up with a 25ms frame anyway. Most relays will have difficulty keeping up with a 100ms frame rate and they are best used to just turn things on and off over long (multiple seconds) periods.

    2017 adding 2 more candy canes, 7 Mid trees and a Halloween show. Removing most 2812 strips and replacing them with bullet pixel mounting strips. Replacing many buck converter waterproof bags with printed boxes.

  5. #35
    Join Date
    Nov 2017
    Posts
    39
    Post Thanks / Like

    Default Re: Sketch to keep lights lit when no in sequence?

    Thank you guys!

Page 4 of 4 FirstFirst ... 234

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •