- Probe an input device(s)'s analog levels and digital signals.
- Document your work on the group page and reflect what you learned on your individual page.
Individual assignments:
- Measure something: add a sensor to a microcontroller board that you have designed and read it.
Group Assigment
we test a input device's input signals that is analog signals and digital signals.
Click on this button to get it to our Group Assignment Page
Individual Assignment
heroshot
This is my first time i made this type of Design and i love this one with all the design i made in it.
What is Input Devices?
An input device responds to changes in the environment and produces a suitable electrical signal for processing in an electronic circuit. In all input devices, other forms of energy are transformed into electrical energy.
Basically, an input device is any hardware device that sends data to the microcontroller, allowing you to interact with and control the board. The input devices such as keyboard, mouse, sensors which send data to the microcontroller. Sensors are usually refer as input devices. Sensors like phototransistor and photo diode that detects the amount of light, temperature sensors, pressure sensors, humidity sensors, fluid sensors, etc.
An input device reacts to changes in the environment around it and produced a electrical signal for processing to an electronic circuit. It is generally grouped into 2 categories; Active and Passive devices.
Sensors
Sensors are electronic devices that detect physical changes and convert them into electrical signals. It output either analog or digital signals, requiring appropriate interfacing with microcontrollers.
1. Infrared (IR) Sensor
An Infrared (IR) Sensor detects infrared radiation emitted by objects. It is commonly used in remote controls, motion detectors, and temperature sensing. IR sensors work in active (emitting IR light) or passive (detecting heat) modes, depending on the application.
2. Temperature Sensor
A Temperature Sensor measures heat levels in an environment or object. It is widely used in HVAC systems, industrial automation, and medical devices. Common types include thermocouples, RTDs, and semiconductor-based sensors.
3. Humidity Sensor
A Humidity Sensor measures the moisture content in the air. It is widely used in weather monitoring, HVAC systems, and industrial processes to ensure optimal conditions. Typically, these sensors operate on capacitive or resistive principles to provide accurate humidity readings.
4. Gas Sensor
A Gas Sensor detects the presence and concentration of gases in the environment. It is used in industrial safety, air quality monitoring, and leak detection. Common types include electrochemical, infrared, and semiconductor-based sensors for detecting gases like CO₂, CO, and methane.
5. Light Dependent Sensor
A Light Sensor detects ambient light intensity and adjusts brightness accordingly. It is commonly used in smartphones, automatic lighting systems, and cameras. Common types include photodiodes, phototransistors, and LDRs (Light Dependent Resistors).
6. Touch Sensor
A Touch Sensor detects physical contact or pressure on a surface. It is widely used in touchscreens, interactive devices, and industrial controls. Common types include capacitive, resistive, and piezoelectric sensors.
7. Ultrasonic Sensor
An Ultrasonic Sensor measures distance by emitting high-frequency sound waves and analyzing their echo. It is widely used in robotics, obstacle detection, and parking assist systems. It operates effectively in various environments but may struggle with soft or angled surfaces.
8. Accelerometer
An Accelerometer measures acceleration forces, including motion, tilt, and vibration. It is widely used in smartphones, robotics, and automotive applications for orientation detection, step counting, and impact sensing. It operates using MEMS (Micro-Electro-Mechanical Systems) technology to detect changes in velocity.
9. Gyroscope
A Gyroscope measures angular velocity and rotational motion. It is used in navigation, stabilization, and motion tracking applications, such as drones, smartphones, and VR systems. It works by detecting changes in orientation using MEMS or fiber-optic technology.
10. Magnetometer
A Magnetometer measures magnetic fields and is commonly used for navigation, detecting metals, and geophysical surveys. It helps determine direction by sensing Earth’s magnetic field, often integrated into digital compasses and smartphones. It operates using Hall effect or fluxgate technology.
11. Proximity Sensor
A Proximity Sensor detects the presence of objects without physical contact. It is commonly used in smartphones, industrial automation, and vehicle parking systems. It operates using infrared, ultrasonic, capacitive, or inductive sensing technology.
12. PH Sensor
A pH Sensor measures the acidity or alkalinity of a liquid. It is widely used in water quality monitoring, agriculture, and chemical industries. It operates using an electrode that detects hydrogen ion concentration in a solution.
13. RFID Sensor
An RFID Sensor reads and verifies RFID tags using radio frequency signals. It is widely used in access control, inventory management, and contactless payment systems. It operates in low, high, or ultra-high frequency ranges depending on the application.
14. Vibration Sensor
A Vibration Sensor detects mechanical oscillations or movements in machines and structures. It is used in industrial monitoring, earthquake detection, and predictive maintenance. Common types include piezoelectric, MEMS, and accelerometer-based sensors.
15. Current Sensor
A Current Sensor measures electric current flow in a circuit. It is used in power monitoring, battery management, and industrial automation. Common types include Hall effect, shunt resistor, and Rogowski coil sensors.
Line Items
These are the Line Items that i have been used to create these design.
- Seeed studio Xiao ESP32C3 module X 1
- SMD LED (1206) X 3
- SMD resistor 100 ohms (1206) X 3
- Header Pins - 1x3 , 1x4, 1x2
- KY - 004 Tactile switch X 1
Preparaing the Board
I have used KIcad Software to Create adn Develop my PCB Board
I created the Schematic and PCb Design with XIao ESP32C3 Microcontroller for my final Project as Well.
Here is my pcb design of my PCB Board that i created on it.
Here is the 3d Viewer of my design that i made on it.
PCB Production
I have Used FlatCAM software to Convert the gerber files to G-Code on it and here is the Gerber image of it
BY using FlatCAM on it by creating the toolpath for it on it as well as on this.
Here is the final generation of it.
Then i have used Wegstr Software to control our PCB milling Machine to work on it and also uploading it and also on the board designing as well to cut of my Board in it.
Here is the few images of my board production .
this is the board that i have made. and i have checked the board on it by using multimeter for continuity test and solder the components with the board.
Intregration of Sensor with PCB Board that is by using IR Sensor
IR Sensor
An IR (Infrared) sensor detects infrared radiation emitted by objects. It consists of an IR LED that emits infrared light and a photodiode or phototransistor that receives it. IR sensors are commonly used for object detection, proximity sensing, and line following in robots. There are two main types: active (emits and detects IR) and passive (detects only IR from external sources). The sensor’s output changes based on the reflected IR light intensity. It works well for non-contact detection but can be affected by ambient light..
- IR LED (Infrared Light Emitting Diode):
Emits infrared light (typically around 940 nm wavelength). This light is invisible to the human eye but can be reflected by surfaces and detected by receivers.
- Photodiode or Phototransistor (IR Receiver):
Sensitive to infrared light. When it receives reflected IR light, its resistance changes, producing an analog signal. Phototransistors offer amplification and are more sensitive than photodiodes.
- Comparator (e.g., LM393):
Compares the voltage from the photodiode with a reference voltage. It outputs a digital HIGH or LOW signal based on whether the received IR intensity crosses a threshold.
Programming
const int irSensorPin = 10;
const int ledPin1 = 2;
const int ledPin2 = 3;
const int ledPin3 = 4;
int data = 0;
void setup() {
pinMode(irSensorPin, INPUT);
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, LOW);
Serial.begin(9600);
Serial.println("IR Sensor Test Started");
}
void loop() {
int irValue = digitalRead(irSensorPin);
Serial.println(irValue);
if (irValue == LOW) {
data++;
if (data == 1){
digitalWrite(ledPin1, HIGH);
}
if (data == 2){
digitalWrite(ledPin2, HIGH);
}
if (data == 3){
digitalWrite(ledPin3, HIGH);
}
if (data == 4){
digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, LOW);
data = 0;
}
Serial.println("Object Detected!");
delay(500);
}
else {
Serial.println("No Object");
}
}
- I connected the IR sensor analog pin with XIAO ESP32S3 board’s A2 pin, and also connected the 5V and GND with the Microcontroller.
- To check this I connected one LED in the microcontroller, I set the +Ve with D4 and connected the GND in that board.
- Then I set the IR sensor as input and LED as output, and give the serial begin 115200.
- I wrote the code like whenever I keep any object near by IR sensor then the LED will blink, remaining time it only as off condition.