Skip to content
Snippets Groups Projects
Commit 06bb0fd8 authored by Charlotte Vandenbulcke's avatar Charlotte Vandenbulcke
Browse files

adding mors content to page week11

parent fb90479a
No related branches found
No related tags found
No related merge requests found
Pipeline #449797 passed
......@@ -247,19 +247,6 @@
<hr>
<section>
<h3>My journey</h3>
<p></p>
<span class="image object">
<img src="../images/...jpg" alt="..." />
</span>
</section>
<hr>
<section>
<h3>Files and resources</h3>
......
......@@ -54,7 +54,7 @@
<section>
<h3>Group Assignment</h3>
<h4>Measuring Ultrasonic Distance Sensor</h4>
<h4>Measuring Ultrasonic Distance Sensor (infos from <a href="https://components101.com/sensors/ultrasonic-sensor-working-pinout-datasheet" target="_blank">Components 101</a>)</h4>
<p>This sensor is a very popular sensor used in many applications where measuring distance or sensing objects are required.</p>
......@@ -80,6 +80,9 @@
<li>Depth of certain places like wells, pits etc can be measured since the waves can penetrate through water</li>
</ul>
<p>Link to our <a href="https://fabacademy.org/2024/labs/fabc/group-assignment/week011/" target="_blank">Group page</a></p>
</section>
<hr>
......@@ -93,12 +96,24 @@
<p>I've tested several input devices with programming codes found on internet to understand how they work and how useful they could be (mostly for my final project).</p>
<h4>Humidity and Temperature Sensor</h4>
<h4>Humidity and Temperature Sensor (infos from <a href="https://tutoduino.fr/en/beginners-corner/temperature-sensor/" target="_blank">Tuto Duino</a>)</h4>
<p>The DHT11 sensor measures temperature and humidity. The use of this type of sensor is interesting for a beginner because it makes it possible to measure a physical quantity accessible to all.</p>
<span class="image object">
<img src="../images/humidity-and-temperature-sensor.jpg" alt="..." />
</span>
<h5>Pinouts</h5>
<p>The DHT11 sensor has 4 pins, but is often sold on a carrier board which has 3 pins. It communicates with the Arduino very simply through one of its digital inputs. The other 2 pins are for its 5V supply and ground (GND).</p>
<span class="image object">
<img src="../images/dht11-pinouts.jpg" alt="..." />
</span>
<h5>Test with the Humidity and Temperature Sensor</h5>
<pre>
<code>
#include < DHT.h>
......@@ -138,7 +153,7 @@
<hr>
<h4>Water Sensor</h4>
<h4>Water Level Sensor</h4>
<span class="image object">
<img src="../images/water-sensor.jpg" alt="..." />
......@@ -184,19 +199,75 @@
<hr>
<h4>Soil Humidity Sensor</h4>
<h4>Soil Moisture Sensor (infos from <a href="https://maker.pro/arduino/projects/arduino-soil-moisture-sensor" target="_blank">Maker Pro</a>)</h4>
<p>The soil moisture sensor consists of two probes that are used to measure the volumetric content of water. The two probes allow the current to pass through the soil, which gives the resistance value to measure the moisture value.</p>
<span class="image object">
<img src="../images/soil-humidity-sensor.jpg" alt="..." />
</span>
<span class="image object">
<img src="../images/moisture-sensor.jpg" alt="..." />
</span>
<p>When there is water, the soil will conduct more electricity, which means that there will be less resistance. Dry soil conducts electricity poorly, so when there is less water, then the soil will conduct less electricity, which means that there will be more resistance.</p>
<p>This sensor can be connected in analog and digital modes. First, we will connect it in analog mode, and then digital.</p>
<h5>Specifications</h5>
<p>The specifications of the FC-28 soil moisture sensor are as follows:</p>
<ul>
<li>Input Voltage: 3.3–5V</li>
<li>Output Voltage: 0–4.2V</li>
<li>Input Current: 35mA</li>
<li>Output Signal: both analog and digital</li>
</ul>
<h5>Pin-out</h5>
<p>The FC-28 soil moisture sensor has four pins:</p>
<ul>
<li>VCC: Power</li>
<li>A0: Analog Output</li>
<li>D0: Digital Output</li>
<li>GND: Ground</li>
</ul>
<span class="image object">
<img src="../images/sensor-moisture-pinout.WebP" alt="...">
</span>
<p>The module also contains a potentiometer, which will set the threshold value. This threshold value will be compared by the LM393 comparator. The output LED will light up and down according to this threshold value.</p>
<h5>Test with the Soil Moisture Sensor</h5>
<span class="image object">
<img src="../images/soil-humidity-sensor-test.jpg" alt="...">
</span>
<pre>
<code>
#define solPin 4 // Sensor conection port
#define ledPin 26 // LED connection port
int sol;
void setup(){
Serial.begin(9600);
pinMode(solPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop(){
Serial.print("sol = ");
Serial.println(digitalRead(solPin)); // show variable
if (digitalRead(solPin) == LOW) { digitalWrite(ledPin, LOW); }
if (digitalRead(solPin) == HIGH) { digitalWrite(ledPin, HIGH); }
delay(1000);
}
</code>
</pre>
......@@ -268,29 +339,53 @@
<hr>
<h4>Hall Magnetic Sensor</h4>
<h4>Hall Magnetic Sensor (infos from <a href="https://techiescience.com/hall-effect-sensor-arduino/" target="_blank">Techiescience</a>)</h4>
<p>The Hall Effect Sensor Arduino is a device that allows you to measure magnetic fields.</p>
<span class="image object">
<img src="../images/hall-magnetic-sensor.jpg" alt="..." />
</span>
<p>The sensor consists of a thin strip of semiconductor material, typically made of gallium arsenide or indium antimonide. This strip is placed in a magnetic field, and when a current flows through it, the Hall effect occurs.</p>
<h5>Pinouts</h5>
<p>The module has 3 output points; Power, Ground, and Signal.</p>
<span class="image object">
<img src="../images/hall-magnetic-Pinout.jpg" alt="..." />
</span>
<h5>Applications</h5>
<ul>
<li>Motor control</li>
<li>Metal detector</li>
<li>Position sensing</li>
<li>Magnetic Code Reading</li>
<li>Current sensing</li>
</ul>
<h5>Test with the Hall Magnetic Sensor</h5>
<pre>
<code>
int Led = 26 ; // claration de la Led en broche 26
int SENSOR = 4 ; // claration du capteur en broche 4
int val ; // Déclaration d'une variable numérique
int Led = 26 ; // Led declaration on pin 26
int SENSOR = 4 ; // Sensor declaration on pin 4
int val ; // Variable number declaration
void setup (){
pinMode (Led, OUTPUT) ; // Définition de la broche Led en tant que sortie
pinMode (SENSOR, INPUT) ; // Définition du capteur en tant qu'entrée.
pinMode (Led, OUTPUT) ; // Define LED as output
pinMode (SENSOR, INPUT) ; // Define Sensor as input
}
void loop (){
val = digitalRead (SENSOR) ; // Lecteur de l'état du capteur
val = digitalRead (SENSOR) ; // Reading sensor status
if (val == LOW) { // Quand le capteur détecte un aimant, la Led 26 s’allume
if (val == LOW) { // When sensor detects a magnet, LED 26 goes on
digitalWrite (Led, HIGH);
}
......@@ -310,9 +405,28 @@
</section>
<br>
<hr>
<br>
<section>
<h3>Files and resources</h3>
<p><strong>My files</strong></p>
<ul>
<li><a href="../files/humidity_and_temperature.ino" target="_blank">Humidity and Temperature Arduino file</a></li>
<li><a href="../files/SoilHumidity.ino" target="_blank">Soil Moisture Arduino file</a></li>
<li><a href="../files/BigSound.ino" target="_blank">Big Sound Arduino file</a></li>
<li><a href="../files/HallMagnetic.ino" target="_blank">Hall Magnetic Arduino file</a></li>
</ul>
<p><strong>Resources</strong></p>
<ul>
<li><a href="https://components101.com/" target="_blank">Components 101 website</a></li>
<li><a href="https://arduinogetstarted.com/" target="_blank">Arduino Get Started website</a></li>
<li><a href="https://maker.pro/" target="_blank">Maker Pro website</a></li>
<li><a href="https://electropeak.com/" target="_blank">Electro Peak ! website</a></li>
<li><a href="https://techiescience.com/" target="_blank">Techiescience website</a></li>
<li><a href="https://fabacademy.org/2024/labs/fabc/" target="_blank">Our group page</a></li>
</ul>
</section>
......
#include <DHT.h>
#define DHTPIN 9
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
float temp;
float hum;
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
hum = dht.readHumidity();
temp = dht.readTemperature();
if (isnan(hum) || isnan(temp)) {
Serial.println("Error reading from DHT sensor!");
return;
}
Serial.print("Humidity: ");
Serial.print(hum);
Serial.print("%\t");
Serial.print("Temperature: ");
Serial.print(temp);
Serial.println(" *C");
delay(2000);
}
\ No newline at end of file
public/images/dht11-pinouts.jpg

22.2 KiB

public/images/hall-magnetic-Pinout.jpg

55.1 KiB

public/images/moisture-sensor.jpg

95.4 KiB

public/images/sensor-moisture-pinout.webp

6.81 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment