# ¿De dónde viene la sal?

> “Una salina es un lugar donde se deja evaporar agua salada, para dejar solo la sal, poder secarla y recogerla para su venta. Se distinguen dos tipos de salinas, las costeras, situadas en las costas para utilizar el agua de mar, y las de interior, en las que se utilizan manantiales de agua salada debido a que el agua atraviesa depósitos de sal subterráneos.” (Fuente: Wikipedia)
>
> El agua salada es una mezcla homogénea de cloruro de sodio (y otras sales minoritarias) y agua líquida. En las salinas, el agua del mar o de ríos salados es conducida por sucesivas balsas de concentración. Al calentarse con el calor del sol, la cantidad de disolvente disminuye por evaporación y, por tanto, aumenta su concentración salina. Finalmente, en las naves de cristalización se produce la precipitación de la sal. La sal está ya lista para su recolección en unos depósitos, donde termina de secarse antes de su empaquetamiento y distribución.
>
> El proceso de extracción de la sal se inicia a finales de la primavera y las primeras cosechas de sal se obtienen en el mes de junio; durante el otoño y el invierno las salinas permanecen inactivas. En España, la mayoría de las salinas activas se encuentran en Andalucía, las Islas Baleares y Canarias y las comunidades del Mediterráneo, debido a que el proceso de evaporación se ve favorecido por las altas temperaturas.

## Objetivo

Analizar cómo se relaciona la temperatura del agua con la evaporación.

## Descripción

Disponemos de dos recipientes idénticos, ambos con al misma cantidad de agua. Uno de ellos tiene agua caliente y el otro agua fría. Situamos el sensor muy cerca de la superficie (teniendo cuidado de que no se moje) y medimos la humedad en la superficie de cada uno de los recipientes. Comparamos cómo han variado los valores de la humedad relativa en la superficie del agua fría y en la superficie del agua caliente en el mismo intervalo de tiempo.

## Material

**Electrónico**

* [Sensor DHT22](/sensores/sensores/sensor-de-humedad-dht22.md)
* Arduino
* [LCD display](/sensores/salida/pantalla-lcd-i2c.md)
* Fuente de alimentación
* Placa de pruebas, cables...

**No electrónico**

* 2 recipientes iguales
* Agua fría y agua caliente
* Cronómetro

## Programa

#### Un sensor

{% code title="Sensor DHT22 y pantalla LCD" %}

```cpp
/*
This program uses a DHT22 temperature and humidity sensor
and displays the value of the measured relative humidity
both on the serial monitor and on an I2C LCD display.

Connections for the DHT22 sensor:
DAT: digital pin 2 (can be changed)
VCC: 5V or 3V
GND: GND

Connections for the LCD I2C display on a standard Arduino board:
SCL: analog pin 5 (provides a clock signal)
SDA: analog pin 4 (transfer of data)
VCC: 5V
GND: GND
*/

// Library for the DHT22 sensor
#include <SimpleDHT.h>

// Libraries for the LCD I2C display
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

// Humidity sensor is connected to digital pin 2
const int pinDHT22 = 2;

// A SimpleDHT22 object called dht22 is created
SimpleDHT22 dht22;

void setup() {
  // Start serial communication at 9600 bauds
  Serial.begin(9600);

  // Initialize the LCD
  lcd.begin();
}

void loop() {
  // Creating variables to store temperature and humidity
  float temperature = 0;
  float humidity = 0;

  // Reading the sensor
  dht22.read2(pinDHT22, &temperature, &humidity, NULL);
 
  // Showing temperature and humidity on the serial monitor
  Serial.print("Temperatura: ");
  Serial.print(temperature);
  Serial.print(" *C \t");
  Serial.print("Humedad relativa: ");
  Serial.print(humidity);
  Serial.println(" %");

  // Showing humidity on the LCD display
  // First line
  lcd.setCursor(0, 0);
  lcd.print("Humedad:");

  // Second line
  lcd.setCursor(0, 1);
  lcd.print(humidity);
  lcd.print(" %");
 
  // DHT22 sampling rate is 0.5 Hz
  delay(2500);
 
  // Clear the display
  lcd.clear();
}
```

{% endcode %}

#### Dos sensores

{% code title="Dos sensores DHT22 y pantalla LCD" %}

```cpp
/*
This program uses two DHT22 temperature and humidity sensors
and displays the value of the relative humidity on an I2C LCD display.

Connections for the DHT22 sensors:
DAT: digital pins 2 and 3 (can be changed)
VCC: 5V or 3V
GND: GND

Connections for the LCD I2C display on a standard Arduino board:
SCL: analog pin 5 (provides a clock signal)
SDA: analog pin 4 (transfer of data)
VCC: 5V
GND: GND
*/

// Library for the DHT22 sensor
#include <SimpleDHT.h>

// Libraries for the LCD I2C display
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

// Humidity sensors are connected to digital pins 2 an 3
const int pinDHT1 = 2;
const int pinDHT2 = 3;

// Two SimpleDHT22 objects called dht1 and dht2 are created
SimpleDHT22 dht1;
SimpleDHT22 dht2;

void setup() {
  // Start serial communication at 9600 bauds
  Serial.begin(9600);

  // Initialize the LCD
  lcd.begin();
}

void loop() {
  // Creating two variables for each sensor to store temperature and humidity
  float temperature1 = 0;
  float temperature2 = 0;
  float humidity1 = 0;
  float humidity2 = 0;

  // Reading the sensors
  dht1.read2(pinDHT1, &temperature1, &humidity1, NULL);
  dht2.read2(pinDHT2, &temperature2, &humidity2, NULL);
 
  // Showing temperature and humidity on the serial monitor
  // Sensor 1
  Serial.print("Temperatura 1: ");
  Serial.print(temperature1);
  Serial.print(" *C \t");
  Serial.print("Humedad relativa 1: ");
  Serial.print(humidity1);
  Serial.println(" %");
  // Sensor 2
  Serial.print("Temperatura 2: ");
  Serial.print(temperature2);
  Serial.print(" *C \t");
  Serial.print("Humedad relativa 2: ");
  Serial.print(humidity2);
  Serial.println(" %");
  Serial.println("");

  // Showing humidity on the LCD display
  // First line
  lcd.setCursor(0, 0);
  lcd.print("Humedad1: ");
  lcd.print(humidity1);
  lcd.print("%");
  
  // Second line
  lcd.setCursor(0, 1);
  lcd.print("Humedad2: ");
  lcd.print(humidity2);
  lcd.print("%");
 
  // DHT22 sampling rate is 0.5 Hz
  delay(2500);
 
  // Clear the display
  lcd.clear();
}
```

{% endcode %}

## Referencias

{% content-ref url="/pages/-LBp5wxqov7uz7zYfdws" %}
[Sensor DHT22 de humedad y temperatura](/sensores/sensores/sensor-de-humedad-dht22.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LBlKgUP\_88efX3r1j02" %}
[Pantalla LCD I2C](/sensores/salida/pantalla-lcd-i2c.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fisica-arduino.gitbook.io/sensores/proyectos/de-donde-viene-la-sal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
