<div dir="ltr">Brian,<div><br></div><div>This sound very interesting. You should probably use a rotary encoder instead of a potentiometer. Look at <a href="http://bit.ly/1H8jPhm">http://bit.ly/1H8jPhm</a> Rotary encoders use what is called a Gray Code and the data coming out the encoder is digital so no ADC is needed, elimination one chip. I have seen a few examples of the use of these encoders on the web for RPis. I have used them myself, but it was for Arduino/MPUs circuits.</div><div><br></div><div>~Carl</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 10:10 AM, Grawburg via TriEmbed <span dir="ltr"><<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One of the programs the museum regularly presents to schools and other groups is called the Alaskan Pipeline Challenge. Students must construct a "pipeline" that allows for caribou migration under a portion of the pipeline and is able to avoid ecologically sensitive areas and yet allow a marble to go from the start to the finish.  I offered to add another part to he program to introduce instrumentation and control through the use of a motorized ball valve. The valve will actually be controlled by a Raspberry Pi that will activate a 12VDC relay connected to the valve actuator. That's the easy part. Here's the more involved part.<br>
<br>
The valve will not have anything actually going through it, but I want to simulate a flow meter and a pressure gauge. The idea being that a pipeline leak could be detected by a change in oil flow rate or drop in line pressure.  I wonder, would using a pot to vary voltage which will be converted to digital for the RPi with an appropriate ADC (an MCP3008, probably, which Adafruit supplies with all the instructions) be the simplest method?  This seems pretty straight forward and the Python code fits well into the whole project. A drop in pressure would automatically close the valve, for example.<br>
<br>
<br>
Thanks,<br>
Brian Grawburg<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<a href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">-------------------------------------------------------------------------------<br>Carl J. Nobile (Software Engineer)<br><a href="mailto:carl.nobile@gmail.com" target="_blank">carl.nobile@gmail.com</a><br>-------------------------------------------------------------------------------</div>
</div>