Sustainability Of Supermarket Plants

Where to supermarket herbs come from…

Most supermarkets buy their herbs from abroad and ship them over to the UK to then be sold on to individuals. This uses a huge amount of energy and increases the carbon footprint of the herbs that you buy. The GrowStations aim is to bring attention to the carbon footprint of the products that are used everyday in the kitchen.

Sainsbury’s

Image for Sainsbury's Fresh Packed Bunch Coriander 30g from Sainsbury's

Fresh Packed Bunch Coriander 30g – 70p

Country of Origin:
Packed in Cyprus, Ethiopia, Germany, Italy, Kenya, Morocco, Portugal, South Africa, Spain, United Kingdom

 

Image for Sainsbury's Fresh Living Basil Pot from Sainsbury's

Sainsbury’s Fresh Living Basil Pot – 1.25

Country of Origin:
Packed in Cyprus, Ethiopia, Germany, Italy, Kenya, Morocco, Portugal, South Africa, Spain.

 

I used a carbon footprint calculator to work out on average how much CO2 is produced by a single pot of basil being transported from Ethiopia to the UK by Plane.

Capture

I then worked out what the cost of transporting that to a Bristol based supermarket was for a 120 mile Journey in a 3.5 tonne van;

Capture1234

In Total, from door to door a single basil plants Carbon footprint is roughly 2.43 metric tons of CO2e.

In order to work out the benefits of using the Grow Station I’ve calculated the amount of energy used in terms of electricity based on the time it takes for a basil plant to grow from a cutting to a full plant.

“Basil seeds take between eight and 14 days to germinate and emerge from the soil. After germination, look for the first set of true leaves two to three weeks later. Then, two to three weeks after the first set of true leaves emerge, basil plants should be about 6 inches tall, once grown to this point your basil plant will continue to sprout leave continuously if you give it enough water, light and the right temperature”

The calculation below shows the amount of energy used by the Grow Station over 24 Hours , and is broken down into the costs to run it for a week, month and year.

Capture213

It would cost the user $1.44 to grow up to 8 separate basil plants, where as it would cost $1.25 to buy a plant from Sainsbury’s. The carbon footprint of the Grow Station is shown below.

Capture12344

One thing to factor into this calculation is that plants absorb roughly 25% of the CO2 that we as humans produce, therefore it is possible that the Grow Station could be considered carbon neutral.

Changing Attitudes

There is a huge amount of research out there on the effects of smart home devices , specifically smart meters, that suggests that there is an effect on the way that people behave based on the information that they are given by the meters. According to a study by the Department of Energy & Climate change shows that people are much more receptive to the effects of energy usage when it is make clear how it effects their wallets. By using this research and adapting it to the idea of growing your own food/herbs people should be much more receptive to the idea of changing their habits.

Other examples of this can be seen in product such as the FitBit, which get peoples attention and help them make a change by giving specific quantitative feedback, This is being applied to The Grow Station by showing the user the amount that they are saving cost wise by using the product.

Bob & Alex, Grow Station watering system.

For our grow station Bob and I needed to find a way to stem the flow of water when the main tank in the base is full. to do this we initially tried to use a servo with a 3D printed arm to ‘crimp’ the silicone tubing that we are using. As you can see in the video below this was not really an effective solution. So we’re moving on to a few different ways that we could stem the flow.

After a bit of research, I stumbled across an Instructables using 3D printed servo controlled valves designed to be used for artificial muscles. after reading through I realised that a few of the valves could be re-purposed to stem the flow in our gravity few watering systems.

There are a few different servo controlled systems that could be used. the first is a three valve system that we could use to not only supply water but things like plant food.

 

FO48P7LINKLPY6T.LARGE
Three-way valve system

This image shows the three-way system. it is actually three valves controlled by one servo. They can be all off or they can be opened one at a time. A cam that presses against a cam-follower is rotated to open the valves. The servo controlled valve can replace 3 conventional solenoid valves.

 

 

 

 

 

F08R5N6INKLQ1FF.LARGE
3D Printed Gate Valve

The image on the left shows the 3D printed gate valve system that is probably the simplest to use with the growing station. It consists of a housing with a slide bar that manually kinks and unkinks the silicone tubing, and can work up to and beyond 30PSI of pressure.

 

Alex & Bob Moisture Sensor for Grow Station

So for our grow station Bob and I decided to use a couple moisture sensors to see when plants in the station need more water.

Based on the research done by Liam earlier in the semester we looked at how we could integrate the moisture sensors into the station.

 

