Home
Assignments
About me
Final project
WEEK 11 - INPUT DEVICES

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

The week's assignment, asks the manufacture of a plate with sensor circuits using the ATTINY 45, to measure physical quantities using predesigned PCB’S for light, temperature, sound, etc.

It was decided to develop the temperature sensor as it is what will be used for the project.

Initially, it has to develop the plate using a milling present in the laboratory

After that, it began to weld all components carefully because it is a bit difficult to realize.

After the elaboration of the circuit board temperature sensor, will step to the programming of ATtiny 45, which demanded a preliminary investigation into the management of the program.

For programming we started with Linux and the following files are downloaded:

- hello.temp.45.c
- makefile
- hello.temp.45.py

It has been created shortcuts on the desktop to easily locate them.

The Ubuntu terminal has been opened to begin programming.

First, it enters to the command "cd escritorio" to place the files that are located on the desktop.

Then the “makelife” file is used and this prompts the file to generate another file called hello.temp.45.hex which is used to program the ATtiny45 with the following command:

- sudo make -f hello.temp.45.make program- avrisp2 (using the AVR)
- sudo make -f hello.temp.45.make program-usbtiny (using the ISP)

At the end of programming of ATTINY 45 , hello.temp.45.py file was tested in PYTHON using the following command.

- python hello.temp.45.py /dev/ttyUSB0

PROBLEMS AND SOLUTIONS:

I had problems in the design of the circuit in the joined tracks, which generated short circuit

It was Obtained Problems When welding electronic components

The solution is the test of continuity in electronic tracks so they do not result in error

Datasheet:

THE MICROCONTROLLER:

Ruterar the track by hand

Pin Configurations:

Pin Descriptions

1.1.1 VCC

Supply voltage.

1.1.2 GND

Ground.

1.1.3 Port B (PB5:PB0)

Port B is a 6-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port B also serves the functions of various special features of the ATtiny45

1.1.4 RESET

Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running and provided the reset pin has not been disabled The reset pin can also be used as a (weak) I/O pin.

Block Diagram:
THERMISTORS – NTC:

Click here to download the files