-
1PREREQUISITES
GUI Prerequisites:
apt-get install qtdeclarative5-dev-tools
apt-get install libqcustomplot-dev
Email Messaging Prerequisites:
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
Temp Sensor Prerequisites:
sudo apt-get install pigpio python-pigpio python3-pigpio
-
2INSTALLATION GUIDE
Clone Repository:
git clone https://github.com/domrest/TrashBot.gitRun Cmake within directory:
cmake .
Run Make:
make
Run Program:
sudo ./Trashbot
-
3Temperature Sensor usage
Trashbot receives its temperature readings via two Tsic 306 temperature sensors, which have an error of +-0.3 K and a sampling rate of 10 Hz. These are connected to the Pi via the ground and 5V Power, and with the data pins connected to seperate GPIO ports. The TSIC Temperature Sensors will communicate to the Pi passing the current temperature reading from the sensor through two packets of data transmitted at a Baud Rate of 8kHz This is done through the ZACWire Protocol. The Pi will interrupt on every bit received, storing the bit and decoding it into a temperature once both packets arrive.
-
4Temperature Sensor Component
As stated the temperature sensors utilised within the system are two TSIC 306 sensors These can be found on RS-Online for a price of £6.46 each.
-
5Sensor Connection
The sensor has Three pins:
- Power
- Data
- Ground
Which were soldered to distinct wires
The Power wires were then connected to the same Power pin on the Raspberry Pi, similarly to the Ground wires connected to the same ground pin on the raspberryPi. GPIO pins 23 and 24 were connected to the remaining Data wires.
-
6GPIO Pinout Diagram
-
7Graphical User Interface - GUI
A very quick and easy GUI can be made using QT widgets and C++ programming.
QT is a cross platform windows development environment for Linux/Windows
and Mac.
Elements in QT are Widgets which can contain anything form plots,
buttons or text fields. They are classes. You can define your own widgets or
use ready made ones. -
8Qt and Qwt Widgets and Classes
A layout in QT is defined in a declarative way as layout classes forexample horizontal or vertical layouts.
From existing widgets like QwtThermo you can get a thermometer widget and then set its size and color accordingly using its functions.
With various available classes like QLabel and Qfont you can change font size, colors and add labels to your GUI window.
Downloading the source code and after installing the required libraries mentioned in instructions above. You can get this handy GUI up and running in no time and can play around with it to make it your own!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.