user37579: 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.

user4143: 
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 – Schematic created using CircuitLab

37579: <p>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 ?</p>

<p>Here is a link to the Data sheet for the Optoisolator I am using..</p>

<p><a href="http://www.everlight.com/file/productfile/el817.pdf" rel="nofollow noreferrer">http://www.everlight.com/file/productfile/el817.pdf</a>
I think (if I am reading it correctly) it expects an input voltage of 1V at about 20mA ?</p>

<p>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.
<a href="http://tinyurl.com/y9xd7lzb" rel="nofollow noreferrer">http://tinyurl.com/y9xd7lzb</a></p>

<p>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 ..</p>

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

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

<p>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.</p>

<p>Many thanks..</p>

<p>Dave.</p>
 4143: <blockquote>
  <p>Is this the best approach ?</p>
</blockquote>

<p>Not really, no.</p>

<blockquote>
  <p>Is it efficient ?</p>
</blockquote>

<p>No, far from it.</p>

<blockquote>
  <p>are there any problems I should be aware of ? Precautions I need to take ?</p>
</blockquote>

<p>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.</p>

<blockquote>
  <p>Is the voltage divider a good approach to feed the input to the Optoisolator ?</p>
</blockquote>

<p>No, definitely not.</p>

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



<p><img src="https://i.stack.imgur.com/bYmsg.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fbYmsg.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>
