Skip to content

11. Open Source

Research & Ideation

For this week's project at the Basque BioDesign Center under the frame of Open Source Hardware, we've worked collaboratively with Ainhoa Cadarso, Laura Fernández Antolín, and myself, Ailin Sandlien, under the guidance of instructors Paula Franco and Eduardo Loreto.

Microalgae (including cyanobacteria) are predominantly unicellular photosynthetic organisms which constitute the base of aquatic food webs. As an ancestor of plants with billions of years of evolutionary history, they distinctively adapted to extreme habitats and developed massive phylogenetic and biochemical diversity. They have colonized almost all biotopes and been acclimated to severe environments, living in salt marshes, deserts or environments with very low light . Not only do some microalgae tolerate hostile environmental conditions but also need these conditions to thrive. (Scholarly Community Enciclopedia). Microalgae are microscopic (2-200 μm), photosynthetic, unicellular microorganisms. They are also polyphyletic and eukaryotic (thus excluding cyanobacteria, which are no longer considered true algae as they belong to the prokaryotic kingdom). Microalgae can grow autotrophically, meaning they are capable of producing their own organic matter from inorganic substances, or heterotrophically (Heterotrophic nutrition refers to organisms that obtain their nutrients and energy from organic matter, in contrast to autotrophic nutrition, where inorganic matter is used for those purposes).

They live in water, soil, and air, and are found everywhere. Microalgae are essential to the aquatic food chain, serving as food for small marine animals and fish.

They are capable of decontaminating, storing carbon dioxide (CO2), producing biofuels, and enhancing food and cosmetics. There are over 50,000 species of microalgae, found in the ocean, freshwater, and wastewater.

Importance: Microalgae are responsible for 40% of global photosynthesis and play a crucial role in aquatic ecosystems.

Diversity: There are more than 30,000 species of microalgae, but only 5% have been studied, and around 20 are commercially exploited.

Interest: They are particularly interesting due to their high lipid content and rapid growth.

