Team:TU-Munich/Results/Implementation

From 2013.igem.org

(Difference between revisions)
(Temperature sensor DS18B20)
(Arduino Microcontroller)
Line 27: Line 27:
One advantage of a moss filter is that it works quite autonomic. Once the moss is installed it filters until it's "saturated", assumed that
One advantage of a moss filter is that it works quite autonomic. Once the moss is installed it filters until it's "saturated", assumed that
the environmental parameters fit and a proper living space is provided.
the environmental parameters fit and a proper living space is provided.
-
The main goal of our measurenment device is to monitor these environmental parameters in real time.  
+
The main goal of our measurement device is to monitor these environmental parameters in real time.  
-
Since the filter's autonomy has to be obtained and the costs should be kept as low as possible, the usage of ordinary lab measurenment tools is limited.
+
Since the filter's autonomy has to be obtained and the costs should be kept as low as possible, the usage of ordinary lab measurement tools is limited.
Looking one step ahead it's suggesting to use the moss for cleaning waters like ponds or streams. Places that are not continuously supervised by humans.
Looking one step ahead it's suggesting to use the moss for cleaning waters like ponds or streams. Places that are not continuously supervised by humans.
So the aim was to use a low cost and low energy solution, that maintain the filters autonomy.
So the aim was to use a low cost and low energy solution, that maintain the filters autonomy.
[[File:Arduino_Uno.png|thumb|right|250px|Fig A: Arduino Uno, released in September 2010]]
[[File:Arduino_Uno.png|thumb|right|250px|Fig A: Arduino Uno, released in September 2010]]
This is where Arduino comes into play.
This is where Arduino comes into play.
-
Arduino is a platform that is based on one microcontroller wich is attached to a circuit board. Its convenient handling and easy programming,  
+
Arduino is a platform that is based on one microcontroller which is attached to a circuit board. Its convenient handling and easy programming,  
-
the lots of available hardware and the great community support make it one of the most popular prototyping platforms these days, espacially for
+
the lots of available hardware and the great community support make it one of the most popular prototyping platforms these days, especially for
multidisciplinary applications. Among its many fans it already enjoys cult status.
multidisciplinary applications. Among its many fans it already enjoys cult status.
We first used the Arduino Uno. It is the most commonly used board and the first revision was released in September 2010.  
We first used the Arduino Uno. It is the most commonly used board and the first revision was released in September 2010.  
Designed for beginners, it gave us an easy start into the handling, since no one of us had any experience working with microcontrollers.
Designed for beginners, it gave us an easy start into the handling, since no one of us had any experience working with microcontrollers.
Most libraries already worked out of the box and all shields and sensors we ordered came with an example code.  
Most libraries already worked out of the box and all shields and sensors we ordered came with an example code.  
-
But the Arduino Uno came to it's limits, when we tried to get a display, wifi and several sensors working.
+
But the Arduino Uno came to it's limits, when we tried to get a display, WiFi and several sensors working.
-
Therefore we ordered the Arduino Due, wich is the most powerful Arduino board.  
+
Therefore we ordered the Arduino Due, which is the most powerful Arduino board.  
It has 16 times more flash memory (code storage) than the Arduino Uno and its clock runs 5 times faster. Instead of 2KB SRAM there are 96KB.  
It has 16 times more flash memory (code storage) than the Arduino Uno and its clock runs 5 times faster. Instead of 2KB SRAM there are 96KB.  
At least there are a lot more free pins that can be used for sensors etc, and still its costs don't exceed 50€€ (~60$).
At least there are a lot more free pins that can be used for sensors etc, and still its costs don't exceed 50€€ (~60$).
Line 156: Line 156:
'''Pin usage:'''
'''Pin usage:'''
-
  4 SS for SD card (Slave Select)
+
Pin  4 SS for SD card (Slave Select)
-
  7 Handshake between Arduino and WiFi Shield
+
Pin  7 Handshake between Arduino and WiFi Shield
-
  10 SS for WiFi
