Previous Page

Home

Next Page

 

Input Devices

Week 13

 

Assignment :

 

An input device is a (piece of computer hardware equipment) used to provide data and control signals to an information processing system such as a computer or information appliance. There are many input devices such as :

 

Temperature Sensor : A temperature sensor is a thermocouple or RTD, that measures the temperature through an electrical signal. It has three pins : VCC , Output & Ground. 

Temperature Sensor Datasheet

 

Switch : a device for making and breaking the connection in an electric circuit. It's mainly connected to Ground & Microcontroller.

Switch Datasheet

 

Flex sensor : are passive resistive devices that can be used to detect bending. It has 2 pins : Ground & VCC.

Flex Sensor Datasheet

 

Motion sensor : is a device that detects physical movement on a device or within an environment. It's pins are connected with Ground , VCC & Alarm.

Motion Sensor Datasheet

 

Light sensor : A Light Sensor is something that a robot can use to detect the current ambient light level (how dark it is). It has 3 pins VCC , Output & Ground.

Light Sensor Datasheet

 

Sound sensor : is a small board that combines a microphone and some processing circuitry. It has 3 pins : VCC , Ground & analog.

Sound Sensor Datasheet

 


 

What I did :

 

I planned to add a Flex Sensor as an Input. The A flex sensor or bend sensor is a sensor that measures the amount of bending.

Flex Sensor Datasheet

 

Design :

 

 

 

I am using Attiny 45 , I connected in my Flex Sensor to pin PB2 (2).

 

 

 

I designed my board and this is the Schematic view of my Flex Sensor board , which I referred from .

In this design I used 5 Volt IC because I’m using a battery power connection.

 

 

 

Manual rooting is very complicated thats why I used Auto-rooting , there is some limitations in auto-rooting we cannot get our desired design. When I auto root , some traces are too close to each other.

 

I move the traces and make some of the traces wider. And increase some of the traces width. To ease my soldering process which is a nightmare to me.

 

 

 

The above board had many shorts after soldering , I made many mistakes while soldering.

 

 

 

So I milled another board and soldered again and programmed it.


 

Programming :

 

Below is the code I used to program my board.

 

#include<SoftwareSerial.h>

SoftwareSerial mySerial (1,0);

 

int sensorPin = A0; // select the input pin for Flex Sensor

int sensorValue = 4; // variable to store the value coming from the sensor

void setup() {

mySerial.begin(9600); //sets serial port for communication

}

void loop() {

sensorValue = analogRead(sensorPin); // read the value from the sensor

mySerial.println(sensorValue); //prints the values coming from the sensor on the screen

delay(100);

}

 

 

 

 

Schematic File

 

Board File

 

 

Video Link

 

 

Previous Page

Home

Next Page