-
1Step 1
Configure Raspberry Pi:
1. Load GPIO and DS18B20 modules at boot:
Add w1-gpio and w1-therm to /etc/modules
2. Install python libs for gpio:
sudo apt-get install python-rpi.gpio
3. Copy python scripts and web pages:
https://github.com/james7780/TempMonitor
test.py in the cgi-bin folder can be used to test the connected temp sensors?
4. Install and configure "lighttpd" webserver:
Should work out of the box, as long as you put cgi scripts in /var/www/cgi-bin folder and mark them as executable.
www.penguintutor.com/linux/light-webserver
5. Add python script to webserver:
Copy contents of github repository (URL above) to /var/www
Update the "sensorID" variable in the readtemp.py script to match your sensor's ID (when you have it, see below).
6. [OPTIONAL] C library installation:
Install wiringPi (for C) - wiringPi.com/download-and-install/
(This is if you prefer to use C for you CGI "scripts" instead of python)
-
2Step 2
Build patch-panel:
1. Glue terminal blocks to baseplate
2. Wire up terminal blocks
3. Solder 5K resistor between +5V and data terminals
4. Connect to Raspberry Pi GPIO (+5V, GND and data)
-
3Step 3
Test/identify temperature sensors:
1. Connect DS18B20 to patch panel
2. Run test python script to check operation and identify (each DS18B20 has a unique ID)
2. OR - test DS18B20 temperature probes manually:
modprobe w1-gpio
modprobe w1-therm
cd /sys/bus/w1/devices
ls
cd 28-xxxx (DS18B20 serial number)
cat w1-slave
3. Label the sensors with their ID's so you know which is which.
4. Update the "sensorID" variable in the readtemp.py script to match your sensor's ID.
-
4Step 4
[TODO] Test flow sensors:
1. Connect flow sensors to GPIO (which???)
2. Run test python script and blow thru sensors
3. Output should change
4. Can also test/calibrate flow sensors using bucket of water and 2L coke bottle
-
5Step 5
Test system:
1. Use a web browser to browse to the raspberry Pi's IP address from another computer (or phone or tablet).
2. After a few seconds the status page should be displayed with the current temperature and flow rate values.
3. If it fails, try adding "/cgi-bin/readtemp.py" to the URL.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.