Input Devices

Introduction:

In this week we are required to add one or more sensor to our microcontroller board that we designed and read it. I am going to use the potentiometer for this week as it will be part of my final project.

Group Assignment

The link if the group assignment can be found here

What is Input Device?

An input device is a piece of hardware used to provide data to a computer used for interaction and control. It allows input of raw data to the computer for processing.

potentiometer
Designing the final project board

I will use atmega328 which is similar to Arduino Uno board but the difference between them is that The Arduino is a complete system (Hardware with supporting components), and software. The atmega 328 is a Microprocessor that needs external components, and a programmer to operate. I’m going the explain the steps that I did in order to design the atmega328:

  1. I opened the atmega board that neil designed and then I opened eagle and add all the components that neil added then I think of what should I add more for my final project so what I added is listed below:

I had to search on the internet on which pins should I add to my final project board to able to connect the potentiometer, I2C LCD, SSR and NTC sensor. below is the list of what I added on my board.

To connect the LCD with my board I added Analog Pin 4 & Analog Pin 5, GND and VCC.

To connect the SSR with my board I added a Analog Pin, GND & VCC

To connect the SSR with my board I added a digital pin and GND.

To connect the NTC sensor with my board I added a Analog pin, GND, VCC and resistor.

  1. This this how the schematic board look likes after adding all the components:

  1. Then I had to move to the layout page which was the hardest part and the part that takes days from me. This is how the layout looks like :

  1. Then instead of using fabmodulus or Mods our instructor explain for us a new software which is easier and take less time and effort than fabmodulus. This software called flatCAM.

  2. To move the file to flatCAM I clicked on Manufacturing tool >> CAM to open the cam processor, generate and export the Gerber files.

  1. Then I moved to flatCAM and open the Gerber files ( the traces and the outline ) and the Excellon files (for the drill parts) as shown below:

  1. Then I opened my colleague Maha page and follow the same steps.

  2. I used the Roland SRM-20 CNC machine for milling the board, but modified the setup in the software to accommodate the file extension I am using.

  3. for the milling process I repeated the same steps that I did during the electronic production week

Soldering

.

.

Problem I faced
Potentiometer

As I mentioned in the above paragraph I wasn’t able to use the serial monitor with my board so I used Arduino Uno. I connected the potentiometer to the Arduino Uno as shown in the below picture.

.

There are three terminals. the first one is connected to the Ground (GND). The second one is connected to the Analog Pin(3). The last one is connected to the VCC Pin (5V).

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 3:
  int sensorValue = analogRead(A3);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1000);        // delay in between reads for stability
}

I’m going to use the potentiometer to change the temperature of the heater on my final project.

Reference

    Input device

    Potentiometer