+
  Pin 10 SS for WiFi
-
  74 SPI MISO (Master in, Slave out)
+
  Pin 74 SPI MISO (Master in, Slave out)
-
  75 SPI MOSI (Master out, Slave in)
+
  Pin 75 SPI MOSI (Master out, Slave in)
-
  76 SPI SCK  (Serial clock)
+
  Pin 76 SPI SCK  (Serial clock)
-
  gnd
+
    gnd
-
  3.3V
+
    3.3V
-
  5V
+
    5V
====Watterott mega msd-shield====
====Watterott mega msd-shield====
Line 176: Line 176:
'''Pin usage:'''
'''Pin usage:'''
-
  4 SS for SD card
+
Pin  4 SS for SD card
-
  6 SS for the touch of the touch display
+
Pin  6 SS for the touch of the touch display
-
  7 (25)SS for the LCD (Workarround of the double usage of pin 7 by the WIFI Shield)
+
Pin  7 (25)SS for the LCD (Workarround of the double usage of pin 7 by the WIFI Shield)
-
  8 reset LCD
+
Pin  8 reset LCD
-
  9 LCD LED
+
Pin  9 LCD LED
-
  20 RTC (real time clock) I²C SDA (Serial Data Line)
+
  Pin 20 RTC (real time clock) I²C SDA (Serial Data Line)
-
  21 RTC  I²C SCL (Serial Clock)
+
  Pin 21 RTC  I²C SCL (Serial Clock)
-
  50 SPI MISO
+
  Pin 50 SPI MISO
-
  51 SPI MOSI
+
  Pin 51 SPI MOSI
-
  52 SPI SCK
+
  Pin 52 SPI SCK
-
  gnd
+
    gnd
-
  3.3V
+
    3.3V
====Display MI0283QT-9====
====Display MI0283QT-9====
Line 213: Line 213:
'''pin usage:'''
'''pin usage:'''
    
    
-
  20 TSL2561 I²C SDA (Serial Data Line)
+
  Pin 20 TSL2561 I²C SDA (Serial Data Line)
-
  21 TSL2561 I²C SCL (Serial Clock)
+
  Pin 21 TSL2561 I²C SCL (Serial Clock)
-
  gnd
+
    gnd
-
  3.3V
+
    3.3V
====Temperature sensor DS18B20====
====Temperature sensor DS18B20====
Line 237: Line 237:
'''pin usage:'''
'''pin usage:'''
-
  A7 Water sensor
+
  Pin A7 Water sensor
-
  gnd
+
    gnd
-
  3.3V
+
    3.3V
====Photodiodes====
====Photodiodes====

Revision as of 09:54, 16 September 2013


Implementation of a Plant Biofilter

Text




Our Physco-Filter Prototype



Text




Arduino Microcontroller

Introduction

One advantage of a moss filter is that it works quite autonomic. Once the moss is installed it filters until it's "saturated", assumed that the environmental parameters fit and a proper living space is provided. The main goal of our measurement device is to monitor these environmental parameters in real time. Since the filter's autonomy has to be obtained and the costs should be kept as low as possible, the usage of ordinary lab measurement tools is limited. Looking one step ahead it's suggesting to use the moss for cleaning waters like ponds or streams. Places that are not continuously supervised by humans. So the aim was to use a low cost and low energy solution, that maintain the filters autonomy.

Fig A: Arduino Uno, released in September 2010

This is where Arduino comes into play. Arduino is a platform that is based on one microcontroller which is attached to a circuit board. Its convenient handling and easy programming, the lots of available hardware and the great community support make it one of the most popular prototyping platforms these days, especially for multidisciplinary applications. Among its many fans it already enjoys cult status. We first used the Arduino Uno. It is the most commonly used board and the first revision was released in September 2010. Designed for beginners, it gave us an easy start into the handling, since no one of us had any experience working with microcontrollers. Most libraries already worked out of the box and all shields and sensors we ordered came with an example code. But the Arduino Uno came to it's limits, when we tried to get a display, WiFi and several sensors working.

