Signal bleed over from Arduino to SSR
Newbie needs help in a bad way. I started this project November of last year had to many problems to get it to work in time so I shelved it till this year. I am on a tight budget so Im using a Arduino mega 2560 with 4 SSR picture links below with incandescent lights and vixen software to run it. I learned my setup using videos from Dee Higginbotham the Cheapskate Video how to. I am using the sketch provided in the link from the videos it seems to work I just wish it had a random function when not receiving a signal. Anyway back to the problem every time the signal light flashes on the Arduino trips the first ten channels some times others this is when vixen is not playing. Right now the Arduino is powering the SSR's I have a 5V power supply that I could power the SSR's with the problem is I read you have to have the ground from Arduino hooked up to trip the SSR's not for sure how to wire the SSR's mine are a little different from what I see posted on other threads.
I hope I have provide all the necessary information to figure this out.
picks of SSR and arduino
https://ibb.co/4KVHtJj
https://ibb.co/DbYffJZ
Sketch im using
#define MEGA_VIXEN
//#define UNO_VIXEN
#ifdef MEGA_VIXEN
#define MAX_CHANNELS 48
int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53};
#endif
#ifdef UNO_VIXEN
#define MAX_CHANNELS 18
int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,A0,A1,A2,A3,A4,A5};
#endif
int incomingByte[MAX_CHANNELS];
void setup()
{
int i;
Serial.begin(9600); // set up Serial at 9600 bps
for ( i = 0; i < MAX_CHANNELS; i ++ ) pinMode(channels, OUTPUT);
}
void loop()
{
int i;
if (Serial.available() >= MAX_CHANNELS)
{
for (i=0; i < MAX_CHANNELS; i ++) incomingByte = Serial.read();
}
for (i = 0; i < MAX_CHANNELS; i ++ ) analogWrite(channels, incomingByte);
}
Newbie needs help in a bad way. I started this project November of last year had to many problems to get it to work in time so I shelved it till this year. I am on a tight budget so Im using a Arduino mega 2560 with 4 SSR picture links below with incandescent lights and vixen software to run it. I learned my setup using videos from Dee Higginbotham the Cheapskate Video how to. I am using the sketch provided in the link from the videos it seems to work I just wish it had a random function when not receiving a signal. Anyway back to the problem every time the signal light flashes on the Arduino trips the first ten channels some times others this is when vixen is not playing. Right now the Arduino is powering the SSR's I have a 5V power supply that I could power the SSR's with the problem is I read you have to have the ground from Arduino hooked up to trip the SSR's not for sure how to wire the SSR's mine are a little different from what I see posted on other threads.
I hope I have provide all the necessary information to figure this out.
picks of SSR and arduino
https://ibb.co/4KVHtJj
https://ibb.co/DbYffJZ
Sketch im using
#define MEGA_VIXEN
//#define UNO_VIXEN
#ifdef MEGA_VIXEN
#define MAX_CHANNELS 48
int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53};
#endif
#ifdef UNO_VIXEN
#define MAX_CHANNELS 18
int channels[MAX_CHANNELS] = {2,3,4,5,6,7,8,9,10,11,12,13,A0,A1,A2,A3,A4,A5};
#endif
int incomingByte[MAX_CHANNELS];
void setup()
{
int i;
Serial.begin(9600); // set up Serial at 9600 bps
for ( i = 0; i < MAX_CHANNELS; i ++ ) pinMode(channels, OUTPUT);
}
void loop()
{
int i;
if (Serial.available() >= MAX_CHANNELS)
{
for (i=0; i < MAX_CHANNELS; i ++) incomingByte = Serial.read();
}
for (i = 0; i < MAX_CHANNELS; i ++ ) analogWrite(channels, incomingByte);
}