Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 44

Thread: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay board)

  1. #11
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    1,023
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    The wiring diagram from the dimming SSR site shows sync on pin 3. But he was using a UNO.
    The code says: attachInterrupt(1, zero_crosss_int, RISING);
    This is obfuscated because the 1 is the IRQ1 which is pin3 on the UNO.

    If you look up attachInterrupt, you will find that it is recommended to use this:
    attachInterrupt(digitalPinToInterrupt(pin), ISR, mode);
    Much more readable when saying the exact pin you will you use. On the Mega, you can also use digital pin 3 so put this in the setup() like this.
    attachInterrupt(digitalPinToInterrupt(3), zero_cross_int, RISING);

  2. #12
    Join Date
    Jan 2019
    Location
    Silver Spring Shores Florida
    Posts
    14
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    Kev brings up a most valid point, are either of you accounting for the sync detection from that board, they have a schematic with that board, I would break everything down to just run that board eliminate the sainsmart board for now since that is an easy reconnect. Focus on the dimmer board this is a post of there schematic for an UNO, I know the dimmer board I have looked at in the past, but never purchased, had pin 2 on the Mega as the sync detection pin. I have heard that some Arduino's you cannot change or reassign a pin for this detection, if I am wrong please someone chime in here. Also is 5v power supplied from an outside source, is the arduino and dimmer board grounded together? I just cannot see well in the pictures, I am guessing yes to both of those questions.

    Remember they have posted a sketch for that board on the link, it has the dimming and zero cross detection in it. As well as the schematic I posted.
    So pin 3 on this looks like what you want.
    If you rewire it like they have it posted please take pictures so we can all see. Let us know so we can keep trying to figure this out.

    8ch UNO.jpg

  3. #13
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    799
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    The ZParticle sketch is a proven sketch that many people are running. It requires that you follow ZParticle's setup. If you have a basic/good understanding of Arduino code and a basic/good understanding of different supplementary peripherals, you can change the ZParticle code to meet your specific needs. If your setup is not working, then I suspect that you have a hardware or hardware interface problem

    ZParticle code requires that -
    1. you use an Arduino MEGA or compatible clone.
    2. you use a zero cross detector.
    3. the zero cross detector needs to be connected to pin 2 (int4)
    4. you use a USB to TTL adapter.
    5. the TTL adapter needs to be connected to pins 18 and 19 (serial 1)

    Make sure you have common ground between the MEGA, DC power supply and the SSR board.

    If you don't have a USB to TTL adapter, you can change the code to use Serial instead of Serial1.

    Good luck.
    Last edited by kev; 03-03-2019 at 03:53 PM.
    Kevin

    2017 - Pi3 w/FPP controlling 8 ESPixelsticks driving 1250pixels and 3 Arduino MEGAS communicating with ESP-01s driving 96 channels
    2016 - 184 channels of Blinking/Flashing using 4 Arduino MEGAs and cheap home-made props.

  4. #14
    Join Date
    Jan 2019
    Posts
    18
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    Things are getting a little confusing. I got the Test sketch that was listed with the relay board working . All 8 lights come on and Dim as in the sequence. So we know the board will dim the lights , so is there any way extract what parts of the code to insert into my original code or even the sketch SpankyTy posted?
    I know this can be done without using those long complicated sketches. I'm trying a few things and if I come up with anything I'll post.
    Thanks everyone for the help (We'll get it figuired out)

  5. #15
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    799
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    I have not opened the test sketches to see how they are performing dimming. I am not a programmer. I know enough to be dangerous!!! I know the ZParticle sketch really well and can help with that sketch. But I do not generally get involved with programming new sketches or combining sketches. If you decide to go move forward using the ZParticle sketch and need help, then I can probably be of assistance.

    BTW where are you located?
    Kevin

    2017 - Pi3 w/FPP controlling 8 ESPixelsticks driving 1250pixels and 3 Arduino MEGAS communicating with ESP-01s driving 96 channels
    2016 - 184 channels of Blinking/Flashing using 4 Arduino MEGAs and cheap home-made props.

  6. #16
    Join Date
    Jan 2019
    Posts
    18
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    Hi Kevin,
    I guess from what I've read my original sketch will not work . So I downloaded ZParticle code. And in his code define channel it starts w/channel 1 pin2 to pin13 and then to pin44 to pin47 so I hooked up my mega with dimmer relay board on pins 2 thru 9 I don't know where to put the sync wire.(this board https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1)
    and my SSR to pins 10 to 13 and 45 thru 47.
    Ok you said I need zero cross detector? And it needs to be in pin2 ( which I already used )The dimmer relay board has a zero cross detector in/on it.
    So do I still need ZCD? And I know nothing about TTL.

    So I loaded the sketch , All the lights come on and stay on. I setup Vixen ,Ran it and I nothing happens lights stay on? I know I'm doing something wrong and with all the other suggestions I'm really confused.
    Oh I also tried inserting "VIXEN_START" AND "VIXEN_END" in Vixen
    Last edited by coors40ack; 03-01-2019 at 11:40 AM.

  7. #17
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    799
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    That is the wrong sketch. That is his version 1 sketch that was designed for mechanical relays. He soon found out that mechanical relays did not work well for this application and that there is no way to dim with mechanical relays.

    You need his version 2 sketch which can be found here - https://drive.google.com/folderview?...Fk&usp=sharing

    It is the one with SSR in the title and dated sept 15, 2016.
    Kevin

    2017 - Pi3 w/FPP controlling 8 ESPixelsticks driving 1250pixels and 3 Arduino MEGAS communicating with ESP-01s driving 96 channels
    2016 - 184 channels of Blinking/Flashing using 4 Arduino MEGAs and cheap home-made props.

  8. #18
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    799
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    I know that it is a lot of reading and you have to filter out a bunch of other comments, but you need to read through the ZParticle thread.

    There are some other settings that you have to make in Vixen. Like putting STRT in the header and END in the footer section of the Vixen Generic Serial controller.

    The sketch is setup for 32 channels. So setup 32 channels in Vixen even though you are going to use less. Just call the extra channels Dummy1 to Dummy16 for now. Once you get everything working, I am sure you will be adding more channels.
    Kevin

    2017 - Pi3 w/FPP controlling 8 ESPixelsticks driving 1250pixels and 3 Arduino MEGAS communicating with ESP-01s driving 96 channels
    2016 - 184 channels of Blinking/Flashing using 4 Arduino MEGAs and cheap home-made props.

  9. #19
    Join Date
    Jan 2019
    Posts
    18
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    Kevin, I downloaded the correct zparticle sketch to the Mega. Read through most of his thread but I'm lost about what pins go where (SSR board to Mega and Dimmer relay board to Mega? and the dimmer board has zero cross detection on the board (SYNC) do I still need to add one ? And what about TTL you mentioned.
    I don't want to be a pain , only been doing this for few months learned a lot but not enough .
    I really appreciate your help.20190301_132349.jpg20190301_132407.jpg20190301_132428.jpg
    Hope you can see

  10. #20
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    799
    Post Thanks / Like

    Default Re: Help with Vixen 3 (code for mega2560 8 channel SSR and 8 CHANNEL dimmer relay boa

    Your sync signal should substitute for the zero cross board ZParticle used. If you are not going to use a USB to TTL adapter for the serial communications then you will need to modify the code slightly. I think that there are 5 places where he uses "Serial1". You need to change those to "Serial". You can use the FIND command to find those 5 places. Then you can connect your computer USB directly to the MEGA USB.

    Where are you located?
    Kevin

    2017 - Pi3 w/FPP controlling 8 ESPixelsticks driving 1250pixels and 3 Arduino MEGAS communicating with ESP-01s driving 96 channels
    2016 - 184 channels of Blinking/Flashing using 4 Arduino MEGAs and cheap home-made props.

Page 2 of 5 FirstFirst 1234 ... LastLast

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
  •