Rafael Rebolleda — Fab Academy 2020 Documentation

W9: Input Devices

For this assignment I use the Hello Fab Kit board I designed and produced for the Electronics Design assignment, in turn based on the work done in the Electronics Production assignment.

Analog sensor

For this assignment I tried the classic HC-SR04 ultrasound sensor.

It works by sending a sound pulse and listening back for the echo. Then it's a matter of doing the math with the speed of sound.

The one thing I found is that it's a little finicky with voltage, so working on 3.3V produced somewhat inconsistent results, so I ended up powering the sensor independently.

Input devices for the final project

External button

My first approach was to grab one of the push buttons I planned on using for the Final Project's control panel, and quickly test it. It's just basically the same sketch used in Embedded Programming but changing the pin number.

The Control Panel

Like many others, bacause of access and purchasing constraints due to the pandemic, I had to make do with stuff I had laying around to design a control panel for the Final Project's machine.

The control panel contains a number of digital and analog inputs and outputs:

All inputs make use of a resistor to make the reading more stable:

In the following examples I'm using the switches just to toggle an LED:

In this case the potentiometer is controlling the delay between LED flashes

In the next one, I'm using a push button to cycle through the LEDs.

Files