Arduino and Optoisolators I am looking for an efficient (and safe) way to use the Arduino to switch a higher voltage device off and on. The first option would be a relay, but they are fairly bulky. I was wondering if I should use an Optoisolator instead ?

Here is a link to the Data sheet for the Optoisolator I am using..

http://www.everlight.com/file/productfile/el817.pdf
I think (if I am reading it correctly) it expects an input voltage of 1V at about 20mA ?

However, I think it may be more involved than I originally thought. Here is a sort of simulation of what I am trying to achieve.
http://tinyurl.com/y9xd7lzb

As you can maybe tell, I am using a voltage divider to reduce the output from the arduino (from 5V to 1V).
My concerns are ..


Is this the best approach ?
Is it efficient ?
are there any problems I should be aware of ? Precautions I need to take ?
Is the voltage divider a good approach to feed the input to the Optoisolator ?


Also, efficiency is an issue as the Arduino (probably a Nano) will be running off batteries.

The target device is a 20V DC motor. I am a novice when it comes to electronics, so I would be grateful of any help or advice you can give.

Many thanks..

Dave.
Is this the best approach ?


Not really, no.


  Is it efficient ?


No, far from it.


  are there any problems I should be aware of ? Precautions I need to take ?


You don't want a voltage divider to power an opto-isolator. An opto-isolator won't be powerful enough to cope with the motor current. You need flyback protection.


  Is the voltage divider a good approach to feed the input to the Optoisolator ?


No, definitely not.

Unless you require galvanic isolation all you need is a simple NPN transistor or N-channel MOSFET circuit:







simulate this circuit &ndash; Schematic created using CircuitLab