Skip to content

13. Input Devices

Objectives

  • Measure something: add a sensor to a micro-controller board that you have designed and read it.

Group Assignment Group Assignment page

  • Probe an input device’s analog levels and digital signals.

The Thirteenth week’s class of my fab academy life took place and the professor Neil class started as usual,this week assignmend as khown as Input Devices

In this week assignment is input device

So I desided to explore a sensor /input device in this week

First I select the rain sensor

Specifications

  • Operating voltage ranges from 3.3 to 5V.

  • The operating current is 15 mA.

  • The sensing pad size is 5cm x 4 cm with a nickel plate on one face.

  • Comparator chip is LM393.

  • Output types are AO (Analog o/p voltage) & DO (Digital switching voltage)

  • The length & width of PCB module 3.2cm x 1.4cm.

The cost of rain sensor is - ₹150/- Purchase link.

I used microcontroller is the same board to make the output week This is the board microcontroller board

Rain sensor connected the microcontroller board The datesheet of the samd2E17A

I Connected the sensor pin in 1 and 24 then add the programming

const int capteur_D = 1;
const int capteur_A = 24;

int val_analogique;

void setup()
{
  pinMode(capteur_D, INPUT);
  pinMode(capteur_A, INPUT);
  Serial.begin(9600);
}

void loop()
{
if(digitalRead(capteur_D) == LOW) 
  {
    Serial.println("Digital value : wet"); 
    delay(10); 
  }
else
  {
    Serial.println("Digital value : dry");
    delay(10); 
  }
val_analogique=analogRead(capteur_A); 
 Serial.print("Analog value : ");
 Serial.println(val_analogique); 
 Serial.println("");
  delay(1000);
}

The board selection is same for the output week

Then upload the programming

This is the result

All Files Download here Download


Last update: July 13, 2022