Therefore we ordered the Arduino Due, which is the most powerful Arduino board. It has 16 times more flash memory (code storage) than the Arduino Uno and its clock runs 5 times faster. Instead of 2KB SRAM there are 96KB. At least there are a lot more free pins that can be used for sensors etc, and still its costs don't exceed 50€€ (~60$).

Gruppenfoto
Table 1:

Shopping list for our Arduino-Project

Component Quantity Source Price Figure
Arduino Due microcontroller 1 [http://www.watterott.com/de/Arduino-Due?xfb7d6=d868f3f07c538128ec6013c6d984b089 Source] 46.41 € Fig. 1 A
Arduino WIFI Shield 1 Source 63.58 € Fig. 1 B
Watterott mega msd-shield 1 [http://www.watterott.com/de/Arduino-Mega-mSD-Shield Source] 19.49 € Fig. 1 C
Display MI0283QT-9 1 [http://www.watterott.com/de/MI0283QT-2-Adapter Source] 36.00 € Fig. 1 D
Light sensor TSL2561 1 [http://www.watterott.com/de/TSL2561-Lichtsensor Source] 7.74 € Fig. 1 E
Temperature sensor DS18B20 1 [http://www.exp-tech.de/Sensoren/Sparkfun-Temperature-Sensor---Waterproof--DS18B20-.html Source] 8.80 € Fig. 1 F
Water sensor 1 [http://www.exp-tech.de/Sensoren/Seeedstudio-Grove---Water-Sensor.html Source] 2.90 € Fig. 1 G
Lithium-Battery 1 [http://www.amazon.com/s/ref=nb_sb_noss_1/176-6668907-5443152?url=search-alias%3Daps&field-keywords=lithium%20battery&sprefix=lithi%2Caps&rh=i%3Aaps%2Ck%3Alithium%20battery Source] 16.35 €
Stackable Headers 3 [http://www.exp-tech.de/Zubehoer/Steckverbinder/Arduino-Stackable-Header-Kit.html Source] 5.37 €
Linking wires and resistors 1.00 €
Photodiodes 3
207.64 €

part description

Arduino Due

Fig 1 A: Arduino Due, released in October 2012

The Arduino Due is the most powerful Arduino board. It's underlying 32bit-processor is the Atmel SAM3X8E. Contrary to the other boards that run at 5V the Due works with 3.3V.

Data:

 84 Mhz	CPU Clock
 96 	KBytes of SRAM.
512 	KBytes of Flash memory. 
 54 	Digital I/O Pins
 12 	Analog Input Pins
  2 	(DAC)Analog Outputs Pins

Arduino WiFi Shield

Fig 1 B: Arduino WiFi, released in August 2012

The Arduino WiFi Shield is an attachable shield that provides Wireless LAN 802.11b/g to the Arduino. It can scan for networks, connect to networks and open and transfer data through TCP and UDP sockets. It also supports WEP and WPA2 encryption. The WiFi Shield is fully supported by the Arduino Due and Arduino supplies a suitable stock WiFi-library. There is also an SD-card socket onboard to store received data. As the SD-card is accessable seperatly, it can also be used as a storage for any data generated by the Arduino. The SD-card socket is also supported by a stock library. The communication between Arduino Due and the WiFi Shield runs via an SPI/ICSP interface.

Pin usage:

Pin  4	SS for SD card (Slave Select)
Pin  7	Handshake between Arduino and WiFi Shield
Pin 10	SS for WiFi
Pin 74	SPI MISO (Master in, Slave out)
Pin 75	SPI MOSI (Master out, Slave in)
Pin 76	SPI SCK  (Serial clock)
    gnd
    3.3V
    5V

Watterott mega msd-shield

Fig 1 C: Watterott mega msd-shield

The mega msd-shield was designed by Watterott and consists of a couple of components. The components are one real time clock, one SD-card socket we won't use, a small battery, a socket for a touch display. To get it ready to run, the shield must be assembled. The stackable headers and the quartz must be soldered to the board and you must insert the battery. Unluckiely the mega msd-shield and therefore also the MI0283QT-9 touch display only come with a working library for older Arduinos such as the Uno. The Due is not yet supported and all libraries have to be rewritten. The touch display and the SD-card-slot communicate with the Arduino Due via SPI/ICSP. The real time clock transmit its data via I²C.

Pin usage:

Pin  4	SS for SD card
Pin  6	SS for the touch of the touch display
Pin  7 (25)SS for the LCD (Workarround of the double usage of pin 7 by the WIFI Shield)
Pin  8	reset LCD
Pin  9	LCD LED
Pin 20	RTC (real time clock) 	I²C	SDA (Serial Data Line)
Pin 21	RTC  			I²C	SCL (Serial Clock)
Pin 50	SPI MISO
Pin 51	SPI MOSI
Pin 52	SPI SCK
    gnd
    3.3V

Display MI0283QT-9

Fig 1 D: MI0283QT-9

The MI0283QT-9 is a multicolor touch display. It comes already attached to a board, where only the pin headers are still to be soldered. Once assembled it can easiely be plugged into the mega msd-shield. It has an onboard touch controller (TI ADS7846). The display size is 2.83"(43.2 x 57.6mm) with a resolution of 240x320. It supports 262k colors. The pin usage is already considered in the mega msd-shield description.

Light sensor TSL2561

Arduino Tsl2561.png
Arduino Tsl2561 Curve.png
Fig 1 E: TSL2561 Fig 1 E1: TSL2561 Absorption Curve

The light sensor is a small, so called beakout board. It is usually not directly plugged to the Arduino board or into a shield but connected by wires. The light sensor has two photodiodes onboard that measure visible and infrared light. Similar to the RTC, the TSL2561 is adressed via I²C. Once you get the I²C library working on your Arduino Due working it takes only little effort to integrate additional I²C devices. Just very few lines of the library have to be rewritten. The photodiodes can be adressed seperately or both at one. Their output is already converted to Lux.

pin usage:

Pin 20	TSL2561		 	I²C	SDA (Serial Data Line)
Pin 21	TSL2561			I²C	SCL (Serial Clock)
    gnd
    3.3V

Temperature sensor DS18B20

Fig 1 F: DS18B20

The temperature sensor is embedded into a water proof cable. It is addressed via One-Wire. The provided data are digital raw data, which need to be converted into degrees Celsius. Information about the conversion are given by the manufacturer. Similar to the I²C (TwoWire) bus, you only have to get the One-Wire interface working once. After that you can easily set up One-Wire more devices. Again, just very few lines of the library have to be rewritten.

pin usage:

Pin 14 	One-Wire DS18B20 (pin was randomly chosen)
Pin gnd
Pin 3.3V

Water sensor

Water sensor Fig 1 G

Setting up the water sensor is very easy. If and how much water the sensor registered can be measured via an analog pin.

pin usage:

Pin A7	Water sensor
    gnd
    3.3V

Photodiodes

We disassembled a broken "Biorad 550"-photometer and recovered a halogen lamp, a small number of wavelength filters, three of eight Photodiodes and their fitting Resistors.

Tools

  • Breadboard
  • Soldering bolt
  • Solder

Assembly

Arduino Due pinout diagram

Keep everything clear during your assembly. If you have different colored linking cables, always try to use the same color code. For example: brown cable for 3.3V etc. Troubleshooting can get nasty.



References:

http://www.ncbi.nlm.nih.gov/pubmed/6327079 Edens et al., 1984

  1. http://www.ncbi.nlm.nih.gov/pubmed/6327079 Edens et al., 1984 Edens, L., Bom, I., Ledeboer, A. M., Maat, J., Toonen, M. Y., Visser, C., and Verrips, C. T. (1984). Synthesis and processing of the plant protein thaumatin in yeast. Cell, 37(2):629–33.