Skip to content

Input Devices

"Memorable quote"

Global notes

On Pins Controllers have pins. Each pin is actually a little machine. You have to tell it if it is listening, or talking.

Analog compartors:

ADC. Analogue to digital converter.

Serial - there a various ways to listen to ports. Your timing/clock is important; you need to set a right clockrate. If you get garbage, you need to look at an oscilloscope or something, to look at the timing.

InPut Devices

  • Switch
  • you can push them or switch them
  • you can read in the serial what happens.
  • the button is input, you set another pin as the output.
  • The signal of a button starts and ends with a little gitter.
  • you have to do some debouncing; read it a little after it is pushed.

Neil has a few examples online, some use arduino libraries, some not. The ones without look more complex but are also neater in a way.

I can use the ones that are made for the SamD

  • Motion
  • You can use pyroelectric, but beter use radar
  • Doppler radar detects movement (great for my hallway life)
  • we can use the little program Neil made for the on/off interfaces on your screen

  • distance

  • sonar
  • optical time of flight: puts out a light pulse and measures the return
    • lidar is similiar: but adds scanning.
    • maybe us e a breakout board: it is really hard to handle.
    • there is an open library on github
    • mounting can be done by reflowing.

location - there are crazy small parts that will always tell you where a thing exactly is. This scream to be build into a bike... - they also do time really well -

Magnetic fields - measure to see if something is open or close...? - you can read something many times and takes the avarage. This can improve your signal to noise ratio.

Temperature - NTC -> if you go up in temp - RTD -> if you go down in temp - to use these, you need a bridge with resitors; that you can measure a small change in a big system. - Infrared: you can measure everything, or in smaller portions for more precise measurements.

Light - You can use LED also as light sensing devices. As a sensor. But you can better use phototransisters. - LDRs are obsolete. - synchronus detection is pretty nifty: how to rule out room light.

Acceleration, orientation, rotation - you might need to reflow with hot air as many of these small components have their legs under them. (see image) - these are hard to solder; you could use a breakout board to make it easier. - fun, but for what...?

sound - MEMS, for digital sound recording we use I2S; a substantial protocol - SamD has an hardware I2S interface

step response - neils favorite - it is arts and crafts: you basically measure changes to the electric magnetic field. This opens a world of possibilities - there is a key trick: you charge up, you charge down and you send both. And then you measure the difference between the up and the down. - this compensates for noise in the measurement

image processing - esp32 cam; neil showing the webserver. - the esp32 can do that for you; it is non-trivial, but all the code is there. Just have a look - openCV is an open library to do image recognition. -

Inspirations from around the world

Lecture


http://fabacademy.org/2021/labs/sedi/students/gustavo-salcedo/Week10.html