Can I use a 4N25 optocoupler ( controlled by an Arduino pin with a 390 ohm resistor ) to run a small geared motor without having to add a relay ?
Motor specs :Operating Voltage - 3V to 12V DCRecommended Operating Voltage - 6V to 8VLoad Current (3V) - 70mA
I will add a diode over the motor terminals as a flyback diode.
Assuming the speed is controlled by the voltage, the voltage range that will be applied to the motor will be 3V to 9V ( 9V being same used for Arduino power ).
The motor spec says 3V 70mA. Would the mA increase or decrease when the voltage is changed ?
the 4N25 opto is listing specs as :Input Forward Voltage IF = 10mA 1.18 - 1.50 VSo I am understanding the Arduino output pin being 5V, 4N25 forward voltage 1.4V and 10mA would need a current limiting resistor ( between Arduino pin and Opto ) of 390 ohms.
This should saturate the transistor in the 4N25 fully.
So what current can the output side of the 4N25 safely manage, and what current would this motor ( variable voltage ) be pulling ?
I also have 2N3904 transistors if they would be better suited.
The motor spec says 3V 70mA.
Would the mA increase or decrease when the voltage is changed
Or just use a logic level power FET - IRL540 comes to mind for up to about 4 A or so, there are (much) better ones for more power.
I can source the IRL540 locally. Can I control that directly from an Arduino output pin, or should it have a transistor or current limiting resistor ?
It can be; you will want a 47k pull-down on the Arduino pin simply to keep the FET off while you are booting, and if you use PWM to control the motor speed, you should have a 220 Ohm resistor between the pin and the gate of the FET.It goes without saying the supply negative will be common to the Arduino ground and the FET source.
I have 100K so I assume that would also do as a pull down resistor.
I can add the 220 ohm between pin and gate even if it is only being used on a on/off situation as well, I assume.
like the 9V from the power supply ) to the IRF520 to ensure that it switches on fully.
This would invert the status of the IRF520 so Arduino pin High = Load off, and Arduino Pin LOW = Load on.
#define MOTOR_ON 0#define MOTOR_OFF 1
Drat. just found out the locally available ones are MOSFET Switch Module IRF520
Is this a problem? If it is then just define some constants