The objective of this week is to know the operation of the different types of input devices.
1. Group Assignment
Probe an input device's analog levels and digital signals
2. Individual Assignment
Measure something: add a sensor to a microcontroller board that you have designed and read it
2.1 What is the microcontroller?
A microcontroller is a compact integrated circuit designed to govern a specific operation in an embedded system. A typical microcontroller includes a processor, memory and input/output (I/O) peripherals on a single chip.Sometimes referred to as an embedded controller or microcontroller unit (MCU), microcontrollers are found in vehicles, robots, office machines, medical devices, mobile radio transceivers, vending machines and home appliances among other devices (MORE ABOUT IT)
2.1.1 ATtiny25 / ATtiny45 / ATtiny85
ATtiny (also known as TinyAVR) are a subfamily of the popular 8-bit AVR microcontrollers, which typically has fewer features, fewer I/O pins, and less memory than other AVR series chips. The first members of this family were release in 1999 by Atmel.Check " Data sheet"
For this assignment we use the Attiny45, circuit developed in week 7, where we add an LED and a button to the Echo Hello-World board and to test it (Blinking - On / Off button)
2.1.2 Bord Design
To test the input sensors, I designed a plate with output pins to use as input or output.
2.1.2 Distance Sensor (Ultrasonic sensor)
The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats or dolphins do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package. From 2cm to 400 cm or 1" to 13 feet. It operation is not affected by sunlight or black material like Sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module".Check " Data sheet"
2.1.4 Motion Sensor (Pyroelectric sensor)
The HC-SR501 Passive Infrared (PIR) Motion Sensorr this motion sensor module uses the LHI778 Passive Infrared Sensor and the BISS0001 IC to control how motion is detected. The module features adjustable sensitivity that allows for a motion detection range from 3 meters to 7 meters.The module also includes time delay adjustments and trigger selection that allow for fine tuning within your application.Check " Data sheet"
2.1.5 Programing the Bord
To program and test the input sensors, i had to download (click here) the files makefile, hex and phyton files; these for each type of sensor.
Once downloaded the files. We enter the terminal and type:
$ sudo make program-usbtiny (Your programmer)
This allows us to record our program in the microcontroller.