Week THIRTEEN : Input Devices

Assignment :

Measure something: add a sensor to a microcontroller board that you have designed and read it.

There are many input devices such as:
Temperature sensor : Thermistors are thermally sensitive resistors whose prime function is to exhibit a large, predictable and precise change in electrical resistance when subjected to a corresponding change in body temperature.

Flex sensor : is a sensor that measures the amount of deflection or bending. Usually, the sensor is stuck to the surface, and resistance of sensor element is varied by bending the surface.

And a lot more like switch, motion sensor , sound sensor, light, sensor, magnetic field , motion sensor.




I choose Passive infrared sensor or (PIS) which is : is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. They are most often used in PIR-based motion detectors.

What I did :



Trying to connect pis sensor to a microcontroller board as shown in the picture below :



Design

I am using Attiny 45 and my servo motor is connected to PB3 pin
.
.

.
.

Design

This is my Schematic design in eagle :
.
.

.
.
and this is the board design :
.
.

.
.

soldring the board

Since I am using connection pis that needs drilling holes in the board the bottom layer copper will short circuit them so I had to remove it using electric grinder
.

.

Then I soldered the pins, checked the shorts and everything is good
.

.

.

Programming :

I used this code to program the board to move the servomotor :



This is the output when the sensor detect somthing:


This is the output when nothing is detected:

Download Files :

Download brd file here


Download sch file here


Previous Page Home Next Page