Digital I/O board
lux11
Posts: 6
Hello. I just completed assembly of a 27113 I/O board and am ready to do some testing. I'm not an electronics expert and I need a bit of help with the basics. For starters, I'm going to try to turn on and off a 24VAC solenoid using input to the board from an Arduino UNO. I have installed a sharp relay on the board for this purpose. But Im a bit confused about the use of various input pins and terminals on the I/O board and have not been able to find much documentation or examples. Any assistance is appreciated. My questions are of a most basic nature. Thanks,
lux11
lux11
Comments
http://www.parallax.com/StoreSearchResults/tabid/768/ProductID/658/Default.aspx?txtSearch=digital+i
2) Yes.
3) IN_x is attached to the optos, RLY_x goes to the coils of the relays. Kinda related to the second question.
4) The V+ pin lets you provide the 12VDC over the header. If you use an external power supply, you can remove jumper JP2 and not use the V+ pin at all.
5) Nope.
6) Yep.
Out of curiosity, I got confused on your diagram. Are you using the SS to drive a 24vac solenoid to control a 120vac load? Not nay-saying it, just wondering!
3a) The IN_x designations you refer to on the parallel interface show the state of the inputs, which, depending on how you have the input of the opto wired may be inverted. What you're actually reading is the output of the photo transistor which is high when the input is not energized and low when it is.
3b) The relay inputs on the parallel interface you show are logic inputs to the ULN2803 Darlington array. When you make one of these inputs high (3.3-5V) that corresponding ULN output sinks the negative side of the transistor to ground. Of course, the positive rail should be getting 12V from the relay power input of the relay won't energize. So to be clear the 12V is powering the relays, but the signals on this header just trigger the relay to turn on using a 3.3V or 5V input, usually directly from one of your microcontroller I/O pins.
4) The V+ terminal will be at the same potential as the DC Barrel Jack and Terminal Block used to provide the 12V relay power, however you don't provide 12V at this pin. It is here to provide 12V to your microcontroller VIN so that you don't need an extra power supply to run the microcontroller.
5) The VDD terminal provides the Digital I/O Board with a logic supply voltage and can be either 3.3V or 5V. But what I wanted to clarify is that this voltage sets the I/O voltage for the IN_x terminals on the parallel inputs as well as the voltages used by the shift registers in serial mode. So if your I/O pins are 5V then you should connect your microcontroller 5V supply to VDD (don't forget to also connect ground to VSS). Use 3.3V if the I/O pins are 3.3V only. The shift registers run at either voltage.
6) Yes and you can use terminal block connector if your supply doesn't have the barrel connector on it.
It seems there is an issue with your relay connection though as in your diagram it seems you're connecting the 24VAC coil directly to the relay and not to power. In that configuration nothing will happen. The relays such as the SSR are designed to switch the hot line on the AC going to your coil. So to energize an AC coil the neutral line would go to the relay coil and the hot line would connect to the relay COM terminal and the NO terminal would connect to the hot side input of the relay coil. In this manner the relay is acting as a switch between your power supply and the coil. In the configuration you show it appears as if the Digital I/O Board would be providing power to your coil, which is not the case.
I have seen many industrial control systems which emply a series of 24VAC relays within the control box to handle the higher current relays that directly control lighting and power distribution.
1) 15-30V is correct. If you need a something outside of that, the resistor value needs to change. The docs have a section on "setting the input voltage range"
I'm still not clear on the purpose of terminals IN1-IN8. Is this where I would connect the 24VAC from my xformer? (Jordan, to your last point, and related to this, the hand-drawn diagram shows a 120VAC to 24VAC transformer connected to a irrigation sprinkler solenoid: the idea being that this circuit would be switched on and off by the relay contacts). Is this NOT how one would connect to the relay contacts?
2) Yes.
To continue the inquiry, do the RED and GREEN LED's indicate the state of the relays? I noticed when I tested the board last night, if I apply either the 3.3V or 5V to the VDD pin, all the RED led's light up. Is that to be expected? (I have a Sharp relay set in the RLY1 spot and the other 7 are empty and yet ALL the red lights are on).
3) IN_x is attached to the optos, RLY_x goes to the coils of the relays. Kinda related to the second question.
3a) The IN_x designations you refer to on the parallel interface show the state of the inputs, which, depending on how you have the input of the opto wired may be inverted. What you're actually reading is the output of the photo transistor which is high when the input is not energized and low when it is.
Then I could use the IN_x pins as information feedback to my software to indicate and ON-OFF condition of the relays?
3b) The relay inputs on the parallel interface you show are logic inputs to the ULN2803 Darlington array. When you make one of these inputs high (3.3-5V) that corresponding ULN output sinks the negative side of the transistor to ground. Of course, the positive rail should be getting 12V from the relay power input of the relay won't energize. So to be clear the 12V is powering the relays, but the signals on this header just trigger the relay to turn on using a 3.3V or 5V input, usually directly from one of your microcontroller I/O pins.
I think I understand this better now after 5) below.
4) The V+ terminal will be at the same potential as the DC Barrel Jack and Terminal Block used to provide the 12V relay power, however you don't provide 12V at this pin. It is here to provide 12V to your microcontroller VIN so that you don't need an extra power supply to run the microcontroller.
Okay. That is how I understood the documents. The arduino can run from an unregulated 6-20 VDC (7-12V recommended) so the V+ pin will come in handy.
5) The VDD terminal provides the Digital I/O Board with a logic supply voltage and can be either 3.3V or 5V. But what I wanted to clarify is that this voltage sets the I/O voltage for the IN_x terminals on the parallel inputs as well as the voltages used by the shift registers in serial mode. So if your I/O pins are 5V then you should connect your microcontroller 5V supply to VDD (don't forget to also connect ground to VSS). Use 3.3V if the I/O pins are 3.3V only. The shift registers run at either voltage.
Thanks. I did not know that was how that worked.
6) Yes and you can use terminal block connector if your supply doesn't have the barrel connector on it.
Got it, thanks.
Out of curiosity, I got confused on your diagram. Are you using the SS to drive a 24vac solenoid to control a 120vac load? Not nay-saying it, just wondering!
It seems there is an issue with your relay connection though as in your diagram it seems you're connecting the 24VAC coil directly to the relay and not to power. In that configuration nothing will happen. The relays such as the SSR are designed to switch the hot line on the AC going to your coil. So to energize an AC coil the neutral line would go to the relay coil and the hot line would connect to the relay COM terminal and the NO terminal would connect to the hot side input of the relay coil. In this manner the relay is acting as a switch between your power supply and the coil. In the configuration you show it appears as if the Digital I/O Board would be providing power to your coil, which is not the case.
See my comment on item 1 above. So, if I understand, I should NOT use the COM-NO-NC terminals as a switch? I should feed my 24VAC to the IN-x terminal blocks and then connect the solenoid to the COM and either NC or NO terminals?
Thanks for the continued support.
lux11
Think of the Digital I/O Board as an eight relay output board and an eight optically isolated input board stuck together. The functions are independant from each other, and while they can be used in conjunction with one another it doesn't sound like that's what you need for your situation. It so happens I am in the process of replacing my Toro irrigation controller with a Propeller-based unit and am also using the Digital I/O Board, so I can hopefully more easily explain this now that I know what you're trying to do.
The 120VAC side of the transformer will connect to a 120VAC fused or breaker protected power source. The 24VAC output will be connected as follows. One of the two outputs will connect to one of the solenoid wires on each valve you're trying to control. This is a common connection. The other wire from the 24VAC transformer will be the switched lead and will go to the COM input on each relay you are planning to use to control an individual valve solenoid. So if you plan on controlling 8 of them, you should have a wire jumping from the COM connection on the first relay to the COM connection on each relay. The NO connection for each relay connects to the other wire on each solenoid valve. In this manner you could control up to 8 valves.
Try to look at it this way...the power source has two wires and the solenoid valve has two wires. These need to be connected together to activate the solenoid. You will be wiring one side directly an the relays will be switching the other side, completing the circuit.
It is very important that you understand how all of this works before attempting to wire anything. It is also very important to verify that your board works correctly and that everything has a fuse and a breaker to protect it if there's a problem. Switching high voltages is not a trvial matter.
If I had to guess I would say there is an error somewhere in what is soldered to the PCB. The Red LEDs should not come on unless you are activating a relay (that relay is on). In fact, those LEDs are in no way connected to the power supply rail you're using so simply applying power to VDD would not cause the LEDs to light unless you have also connected the RLY inputs to it as well. The green LEDs are indications of input voltage on the opto inputs and are not related to the relays.
You could, yes, however this would mean running a pair of wires ou to the valve to verify that the valve actually received power. A flow sensor past the valve might be a better way to verify valve functionality, but that is digressing...
This is not correct. the IN-x terminals are in no way related to the functions of the relays. These are used for testing externals voltages such as the 24VDC sensors typically used in an industrial system.
I got that now. I finally realized I was so focused on the output side of things and equating the word input only with the data input used to control the relays that I was missing the bigger picture.
This is what I have drawn on my sketch (although I did not show detail wires going to COM and NO). I understood this and understand the safety significance of correct wiring. I will be checking into that over the weekend.
Thanks for the help.
lux11
lux