Okay.. I've learned this the hard way. I used IND I/O to control Forward and Reverse of a 3 phase AC Induction Motor. Everything went well initially until I cut off electricity. As soon as I turned the IND I/O back on, both contactors exploded and there was huge explosion sound. It seems like when IND I/O start up, it produces output voltage simultaneously on all ports for a fraction of a second. This action connected both contactors simultaneously and caused short between the phases. I've even interlocked the control coil of both contactors to pass through each other's NC port so when one contactor is active, another one cannot turn on. The problem is, I connected the IND I/O to contactor through two very fast Solid State Relay. The process happened so fast that the electricity reached both contactors before the NC coil has time to disconnect each other's coil. I wish I could upload my wiring diagram but unfortunately I have no enough karma. The following is how I wired them:
DIO CH1 ( Output ) --> 24 Vdc Solid State Relay --> Forward Contactor
DIO CH2 ( Output ) --> 24 Vdc Solid State Relay --> Reverse Contactor
Now, I've heard that setting all Digital IO Ports mode to OUTPUT first and set them to LOW before configuring each port for INPUT / OUTPUT during setup() will prevent IND I/O to produce any voltage output during start up. Is this solution guaranteed? Or is there any other methods? Please provide solution as this is a very dangerous bug. Luckily nobody died today.
FURTHER TEST #1
I removed every codes from inside loop() and only initialized the setup() so basically it does nothing after start up. I set all dio ports to OUTPUT and set everything LOW. I then disconnected the USB and plug 24Vdc power into IND I/O. I can still see both Solid State Relay indicator blinked for a fraction of second ( around 1/4 second ) during start up. Then I connected one Solid State Relay through a mechanical relay's NC Port. The wiring as follow:
IND I/O CH 1 --> Mechanical Relay Coil --> Mechanical Relay NC-A --> Mechanical Relay NC-B --> Solid State Relay Coil.
The Solid State Relay still blinked which means the mechanical relay's NC is not fast enough to cut off electricity flowing to SSR coil.
Does anybody know what caused the IND I/O to produce signal output during start up or how to stop it? I am now quite positive that this is what caused my contactors to explode yesterday as they were connected to 380Vac, 1000KVa transformer source.
FURTHER TEST #2
I tried uploading empty sketch to the IND I/O and the problem appears to be solved. Then I wrote the following in setup():
and I found out that both Solid State Relay are turned on. Then I add:
It reproduce the symptoms: dio port output HIGH for a fraction of second. Aha! Now I know what happen. It seems like by default, dio port will output HIGH once we set the mode. Then turn them down as soon as the cpu reach the next statement to make them LOW.
Question: Is there a way to tell the board to output nothing by default until there is command to make them HIGH?
FURTHER TEST #3
Interestingly, I wrote the following in setup():
No codes other than above was written in setup(). loop() is empty. Guess what? Both my solid state relays that were connected to dio 1 & 2 were on! I was surprised, those ports were configured to receive voltage input but were outputting 24Vdc instead. No wonder "The recommended way to declare dio INPUT is to set them as OUTPUT first, turn them LOW, then set them as INPUT".
Question: Is this a bug? Wouldn't this conflict with 24Vdc input from sensor?
This problem seemed a serious issue at start, but as usually happens, it was due to a incorrect application.
A system should be designed to make it impossible to get damaged in case of a faulty condition, and this system was not.
I also happened to burn contactors in big power generators, because start-up current is tenfolds operating current.
But in this case the problem was a redundant projects, in that part of the circuit would wire the motor one way and another part in the opposite way, so when both were switched on for whatever reason, disaster occurred.
After checking all possible causes, which are enumerated earlier, this was the final solution:
Simple answer would be:
output 1 = on/off
output 2 = direction
output 1 = forward
output 2 = reverse
That would avoid any type of problem!
Re: the type of relay used, it has a minimum operation current of 10 mA, or 240mW@24Vdc.
I don't know if this is somehow comparable with the leak current of I/O, but I don't think so, unless as I said something was damaged.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!