Daily Weblog 3/1/17

Today, I built my EC meter out of an electrical cord, as described in the guide that I have linked to previously. Because the shape and spacing of electrical sockets is standardized, this makes an extremely cheap and easy EC sensor, but should be as accurate as ones bought online (which can cost up to $200). I also finished writing the first version of the code, but I will have to modify it to include support for the PiFace module that I will be using as an analog input device, as the Pi natively has no analog-to-digital converters.



0 comments

Daily Weblog 10/17/17

Today, I re-enabled the sensor system, though I did not have time to find the IP address. It didn't give its name ("raspberry pi" or somesuch) to my NMAP scan, so I'll probably have to just plug it in to a monitor next class. The Space Squad and I talked about a name for our project (we're still not completely sure, but we're thinking something Hawaiian), and I explained Lagrange points.

0 comments

Daily Weblog 10/16/17

Today, we went over our goals for Quarter 2. I seem to have ended up with five separate projects:
  1. Security and penetration testing (next steps: Duckuino and possibly ARP cache poisoning)
  2. Hydroponics sensors for the new setup
  3. Moonbase project continuation (and possibly the NASA Ames space colony building competition)
  4. Attendance project and integration with Daniel Mark and others' projects
  5. Generally helping people with their projects, especially Matt Pouchain with learning Python

0 comments

Daily Weblog 4/10/17

Today, I finished wiring the temperature sensor in - I soldered a set of jumper wires to the leads so that it could fit in to the breadboard, and added a resistor. The sensor hardware is all complete now. I also obtained a Raspberry Pi 2 to use for recording the data. It can in fact read data from the Arduino, and both halves of the sensor work. The next step will be to find a waterproof container for the sensors to stay in outside, and to connect the Pi to the EMCc database so that it can log data in real time to available displays.




0 comments

Daily Weblog 2/22/17

Today, we had a guest who was an amateur hydroponicist, to help us get the initial ideas down for the beginning of the HPA hydroponics project. The part of this project that interests me the most is the potential for automation; I think that a single Raspberry Pi should, equipped with I2C sensors, be able to service several hydroponic ponds. Additionally, data could be piped to EMC to create an extremely accurate running log of how each unit fares, or even automatically regulate levels of water, nutrients and acidic additives.


I researched the components that might go in to such a system today, and equipping a hydroponic tank with a suite of sensors is surprisingly inexpensive - a single tank should not cost more than $50 in sensors at maximum, not including the cost of a central Pi to manage the data. Phidgets sells robust pH meters for $25; I have proven with my attendance system that Phidgets can be integrated with the Pi rather easily. Waterproof temperature sensors are available from Adafruit for $10, and are explicitly designed for use with the Pi over I2C. From personal experience, these sensors are extremely reliable (although I have not used one underwater!) Alternatively, Ilan Naibryf and I could probably fabricate one without too much difficulty. Electrical conductivity meters, to measure the solute concentration of a tank, are considerably more expensive (costing $100-$200 each for some reputable machine-readable models), but I found a guide detailing how to fabricate one for approximately $3 on Arduino; using the same sensor design and slightly modified code on a Pi would not be difficult.


The Raspberry Pi that ran a hydroponic system would, in my vision, be equipped with a database of plant types and their optimal values of pH, temperature, and nutrient ppm. Reading data from its 3 sensors in each tank, the Pi could automatically introduce more water, acid, base, or nutrients as needed, and alert ISR students when dangerous levels in any category were reached. Node-Red might be a good networking tool for the system, although in my opinion it crashes too frequently to be of use in such a serious application; Python scripts time-controlled by the crontab seem like they may be a better option, as that type of system has proven reliable for me in the past.

0 comments

Daily Weblog 8/22/17

Today, I planned out my proposal in more detail, and made additions to the document (now posted above). I also planned with my fellow ISR students a meeting tomorrow morning to help rearrange the Elab to expedite the fab-lab coming online. To this end (and for future communication), I created an ISR F group on Slack. I also helped Sameer begin setting up the new hydroponics system - I will need to move the sensors into the new area when it is ready.

0 comments

Yearly Summary 2016-2017

This year, I originally proposed to work on "Vision Systems and Campus Automation", with a specific focus on "Classroom Attendance and Intra-campus Transport". I was forced to abandon the transportation side of the project early in the year, when it became clear that the cost of maintaining autonomous golf carts, as well as dealing with the liability associated with autonomous vehicles, was infeasible.

