Hello,
I am trying to prototype/setup a testing environment to manipulate some 3 way SMC solenoid valves through LabVIEW using an Arduino UNO. I am doing this to learn something more about Arduino and electronics while I wait for the wheels of bureaucracy to submit and then approve the requisition of the actual National Instruments cards we will actually need to use eventually. Yay regulations!
At the moment, I am stuck at a very rudimentary part of the process, i.e. just getting the sketch to open and close the valve.
The valve I am using is the SYJ500 model as shown in this documentation:
The solenoid requires fairly low wattage (<1 Watt) but fairly high voltage for Arduino projects (24 V) so I have linked 4x 9V batteries in series and tested them to see that they are succesfully outputting sufficient voltage.
I will be able to upload a diagram/photo of the wiring setup tomorrow when I return to the lab, but hopefully the following description may clarify:
The Arduino is connected to the circuit board through output pin 4, which leads to a 3.3k resistor before going to the Darlington transistor (I believe a TIP120). The emitter is connected to the battery ground. The collector pin is connected to the positive solenoid wire, and the negative solenoid wire is connected to the positive battery terminal.
I have essentially tried to implement the wiring as in the attached motor diagram, only emitting the diode explicitly as I believe there is a one way diode in the solenoid electronics themselves.
Once I wire it, the LED on the solenoid lights up, which actually uses 75% of the power the solenoid draws, so I believe it is definitely pulling sufficient power. However, my sketch seems to not actually turn the solenoid valve. The sketch I am using is below:
int solenoidPin = 4; //This is the output pin on the Arduino we are using
void setup() {
// put your setup code here, to run once:
pinMode(solenoidPin, OUTPUT); //Sets the pin as an output
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(solenoidPin, HIGH); //Switch Solenoid ON
delay(1000); //Wait 1 Second
digitalWrite(solenoidPin, LOW); //Switch Solenoid OFF
delay(1000); //Wait 1 Second
}
It just now occurs to me that it may simply be the case that I need to connect the Arduino ground to the circuit ground, but I will put up this post anyway as I cannot test at the moment and in case there may be some other issue that I am overlooking. If I happen to test it and this resolves the issue before I get any responses, I will try to close the topic.
Any and all help/advice is appreciate, I have a little experience with circuits but definitely am an Arduino beginner. Thanks!