<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Reading a photo sensor with the Raspberry Pi B+</title><link>/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><description>Another simple real world measurement that can be performed with the Raspberry Pi B+ is to make measurements of the physical world around you. As several have shown before, you can get digital sensors to determine temperature, humidity, distance, mot</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Fri, 01 Jan 2016 23:22:01 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>tally44xz@hotmail.com</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;Hey there, I&amp;#39;ve just copied this nifty project with some unusual results. The numbers returned seem to be coming is sets of three different readings, eg: 2997, 181, 429, 3012, 174, 432&amp;nbsp; also, holding a flash light over the photocell does not change the values at all. Another strange thing, I have to be physically touching the ribbon cable coming from my Pi for this to work at all. I have no male female connectors so I put the ribbon cable in and use all male. I suspect the capacitor or photo resistor may be bad, I only have one of each. Any ideas would be greatly appreciated! &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 20:44:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>D_Hersey</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;A current source would be a choice, in place of the resistor, if you wanted to tart it up a bit.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 20:38:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>D_Hersey</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;You can stick it in an oscillator and count it.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://electronicdesign.com/analog/whats-all-v-f-converter-stuff-anyhow-part-1" rel="nofollow ugc noopener" target="_blank" title="http://electronicdesign.com/analog/whats-all-v-f-converter-stuff-anyhow-part-1"&gt;What&amp;#39;s All This V-F Converter Stuff, Anyhow (Part 1) | Analog content from Electronic Design&lt;/a&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 16:34:06 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>Robert Peter Oakes</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;another idea based on this great work and a great one for the STEM academy&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;replacing the photo resistor with an accurate known value resistor will allow you to measure within a reasonable accuracy, the value of a capacitor, the range that this would work may be limited but it should work&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Just a thought &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-b2f6cc19-2226-4d8d-b9cf-e5f42436589e/8372.contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 15:55:17 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>Robert Peter Oakes</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi Mike&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Nice example of basic electronics being applied to a modern system, it is always nice to see simplicity in action and if it is accurate enough for the application then whos to complain, not me for sure. ADCs are nice but add complexity and the additional resolution is often not required.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I believe Agilent (Keysight &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-b2f6cc19-2226-4d8d-b9cf-e5f42436589e/1373.contentimage_5F00_1.png:16:16]&lt;/span&gt; ) have been using this approach for years in their high end power supplies etc as part of the control circuit as it is so easy to calibrate for (Its all basic counting)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;the one thing they do from what I understand is count on both slopes and this may improve the speed a little as there is no need to discharge, only go low enough to trip the logic level the other way, you could then average the reading of up and down or some other fancy math ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;How fast is it allowing you to sample ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I will be book marking this page for future use &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-b2f6cc19-2226-4d8d-b9cf-e5f42436589e/1373.contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 04:14:29 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>dragonstyne</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Excellent work Sir.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;-Steve&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 04:01:27 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>clem57</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;So even though we think in 1&amp;#39;s and 0&amp;#39;s there are points of change giving rise to a square world of digital overlayed in a imprecise/fuzzy world of analog. Cool! &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-b2f6cc19-2226-4d8d-b9cf-e5f42436589e/contentimage_5F00_930.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Clem&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 03:15:08 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>Problemchild</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;This is So 80&amp;#39;s ... and that&amp;#39;s a complement&amp;nbsp; so many designs had so called analog converters which were merely&amp;nbsp; charge time counters in software.&lt;/p&gt;&lt;p&gt;I&amp;#39;m wondering why you chose a quite large capacitor of 1uf most use say .01-0.1uf. This is quicker of course and I think would probably stress the RPI GPIO pin less when you try to discharge the Cap for the next sample.. What is the discharge time BTW when you set the GPIO low to discharge the capacitor?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Wed, 24 Dec 2014 02:16:48 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>mcb1</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Mike&lt;/p&gt;&lt;p&gt;Despite knowing about RC and charge times, and having been to Adafruit once or twice (mostly shopping), it never occurred to me to try this.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Well done, you deserve a pay rise. ... &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Mark&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Tue, 23 Dec 2014 20:36:01 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>gadget.iom</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Thanks for this &lt;span&gt;[mention:51d5bb89e8a04c63af6a84cefbc03bd9:e9ed411860ed4f2ba0265705b8793d05]&lt;/span&gt;. &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-b2f6cc19-2226-4d8d-b9cf-e5f42436589e/contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;looking to take light level readings very soon. This is a great approach!&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Tue, 23 Dec 2014 20:16:15 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>shabaz</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;You&amp;#39;re on fire with your RPI STEM tutorials : ) Great stuff!! : )&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Tue, 23 Dec 2014 19:48:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>DAB</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi Michael,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I like where you are going with these basic tutorials.&lt;/p&gt;&lt;p&gt;Sometimes people just need a few examples to realize the power their boards have hidden.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Reading a photo sensor with the Raspberry Pi B+</title><link>https://community.element14.com/learn/learning-center/stem-academy/b/blog/posts/reading-a-photo-sensor-with-the-raspberry-pi-b</link><pubDate>Tue, 23 Dec 2014 19:06:32 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b2f6cc19-2226-4d8d-b9cf-e5f42436589e</guid><dc:creator>ntewinkel</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Another great tutorial, thanks Michael!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I had no idea that reading analog sensors in a digital way like this was even possible.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19537&amp;AppID=134&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>