Some of the most studied and well-known microalae are :

  • [Spiruline](https://en.wikipedia.org/wiki/Spirulina_(dietary_supplement) : Spirulina is symbiotic, multicellular, and filamentous blue-green microalgae with symbiotic bacteria that fix nitrogen from air. It is recognizable by the arrangement of the multicellular cylindrical trichomes in an open left-hand helix along the entire length.

  • Chlorella : Chlorella is a genus of about thirteen species of single-celled green algae of the division Chlorophyta. The cells are spherical in shape, about 2 to 10 μm in diameter, and are without flagella. Their chloroplasts contain the green photosynthetic pigments chlorophyll-a and -b.

Differences between Spiruline and Chlorella

  • Diatoms : Diatoms capture solar energy and produce a quarter of our planet’s oxygen. Despite their tough, siliceous shells, these phytoplankton are abundantfood for copepods and are at the base of the marine food chain. Diatoms are single-celled organisms with nuclei and chloroplasts. They are protists living individually or forming chains, zig zags or spirals. The first diatoms – the centrics – appeared in the Jurassic age some 200 million years ago, as combinations of yeast-like organisms and algae. Over the eons,diatoms acquired new genes, shapes and complex metabolisms. They’ve becomechampions of photosynthesis, while retaining many properties of animal cells.

  • Dunaliella : Dunaliella is a single-celled, photosynthetic green alga, that is characteristic for its ability to outcompete other organisms and thrive in hypersaline environments. It is mostly a marine organism, though there are a few freshwater species that tend to be more rare

Algae Bioreactor

A bioreactor is any manufactured device or system that supports a biologically active environment. In one case, a bioreactor is a vessel in which a chemical process is carried out which involves organisms or biochemically active substances derived from such organisms. This process can either be aerobic or anaerobic. These bioreactors are commonly cylindrical, ranging in size from litres to cubic metres, and are often made of stainless steel.It may also refer to a device or system designed to grow cells or tissues in the context of cell culture. These devices are being developed for use in tissue engineering or biochemical/bioprocess engineering. (wikipedia)

An algae bioreactor is used for cultivating micro or macroalgae. Algae may be cultivated for the purposes of biomass production (as in a seaweed cultivator), wastewater treatment, CO2 fixation, or aquarium/pond filtration in the form of an algae scrubber.[1] Algae bioreactors vary widely in design, falling broadly into two categories: open reactors and enclosed reactors. Open reactors are exposed to the atmosphere while enclosed reactors, also commonly called photobioreactors, are isolated to varying extents from the atmosphere. Specifically, algae bioreactors can be used to produce fuels such as biodiesel and bioethanol, to generate animal feed, or to reduce pollutants such as NOx and CO2 in flue gases of power plants. Fundamentally, this kind of bioreactor is based on the photosynthetic reaction, which is performed by the chlorophyll-containing algae itself using dissolved carbon dioxide and sunlight. The carbon dioxide is dispersed into the reactor fluid to make it accessible to the algae. The bioreactor has to be made out of transparent material. (wikipedia)

Biomass is a term used in several contexts: in the context of ecology it means living organisms, and in the context of bioenergy it means matter from recently living (but now dead) organisms. In the latter context, there are variations in how biomass is defined, e.g., only from plants, from plants and algae, from plants and animals. The vast majority of biomass used for bioenergy does come from plants. Bioenergy is a type of renewable energy that the bioenergy industry claims has the potential to assist with climate change mitigation. (wikipedia)

🧪 Our goal is to cultivate microalgae for biomass production for materials research Turning RESIDUE into GROWTH we will feed our algae with the CO2 from the Basque BioDesign Center's laser cutting machine.

Papers on this research:

get inspired!

Check out and research alumni pages to betetr understand how to document and get inspired

References & Inspiration

Spita: Discovering microalgae through biodesign

SPITA is a toolkit for microalgae cultivation. SPIRA’s goal is to take microalgae cultivation beyond the academic and research sphere, making the benefits and knowledge associated with this practice accessible. Although microalgae have demonstrated considerable potential, their applications on a personal scale are still insufficiently explored, remaining mostly confined to the industrial context. SPIRA aims to reverse this perspective, highlighting how feasible and advantageous it is to adopt microalgae cultivation systems on a small, accessible and easily controlled scale. The ambition is to exploit the biodesign methodology to bridge the gap between specialised research and general knowledge, promoting inter-species collaboration with microalgae as a viable and concrete tool to address the challenges of the climate crisis.

HANG SU - PHYTOSPHERE Phytosphere presents a new mechanism of symbiosis among an interdependent and mutually improving plant community. Six plant-machine hybrids, that are controlled by the 'intelligence' of plants, are empowered with new abilities for plants to take the initiative to explore and adjust their own surrounding environment and develop self-identity. As radical speculation, the project is seen as an innovative strategy for the evolution of plants and a provocative trigger that provokes a critical reflection on the role and survival of plants in the ever-expanding man-made world.

Algae Curtain by EcologicStudio The project was conceived by ecoLogicStudio with the support of the Urban Morphogenesis Lab – UCL and Synthetic Landscapes Lab – University of Innsbruck. Designed as an “urban curtain”, the system is specifically engineered as a lightweight soft and translucent retrofitting skin. This new building skin was installed on the main facade of the Print-works office building, where it captured CO2 from the atmosphere at an estimated rate of approximately one kilo per day, equivalent to that of 20 large trees.

FASTER HIGHER STRONGER by Mary Maggic

DISRUPTING CIRCULARITY // BREAKING THE WHEEL a performance that activates the human-non-human fitness installation FASTER HIGHER STRONGER, unsettling human technological fantasies and aesthetics of optimization, augmentation, and competition. A production inspired by the official Olympic motto, “Faster, higher, stronger, together”, in which human-powered exercise machines supply energy to a bio-reactor that maximizes the production of a symbiotic culture of bacteria and yeasts (SCOBY) produced in kombucha. “Humans and non-humans train together, staging the impossible fantasy of post-natural optimization”, with this interspecies fitness #MaryMaggic invites you into the tension that is articulated between work, care, alienation and alliances.

OXMAN

A “scent computer” made of genetically engineered bacteria. Capsule III explores the potential of living machines that can compute using bVOCs, the molecular language of plants, animals, and ecologies. In Capsule III, a synbio robot facilitates ‘conversations’ — the passing of molecular messages — between genetically engineered bacteria. Within 16 Bioreactors grow colonies of biosensors: genetically engineered bacteria that can produce scents and fluoresce upon sensing a specific molecule (bVOCs). The bacterial biosensors pass molecular messages back and forth using bVOCs as one of their core languages. To facilitate interactions between the Bioreactors, a gantry setup equipped with a mechanical lung samples the air from each Bioreactor. Each Bioreactor contains the engineered biosensors in a temperature-controlled liquid chamber, which is designed to be easily removed for transport or sterilization in an autoclave. A septum port on top of this chamber allows us to introduce bVOCs into the headspace, to test the response of biosensors to bVOCs of interest. The transfer of bVOCs between producer and sensor bacterial strains is followed by a fluorescent glow in a Bioreactor, signaling that the bacteria has received the message.

SEAmpathy

Reconstruction of the algae for a configuration of living fibres that sustain photosynthesis. During the project and research, the designer has been collaborating with Weizmann Institution for science and worked under Dr. Filipe Natalio's lab researching and developing methods for creating living matter. Experimenting with new fields and collaborating with scientists was essential to the project. The purpose of the experiment was to create a manipulation for a living microscopic algae colony.

A partition which proposes an implementation of the algae as a versatile sheet material, with the potential for recycling and industrialisation. Inspired by circular design and zero waste approaches the designer has created a biomaterial that can be used and reused by repeating the process of its 'cooking'.

Building an algae bioreactor

Tools

BoM

Materials

Qty Description Price Link Notes
1 4,15m Flexible transparent PVC tube 18,75 amazon 45,16€ price for 10m
4 LED lights 20,79€ amazon -
1 Water pump 22,99€ amazon -
1 Aquarium Water Valve 21,02€ amazon -
1 Flexible Air Outlet Pipe Ø 100 mm 14,69€ amazon -
1 Air Extractor Fan Ø 150 mm 22,94€ amazon -
1 Large funnel with filter and flexible nozzle 3,49€ amazon -
1 I2C LCD 1602 Module 6,5€ amazon we bought a 2 pack(12,95€)
1 KEYESTUDIO TDS Water Quality Meter Probe V1 Sensor Module with XH2.54-3Pin Jumper Wire Connector for Arduino 11,92€ amazon -
1 KY018 SENSOR 1,9€ Robotlandia -
1 WATERPROOOF DIGITAL TEMPERATURE SENSOR 6,57€ Digikey -
1 GREN LED LIGHT 0,23€ Digikey -
1 0.8mm 100gr tin for soldering 4,65€ amazon -
1 HAND TIN WELDER 12,99€ leroy merlin -
1 ARDUINO UNO R3 24,71€ arduino -
1 USB CHARGER HEAD 6,99€ amazon -
1 Cable USB-A 2.0 Macho a USB-B 5,09€ amazon -
1 Zolt 12W Universal AC DC Power Adapter 3V 4.5V 5V 6V 7.5V 9V 12V 1A Switching Power Supply Transformer, 1000mA Max. 13,52€ amazon we’ve cut the positive and ground wires open to weld it to the water pump
1 methacrylate sheet 5mm 163,71€ planchas de plástico 150 x 110 cm
1 plywood sheet 5 mm thickness 51,55 € taller del cuadro we reused from the lab

Process


Our working process it's been divided collaboratively between the 3 of us, Laura the person in charge of research, development, management and documentation, Ive been the person in charge of the structure design, and Ainhoa taking care of the electronics and sensors developement.


Structure design

We've worked collaboratively to make a structure that surrounds the tank containing microalgae. To cultivate microalgae, the water needs to be in movements, that's why we've surrounded our structure with a flexible pipe for water flow, and we've connected a fountain pump at the bottom of the tank. On the upper part of the structure, the sensors will be connected.


Here is a video of the work in process for the structure design and the functioing of the pump :



We've opted by making our structure of 5 mm methacrylate sheets, we cut it on the laser cut machine.



first sketches of our structure


final plans for laser cutting our structure

LASER CUTTING SETTINGS 
Material: methacrylate
Thickness: 0,5 mm

CUT
Speed: 15
Min. power: 70
Max. power: 74


final plans for laser cutting our structure

When setting up the structure we noticed we could make little holes to attached around LED lights on each of the 4 structures' columns


laser cutting holes for lights assamblage


sctructure with LED lights


pump details

During the set up process we noticed it was nicer to make a custom platform to place all our sensor and electronic devices:


platform for sensors


details

File: LASER CUT STRUCTURE

File: SENSOR PLATFORM

Custom pieces for fummes extractor

We've bought a fan to connect the laser cut fummes extractor hose to our algue bioreactor. To connect this fan to both machines we've 3D printed 3 adaptators to make the pieces match.


Custom pieces for fan between laser cuter fummes extrator and our algae bioreactor

Each ADAPTATOR is made of 2 pieces, because the thicknes of each part of the piece was different , so we printed each adaptator in 2 and then we glued them together. Here are the Cura 3D printing settings :


WIP 3D printing of adaptators


FAN WITH ADAPTATORS

We made a hole into the tank with the hand welder so the Co2 from the fan goes into the algae bioreactor.


hole for fan funnel


final set up of fan for Co2 collection from laser cut machine into algae bioreactor

Sensors development

Our circuit is compossed of:

1 Arduino Uno
1 LCD I2C
1 TDS Sensor
1 Water temperature sensor
1 LED

TDS Sensor

This sensor calculates the particles in a liquid, we will use it to know how much biomass there is in our crop. This code gives values ​​from 0 to infinity.

#define TdsSensorPin A0
#define VREF 5.0              // analog reference voltage(Volt) of the ADC
#define SCOUNT  30            // sum of sample point


int analogBuffer[SCOUNT];     // store the analog value in the array, read from ADC
int analogBufferTemp[SCOUNT];
int analogBufferIndex = 0;
int copyIndex = 0;


float averageVoltage = 0;
float tdsValue = 0;
float temperature = 16;       // current temperature for compensation


// median filtering algorithm
int getMedianNum(int bArray[], int iFilterLen){
 int bTab[iFilterLen];
 for (byte i = 0; i<iFilterLen; i++)
 bTab[i] = bArray[i];
 int i, j, bTemp;
 for (j = 0; j < iFilterLen - 1; j++) {
   for (i = 0; i < iFilterLen - j - 1; i++) {
     if (bTab[i] > bTab[i + 1]) {
       bTemp = bTab[i];
       bTab[i] = bTab[i + 1];
       bTab[i + 1] = bTemp;
     }
   }
 }
 if ((iFilterLen & 1) > 0){
   bTemp = bTab[(iFilterLen - 1) / 2];
 }
 else {
   bTemp = (bTab[iFilterLen / 2] + bTab[iFilterLen / 2 - 1]) / 2;
 }
 return bTemp;
}


void setup(){
 Serial.begin(115200);
 pinMode(TdsSensorPin,INPUT);
}


void loop(){
 static unsigned long analogSampleTimepoint = millis();
 if(millis()-analogSampleTimepoint > 40U){     //every 40 milliseconds,read the analog value from the ADC
   analogSampleTimepoint = millis();
   analogBuffer[analogBufferIndex] = analogRead(TdsSensorPin);    //read the analog value and store into the buffer
   analogBufferIndex++;
   if(analogBufferIndex == SCOUNT){
     analogBufferIndex = 0;
   }
 }  
  static unsigned long printTimepoint = millis();
 if(millis()-printTimepoint > 800U){
   printTimepoint = millis();
   for(copyIndex=0; copyIndex<SCOUNT; copyIndex++){
     analogBufferTemp[copyIndex] = analogBuffer[copyIndex];

     // read the analog value more stable by the median filtering algorithm, and convert to voltage value
     averageVoltage = getMedianNum(analogBufferTemp,SCOUNT) * (float)VREF / 1024.0;

     //temperature compensation formula: fFinalResult(25^C) = fFinalResult(current)/(1.0+0.02*(fTP-25.0));
     float compensationCoefficient = 1.0+0.02*(temperature-25.0);
     //temperature compensation
     float compensationVoltage=averageVoltage/compensationCoefficient;

     //convert voltage value to tds value
     tdsValue=(133.42*compensationVoltage*compensationVoltage*compensationVoltage - 255.86*compensationVoltage*compensationVoltage + 857.39*compensationVoltage)*0.5;

     //Serial.print("voltage:");
     //Serial.print(averageVoltage,2);
     //Serial.print("V   ");
     Serial.print("TDS Value:");
     Serial.print(tdsValue,0);
     Serial.println("ppm");
   }
 }
}

Water temperature sensor

This sensor calculates the temperature of a liquid. This code gives values ​​in Celsius.

#include "math.h"


// This code is for the Analog and digital temperature sensor module
#define LED_PIN 13                            // defining pin 13 as the led input pin
#define DIGITAL_INPUT 2                   // defining digital input at pin 3
#define ANALOG_INPUT   A1            // defining analog input at A0


// initializing the variables
int    digital_output ;                          // This will read the digital value
int    analog_output ;                        // This will read the analog value
int    revised_output;                        // variable to store the corrected value
float  temp_C ;                                  // Variable for storing the temperature
float  temp_f ;                                  // Variable for storing the Fahrenheit


void setup ( )                                                                     // Anything written I it will run once.


{
 pinMode ( LED_PIN, OUTPUT ) ;                               // declaring pin 13 as output
 pinMode ( DIGITAL_INPUT, INPUT ) ;                   // declaring pin 3 as input
 pinMode ( ANALOG_INPUT, INPUT )  ;                 // declaring A0 as input pin
 Serial.begin ( 9600 ) ;                                            // selecting the baud rate at 9600
}


void loop ( )                              // Anything written in it will run continuously


{
 analog_output = analogRead ( ANALOG_INPUT ) ;         // Reading the analog value and storing in analog_output
 Serial.print ( " Analog value of the module is =  " ) ;                                      
 Serial.println ( analog_output ) ,  DEC ;                                    // This will display the analog value


 // The module has thermistor connection reversed
revised_output= map ( analog_output, 0, 1023, 1023, 0 ) ;
 temp_C    = Thermistor ( revised_output ) ;
 temp_f = ( temp_C * 9.0 ) / 5.0 + 32.0 ;


// Reading the digital data
 digital_output = digitalRead ( DIGITAL_INPUT ) ;
 Serial.print ( "   Digital value of the module is =  " ) ;
 Serial.println ( digital_output ) , DEC ;     // This will display the digital value on the display
 Serial.print ( " LED is =" ) ;


 if ( digital_output == HIGH )   // The LED will turn on When the sensor value will exceed the set point


 {
   digitalWrite ( LED_PIN, HIGH ) ;
   Serial.print ( "ON " ) ;
 }  else
 {
   digitalWrite ( LED_PIN, LOW ) ;
   Serial.print ( "OFF " ) ;  
 }


// This will print the temperature
 Serial.print ( " Measured Temperature = " ) ;
 Serial.print ( temp_f, 1 ) ;    // This will display the temperature in Fahrenheit
 Serial.print (" F  " ) ;
 Serial.print  (temp_C, 1 ) ;  // This will display the temperature in Celcius
 Serial.println (" C " ) ;
 Serial.println ( ) ;     // Leaving a blank line
 delay ( 1000 ) ;       // Wait for 1 second
}


double Thermistor ( int RawADC ){


 double Temp ;
 Temp = log ( ( ( 10240000 / RawADC ) - 10000 ) ) ;
 Temp = 1 / ( 0.001129148 + ( 0.000234125 * Temp ) + ( 0.0000000876741 * Temp * Temp * Temp ) ) ;
 Temp = Temp - 273.15 ;     // This will Convert Kelvin to Celsius
 return Temp ;


}

Liquid Crystal Display with I2C

The display has an embedded I2C that works to communicate with the Arduino. In order to use this display you need to download an Arduino library.

#include <LCD-I2C.h>
#include <Wire.h>


LCD_I2C lcd(0x27, 16, 2); // Default address of most PCF8574 modules, change according


void setup() {
   // If you are using more I2C devices using the Wire library use lcd.begin(false)
   // this stop the library(LCD-I2C) from calling Wire.begin()
   Wire.begin();
   lcd.begin(&Wire);
   lcd.display();
   lcd.backlight();
}


void loop()
{
   lcd.print("     hello"); // You can make spaces using well... spaces
   lcd.setCursor(5, 1); // Or setting the cursor in the desired position.
   lcd.print("world");


}

FINAL CODE

For our bioreactor we have the two sensors connected to the Arduino. The screen shows us the values ​​obtained by the sensors. First we indicate the temperature (C) and then the solids (ppm). We have configured an LED to turn on when the sensor detects 1100 ppm.

#include <LCD-I2C.h>
#include <Wire.h>
#include "math.h"


LCD_I2C lcd(0x27, 16, 2); // Default address of most PCF8574 modules, change according


#define DIGITAL_INPUT 2                   // defining digital input at pin 3
#define ANALOG_INPUT   A1            // defining analog input at
#define TdsSensorPin A0
#define VREF 5.0              // analog reference voltage(Volt) of the ADC
#define SCOUNT  30            // sum of sample point
#define LED_PIN 13 


int    digital_output ;                          // This will read the digital value
int    analog_output ;                        // This will read the analog value
int    revised_output;                        // variable to store the corrected value
float  temp_C ;                                  // Variable for storing the temperature
float  temp_f ;


int analogBuffer[SCOUNT];     // store the analog value in the array, read from ADC
int analogBufferTemp[SCOUNT];
int analogBufferIndex = 0;
int copyIndex = 0;


float averageVoltage = 0;
float tdsValue = 0;
float temperature = 16;       // current temperature for compensation


// median filtering algorithm
int getMedianNum(int bArray[], int iFilterLen){
 int bTab[iFilterLen];
 for (byte i = 0; i<iFilterLen; i++)
 bTab[i] = bArray[i];
 int i, j, bTemp;
 for (j = 0; j < iFilterLen - 1; j++) {
   for (i = 0; i < iFilterLen - j - 1; i++) {
     if (bTab[i] > bTab[i + 1]) {
       bTemp = bTab[i];
       bTab[i] = bTab[i + 1];
       bTab[i + 1] = bTemp;
     }
   }
 }
 if ((iFilterLen & 1) > 0){
   bTemp = bTab[(iFilterLen - 1) / 2];
 }
 else {
   bTemp = (bTab[iFilterLen / 2] + bTab[iFilterLen / 2 - 1]) / 2;
 }
 return bTemp;
}




void setup() {
   // If you are using more I2C devices using the Wire library use lcd.begin(false)
   // this stop the library(LCD-I2C) from calling Wire.begin()
   Wire.begin();
   lcd.begin(&Wire);
   lcd.display();
   lcd.backlight();                             
   pinMode ( DIGITAL_INPUT, INPUT ) ;                   // declaring pin 3 as input
   pinMode ( ANALOG_INPUT, INPUT )  ;                 // declaring A0 as input pin
   pinMode(TdsSensorPin,INPUT);
   pinMode ( LED_PIN, OUTPUT ) ;
   Serial.begin ( 115200 ) ;                                            // selecting the baud rate at 9600
}


void loop()
{


 lcd.print (temp_C, 1); // You can make spaces using well... spaces
 lcd.print ( "C");
 lcd.print ("----");
 lcd.print (tdsValue,0); // You can make spaces using well... spaces
 lcd.print ("ppm");
 lcd.setCursor(0, 1); // Or setting the cursor in the desired position.


 static unsigned long analogSampleTimepoint = millis();
 if(millis()-analogSampleTimepoint > 40U){     //every 40 milliseconds,read the analog value from the ADC
   analogSampleTimepoint = millis();
   analogBuffer[analogBufferIndex] = analogRead(TdsSensorPin);    //read the analog value and store into the buffer
   analogBufferIndex++;
   if(analogBufferIndex == SCOUNT){
     analogBufferIndex = 0;
   }
 }  
  static unsigned long printTimepoint = millis();
 if(millis()-printTimepoint > 800U){
   printTimepoint = millis();
   for(copyIndex=0; copyIndex<SCOUNT; copyIndex++){
     analogBufferTemp[copyIndex] = analogBuffer[copyIndex];

     // read the analog value more stable by the median filtering algorithm, and convert to voltage value
     averageVoltage = getMedianNum(analogBufferTemp,SCOUNT) * (float)VREF / 1024.0;

     //temperature compensation formula: fFinalResult(25^C) = fFinalResult(current)/(1.0+0.02*(fTP-25.0));
     float compensationCoefficient = 1.0+0.02*(temperature-25.0);
     //temperature compensation
     float compensationVoltage=averageVoltage/compensationCoefficient;

     //convert voltage value to tds value
     tdsValue=(133.42*compensationVoltage*compensationVoltage*compensationVoltage - 255.86*compensationVoltage*compensationVoltage + 857.39*compensationVoltage)*0.5;

     //Serial.print("voltage:");
     //Serial.print(averageVoltage,2);
     //Serial.print("V   ");
     Serial.print("TDS Value:");
     Serial.print(tdsValue,0);
     Serial.println("ppm");


     if (tdsValue>100){
       digitalWrite ( LED_PIN, HIGH);
     } else {
       digitalWrite (LED_PIN, LOW);
     }
   }
 }


 analog_output = analogRead ( ANALOG_INPUT ) ;         // Reading the analog value and storing in analog_output
 Serial.print ( " Analog value of the module is =  " ) ;                                      
 Serial.println ( analog_output ) ,  DEC ;                                    // This will display the analog value


 // The module has thermistor connection reversed
revised_output= map ( analog_output, 0, 1023, 1023, 0 ) ;
 temp_C    = Thermistor ( revised_output ) ;
 temp_f = ( temp_C * 9.0 ) / 5.0 + 32.0 ;


// Reading the digital data
 digital_output = digitalRead ( DIGITAL_INPUT ) ;
 Serial.print ( "   Digital value of the module is =  " ) ;
 Serial.println ( digital_output ) , DEC ;     // This will display the digital value on the display
 Serial.print ( " LED is =" ) ;




// This will print the temperature
 Serial.print ( " Measured Temperature = " ) ;
 Serial.print ( temp_f, 1 ) ;    // This will display the temperature in Fahrenheit
 Serial.print (" F  " ) ;
 Serial.print  (temp_C, 1 ) ;  // This will display the temperature in Celcius
 Serial.println (" C " ) ;
 Serial.println ( ) ;     // Leaving a blank line
 delay ( 1000 ) ;       // Wait for 1 second




}


double Thermistor ( int RawADC ){


 double Temp ;
 Temp = log ( ( ( 10240000 / RawADC ) - 10000 ) ) ;
 Temp = 1 / ( 0.001129148 + ( 0.000234125 * Temp ) + ( 0.0000000876741 * Temp * Temp * Temp ) ) ;
 Temp = Temp - 273.15 ;     // This will Convert Kelvin to Celsius
 return Temp ;




}

FINAL RESULT


final result


Algae bioreactor set up in fabrication lab


Fabrication files

File: LASER CUT STRUCTURE

File: LASER CUT PIECE FOR SENSORS

File_ADAPTATOR_FUNEL-HOSE

File_ADAPTATOR_HOSE-EXTRACTOR

File_ADAPTATOR_LASER HOSE-EXTRACTOR