<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFCC" text="#3333FF">
<div class="moz-cite-prefix">Actually the typical circuit, from a Pi
or any other controller, consists of a NPN transistor, driving a
MOSFET, which drives the solenoid. Hard lesson learned from years
of model trains and diorama animations. I have seen people drive
the solenoid directly through a single transistor, but like you
said, you gotta watch for the back EMF current.<br>
<br>
<img title="Basic Relay or Solenoid Driver"
src="cid:part1.02030801.05070505@gmail.com" alt="Basic Relay or
Solenoid Driver" height="422" width="577"><br>
<br>
See this article:
<a class="moz-txt-link-freetext" href="http://www.delabs-circuits.com/cirdir/electric/discrete/del50010.html">http://www.delabs-circuits.com/cirdir/electric/discrete/del50010.html</a><br>
<br>
Here is an article of a simpler circuit:
<a class="moz-txt-link-freetext" href="http://electronics.stackexchange.com/questions/62415/solenoid-driving-circuit">http://electronics.stackexchange.com/questions/62415/solenoid-driving-circuit</a><br>
<img src="cid:part2.05040102.08090102@gmail.com" alt="schematic"><br>
<br>
Here is an Instructable:
<a class="moz-txt-link-freetext" href="http://www.instructables.com/id/Controlling-solenoids-with-arduino/">http://www.instructables.com/id/Controlling-solenoids-with-arduino/</a><br>
<br>
And this EE claims that others do it wrong, and he uses proper EE
analysis to prove it:
<a class="moz-txt-link-freetext" href="http://www.evdl.org/docs////solenoid_drivers.pdf">http://www.evdl.org/docs////solenoid_drivers.pdf</a><br>
<br>
On 09/24/2013 11:31 AM, Rodney Radford wrote:<br>
</div>
<blockquote
cite="mid:CA+kfaxEkNa7Kxu6tFSG-45y_pRoUTnJEq1o+GKAiRyuHyo4Z+Q@mail.gmail.com"
type="cite">
<div dir="ltr">If only controlling the release of ball bearings on
a track, the simplest approach may be a single R/C servo with an
attached wand that can be controlled to lift up, let the ball
roll through, and then drop to catch the next ball (I assume
there is more than one).
<div>
<br>
</div>
<div>And yes, it is possible to control *one* R/C servo on the
Raspberry Pi without additional hardware using the PWM channel
(lots of references online via google).</div>
<div><br>
</div>
<div>The idea of the solenoid will also work, but the spikes
from a solenoid can be rather nasty, so there will need to be
some isolation between the RPi and the solenoid. I would not
recommend using the 3.3v or 5v supplies through the RPi, and
you should put a diode across the solenoid to help ease the
spikes when the solenoid returns back.</div>
<div><br>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="80">--
Scott G. Hall
Raleigh, NC, USA
<a class="moz-txt-link-abbreviated" href="mailto:ScottGHall1@GMail.Com">ScottGHall1@GMail.Com</a>
</pre>
</body>
</html>