Grow It Yourself | GIY
An automated, smart, self-contained growing system that cultivates plants from seed to maturity!
Fab Academy is a digital fabrication certification course run by Neil Gershenfeld, director of MIT's Center for Bits and Atoms, that teaches "How to Make (almost) Anything"
While being a student of Fab Academy 2017, my final project was to build a smart system for growing plants which will allow the control and monitoring of the environment inside the system!
So Let's get started...
Tools & Materials
Software:
- Autodesk Fusion 360 (or any other 3D software
- Rhinoceros 3D (or any other CAD which supports .dxf files)
- Arduino IDE
Hardware components:
- Microchip ATmega32U4
- ESP8266-12E
- 16 MHz Crystal
- Passive Components (resistors, capacitors etc.)
- Power MOSFET N-Channel
- Voltage Regulator Module
- DHT11 Temperature & Humidity Sensor
- DS18B20 1-Wire Digital Thermometer
- Water Level Sensor
- Photo Resistor LDR
- Graphic LCD Screen
- Ultrasonic Atomizer
Fabrication machines:
- CNC Milling Machine
- 3D Printer
- Laser Cutter
MOTIVATION & Good Mood :)
Introduction
I was greatly inspired after watching the TED Talk about Digital Farming, delivered by the director of MIT’s Open Agriculture Initiative, Caleb Harper, which came up with the topic: This Computer will Grow your Food in the Future. The most important question addressed in his talk that really inspired me was What if we could grow delicious, nutrient-dense food, indoors anywhere in the world? And here the idea was born!
So, what I am trying to do is something like a box or incubator, which is able to create ideal climate conditions necessary for growth, providing exactly the amount of light and nutrients that a plant needs. I want to build a sunlight emulator, irrigation system, and climate controller wrapped into one elegant and modern design.
I am planning to achieve the desired results by implementing the following technology:
Grow LED light - the Chlorophyll in plants primarily responds to only two wavelengths, represented by 450nm & 650nm. The LED system which I am planning to use will have a combination of red and blue LED lights to provide the perfect blend to help in both vegetative and flowering growth.
Ultrasonic Atomizer (fog maker) - I want to use a new method of irrigation, which I found out for myself recently, called aeroponics (FogPonics) that waters the plants through fertilizer-infused mist.
Automatic Nutrient Dosing - This system will automatically dose the nutrients for plants exactly when they need it.
Water Sensing System - I want to equip my system with pH and TDS (Total Dissolved Solids) sensors to help maintain a balanced pH value in the water reservoir that will suit best for plants as well as knowing and alerting when to dose the nutrients.
Water Exchange System - the system should be equipped with a hookup for automatic water changes. I want to make this process easy, and controlled just by the click of a button.
Air Control System - It allows having a precise control over temperature and humidity inside the system, down to a single degree. The technology behind involves the use of a Temperature/Humidity sensor like DHT22 or DHT11 to receive the data, and a fan with a coil to regulate it accordingly.
Mobile App - I really want to build an App for the first time in my life! This app should include real time information about the pH level, temperature, humidity, nutrients, ppm etc. and a graph representation over time in order to track statistics and share the growth progress on social media. I also want to implement intelligent alerts that will let me know when the system needs my implication. I also want not only to receive the data representation on my phone, but also be able to setup the climate conditions inside the system!
Unfortunately, I am not the first one who came up with this kind of idea, but the best way to come up with a creative idea is to improve the existing ones!
There are several similar projects on the market available, however, despite all the individual advantages, they have also some disadvantages like taking too much space or being too small, too expensive, growing only one crop at a time etc. I did a lot of research and analyzed carefully the strengths and weaknesses of the available projects, and considering the market response, I want to come up with a new advanced open source system, which will reduced the disadvantages and will implement only the best features.
Very ambitious, isn't it? But let's give it a shot
Experiments
Dealing with plants is very time consuming! They usually require from several weeks to several months to grow, and I have to be ready for that!
Because I know already what I want to build for my final project, I have to take care of it in advance and not leave everything for the last moment. That is why, I will start testing and experimenting as soon as possible!
First thing which I want to find out, is the fact that growing plants using nutrient rich mist and grow LED lights is better than a conventional system in soil and natural sunlight! In theory, this should be exactly the case, but I do not believe anything until I try it!
So I decided to start my own experiment, which will require some time, and it consists of dividing the plants into several groups:
- (Soil + Sunlight) - this group will grow in absolutely natural conditions, planted in soil, and placed on the windowsill.
- (Fog + Sunlight) - this group will be placed in a container, which will have nutrient rich mist inside, and also placed on the same windowsill
- (Soil + Grow LED light) - this group will be in soil, but will use artificial Grow LED light instead of the sunlight
- (Fog + Grow LED light) - this is supposed to be the HERO group) Because my future system will implement these two features, the grow LED light and the nutrient rich cloud of fog, I hope to find out that this combination will show the best results!
In the local german store Kaufland, in the plants department, I bought the seeds of mixed herbs. These will be my testing babies :p
It was the first time in my life when I planted anything :D do not judge me if I did something wrong!)
I checked several tutorials before, and I learned that I have to germinate the seeds first. I got a plastic container, where I placed the seeds, and covered them in a paper towel. At this stage, they need almost 100% humidity, that is why I used a spray to water the paper towels, and covered the container with the plastic bag, so the water does not evaporate.
I left the seeds for 1.5 weeks, and when I opened the container, I was really surprised! Almost all the seeds germinated! I was happy like a kid)
Next I had to select the best little plants, the ones that had the thickest stem, and just looked bigger and better overall.
In the tutorial that I was following (YouTube blogger), the guy recommended to plant the little plants into any type of medium, until they give so called "second leaves". On Amazon I ordered coconut coir pellets. They are organic, have similar properties to soil, and the cool thing is when the pellets are watered, they become x6 times bigger in size.
I also purchased a box, which has separators specially for planting! I got it for only 2 euros, and this made the things way more organized. I placed the coconut pellets inside the separators of the box, watered them until they became fully hydrated, placed the little plants in the middle, and covered the box with a transparent piece of plastic which came with the box kit.
I closed the box, and left it for one week! And again when I opened it, I was surprised! They actually became bigger! I could never imagine that I can manage to grow some plants, I barely manage to take care of myself :D
But the difference is noticeable!
Now when I see the first roots, I can place them in soil and clay balls, and start experimenting with fog!
During the Computer-Aided Design week, I designed the net cups, which I used to place the plants
I also bought in a local store a plastic container with the approximate dimensions which I need, and sketched the holes to drill!
And here is my assembled test system, with the plants inside the coconut pellets, and clay balls, as well as soil!
https://www.youtube.com/watch?v=LF93Xjd8avk
To be honest, the results could be better :D
Only few plants survived in my fog system. My guess is because of the growing medium! The fog is not strong enough to keep the clay balls wet, neither the soil.
Easter Break!
During the Easter break I did not do anything, and because the lab was closed, all the system was off as well. So, my plants all died
With a fresh mind, I decided to make another system, but this time using another growing medium based on the previous observations The growing medium which I chose for this system is Rock Wool. I bought it in our local IKEA store. I also bought a couple of seeds from their department
And I placed the new seeds into the rock wool for germination for one week!
After one week I checked my box, and noticed that one type of seeds were successful, another failed! Due to the lack of time, I went on with the seeds that germinated
In the meanwhile, I set up another fog system, and will try to increase its working time, to see If I can germinate seeds using fog, ONLY FOG!
https://www.youtube.com/watch?v=eiBddapPWL0
I will keep experimenting with different parameters and settings, and see how far I can reach!)
Electronics Design & Production
Before jumping on designing the final board, I sat down to draw on a piece of paper all the features and requirements which the board must implement and fulfill! I also keep track of how many pins are going to be used, in order to estimate better and decide which will be the final microprocessor
Here is the sketch of what should be on the board: (Picture 1)
The final choice on which board to use was between satshakit from Daniele Ingrassia and FABLEO by Jonathan Grinham
satshakit is a 100% Arduino IDE and libraries compatible, fabbable and open source board, and also an improved version of Fabkit.
Main improvements and features over Fabkit are:
- 16Mhz instead of 8Mhz
- crystal instead of resonator
- costs less (7-9 euro vs 13 euro)
- 100% compatible with default Arduino IDE (satshakit is recognized as Arduino UNO)
- ADC6/7 connected instead of ADC6/7 not connected (satshakit laser and cnc)
- larger space to easy soldering (satshakit laser and cnc)
On the other hand, the FabLeo has very similar features, plus the hardware USB! Because I used already the ATmega328p earlier, I wanted to try something new, and decided to use the FabLeo design as my starting point
My bible and #1 guide for this assignment was the ATmega32u4 pinout
To design the board, the software which I will be using for this is EAGLE (Easily Applicable Graphical Layout Editor) is a flexible and expandable EDA schematic capture, PCB layout, auto router and CAM program. EAGLE is popular among hobbyists because of its freeware license and rich availability of component libraries on the web
Eagle has two windows that are used simultaneously to design a board:
- Schematic (.sch) - logical components
- Board Layout (.brd) for the actual board that we mill
After I installed EAGLE, the first thing which I want to do is Create a New Schematic. A schematic in electronics is a drawing representing a circuit. It uses symbols to represent real-world electronic components. The most basic symbol is a simple conductor (traces), shown simply as a line. If wires connect in a diagram, they are shown with a dot at the intersection.
In order to place my components on the schematics, I have to download and use special Libraries. Eagle has a lot of built in libraries of components that we can use. The fab network also maintains a library which is constantly updated:
In order to install the library, in the EAGLE environment, go to the top toolbar and select the Library menu. Then select use and open the .lbr file that I just downloaded.
Now I can go to Add component and selecting the library, I choose the component which I want to place.
When I have all the components placed on my schematics, I have to connect each of them to the pins of the microprocessor. In the EAGLE left menu, I click on Net, command which allows me to draw green lines and connect the pins. Important thing is to start the connection from the little line on the pin (I marked it on the picture 3)
To avoid multiple connections, I will be using Labels.. In EAGLE left menu, I press Add Label and add it to the end of my connection line. If I press the right click and then choose name, I can attribute to the label the same name which I used for the microprocessor pin, and connect them in this way!
f I did everything right, a message should appear that states: Are you sure you want to connect your label (N$10) with GND? (Picture 4)
At this stage, in the schematics, the important thing is the Logic of all connections, not the way it looks. After I finished placing all the components, and connected them in a logical way, this is how it looks: (Picture 5)
I added the AVRISP pin headers, and placed them in according order for the connector. These pins will be used to program my board. (Picture 6)
Here is the schematics of the USB circuit together with the crystal (Picture 7)
I also added a Voltage Regulator circuit which will power the whole board by transforming the input 12V into 5V (Picture 8)
One of the important features of this board is the MOSFET circuits, I added 4 of them, 3 connected directly to the input (12V), and one will be connected to a step-up voltage regulator. The last will be used to power the fog which works at 24V (Picture 9)
After I double check all the connections, I can proceed to the next step, which is the Board Layout. On the top menu, I press Generate/Switch to Board.
First thing which I do is increase the Grid resolution. I go to View menu, and press on Grid, and change the values to 0.01. This will let me be more precise while drawing the route lines. (Picture 10)
Surprisingly, the routing of the most complex board which I have made so far was also the fastest!) I am proud of myself. The experience of making boards had a good influence on improving the speed. After I was done routing, this is how the little beast looks: (Picture 11)
For this board I am using also the trick which I learned earlier. I draw a polygon around my components, and by pressing the right click on the polygon line, I change the name to GND. This will fill the whole area inside the polygon, and make it to be the GND. This will save a lot of time, space, and effort
When I double check everything, I can Export my file as a .png picture.
In the appearing window, I increase the resolution to 1500 dpi, click on monochrome, and select window mode. (Picture 12)
To edit the .png image, I will be using GIMP. I open my image in GIMP, and using the rectangular select tool, I select the image leaving some space from all the sides. After I press File and Copy the selected area. To continue working with the selected picture, I click again on File, and Create from the Clipboard
This is what I get after all the editing: (Picture 13)
This image is ready to be printed, and I will call it Inside_Cut
I prepare the process for the Outside Cut, and this is what I get: (Picture 14)
Because my board is double sided, I have to mill two pieces, and then glue them together. The only thing to keep in mind is that the bottom part, has to be mirrored horizontally
Bottom part Inside_Cut (Picture 15)
Bottom part Outside_Cut (Picture 16)
Now I can proceed to the CNC milling machine. So, again I used FabModules to convert the .PNG files into Gcodes for the Roland machine.
After I press on the gray button input format, a new menu should appear with the option to load the .PNG image. Here I upload the first image, which is the inside engraving. After doing that, the preview of the image will appear in the Fab Modules and also other fields and other parameters will show up
Here I have to set the parameters and ZERO the machine
* A small life hack is to use the multimeter and check if there is connection between the tool and the surface. As a tool to engrave PCB is suggested to use diameter from 0.2 mm and below, while for cutting we can use a 1 mm tool. (Picture 17)
So my final settings look like this: (Picture 18)
For the outside cut the settings remain the same with the exception of the value of the Z-Axis, as I replaced the 0.2mm tool with the 1mm tool. This is how it looks: (Picture 19)
Repeat the same process for the Bottom part and mill the Inside and the Outside parts: (Picture 20) (Picture 21)
This is the final result for the Top part after milling: (Picture 22). And the Bottom part: (Picture 23)
And now Let's solder this!
In order to make sure that I soldered everything in a right way, after each component soldered, I used the multimeter to check if there is conductivity between the component and the traces.
Short animation of the process: (GIF 1)
When I plugged in the PCB board to check if everything is fine, I noticed an error. From experience, I know that the error was from a short circuit, because the computer was disconnecting the Arduino all the time I connect the VCC and GND to it. So my guess was that somewhere on the board VCC and GND are connected, and using the multimeter, I confirmed that I was right. (Picture 24) (Picture 25)
I fixed it by scratching with a knife, and increasing the isolation!
Another thing is placing the Step Up Voltage Regulator on the back side of my board. (Picture 26)
I measured the dimensions in advance, and designed predrilled holes to fix it with the pin headers. But before soldering it on the back side, I have to calibrate it.
The idea is that when I power the board with 12V, the step up will output 24V necessary for the Ultrasonic Atomizer, which is connected to the MOSFET circuit
I used the bench power supply, with a fixed 12V, to measure the output voltage using a multimeter.
https://www.youtube.com/watch?v=XKIyBd-l9Tk
Also on the back side, I placed the WiFi board which I made during the Networking and Communications week!
So, here is The BEAST: (Picture 27) (Picture 28)
A HERO picture for those who may think that it was easy, and everything went smooth :D (Picture 29)
DOWNLOAD FILES:
Wiring & Embedded Programming (I/O Devices)
To program my board I used Arduino IDE. I connect the arduino board to the USB hub, in the tools menu select the right board (Arduino Leonardo) and the port, after go to File--> examples and open the Arduino as ISP sketch. Upload the code. (Picture 1)
After I see done uploading, which means that the code is uploaded to the board, I disconnect the arduino from the PC. The next step is to connect my PCB board to Arduino using some wires. The connection scheme is this one:
- SCLK: Serial Clock (output from master) ----------> Arduino Pin 13
- MOSI: Master Output Slave Input ----------> Arduino Pin 11
- MISO: Master Input Slave Output ----------> Arduino Pin 12
- VCC: Positive supply voltage ----------> Arduino VCC
- GND: Ground ----------> Arduino GND
- RST: ----------> Arduino Pin 10
I connect the arduino board to the USB hub. Under Tools select the right board, select Arduino as ISP programmer, double check the parameters, and press the Burn Bootloader button.
And I see Done Uploading! Good sign)
To test the board, I upload the basic Blink example code:
https://www.youtube.com/watch?v=aGYc0ptEch8
After I see my board blinking, let's go with sensors!
First sensor that I want to use is DHT11 - Temperature & Humidity Sensor (Picture 2)
These sensors are very basic and slow, but are great for hobbyists who want to do some basic data logging. The DHT sensors are made of two parts, a capacitive humidity sensor and a thermistor. There is also a very basic chip inside that does some analog to digital conversion and spits out a digital signal with the temperature and humidity. The digital signal is fairly easy to read using any microcontroller.
Some characteristics:
- Ultra low cost
- 3 to 5V power and I/O
- 2.5mA max current use during conversion (while requesting data)
- Good for 20-80% humidity readings with 5% accuracy
- Good for 0-50°C temperature readings ±2°C accuracy
- No more than 1 Hz sampling rate (once every second)
- Body size 15.5mm x 12mm x 5.5mm
- 4 pins with 0.1" spacing
The wiring is pretty easy, just VCC, GND, and any Digital Pin! In my case, I designed in advance the connection for this sensor.
To test it, I will upload a simple sketch. The sketch includes the library DHT.h
So here is the code: (will attach at the end)
When I open the Serial Monitor, this is what I get: (Picture 3)
Another sensor which I want to use is DS18B20 - One Wire Digital Temperature Sensor
DS18B20 is 1-Wire digital temperature sensor from Maxim IC. Reports degrees in Celsius with 9 to 12-bit precision, from -55 to 125 (+/-0.5). Each sensor has a unique 64-Bit Serial number etched into it - allows for a huge number of sensors to be used on one data bus.
This is by far one of the most simple digital sensors to hookup. Aside from power and ground, it has a single digital signal pin that I will be connecting to digital pin which I designed in advance. It also requires a 4.7k pull-up resistor between the signal and power pin, which unfortunately I forgot to place on my PCB. That is why, I will solder it manually directly to the sensor cables.
Before I start, I have to download the libraries: OneWire.h and DallasTemperature.h
Upload the sketch: (will attach at the end)
The funny thing is that after I successfully programmed the sensor, It stopped working while I was integrating all the sensors together! I spend quite a long time trying to figure out why it does not work, but due to the limited time, I decided to use another DS18B20 sensor which was available in our FabLab stock, and waterproof it by myself! (Picture 4)
So I took the sensor, and used the datasheet to properly solder the cables, and isolate them from each other using shrink tubes
I was planning to use an old rubber glove. I guess you have got the idea how I am going to waterproof it, right? :D Mama ama engineer! (Picture 5) (Picture 6)
Yeah, I know what it looks like :D but I assure you, its just a hand waterproof sensor. The most important is that it works, and does not leak when submerged in water!
And we go to the next sensor which is LDR = Light Dependent Resistor
LDR is a passive electronic component, basically a resistor which has a resistance that varies depending of the light intensity. The resistance is very high in darkness, almost high as 1MΩ but when there is light that falls on the LDR, the resistance is falling down to a few KΩ (10-20kΩ @ 10 lux, 2-4kOmega; @ 100 lux) depending on the model
The LDR gives out an analog voltage when connected to Vcc (5V), which varies in magnitude in direct proportion to the input light intensity on it. That is, the greater the intensity of light, the greater the corresponding voltage from the LDR will be. Since the LDR gives out an analog voltage, it is connected to the analog input pin on the Arduino. The Arduino, with its built-in ADC (Analog to Digital Converter), then converts the analog voltage (from 0-5V) into a digital value in the range of (0-1023). When there is sufficient light in its environment or on its surface, the converted digital values read from the LDR through the Arduino will be in the range of 800-1023.
Here is the sketch code to test the sensor: (will attach at the end)
Next is Water Level Sensor
I want to have a water level sensor in order to receive an alarm when the water container is empty, and its time to add some water. Because I did not think about it in advance, and we did not have any water level sensor in our stock, I decided that I can make my own water sensor!
I decided to use the materials available, in my case the Soil Moisture Sensor. The basic principle of the water level sensor is to measure electric conductivity, which is the same for the soil moisture sensor. I thought that If I can calibrate the sensor in a way that will fulfill my requirements, I can use the moisture sensor like an water level sensor) In principle, this is an analog sensor and the data that we will read will be values from 0 to 1024, and the rest is just math!
But as it often happens, the reality is slightly different. When the sensor is not in touch with the water, the analog value is 0, and when I submerge only the tip, the value goes to 800. I used the following sketch to read the values:
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(analogRead(A4));
delay(100);
}
After I can read the values, I calibrated the sensor to give out three different responses: EMPTY! - when the value is 0, LOW when the values are around 800, and Full when the values are more than 900!
Graphic LCD Display
Because usually the LCD displays use a lot of pins, I had to find a way to connect the 128×64 screen in another way, and I DID!!! This way allows using only 3 Digital Pins on the board which is awesome because I may need the rest of the pins for other stuff, and it does not create a mess of wires. I premade the pins for the LCD on my PCB, and this is how I connected everything: (Picture 7)
After I connect the LCD, It's time to program it!
First of all, I have to download the U8glib library from HERE. Another important thing is the declared pins used in the code. The one I used are the following: U8GLIB_ST7920_128X64 u8g(4, 12, 6, U8G_PIN_NONE)
I uploaded the HELLO WORLD example from the library, to check if everything works
One cool idea that came to my mind was to display the FabLab logo for some seconds, all the time when the display is powered. I spent quite a lot of time on doing this, but I finally did it! In order to display it on the Graphic LCD, I had to have a (.bmp) format picture, and display it as a bitmap.
irst thing which I did was download the FabLab logo from the internet as a (.png) file, and reduce it significantly in size, so it fits my small LCD borders. I used the following online service to do that: LINK
These are the configurations I used: (Picture 8)
The next step is to convert my small picture into (.bmp) format. I used the following online service to do that: LINK
Now, after I have my (.bmp) file, in order to place it into my code, I have to convert it into HEX array. I used a nice tool called LCD Assistant. To load up an image in LCD Assistant, go to File > Load Image. A preview of the image should open up, make sure it’s the right size – 128 pixels wide, 64 pixels tall. Also make sure the Byte orientation is set to Horizontal and the Size endianness is set to Little. These are the configurations for my LCD Display: (Picture 9)
Then I go to File > Save output to generate a temporary text file. Open that text file to have a look at my shiny new array. (Picture 10)
pH Sensor
I should admit that this is the most tricky sensor from all that I played with! It is really hard to find any info about the sensor which I am using (logo ph sensor v1.1), so I decided to make a detailed description about it! (Picture 11)
The probe is like a (tiny) battery when placed in a liquid. Depending the pH it output a positive or negative voltage of a couple of millivolts. This value is too small and other tech stuff like impedance make it unusable directly with an Arduino, that's why you need an "op amp". The op amp board just convert the millivolts of the probe into to something acceptable for Arduino (positive between 0 and 5v).
There are 3 common buffer solutions used for pH measurement: pH 4.01, pH 6.86 and pH 9.18 (7.0 and 10.0 exists). I suggest the powder instead the liquid because it's cheaper, expire after longer and the powder can't be contaminated (vs bottle). You should read the product instructions but usually you have to put the content of the bag into 250ml of water and stir. You can use any water with an average pH (6-8) because the powder will saturate the water at the correct pH level. I personally use tap water (pH 7.4) and didn't see any difference between distilled, and demineralized water. Buffers are not stable in the time, this means that you cannot keep the solution for weeks or months.
Now let's talk more about the sensor that I am using!
- Pin To: Should be the temperature but I can't make it work
- Pin Po: Analog input signal
- Pin To: Should be the temperature but I can't make it work
- Pin Do: High/Low 3.3v adjustable limit.
- Pin G/GND: Probe ground. It is useful when the ground is not the same as your Arduino. In some circumstances the ground voltage of the liquid to measure can be different
- Pin G/GND: Power ground (direct from the board).
- Pin V+/VCC: Input power 5V DC (direct from the board).
- Blue potentiometer (close to BNC): pH offset.
- Blue potentiometer (close to pins): limit adjustment.
Now let's try to calibrate the sensor! There are 2 different parameters, the "offset" value and the "step" value
The offset is the shifting of all pH values to a specific voltage range. If a pH 7 output a voltage of 2.2v and pH 8 a voltage of 2.1v, then a shift of +0.3v move the pH 7 to 2.5v and the pH 8 to 2.4v. This can be done on the board or via software but it's probably easier on the board because it's probe independent and there are less programming to do
Connect GND (both) and Vcc to Arduino GND and 5v. Remove the probe and do a short circuit between the the small BNC hole and the external part of BNC. Put a voltmeter (or Arduino) to measure the voltage between GND and Po. Adjust the pot (close BNC) until the output is 2.5v. Now the pH 7 have an exact value of 2.5v (511 with analogRead function) because the probe will output 0 millivolt. (Picture 12)
To calibrate the steps I need one or more buffer solutions depending on the range and precision required. Ideally it is better to know the range of the measure with the system. I use water between pH 5 and pH 7, then I choose the buffer 4.01 (and 6.86 to verify my stuff). If you usually measure pH between 8 and 10 choose buffer 9.18 (eventually 6.86 also).
I connect the (clean) probe and put it in the buffer, then let it stabilize for a minute. I know it's stable when it goes up and down (3.04 then 3.05 then 3.03 then 3.04).Take note of the voltmeter (or Arduino) value, in my example it's 3.05v.
That's all, now I can use it with the code below. (will attach at the end)
The PH_step calculation is quite simple. I take the difference between the two known voltage, in my example 2.5v@pH7 and 3.05v@pH4.01 which is -0.55v. It's the voltage range equivalent of the pH range from 7 to 4.01, which is 2.99 pH units. A small division of the voltage by pH units gives a volts per pH number (0,1839... in my case).
The PH_probe is calculated by taking the known pH 7 voltage (2.5v) where we add some PH_step to match the probe voltage. This means that a pH of 8 has a voltage value of 2.5v (pH 7) + 0.1839 (1 unit/step); pH 9 then is 2.5v + 0.1839 + 0.1839 = 2.87v.
No magic, JUST MATH :D
MOSFET output:
I connected the RGB LED stripe and the Ultrasonic Atomizer to the MOSFET circuit outputs, which are controlled by digital pins. For the LED lights, I stated in the setup digitalWrite (LED, HIGH); , which means that the LED will switch on all the time when the system is powered. For the Fog maker, I made an If function depending on the water level value. If there is water, the fog maker is ON, if there is no water, EMPTY!, then the fog is OFF!
Video Representation of the integrated code: https://www.youtube.com/watch?v=Ya12wOWakCQ
DOWNLOAD FILES:
3D Design & 3D Printing
Actually for my final system, I used a lot of 3D design and 3D printing technique. I used two different printers, and played a lot with the settings until I got the desired result!
For 3D design, I used FUSION 360 which as I mentioned before, is my favorite CAD software! I will not go too much into details of how to create simple shapes, and extrude objects, all this could be found during my Computer-Aided Design week, where I learned how to use different software, as well as 3D Scanning and Printing week.
The main task was to design the physical appearance of my system! The challenge was that I wanted it to look SEXY!!!
The aesthetics was a very important criteria, as well as functionality! The system should also be assemblable, which makes it even more challenging. I also wanted to integrate the skills which I learned like 3D printing, CNC milling, Laser cutting etc. Before designing it in the digital world, I made a simple sketch on paper! Here it is: (Picture 1)
And this is the final 3D design: (Picture 2) My sexy ass system :D
First thing which I designed was the water container. (Picture 3)
It incorporates several features! First, there is enough space for plants to grow, as well as in the middle I made a hole to place the Ultrasonic Atomizer. It is done because I wanted to level the fogger with the container. The thing is that the water level should be above the fogger by 2cm, so all the water which is leveled with the fogger height, will not be used (waste)! So if I place the fogger below the container level, I have a water zero level exactly at the point where it should be, zero for the container = 2cm above the fogger. In this way, all the water is used!
I also considered the height of the container. Actually, all the dimensions of the container are measured during the experimental stage!
As you can see, I made a hole on the wall, which will be used for the cables from sensors placed in the water to hide into the electronics section. In the front of the container, I made the slot to attach the graphic display. I also designed some handles to easily remove the container when need! (Picture 4)
From this perspective, you can see the electronics section. Now its opened, but I also designed a lid to close it. Inside the electronics section, I designed a hole to have access to power and program the board (Picture 5)
On the bottom side I designed sliders which will be attached to the rest of the system, and make it easier to remove the container when needed, it will also play a role of fixation of the container in place!
And now Let's Print It!
I can proudly announce that the printer which I will be using is called BigRep 3D Printer, only available in our FabLab Kamp-Lintfort. It has a capacity of one cubic meter, and provides the largest FFF build volume for professional and industrial use.
The slicing software which I use is SIMPLIFY 3D , one of the most advanced slicing tools, in my opinion, with a lot of configurations and options.
I do not think that there is a right and a wrong way to print something, you just have to play with the settings until you find the best options for the specific object to print.
Because this printer is new, there are not too many testings made. So, I had to experiment with the settings, and try, try and again try...
I will show bellow the settings that I will be using for my water container print, but some of them are intuitive.
I choose the Tool1, because the BigRep Printer has two nozzles with two different filaments, and I have to specify which nozzle I want to use, as well as the nozzle diameter and the rest of the settings. (Picture 6)
Layer: (Picture 7)
Additions: (Picture 8)
Infill: (Picture 9)
Support: (Picture 10)
These are the main changes that I made, the rest of the settings I just left by default.
And then press on Prepare to Print. The software will generate the paths, and here we can check if everything is good, before sending the .gcode to the machine. (Picture 11)
Briefly about some of the printer's settings. I used Nozzle Temperature = 205 deg.C, and the Bed Temperature = 70 deg.C. After I positioned the X, Y, and Z axis, and double checked all the settings, I launched the job!
Printing process: https://www.youtube.com/watch?v=938Yz_WegH8
This is how the raw model looks like: (Picture 12)
When I started removing the support and cleaning the model, I realized that this is a BIG pain in the ASS :D
As you can notice, the settings which I used are not really perfect, because the container has some big holes next to the edges. I had in my mind to waterproof it anyway, you can see how I did it in the Moulding & Casting section!
The next 3D printed part was the Net Pot. This is a cup which is designed to hold the seeds in the growing medium. More details about the first version of them you can see during my Computer-Aided Design week
This time I will improve the design a bit based on the observations that I made during the experimental stage. The main difference is the size of the empty space, which is increased a lot, to give an easier access for the fog to pass in, and for the roots to go through
So I just modified the old design, and added one more thing! (Picture 13)
I made a slight fillet on the top part, to make the transition smoother. I also added a ball on the bottom, and used the Move command to move it a bit inside, and leave on the bottom around 2-3mm structure width (Picture 14)
After I used the boolean subtraction or Combine function, and I get this nice curvature at the bottom! (Picture 15)
Now let's print it!
The 3D printer which I used is Ultimaker 2+. To slice my 3D model, I will use CURA , a very nice software, with an easy interface, and also functional. The material that I am using is PLA filament
After I import my .stl file, these are the settings that I am using: (Picture 16) (Picture 17)
Here it is my little army :D (Picture 18)
From the final design of the system, I decided to also 3D print the bottom part. Its a big piece, and I will use the BigRap as well for this. (Picture 19)
I wouldn't say that there is anything new about this, because I used the same settings as I used for the water container, and more or less the rest is the same
Here is the preview of the print: (Picture 20)
Printing process: https://www.youtube.com/watch?v=ND5SETJKF6w
Another thing which I 3D printed are the rounded corners on the top side of the system. I used the Ultimaker for this, and used the following settings: (Picture 21) (Picture 22)
The trick here was to achieve maximum smoothness on the surface, and I think I got a pretty good result: (Picture 23)
DOWNLOAD FILES:
2D Design & Laser Cutting
I used the Laser cutting technique to cut acrylic parts which will cover all the inside part of the system, and give it a finished look!
I actually did not design the parts again, I just exported the already created sketches from Fusion 360 as .dxf files. After I exported the file, I used RHINOCEROS 3D to edit the design before importing it into the laser cut machine
This is how the sketch looks in Fusion 360: (Picture 1)
Looks like a big mess, but the good part is that everything is parametric! It looks messy because I had to align everything into the right position, and keep the stuff parametric in case I have to make a change later
This is how the final sketch looks in Rhino before laser cutting: (Picture 2)
I decided to use a green acrylic piece because it gives an organic look, and combines well with the green plants
Laser Cutting process: https://www.youtube.com/watch?v=CBuB0RUMVUQ
For the front and the back cover, I decided to use white color. Its all about the taste, this is the way I see it, and this is how I like it.
The front and the back cover are very similar, have the same dimensions, except the inside cuts! The front cover has the hole for the LCD Display, here it is: (Picture 3)
For the back cover, I want to make a hole to have access to power and program the board! This is how it looks: (Picture 4)
Another lasercutted piece is on the top! I decided to use a transparent acrylic part, in order for the light to go through! I also designed some additional cuts, to decrease the weight, and give more space for the light to pass! I also measured the width of the RGB LED stripes, and will attach them in a way that there is enough room for the sunlight as well as artificial light! (Picture 5)
I finished with the design, and now Let's Laser Cut!
The Laser Cutter that we are using here in FabLab is Epilog Fusion 60Watt, a CO2 laser cutter with a working area of 1016 x 711 mm. It can cut and engrave materials like wood, cardboard, acrylic or other engineered plastics.
Because I used the same material for all the pieces, plexiglass 5mm, I used the same settings for all of them! (Picture 6)
DOWNLOAD FILES:
CNC Milling
Because I wanted to integrate in my system all the skills and techniques that I learned, I also have a piece of structure to CNC mill. I did not design it again, but I exported the .dxf file from Fusion360 sketch!
To cut my design, I will be using the big CNC monster.
A CNC (computer numerically controlled) is a machine that uses a cutting bit that rotates at a very high speed to remove material from a part.
The machine reads a pre‐programed computer file telling it where and how to cut, usually .GCode file. A cutting bit is rotated at a very high RPM by a spindle motor, which can move the bit up and down. This mechanism is moved left, right, front, and back by a cross arm. The machine is therefore known as a three‐axis router because it can move on the X, Y & Z axis. The machine can do two dimensional cutouts and etching, as well as three‐dimensional relief work.
In FabLab Kamp-Lintfort we have a CNC portal milling machine by e(sign: Easy Worker MasterPro 2513.
It’s working area is 2600 x 1400 x 300mm and it comes with a vacuum table. We primarily use it for wood milling but with its HSD Spindel (3.9KW; 24.000U/min) it is also capable to mill metals easily.
The material which I will be using is 18mm Plywood
At first, I place the wood sheet on the CNC bed, and after I aligned it, switch on the vacuum. After I exported the .dxf file, I used RHINOCEROS 3D to edit the design before importing it into the machine CAM software (Picture 1)
First, I have to HOME the machine!
To set the X,Y and Z Zero Positions, I home the machine by pressing the home button in the software (or on the remote control). At first, I can set my zero X and Y roughly aligned to one of the corners of the bed
Now I have to find the Z axis, which I do using the special tool which comes with the machine: (Picture 2) Important thing is to place it on the bed of the machine, not the wood sheet!
Now I can launch the first job, which is making the engraving. These are the settings which I used: (Picture 3)
I press Calculate Toolpath to simulate the job and make sure that there are no collisions! After I save the .GCode, and launch the job, I get this window: (Picture 4)
Now I can launch the outside cut: (Picture 5)
This is what I get after the job is done: (Picture 6)
Another piece which I had to mill is used for the Moulding & Casting section!
I prepared the mold to waterproof my water container. Here is the design: (Picture 7)
There is nothing new about this. I used exactly the same settings as above. The only thing is the material thickness was 10mm wood, and I had to cut 7 pieces, to glue them together later and prepare my mold!
DOWNLOAD FILES:
Moulding & Casting
I used this technique in order to prepare a water container, to waterproof my existing container! I see it as a thin layer of material (a smaller container) which can be easily removable!
This is the result from the previous section CNC Milling (Picture 1)
I cut 7 identical pieces, and aligned them using the reference holes! I also cut a big hole in the middle of 5 bottom pieces, in order to place the air pump inside, and easily remove the cast later.
After I glued all the pieces together, and fixed them, this is how it looks: (Picture 2)
While waiting for the glue to dry out, I prepared a little plastic "thing" (do not know how to call it :D) for the pump.The idea is to be able to screw it on my mold, and remove it whenever I want!
When the mold is ready, this is how it looks: (Picture 3) And the back side: (Picture 4)
I am ready to vacuum cast!
I used a vacuum machine available in our FabLab Kamp-Lintfort called Formech – Manual Vacuum Forming Machine
The thing is that I tried to do it many times, and all the time I could not remove the mold without breaking the cast! After several hours of trials, I came up with a solution! First, I vacuum casted one thin layer of material, and without removing it, I will cast the actual container on top of it. The first thin layer is slippery, and If I spray it with silicon, it will allow me to remove the mold way easier
Vacuum process: https://www.youtube.com/watch?v=le9McBzF49g
After I let the silicon to dry a bit, I can cast the actual layer! https://www.youtube.com/watch?v=U0HY50Hxbdw
And here we are!!!
A hero shot for those who may thing that it was easy (Picture 5) (Picture 6)
Putting All Together
Now, let's put everything together! I will start by assembling the structure. Place next to me all the necessary tools: (Picture 1)
A short animation of the assembling process: (GIF)
To assemble the lights, I cut the RGB LED stripes into 4 pieces (I measured the length in advance), and soldered them accordingly! (Picture 2)
After I connected all the sensors, and managed the wiring, I fixed the board in the electronics section (Picture 3)
And here it is the system!!! Everything assembled, nice looking growing system GIY (Picture 4)
A HERO shot during the working process! (Picture 5)
Final Presentation Video: https://www.youtube.com/watch?v=pgCepM3Hh60
AWESOME | Congratulations
If you reached so far, you must be REALLY STUBBORN my friend :D
Hope that you enjoyed going through this INSTRUCTABLE, learned something new, and HAD FUN reading this :)
.
For more details about the project, please visit the official source:
http://archive.fabacademy.org/2017/fablabkamplintfort/students/396/final.html
.
.
Best Regards,
Dumitru ALBOT