However, I completed a prototype of the campus attendance vision system, and I have plans to continue the project into next year, with a distributed cloud computing solution that may allow full-scale implementation. I did not collaborate with any other students on this project; however, I have left a great deal of documentation and continuation potential for any student who wants to use the OpenCV vision library, and next year I will be working with the Amazon Web Services program Rekognition, for which I will also provide documentation for the ease of use of the next generation of ISR students. Were I to describe this project to someone without any advance knowledge, I would point out specifically the challenges of managing the memory requirements for a large group of people to be recognized. I am very proud of being able to mesh the several different technologies required for the project - from the actual vision system Python libraries, to the MySQL database of users, to the Phidget RFID reader and the webcam - to work as a cohesive whole. I think that I would like to have learned about programs like Rekognition earlier, so that I could have finished a more complete prototype by this point; cloud computing seems like an obvious solution, looking back.

Additionally, I added a new project to the scope of my work that was not included in my initial proposal - creating a hydroponic sensor system to monitor the vital statistics of the plants in the hydroponic column, including electrical conductivity, pH, and temperature. In this project, I collaborated with Sameer Maragh, Sneha Nair, Joshua Bramwell-Butcher, and Minh Truong. This project leaves a very obvious legacy for others in the form of the garden that we have engineered - and my specific contribution to it, the sensor system, which is a platform that can easily be duplicated and built upon by other people, adding more sensors and creating identical systems to service other hydroponic implementations. Next year, I will do exactly that, as we expand the hydroponics program at the Energy Lab. Were I to describe this project, I would focus on the scientific knowledge that I obtained working on the project, such as the concept of nutrient levels in water being described by the electrical conductivity, and the composition of plants determining their ideal range of EC and pH. The greatest challenge in this project was probably creating a sensor system robust enough to survive outside in a wet environment - my previous projects in this class have needed no such hardening of the systems. Were I to do it again, I would have payed more attention to the failings of the system - if I had introduced warning protocols earlier, Dr. Bill would have been notified of the unsafe EC levels on Sunday the 14th, the day many of the plants in the column wilted.

0 comments

Daily Weblog 5/17/17

Today, I presented my project to Ms. Petteys. I think that the presentation went well - I explained my progress throughout this year, with the failed golf cart project, the prototypical attendance project (and its new directions into cloud computing next year), and my current hydroponic monitoring system. I presented a graph of the data, marking major divergence points and events such as the decline due to bubble formation and the water input jumps. The graph is included here, showing the data for the last 2 weeks, which has been an almost completely contiguous data collection period (excluding last weekend, when the program crashed).


0 comments

Weekly Weblog 5/6/17

This week, I only was able to come to class once, because of AP exams. I will miss next Monday as well for the same reason. Next week - for the days I am able to be there, anyway - I will prepare for my presentation on the 17th. I will by that time have collected a good amount of data - currently, it shows a nice, stable upward trend over time of 0.1 Siemens every few days (with a quick drop when new water is added). The data graphs will be invaluable when I present the project.

0 comments

Weekly Weblog 4/29/17

This week, I got the hydroponics system to work. It posts data to the database, in a form that can be graphed. All of the sensors return what appears to be accurate data (although there have been a few anomalies). Next week, I will set up a system that allows the data to be graphed live online, and alert relevant people when the values fall outside acceptable ranges.

1 comment

Daily Weblog 4/26/17

Today, I set up the sensor system with the Raspberry Pi to run it, live and configured in what should be the first working prototype. The sensors all work, and the Pi has all of the necessary software installed on it.
I had some issues with interfacing the two (the database is not being updated properly, as has been a recurring issue for Python scripts controlling databases this year), but I believe I will be able to get the full system operational by Friday. I solved the distilled water problem (mostly) as the water in the Elab is irradiated rather than ionized for sanitation, which should not impact the readings.


0 comments

Daily Weblog 4/24/17

