I'm trying to switch a 12v voltage with my Arduino. I've built a fan controller with PWM, and now I want to be able to switch them completly off, cause I've got a watercooling loop.
For some reason, if I switch the ground of the fans, they still run. (My guess is thats because of the voltage difference between 5v PWM signal and the 12v Power Supply.)
But if I switch the 12V+ they shut off (with a physical switch).
So I used a optoisolator breakout board from Sparkfun to switch my 12V+. In general it works (if no signal from the Arduino is sent, I also get 0V output), but if I use a digitalWrite(Pin, HIGH) to send the switching signal I get on the one channel 0.9V and on the second 1.1V.
Here the link to the board: Sparkfun Optoisolator
And the used Isolator on the board is the ILD213T.
I connected HVG of the breakout board with the ground of the fans and my power supply. HV to the 12V+ of the power supply and the outputs to the VCC inputs of the fans.
On the input side I connected ground to the Arduino Ground and the Inputs to two seperate digital Pins.
I measured on the input side 4.4V on both channels when I set the digital Pins to High.
So my question is: What did I do wrong that I got these off voltages?
If you need to know anything else, feel free to ask.
I connected HVG of the breakout board with the ground of the fans and my power supply. HV to the 12V+ of the power supply and the outputs to the VCC inputs of the fans.
On the input side I connected ground to the Arduino Ground and the Inputs to two seperate digital Pins
Please show us a schematic. I' not going to try and draw one or visualize the circuit from your description.
I'd be surprised if that thing can power a fan. I looked at the SparkFun website and I didn't see a current spec and I didn't see what transistors they are using.
...At this point the transistors (and maybe the opto-isolators) may be fried from excess current or from the back-EMF from the fan motor (since you didn't add a flyback-diode and there isn't one on the board).
Try replacing the motor with an LED (with the usual current-limiting resistor). i.e. Try the Blink Example modified for whatever I/O pin you're using. If the LED isn't switching on & off, stick the LED (with resistor) on the input-side of the opto-isolator to make sure it's getting a pulse. If the LED does work, leave the LED attached and connect the motor.
(My guess is thats because of the voltage difference between 5v PWM signal and the 12v Power Supply.)
5V is enough to turn-on the LED inside the opto-isolator. The 12V on the output-side is separate (and possibly isolated depending how it's wired-up).
DVDdoug:
Please show us a schematic. I' not going to try and draw one or visualize the circuit from your description.
I drew a Schematic, hopfully it gets more clear with that.
DVDdoug:
I'd be surprised if that thing can power a fan. I looked at the SparkFun website and I didn't see a current spec and I didn't see what transistors they are using.
If I read the Datasheet corretly (I'm not so sure :/) it can handle a voltage up to 70V (the Collector emitter breakdown voltage, or for what voltage would I need to look?)
I'll try the tip with the led, but that will take a while cause I will need to solder a little bit.
Edit: Regarding my guess: I meant, if I switch the ground (with a physical switch, the optoisolator not in my circuit) they still run
Edit2: I found out something rather interesting while testing out with the LED, if I disconnect my fan I get the correct 12V.
The LED lights correspondingly also correct.
What could be the reason that as soon as I connect my fan to the circuit (12V) it doesnt output the correct Voltage? Could it maybe be related with the common ground? If so how can I connect them in another manner?
I think what you fail to realise is that the sparkfun board will create SIGNALS that can used with higher voltage logic. This is NOT a driver board and it will fail to provide much of anything in the way of high side "current". You CAN use this board to drive higher voltage rated MOSFETS. You should consider that.
So... the board outputs SIGNALS of GND and HV Voltage to be further used as needed to "drive" your loads with "something" suited to "driving loads".
Think of it more like an optically isolated level converter.
pwillard:
I think what you fail to realise is that the sparkfun board will create SIGNALS that can used with higher voltage logic. This is NOT a driver board and it will fail to provide much of anything in the way of high side "current". You CAN use this board to drive higher voltage rated MOSFETS. You should consider that.
So... the board outputs SIGNALS of GND and HV Voltage to be further used as needed to "drive" your loads with "something" suited to "driving loads".
Think of it more like an optically isolated level converter.
Oh thank you. I think then I completely misunderstood their description. I thought when they wrote
"We often use this board to allow a microcontroller control servos or other motors that use a higher voltage than the TTL logic on the (3.3V or 5V) micro, and may cause electromagnetic interferance with our system as the motors turn on and off. "
they meant I can use it for switching my 12V power circuit.
Then I will need to look for another component which can switch the 12V+ line with my 5V from the Arduino. Do you maybe have any suggestions?