Input Devices

Throughout this week we will work with input devices, in my case I will use a water level sensor, I chose this specific sensor as it is one that I will use for my final project. The purpose of this sensor is that when it reaches a certain water limit, it sends a signal, in this case that an LED is lit.

This week’s group assignment is as follows: Probe an input device(s)'s analog levels and digital signals and document your work on the group work page and reflect on your individual page what you learned.

Group assignment week 11

Moreover, the individual allocation is as follows: Measure something: add a sensor to a microcontroller board that you have designed and read it.

what is an input device?

An input device is any hardware component that allows users to input data into a computer system. These devices are used to enter information or commands for processing by the computer. Common examples of input devices include keyboards, mice, touchscreens, trackpads, scanners, digital cameras, microphones, and joysticks. Each input device serves a specific purpose and enables users to interact with the computer in various ways.

In addition to the aforementioned input devices, sensors are another type of input device that detect and convert physical or chemical phenomena into electrical or digital signals that a computer can understand and process. In the context of a water level sensor, this device is used to measure and monitor the water level in a tank, reservoir, or any other container. It provides information about whether the water level is above or below a certain threshold, which can be useful in applications such as flood control, monitoring water resources, or automating irrigation systems.

PCB design

As with the other assignments that include electronics, I will use Kicad to design my board. The design of this new board is quite simple and the components are few. These are the components I’m going to be using in this mapping.

Components

Qty
Component
1 Led
1 Resistor 220K
1 Water level sensor
3 Pin

Note: This board is going to be connected to the board I made in my Week 8

Knowing already the components that I will be using for this assignment, I will make based on this the circuit schematic design and later the PCB design. This is the design I’ll be using.

Here you can download the file
Here you can download the file

Board cutting

This time I couldn’t use the Roland SRM 20 for time, so I had to use the Lunyee

LUNYEE 3018 PRO

  • Operational Travels in X, Y, and Z: 300 mm (X) × 180 mm (Y) × 80 mm (Z)
  • Loadable Workpiece Weight: [Data not provided]
  • Operation Speed: 2000 mm/min
  • Software Resolution: 0.025 mm/step
  • Mechanical Resolution: 0.025 mm/step
  • Spindle Rotation Speed: 12000 RPM
  • Interface: USB
  • Operational Noise: [Data not provided]
  • External Dimensions: 7.09"W x 11.81"H
  • Weight: 11 kg

Before I start cutting I need to put the file in . SVG so I can put it in Modsproject. Being a different milling machine than the one I have used during past assignments the modules are different. Below I will show the modules that change and the values that have to be assigned.

Traces

1.- File in .SVG

2.- SET PCB DEFAULTS (10 mill)

3.- MILL RASTER 2D

Here you can download the file

Cut

1.- File in .SVG

2.- SET PCB DEFAULTS (10 mill)

3.- MILL RASTER 2D

Here you can download the file

Tools

Cut and traces tools

This is the milling machine working

Soldering

Having already cut the board, it is time to solder the components to the board, being a small board the number of components were not many. For this reason, this step was faster. This is the final result of mi soldering.

Programming

Here you can download the file

This code utilizes a water sensor connected to an analog pin (A1) of Arduino. A LED is connected to pin 13 of Arduino. The sensor reading is stored in the variable waterSensor, and it's printed on the serial monitor for debugging purposes.

In the main loop loop(), the sensor value is continuously read. If the read value indicates no water detected, the LED is turned on. If water is detected, the LED is turned off. After each loop iteration, there's a delay of 1 second before reading the sensor again.

Problems

Problem
Solution
Not being able to use the Roland SRM-20 and had to learn to use another milling machine for the first time. Ask a consultant for help and learn how to use the milling machine that was available.
During board traces the tool destroyed a track. Reduce the number of passes with the help of Modsproject and thus prevent it from destroying another track.
Delay in arrival of original water sensor. Use another water sensor similar to the other to avoid changing the board.