Rasberry Pi and Neils Complaints Addressed
The last part of this project, which was quite a major part was from the Pi. Here is used the Smbus library in Python
which I learned previousely about in this week
here. Then I also used the same UI maker Tkinter
that I previously used in this week
here. The first thing that had to be done was make a UI to display all
the information which was done easily with Tkinter which I then added a clock to to be able to see the day and time. I realized when making the UI that
I will need to update the values every second for the clock and every 30 seconds to all the other values related to the sensors so I made the UI
variable in a class so that I could make a new instance of the class when updating all the values which was far simpler then changing the values. Now
all the was left was to incorporate the SMBus library and to connect to sensor board slave device and request the information. Of course the information
received was a voltage unfortunately from analog read so useless by itself. To fix this I made a two point callibration curve for the pH sensor, for
conductivity used an equillibria equation found from the makers of the sensor, for the thermistor I used the Steinhart and Hart Equation, which could easily
be converted to TDS then the water level sensor was very easy with it detecting water or not if the reading was above a certain value. Then all that was left to do
was add a function to run every 24 hours with an incrementing variable from 1 to 7 which reset at 7 to the slave servo board which worked like a charm. And with that
the final project was complete all that was left was for me to put everything on the tank wire it together, and film the video.
For the video Neil had two complaints the first was a showing PCB board on the back of the tank which was fixed in the photo below, and the second was that we did not show the reading
update which I added two photos below showing the reading changing and a video can be seen on John's site. As you can see it says fetching data when in the process
of updating the data and this occurs every 30 seconds. In the end our device worked like a charm and we made a fish tank sump and feeder
with live readings we did not manage to fit in all the features we were hoping to be we can always add them later with the modular design
we established. You can see a run down of the plans before hand answering many questions on the week
here!