moisture-sensor
Moisture sensor YL-69

We used these Moisture sensors from Amazon, also know as Hygrometer modules. The soil moisture sensors are normally used to detect the humidity of soil, so is perfect for our purposes. The sensor comes in two parts; the electronics board (on the right of the image) and the probe (on the left) that detects the water level.

 

 

 

 

labeled-sensor
Moisture Sensor electronics board

Each sensor has a built-in potentiometer for adjusting the sensitivity of the digital output (D0), an LED to show that its receiving power and a digital output LED, shown in the image on the right.

 

 

The moisture sensors work by estimating the volumetric water content of the soil that they are placed in. The sensor then sends a voltage output dependent on the moisture content that it reads. When it senses moisture in the soil it sends a lower voltage output than when it doesn’t.

We mounted our moisture sensors in two places on our grow station. The first is mounted inside the main tank as seen in the left-hand image, the second is mounted inside the reserve tank (right-hand image). the probes are inside the tank and the connection pins are on the outside so they don’t mix with the water.

Bob & Alex Grow Station

The grow station is coming along nicely, together with Bob we have gotten the self-water feature of the station to read when it needs to be watered and when the reserve tank of water needs to be refilled. we did this using two moisture sensors to tell when the main tank is below a certain level, and when the reserve tank is low as you can see in the videos below.

The main issue that we currently have is that our servo used to control the flow of water is not powerful enough to crimp the tubing that we are using to stop the flow completely.

Combining the MQ-2 and MQ-7 sensors

MQ-2 AND MQ-7 “sensor package”

After researching the two gas sensors individually Ed & I joined the two together to create a combined sensor system. we compiled the two separate breadboard layouts and code together to form a singular circuit. The aim was to allow the individual sensors to detect different gas inputs, and use the same output components but in a different format. For example, different LED display, sound, and motion.

Firstly we combined the two codes together in a simple way, adding the inputs together and giving the same output.

Code output

 

However, it did not behave as we expected. The readings were not clear, and the gas detection did not seem to have a pattern. Consequently, we decided to rewrite a new code instead of taking syntax from previous ones. This resulted in us achieving more effective and clearer instructions.

This image and video show what we did:

