Hi all,
I am a high school student working on a science research project involving 3D printing of biomaterials.
My group is trying to create a device that can accurately control air flow coming from an air compressor and going to a syringe for extruding of various biological solutions. To do this, we are planning to use proportional solenoid valves and pressure transducers to measure the system pressure in real time.
I recently purchased two HF Pro miniature proportional solenoid valves from eBay that are rated for 12v and come with a schematic and instructions for control with a PWM signal
Link: http://aldax.se/wp-content/uploads/2012/12/HFPRO-9_26_12.pdf
The schematic that the manufacturer recommends seemed "relatively" simply to put together, so we made a custom etched circuit board with all the components laid out (image attached below). Alas, after lots of soldering and selecting of components we have been unable to make it work.
My understanding of what this circuit does is to provide a constant 12 volts to the solenoid valve, but then vary the amount of current flowing through the coil based on a 5v PWM signal. It seemed like I could just attach a variable 5v Arduino pin to the circuit and be done with it, but it appears there is something wonky happening that we're unaware of.
Here are some of my current theories on what's happening-
-
Bad transistor type
The schematic calls for a TIP 120 NPN transistor, which we did not have on hand. After scrounging around we found a different transistor that was still NPN, however some of the voltage or current ratings on it may be different from the TIP 120. -
Op-Amp Wiring Wrong
We've double checked multiple times, but the variable voltage from the Arduino feeds correctly into the Op-Amp's non-inverting input (+) and comes through output pin 1, which is connected to the transistors base pin. The inverting output is connected to a 1 ohm resistor which grounds the solenoid valve. We followed the pinout of the LM358 op-amp and the diagram on the solenoid datasheet, but something could have been lost in translation. -
Arduino PWM Frequency Set Incorrectly
I read in this other post (Help required for controlling proportional solenoid valve! - Motors, Mechanics, Power and CNC - Arduino Forum) that the valve has to be controlled with a PWM frequency between 5 and 12 kHz. I looked up how to change the frequency on the Arduino Uno using this resource: https://etechnophiles.com/change-frequency-pwm-pins-arduino-uno/
He said in this blog post that you can change pins 5 & 6 to operate at 7812.50 Hz or 7.812 kHz
The following code I used to change it:
TCCR0B = TCCR0B & B11111000 | B00000010;
Unfortunately this did not solve our problem.
I understand this issue may be out of the scope of this forum, but I was wondering if anyone could offer some insight. It would be greatly appreciated.
I have attached a detailed image of our circuit board and the manufacturers design side by side so its easier to compare the two. If you have any questions or need more information, please feel free to ask.
Thanks,
Frank Parsons
Connections on custom circuit board:
+A = 0-5v Arduino PWM signal
+5v = Arduino 5v power
+PS = 12v power supply positive
-PS = 12v power supply negative
+VC = output to solenoid valve positive
-VC = output to solenoid valve negative
Capacitor and resistor values are labeled on manufacturer diagram