By the way, where are you located?
As far as the Self Test order, that is not easily fixed. The is a FOR loop that expects the Channel order to be tied to the pins 22 - 53 in order. You have them out of order, which is OK as long as you are aware of it.
Another way to test the zcd circuit is to;
1) Remove the AC power from the zcd input terminals.
2) Use a 9V battery and connect the negative terminal to any one of the zcd AC input terminals then;
3) Connect the positive terminal of the 9v battery to a 820 ohm resistor and the other end of the resistor to the 2nd input of the zcd AC terminal.
You can monitor the zcd output with a multimeter, which should be low when you connect the resistor to the AC input terminal and high (approx. +5V) when you remove the resistor to the AC input terminal. Since the opto-coupler has two internal LEDs you can reverse the battery terminals and repeat the process above with similar results.
kev wrote:-The only thing I see on the back of the ZC circuit is, maybe, a poor solder joint where the 10K pullup resistor is soldered to the +5V terminal.
- I assume that the 3 position terminal where you bring GND, +5v in and the ZERO Cross out, the ZERO CROSS out is the middle terminal.
- In the overall system picture, from where I can zoom in, it looks like you have a twisted pair of wires going from the ZERO CROSS terminal to two pins on the MEGA shield. I can't quite make it out. Is one of those wires a GND reference for the MEGA? Or is it just one wire with a color stripe that makes it look like two wires.
- Do you have the DC GNDs for all of the DC components all tied together?
- 2.7V on the ZERO CROSS output makes sense if the pulse is wide enough and depending on your meter characteristics.
Hi Kevin,
Don't think its a solder issue since there is zero resistance at those points with their destinations...but I will check 🙂
yes the middle terminal in the 3 terminal connector is the ZCD pulse.
I used cat 5 cables for all my multi ribbon runs.. so for the interrupt pin 2 I used two wires of equal length just to increase the current carrying capacity of that wire (dont think I needed to do that)... it shouldn't really matter since both wires start and finish at the same point ie: ZCD out to pin 2... but i will check that as well.
All DC grounds are common to the single 5V 6A power supply.
I actually gave up trying to figure out the code 🙂 and I did what I know best to do which is rewire the outputs the way Scott intended in his code 🙂
Power on self test works perfectly and all channel allocations are correct now. Just need to figure out this ZCD circuit and I should be good to go. Hardware responds to the software (If I touch pin 2 with my finger, I get the correct response from the software, obviously its not in sync with the 60Hz line) but I think once I get this ZCD figured out I am going to be totally okay 🙂
Thank you for the patience you have shown with me Kevin! Highly appreciated 🙂
kev wrote:By the way, where are you located?
Mississauga, ON Canada
LightUp wrote:Another way to test the zcd circuit is to;
1) Remove the AC power from the zcd input terminals.
2) Use a 9V battery and connect the negative terminal to any one of the zcd AC input terminals then;
3) Connect the positive terminal of the 9v battery to a 820 ohm resistor and the other end of the resistor to the 2nd input of the zcd AC terminal.You can monitor the zcd output with a multimeter, which should be low when you connect the resistor to the AC input terminal and high (approx. +5V) when you remove the resistor to the AC input terminal. Since the opto-coupler has two internal LEDs you can reverse the battery terminals and repeat the process above with similar results.
Thats a great idea! I will give that a try.
sherman_desouza wrote:Hi Kevin,
Thank you for the kind words 🙂that picture was taken a bit before I finished the project. the FT232RL is installed now and working as expected....
so I checked code 2 with vixen 3 and it works! still no luck with the ZCD but I can see it working if iI touch pin 2 with my finger and create a false interrupt....
OK. So back a few posts you said Code 2 works with Vixen 3. What do you mean by that? That it loads and runs the self test? What actually happens when you start Vixen and run a test sequence?
You also said that you were able to test the hardware with another sketch? What sketch was that? Did it respond to a sequence from Vixen?
I am in California. Maybe we good do a Facetime session or Skype so that I could see what is happening in real time. You are so close and I feel that we are overlooking something simple. I am not a software guy either but I have a good understanding of this particular sketch. I am not an electrical engineer either but I have a good understanding of the hardware requirement for this setup.
kev wrote:OK. So back a few posts you said Code 2 works with Vixen 3. What do you mean by that? That it loads and runs the self test? What actually happens when you start Vixen and run a test sequence?
You also said that you were able to test the hardware with another sketch? What sketch was that? Did it respond to a sequence from Vixen?I am in California. Maybe we good do a Facetime session or Skype so that I could see what is happening in real time. You are so close and I feel that we are overlooking something simple. I am not a software guy either but I have a good understanding of this particular sketch. I am not an electrical engineer either but I have a good understanding of the hardware requirement for this setup.
code 2 works as intended now with vixen 3. I can add, say for example, an alternating effect to channel 1 and the hardware responds...(as long as my finger is touching the wire going to pin 2 :P). I can move this effect to all 32 channels and they all respond properly.
I had originally tried code version 1 to check the proper functioning of the hardware and that had worked (I was also able to change the pin definitions in the software on that code) it was not tested against Vixen when I used code V1. I only used it to make sure all the channels were working (without dimming).
Now that I have rewired the output pins as Scott intended I am positive everything is working, just need to get that ZCD working and I should be done.
Don't feel too badly. When Scott (zparticle) started his journey to dimming lights he too had problems with getting the zcd working. He ended up building several iterations and finally got one going. It isn't clear why it appears to be elusive for some.
I ran my Zero Cross Detection code again tonight and took a screenshot of the results that show up in the serial monitor. If you are not getting anything like what is shown then I think it is safe to say the circuit has a problem.
If it comes down to it, I could build and test a circuit board here and send it to you. Never mailed anything to Canada though.
