Skip to content

10. Input devices

Reguirements

Group project

Probe an input device’s analog levels and digital signals

The members of the group:

  • Achille
  • Anssi
  • Jari
  • Hannu

Group assigment in Jari page

Individual project

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

Individual project

In my final project I have used Strain Gauge sensors. But now I want to get to know Ultrasonic Sensor HC-SR04.

I fabricated two PCB versions. Now I use version 2. It very good board also in Embedded programming, Input devices and Output devices weeks. I have documented the work in Embedded programming week.

Research

The sensors are Transducers, a device which send signal to Microcontroller. The sensor are devices which meter some physical phenomenon and send an output signal to Microcontroller. It is possible that a signal have to change with some other device before microcontroller can process a signal. A sensor signal could be analog or binary. A sensor could be also Passive or Active Sensor.

The processed sensor signals

Ultrasonic Sensor

Ultrasonic Sensor measure distance based on ultasonic echo. I used Ultrasonic Sensor HC-SR04 which analog active sensor.

Ultrasonic Sensor HC-SR04.jpg

Ultrasonic Sensor HC-SR04

UltrasonicSensorHC-SR04connetionATtiny1614-01.jpg

Installation and programming

I installed Ultrasonic Sensor HC-SR04 to my Final project PCB (version 2) by using jump wires. This is documented in Embedded programming week - board

I programmed Microcontroller ATtiny1614 in PCB with Arduino programmer. I copy code for Ultrasonic Sensor HC-SR04 from page https://arduinogetstarted.com/tutorials/arduino-ultrasonic-sensor and edited it. This is documented in Embedded programming week - programming

Test

I tested accuracy of Ultrasonic Sensor to set a object differet distances from sensor.

The distance to test object is 15 cm Test-01.jpg

The distance to test object is 10 cm Test-02.jpg

The distance to test object is 5 cm Test-03.jpg

It was surprise for me how accuracy Ultrasonic Sensor HC-SR04 is.

Reflection

I learned a lot of sensor technique as I documented in Research.

Problem and problem-solving

I had some problems in installation. It was litle challenging to install sensor to PCB with jump wires but at last I succeed that.

Hero Video

This video is hero video for weeks: Embedded programming, Output device and Input device

Files

Embedded programming.ino