Raspberry Pi – Reading Analogue inputs…

Part 1:

This is a tutorial on how to read analogue inputs on your Raspberry Pi using a PCF8591 analogue to digital converter…

Make sure to watch part 2!

Please subscribe and check out my other videos:
http://www.youtube.com/user/TheRaspberryPiGuy?feature=mhee

Happy Piing
The Raspberry Pi Guy
theraspberrypiguy@gmail.com

Part 2:

This is a tutorial on how to read analogue inputs on your Raspberry Pi using a PCF8591 analogue to digital converter…

Make sure to watch part 1 first!

Check out my other videos:
http://www.youtube.com/user/TheRaspberryPiGuy?feature=mhee

Necessary links and commands:

Datasheet for the PCF8591 (PDF) : http://astro.temple.edu/~cvecchio/PCF8591_6.pdf

Raspberry Pi’s GPIO layout: http://cdn.instructables.com/FJA/5B1M/H2WERJ0U/FJA5B1MH2WERJ0U.LARGE.jpg

Commands and code used: (All credit has to go to forum member: Grumpy Mike)

All the commands and code are covered in this forum post:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=42&t=14093&p=146643&hilit=PCF8591#p146643
If you have any problems or would like me to write out the code do not hesitate to comment or email me!

Happy Piing
The Raspberry Pi Guy
theraspberrypiguy@gmail.com

NOTE: Somebody figured this out for me!:

This might be useful to mention : Your tutorial is for a Rev1 Pi. People who have a Rev2 Pi need to change the bus ID from bus = SMBus(0) to bus = SMBus(1) otherwise they will get an IOError since the bus has changed from Rev1 to Rev2. To fix the “Stuck on 128” problem several people mentioned in the comments : Do not connect the OSC (Pin 11) of the PCF8591 to ground simply leave it unconnected and the problem should be solved.
Photo resistor: http://roguescience.org/wordpress/wp-content/uploads/2011/07/photoresistor.png

3 comments on “Raspberry Pi – Reading Analogue inputs…
  1. Catty says:

    really educational submit. Thanks for discussion save
    it as favorite.

  2. Simply desire to say your article is as surprising.
    The clearness in your post is just cool and i can assume
    you are an expert on this subject. Well with your permission allow me to grab
    your feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding work.

  3. This is my first time go to see at here and i am really happy to
    read everthing Raspberry Pi in one place

Leave a Reply

Your email address will not be published. Required fields are marked *

*