0-5V Analog input from Raspberry Pi graphed on Web

Using the PIC PI expansion board combined with your Raspberry Pi i will show you how you can Graph analog Voltages to Cosm
0-5V Analog input from Raspberry Pi graphed on Web
Hardware needed for this project 
1 x Raspberry Pi
1 x PIC PI development board ( you will be able to purchase this soon )
1 x Microchip Programmer
1 x 10k Ohm Trimpot
1 x Soldering Iron
1 x Solder
1 x Wire

The open source schematic for the PIC PI expansion board is provided in the pdf attached more information provided on our  website

pic_rpi_print.pdf663 KB

Step 1: Setting up the raspberry pi operating system

Installing the Raspbian image onto the Raspberry pi in Windows
1. Download the latest raspbian image from the raspberry pi website
2. Download the binary (not the source) image writer for windows
3. Put your Sd card into your PC
4. Run image writer software
5. Browse the image file
6. Select the drive letter from which your sd card is on
7. Click the write button to flash the image to the sd card this takes a while so be patient

For installing on Mac an Linux there are plenty of tutorials you can follow on the internet

Step 2: SSH into you Raspberry Pi

I have found that the easiest way to work with the PIC PI and Raspberry PI at the same time is to ssh into you Raspberry Pi to do this you will need to download Putty which is free to download off the internet. To ssh into your Raspberry Pi you will need to find out the ip address of you raspberry pi you can do this by running the command ifconfig your ip address the inet address of eth0 as show in the picture. Then type your ip address into your putty session and make sure your Port is set to 22

Step 3: Unblacklisting the i2c module

I2C is blacklisted by default in the Raspberry Pi. To disable the blacklisting you need to edit the raspi-blacklist.config file to open the file run the command sudo nano /etc/modprobe.d/raspi-blacklist.conf     Unblacklist the i2c module by commenting ( placing a hash tag in front ) the  blacklist i2c-bcm2708 line ie.#blacklist i2c-bcm2708

After you have done this save the file by  pressing ctrl X  which prompts you to save and enter Y to save

Step 4: Enable I2C Module in the kernel

The i2c module is not included in the Raspberry PI kernel yet so to add it you must open the modules file  to open it run this command  sudo nano /etc/modules and to add it you must type the line i2c-dev into the text editor and again make sure you save the file .

0-5V Analog input from Raspberry Pi graphed on Web

Step 5: Install the i2c packages

For Python to run our code we will have to install a few packages but before you do do an update of the system using   sudo apt-get update then install the i2c tools using the command  sudo apt-get install i2c-tools and the smbus using the command sudo apt-get install python-smbus  and add a user using the command sudo adduser pi i2c then do a reboot of your system using the command
sudo reboot -n   then python requires you add the i2c-dev do this using this command sudo modprobe i2c-dev

 

For more detail: 0-5V Analog input from Raspberry Pi graphed on Web

Scroll to Top
Read previous post:
Combine 1 or more Arduinos with a RaspberryPi

This instructable is a demonstration of the Drogon Remote Control (DRC) feature included with wiringPi. Drogon Remote Control consists of...

Close