Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Newbe with basic Arduino - Vixen questions

  1. #11
    Join Date
    Dec 2010
    Location
    Oceanside, CA
    Posts
    2,065

    Default Re: Newbe with basic Arduino - Vixen questions

    Quote Originally Posted by Jonpro03 View Post
    I use the Generic Serial protocol with my Arduino Uno. It outputs to a serial port which the Uno conveniently creates when you plug it in. One byte of data is outputted per channel, from 00-FF based on dimming. So it's easy to have the Arduino listen for serial data and then do something with that data.
    The problem with generic serial is if your code reading data becomes out of sync with Vixen. You have no way to get back on track and your code doesn't even know it's out of sync. Renard gets around this by having a couple of special bytes used for signifying the start of a packet and address bytes. That's one of the two major reasons I chose to write some code using Renard, rather than generic serial. The other was the fact that all of my other hardware was Renard and it simplified hookup/configuration on the Vixen side of things. I thought that would be best for my first year.
    The perfect is the enemy of the good. -Voltaire

    Click here to show/hide my display details ...

  2. #12
    Join Date
    Dec 2011
    Location
    Illinois
    Posts
    180

    Default Re: Newbe with basic Arduino - Vixen questions

    I can't agree with you more... I have run into that very problem once during my testing (172 channels) and as far as I can tell, the error came from the computer. A lower baud rate seemed to remedy the problem though.
    - Jon Proietti

  3. #13

    Default Re: Newbe with basic Arduino - Vixen questions

    How about a Kit 74 board(s)? They seem easy to hook up and have built in relays. Are these supported by Vixen? If so, what Vixen plug in would you use?

    Thanks, Harry

  4. #14
    Join Date
    Dec 2011
    Location
    Tampa Fla
    Posts
    179

    Default Re: Newbe with basic Arduino - Vixen questions

    Quote Originally Posted by Materdaddy View Post
    The problem with generic serial is if your code reading data becomes out of sync with Vixen. You have no way to get back on track and your code doesn't even know it's out of sync. Renard gets around this by having a couple of special bytes used for signifying the start of a packet and address bytes. That's one of the two major reasons I chose to write some code using Renard, rather than generic serial. The other was the fact that all of my other hardware was Renard and it simplified hookup/configuration on the Vixen side of things. I thought that would be best for my first year.
    I can see where that can be an issue when you get a lot of "1" or "0" in sequence.

    That is where Manchester Encoding/Decoding comes into play. You get rid of the "white spaces" that long strings of "1" or "0" introduce.

    james

  5. #15
    Join Date
    Dec 2011
    Location
    Tampa Fla
    Posts
    179

    Default Re: Newbe with basic Arduino - Vixen questions

    Quote Originally Posted by Zeph View Post
    Good summary.



    I am thinking (as a newbie) that there are two timing issues. One is the timing of receiving Renard serial data, processing it, and sending the unused part out again. Not too bad at 115Kbps if your rate divisors handle that timing, but you don't want to miss any incoming characters. You could skip the output if you will only be at the end of the line (Renard can daisy chain multiple controllers on logical line connected to the same serial port). You can fall back to 57.5Kbps if neccessary (A notch more difficult than Renard is DMX512, which is at 250Kbps; but for pure DMX512 you don't have to send any data back out).

    The other timing issue is dimming. PWM dimming for DC lights should be pretty easy as you can use whatever timing you like, including built in PWM hardward on outputs; just keep it fast enough to not blink too visibly. However AC dimming over multiple channels requires somewhat tighter timing, and a zero crossing input to synchronize to. This is NOT however specific to Renard - it applies equally to DMX512 or your own homegrown protocol, so long as it's handling AC dimming.

    And you have to be sure that neither of these timed tasks unduly intereferes with the other (for example, an interrupt being masked too long).
    There is a chart on the Renard WIKI that tells how many channels you can run versus data speed and Vixen refresh interval. For 57.6Kbps at 25mS, the max channels to run is 142. 286 for refresh intervals of 50mS at 57.6Kbps.

    As long as you stay within the stated parameters then you should have no issues timing wise with an Arduino. If my memory serves me correct the PIC16F688 does one machine cycle every four clock periods. While the Atmel processors execute one machine cycle every two clocks. One the surface the AVRs seems to be a slightly faster processor.

    As for LED dimming, as long as the base frequency of the PWM is above 150 Hz, you should have no problems with flickering while dimming LEDs. The flicker problems come when the base period is less than 100 Hz.

    james

Tags for this Thread

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
  •