Today, I attached the final pH sensor to the Arduino hydroponic sensor assembly and tested it. The sensor worked exactly as designed right out of the box, which was helpful. The data was returned through the serial monitor exactly as expected, and could be parsed easily by the Python script I already have in place (although I used my MacBook's serial capabilities through the Arduino IDE for this experiment for ease of use).
One issue that I found was that the Energy Lab seems to have no distilled water - the sensor is supposed to be rinsed in distilled water following immersion in a test liquid to prevent accuracy drift, but I was forced to settle for tap water. This is unlikely to damage the sensor, but might over a longer period, so finding distilled water soon will be necessary.


All three components worked as designed and corresponded exactly to the values displayed by the commercial handheld pH and EC meters - the Arduino system is actually more precise, returning values at 3 significant digits rather than the handheld reader's 2. To measure whether or not drift was occurring over time due to water ionization, I set up the system in the water for 16 minutes and plotted the results. The sample size is still too small to say definitively whether or not ionization is occurring, but results look encouraging so far.

Excluding the outlier value in the first reading, both the pH and EC readings remained relatively constant throughout the period that I measured the values. pH fluctuated relatively consistently, remaining in the same range with a small degree of error throughout the experiment, which implies that it was not affected by local ionization.

EC had a slight upward trend, increasing by 0.1 Siemens by the end of the experiment and having a maximum value of 2.89 Siemens (0.17 Siemens above the initial reading). I worry that this is the result of ionization (but if it is, the effects are very slight). To say for sure, a more long-term study must be conducted, and controlled against the handheld EC reader. My data is recorded in the Google spreadsheet https://docs.google.com/spreadsheets/d/1ygsmvdz7_ylkOoCiFEAPgX5vfisa7rl_ZeV5a3XpFBM/edit#gid=0.

0 comments

Weekly Weblog 4/22/17

This week, I reassembled the old PCR box and did research for several projects, while waiting for my last hydroponic sensor to arrive. It has now arrived, so I will finish the hydroponic sensor system next week Monday, and test it for the rest of the week, making sure I can counteract the accuracy-reducing effects of water polarization by timing sensor readings properly. Once that system is working satisfactorily, I will return to the facial recognition program and make sure it iw in working order for my presentation in two weeks. If I have time, I will also develop a prototype using Amazon Web Services program "Rekognition".

0 comments

Daily Weblog 2/27/17

Today, Ilan and I took apart the 3D printer to replace the heating bed with the new one we had been sent. When we reassembled it with the new heating bed, however, it did not start properly. My theory is that we replaced the heat sensor cable into the wrong socket; Ilan will contact customer support next class.

I also worked on the code for EC monitoring. I have not yet built the sensor (the one component that I have been unable to find is an unimportant power cable that I can cut apart) but the skeleton of a Python implementation of the sensor array is finished; I need to decide which GPIO library I will reference to complete the program (the basic library, gpiozero, relies on secondary dependencies). Everything is modular and packaged in a class for easy importing if other group members need the code later on. The latest version is live on GitHub.

0 comments

Weekly Weblog 2/25/17

This week, I have been mostly focusing on the new hydroponics project, especially the analytical and automation aspect. I created a spreadsheet for the group to record where they have planted each variety of seed, and started to convert the Arduino EC meter code into Python for use on the Pi that we will use to automate the entire system; this project is on Github at https://github.com/OliverGray/HPA-hydro, as a public repository. Anyone who wants to view the code or add to it (when there is more to add to, anyway!) can branch that repository.

0 comments

Daily Weblog 4/19/17

Today, we practiced presenting our final products, and talked about what that would entail, as well as presenting to three visitors. I will need to sign up for as late a presentation date as possible so as to have functional products for each of my projects - I think that I can manage a functional prototype system for both the hydroponics project and the attendance system by then (two weeks from now). The final sensor came in this morning:
I will finish the hardware for the hydroponic sensors on Friday, connecting the pH meter. I will also run tests of how often each can be polled without polarizing the water - this may take until next week.

I also learned yesterday of a system using Amazon Web Services' Rekognition software that might enable me to completely rework the facial recognition for attendance system by outsourcing all of the processing power to the cloud. It was used by the group Sturdy to make a lighthearted project to shoot their CEO on sight with a NERF gun controlled by a Raspberry Pi, but their code is on GitHub at https://github.com/sturdycloud/sting#rekogntion-from-amazon-web-services, and seems trivially adaptable to my system (though I may leave out the NERF gun component). I will look at integrating Amazon Web Services after I have completed the sensor system for hydroponics. Fundamentally, Rekognition allows the user to submit lightly-processed images to pre-constructed cloud databases for fast analysis on Amazon servers.



As with all of Amazon Web Services, a "Lambda Function" is used to submit and receive data quickly, after detecting (for example) the presence or absence of faces. I can use this to quickly analyze the faces of students more accurately than the Pi could on its own, and without running into barriers in how much data can be accessed at once.

0 comments

Weekly Weblog 4/15/17

This week, I worked almost entirely on the hydroponics project. Two out of the three sensors (EC and temperature) are connected to the Arduino, and the third (pH) has been ordered and will arrive next week. The system must still be connected to the EMCc system, when that becomes a possibility, so that it can log data in a central place. If that is impossible, however, it would not be difficult to set the Pi up with its own database to log temperature, EC, and pH of the tank over time. Next week (or whenever the last sensor arrives), I would like to set the system up outside to monitor one of the tanks - probably the running-water vertical system, so that the electronics can remain in relative safety inside the cabinets. Additionally, I will need to run tests on how frequently I can poll the sensors without polarizing the water to such an extent that it throws off the reading. I was unable to find data on this online, so I will need to conduct my own research.

0 comments

Daily Weblog 4/14/17

Today, I set up the Raspberry Pi I will use for the hydroponics sensors with a static IP address. It now resides at 10.14.4.35, assuming I did it correctly (the process is different on the Pi 2). The sensors, along with the Pi and Arduino, are now in a hopefully-waterproof plastic box, ready to be placed outside when the system is complete.

To that end, all I now require for hardware is the pH meter from DFRobot, which has been shipped and should arrive next week, according to the tracking information.


For software, the sensors must still be connected to the EMCc system when possible.

0 comments

Daily Weblog 4/12/17

Today, I set up the hardware for the sensor array in a box, and researched for the pH meter I will need. I found two things that would work - a robust industrial sensor found at DFRobot, and a homemade solution here. I think the industrial sensor is the better option, as it does not necessitate removing the pH meter from the water at any time, and is much less likely to break. I have also run in to a theoretical problem with the EC and pH meters, however - apparently, they cannot be supplied power at the same time, according to a comment thread on the pH meter page/

I will need to research how I can replicate this solution (the links on the bottom of the thread are broken). Alternately, I may simply be able to turn the powering and ground pins off and allow a depolarization period between each reading, done in turn.

2 comments

Daily Weblog 4/7/17

Today, I tested my temperature sensor against the official sensor that we bought, and it returned exactly the same result. I also connected the temperature sensor to the Arduino, all I am missing is a resistor to complete the circuitry.

For control systems, I have abandoned NanPy in favor of the default PySerial module, with the actual control code located on the Arduino; this will simplify the process massively. Instead of having to connect the Arduino to a Raspberry Pi control structure, it functions independently and the data is just read. The function of the Python script will only be to report and analyze data - this will make everything more efficient.

0 comments

Daily Weblog 4/3/17

Today, I tested a stand-alone Arduino version of the code for the EC meter. As there is no temperature sensor attached, the results were somewhat unreliable; additionally, the environment in which it was tested was constantly being stirred and material added. Thus, the sensor is not currently extremely accurate, but I was able to get readings that were in the general ballpark of what should be expected - it settled at about 0.7 siemens once we stopped stirring the pool or adding solutes, although fluctuation still occurred due to a lack of temperature adjustment and contact along the bottom of the pool.



0 comments

Weekly Weblog 3/4/17

This week, I have been setting up my prototype of the hydroponics automation system. I have one major design element to figure out - how to get access to analog inputs on the Pi - before I can proceed, but everything else is taking shape quite nicely. Once the hurdle of analog input has been cleared, I will need the other sensors (pH and temperature) to create my first system. However, both of those will attach to the Pi much more easily, using Phidgets and I2C respectively.

0 comments

Daily Weblog 3/3/17

Today, I spent most of class showing an Alaskan potential student the class's projects. I also set up the Raspberry Pi again, so I can now access it and install necessary software remotely.

The question that must be decided for the project to continue is how to access analog IO pins. I could:
  • Slave an Arduino to the Pi. Probably the easiest option, if inelegant. I'm not sure how to connect them over a permanent serial connection, but I know it's been done before.
  • Get an ADC and put it with the other components in the breadboard. Dr. Bill does not support this solution, as it would leave the system vulnerable to students. We do not currently have any ADC chips, but they are available from Adafruit for less than $4.
  • Use a Pi HAT. A more elegant solution, but dependent on having the right HAT lying around (I'm not sure exactly what HATs we have - Dr. Bill, if you check for one with analog IO ports, that would be appreciated). Also, this is expensive and may have a lot of unused functionality, but efficiency is less important for this project.
  • Switch platforms entirely to something like the Particle Photon (a simple IoT board with enough IO pins to run everything properly) and program it in Node.js rather than Python. I have a Photon, although using Node.js with some of the functionality I am looking at currently may prove more difficult. This would definitely improve the accessibility of web integration.
Next week, I will need to decide which solution is the best, and implement it.

0 comments

Daily Weblog 2/24/17

Today, I started to work on the automation aspect of the hydroponics project - I downloaded the Arduino version of the code that I will be using to run the electrical conductivity meter, and began converting it to Python. I also helped to set up the germination trays, and made a Google spreadsheet detailing where each type of seed was planted.

0 comments