Tag Archives: ADC0834

Creating a programmable Temperature Alarm with the Raspberry Pi

In this video lesson we show how to create a programmable temperature alarm using the Raspberry Pi, the DHT11 sensor, the ADC0834, a potentiometer and a buzzer. The results are displayed on a LCD1602 LCD display with a i2c connection. The device operates in either program mode or monitor mode. Pressing the button puts you in programming mode. In this mode you turn the potentiometer until your desired set temperature is reached. Then pressing the button again will switch you to monitor mode. In monitor mode the current temperature and humidity are displayed on the LCD. When the temperature exceeds your setpoint, the buzzer will release an audible alarm. Below is the schematic for our build.

temperature sensor
This schematic shows how to create a programmable temperature alarm

Sunfounder ADC0834 Analog to Digital Chip Library for the Raspberry Pi

We will be using the Sunfounder Ultimate Raspberry Pi kit in all these lessons. You can pick your kit up HERE. In order to use the ADC0834 Analog to Digital converter in your projects, you must have the following library installed on your system. In order to do this, you need to copy the code below. Then create a new program on your Raspberry Pi, and paste the code. Then the code should be saved as ‘ADC0834.py’ in the SAME folder you will be running your main python program from. Also, you may save the program in the default python library file on the raspberry pi. To do this, you can save the file to:

/usr/lib/python3.7/ADC0834.py

Note the above includes the path and the file name. Using this is a better option, as any program on python3.7 should find the library here.