Kev, Since I will have 3 boards, can we do digital reads/writes in same sketch as analog read/writes? If so I can use the two megas for all led lights and my uno for the ac elements.
Kev, Since I will have 3 boards, can we do digital reads/writes in same sketch as analog read/writes? If so I can use the two megas for all led lights and my uno for the ac elements.
Last edited by resjsu; 11-10-2017 at 08:22 PM. Reason: 1st was unreadable haha
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.
Kev,
If I can use analog read/writes and digital read writes in same sketch then I could actually just use the two megas for everything correct? So maybe the easiest thing to do is to combine the two codes that are listed towards the begnining of this thread? Is this a possibility?
Well, as you have read, the Zero Cross circuit detects when the AC signal crosses zero. It crosses zero 120 times per second. A sketch can use the 120 crossing points to turn on/off the output pin. It can turn on/off the output pin sooner or later depending on the value sent by Vixen (or other sequence program). As far as the SSR is concerned, it really does not matter whether it is switching AC or DC ( as long as you have the right transistors/mosfets/triacs). It will turn on or off just like a PWM signal. So for a DC signal, if you are using transistors or mosfets that can switch fast enough, the sketch will turn them on and off just like the PWM pins. This means that you can use ANY pin for dimming. As I mentioned earlier, last year I had my MEGAs controlling 48 channels that were all dimmable.
So, if you wanted to use more pins on the MEGA, you would have to invest in a zero cross detector and the correct SSRs that will work. The mosfets you have been using to will probably still work. The SSR boards from Sainsmart will not. But a lot of folks on here have replaced the SSRs that come with the Sainsmart board with ones that are dimmable. Unfortunately, the replacement SSRs cost a lot. The alternatieve is to buy someone else's board or build your own. I opted to build my own. Mine cost about $2.00 per channel. But I missed the first year that I had wanted to put up a display because of the time it takes. It took me a year to figure everything out. And of course this year I am adding pixels which is a whole new ball game. The reason I have gone on so long is...if you want a display this year, I suggest keeping it simple. Go big next year and bigger the year after that. This year, use the MEGAs for the PWM controlled strips and the UNO for your AC on/off elemets.
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.
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.
Maybe use the PWM sketch on the MEGAs and Victor_PV sketch on the UNO. I don't think that I would have time this year to muddle my way through either of them to make them work for both PWM and the extra AC channels. I will take a quick look though. Can you tell me which post contains the correct sketch that you know works for the strips? Or post it anew.
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.
Kev,
Youve def been more than enough help as it is dont try to do the code. The two sketches are in post #30. I will use the victor sketch on the UNO and the PWM sketch on the MEGAs to start and once I have everything set up if I have time to modify code and refine I will but I think this will work. Im getting anxious for all of my material to arrive so I can start testing it all out.
Thank you again!
Sounds like a plan.
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.
Kev,
Got my one of my MEGAs and both SSRs today. Wired up a ssr and tested it with modified victor_pv code and I think I have it working right. I was pretty nervous powering up the lights, I mustve checked the leads about 60 times haha.
https://www.youtube.com/watch?v=bzHUON4hbg0
So far so good.
Last edited by resjsu; 11-11-2017 at 11:26 PM.
Bookmarks