20180224_180249 (1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This was our improved code:

int redLed = 12;

int greenLed = 11;

int buzzer = 10;

int smokeA0 = A5;

int AOUTpin = A4;

int DOUTpin = 8;

 

int sensorThres = 400;

 

void setup() {

  // put your setup code here, to run once:

  pinMode(redLed, OUTPUT);

  pinMode(greenLed, OUTPUT);

  pinMode(buzzer, OUTPUT);

 

  pinMode(smokeA0, INPUT);

 

  pinMode(DOUTpin, INPUT);

 

  Serial.begin(115200);

 

 

}

 

void loop() {

  // put your main code here, to run repeatedly:

  int analogSensor = analogRead(smokeA0);

  int value = analogRead(AOUTpin);

  int limit = digitalRead(DOUTpin);

 

  Serial.print(“Pin A0: “);

  Serial.println(analogSensor);

  Serial.print(“CO value: “);

  Serial.println(value);

  Serial.print(“Limit: “);

  Serial.println(limit);

  delay(100);

  if (analogSensor > sensorThres && value > 80) // both triggered

  {

    digitalWrite(redLed, HIGH);

    digitalWrite(greenLed, LOW);

    tone(buzzer, 1000, 600);

    delay(100);

    tone(buzzer, 5000, 600);

 

  }

  else if (analogSensor < sensorThres && value > 80) //CO trigger4ed

  {

  //output goes here

  }

  else if (analogSensor > sensorThres && value < 80) //smoke triggered

  {

  //outpu goes here

  }

  else if  (analogSensor < sensorThres && value < 80)

  {

    digitalWrite(redLed, LOW);

    digitalWrite(greenLed, HIGH);

    noTone(buzzer);

  }

}

 

This code turned the red light and a series of tones, when either of the sensors detected a gas. A green LED was present when nothing was detected. This function does not determine what gas or sensor has detected anything, which would not be very beneficial in actual use.

For this reason, we wanted to increase the number of LED’s that would display each detection. Having one colour for neutral, one for each sensor, as well as multiple for both sensor detection. Another improvement from the last configuration, is an increase in resistance over each output component. We reduced the brightness of the LED’s and the amplitude of the buzzer to make it more bearable when testing the circuit.

The following image and video show the results.

20180224_205410

 

The following code achieves these functions.

int redLed = 12;

int greenLed = 11;

int whiteLed = 7;

int buzzer = 10;

int smokeA0 = A5;

int AOUTpin = A4;

int DOUTpin = 8;

 

int sensorThres = 400;

 

void setup() {

  // Output setups, LED, buzzer, motor

  pinMode(redLed, OUTPUT);

  pinMode(greenLed, OUTPUT);

  pinMode(whiteLed, OUTPUT);

  pinMode(buzzer, OUTPUT);

  pinMode(smokeA0, INPUT);

  pinMode(DOUTpin, INPUT);

  Serial.begin(115200);

 

 

}

 

void loop() {

  // Defining the read intergers for the input

  int analogSensor = analogRead(smokeA0);

  int value = analogRead(AOUTpin);

  int limit = digitalRead(DOUTpin);

 

  //Output of serial print and LED, buzzer, motor

  Serial.print(“Pin A0: “);

  Serial.println(analogSensor);

  Serial.print(“CO value: “);

  Serial.println(value);

  Serial.print(“Limit: “);

  Serial.println(limit);

  delay(100);

  if (analogSensor > sensorThres && value > 100) // Both triggered

  {

    digitalWrite(redLed, HIGH);

    digitalWrite(greenLed, HIGH);

    digitalWrite(whiteLed, LOW);

    tone(buzzer, 1000, 600);

    delay(100);

    tone(buzzer, 5000, 600);

 

  }

  else if (analogSensor < sensorThres && value > 100) // MQ-7 triggered

  {

    digitalWrite(redLed, HIGH);

    digitalWrite(greenLed, LOW);

    digitalWrite(whiteLed, LOW);

    tone(buzzer, 1000, 600);

    delay(100);

    tone(buzzer, 5000, 600);

 

  }

  else if (analogSensor > sensorThres && value < 100) // MQ-2 triggered

  {

    digitalWrite(redLed, LOW);

    digitalWrite(greenLed, HIGH);

    digitalWrite(whiteLed, LOW);

    tone(buzzer, 1000, 600);

    delay(100);

    tone(buzzer, 5000, 600);

    digitalWrite(redLed, LOW);

    digitalWrite(redLed, HIGH);

  }

  else if  (analogSensor < sensorThres && value < 100) // Neutral setup

  {

    digitalWrite(redLed, LOW);

    digitalWrite(greenLed, LOW);

    digitalWrite(whiteLed, HIGH);

    noTone(buzzer);

  }

}

Using a standard lighter proved to be a challenge to detect specific gases, as they do not always contain just butane. The readings on the Arduino Serial monitor show definite readings of each gas, so we know that they work and behave as we want the code to. However, we think the lighter also contains carbon monoxide, so the red LED also reacts to the lighter. Breathing on the sensor is another method of getting a reading from the MQ-7 sensor, and only the red LED responds.

The next step of this project is to incorporate an additional output, which will be a motor. We plan on connecting it to a fan, which will blow air through a whistle. This will be covered in the next blog post.

MQ-7 Carbon Monoxide Sensor

After reading the data sheet a bit more I found out a huge amount of information about how the MQ-7 sensor works.

It turns out that all of the MQ series sensors work the same way, they all use a small heater inside with an electro-chemical sensor. They are sensitive for a range of gasses and are used indoors at room temperature. The output is an analog signal and can be read with an analog input of the Arduino.

When looking more specifically at the MQ-7 Datasheet it explained (in broken english) that the sensor made it detection for Carbon Monoxide by running through cycles of high and low temperatures. The sensor will detect CO at a low temperature (when the heating element is at 1.5V). At the high temperature end of the cycle the sensor cleans out the other gasses that have been absorbed at the low temperature end of the cycle.

MQ-7 Circuit diagram

“Instructions: The above fig is the basic test circuit of MQ-7.The sensor requires two voltage inputs: heater voltage (VH) and circuit voltage(VC). VH is used to supply standard working temperature to the sensor and it can adopt DC or AC power. For this model sensor, VH should be at 1.5V±0.1V low voltage when detect CO while should be at 5V±0.1V at non detection status(resuming period). VRL is the voltage of load resistance RL which is in series with sensor. Vc supplies the detect voltage to load resistance RL and it should adopts DC power.”

This is taken directly from the MQ-7 data-sheet and explains the circuit diagram shown above.

Sensor CharacteristicsMq-7 sensor charateristics 2

The Circuit

When looking at tutorials for the MQ-7 Sensor I found a very simple way to use the sensor.

MQ-7 Fritzing

The above shows the circuit that i used for the MQ-7 Sensor, with the following code;

const int AOUTpin=0;  //the AOUT pin of the CO sensor goes into analog pin A0 of the arduino
const int DOUTpin=8;  //the DOUT pin of the CO sensor goes into digital pin D8 of the arduino
const int ledPin=13;  //the anode of the LED connects to digital pin D13 of the arduino

int limit;
int value;

void setup() {
Serial.begin(115200);  //sets the baud rate
pinMode(DOUTpin, INPUT);  //sets the pin as an input to the arduino
pinMode(ledPin, OUTPUT);  //sets the pin as an output of the arduino
}

void loop()
{
value= analogRead(AOUTpin);  //reads the analaog value from the CO sensor’s AOUT pin
limit= digitalRead(DOUTpin);  //reads the digital value from the CO sensor’s DOUT pin
Serial.print(“CO value: “);
Serial.println(value);  //prints the CO value
Serial.print(“Limit: “);
Serial.print(limit);  //prints the limit reached as either LOW or HIGH (above or underneath)
delay(100);
if (limit == HIGH){
digitalWrite(ledPin, HIGH);  //if limit has been reached, LED turns on as status indicator
}
else{
digitalWrite(ledPin, LOW);  //if threshold not reached, LED remains off
}
}

the image above shows the above circuit when in use with that code, i was able to get a reading from the CO sensor when I blew smoke onto the sensor.

 

Links:

https://playground.arduino.cc/Main/MQGasSensors

Click to access MQ-7%20Ver1.3%20-%20Manual.pdf

https://en.wikipedia.org/wiki/Electrochemical_gas_sensor

http://www.learningaboutelectronics.com/Articles/MQ-7-carbon-monoxide-sensor-circuit-with-arduino.php

 

MQ-7 Carbon Monoxide Sensor

All the MQ series of gas sensors use a small heater inside with an electro-chemical sensor. They are sensitive for a range of gasses and are used indoors at room temperature.

The output is an analog signal and can be read with an analog input of the Arduino.

Carbon Monoxide Sensor.

This is a simple-to-use Carbon Monoxide (CO) sensor, suitable for sensing CO concentrations in the air. The MQ-7 can detect CO-gas concentrations anywhere from 20 to 2000ppm.

This sensor has a high sensitivity and fast response time. The sensor’s output is an analog resistance. The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a load resistance, and connect the output to an ADC.

After searching a bit more I found some code to use the sensor and how to set it up correctly.

After working on the code and creating a fritzing layout that matched the diagrams, the sensor still did not work.

I did a bit more research into the MQ-7 and found that it has to be properly calibrated for it to work.

I found this step by step run-through in how to calibrate the sensor.

“According to manufacturer’s datasheet, sensor should be running heating-cooling cycles for 48 hours in a row before it can be calibrated. And you should do it if you intend to use it for a long time: in my case, sensor reading in clean air changed for about 30% over 10 hours. If you won’t take this into account, you can get 0 ppm result where there is actually 100 ppm of CO. If you don’t want to wait for 48 hours, you can monitor sensor output at the end of measurement cycle. When over an hour it won’t change for more than 1-2 points – you can stop heating there.

Rough calibration:

After running sketch for at least 10 hours in clean air, take raw sensor value in the end of the measurement cycle, 2-3 seconds before heating phase starts, and write it into sensor_reading_clean_air variable (line 100). That’s it. Program will estimate other sensor parameters, they won’t be precise, but should be enough to distinguish between 10 and 100 ppm concentration.

Precise calibration:

I highly recommend to find a calibrated CO meter, make 100 ppm CO sample (this can be done by taking some flue gas into syringe – CO concentration there can easily be in the range of several thousands ppm – and slowly putting it into closed jar with calibrated meter and MQ-7 sensor), take raw sensor reading at this concentration and put it into sensor_reading_100_ppm_CO variable. Without this step, your ppm measurement can be wrong several times in either direction (still ok if you need alarm for dangerous CO concentration at home, where normally there should be no CO at all, but not good for any industrial application).”

I tried to calibrate the sensor following the steps above, however I didn’t do it over ten hours. I added the sensor value to sensor_reading_clean_air after about 3 ½ hours instead.

After trying to hold the sensor next to my gas hob for a few seconds there was still no change in the reading.

 

 

 

Links:

https://playground.arduino.cc/Main/MQGasSensors

Click to access MQ-7%20Ver1.3%20-%20Manual.pdf

https://en.wikipedia.org/wiki/Electrochemical_gas_sensor