Skip to content

lecture notes

this weeks lecture

Input devices is all about getting signals into a microcontroller.
Debouncing: there’s an open project to measure bouce behaviour across different buttons and switches find it here.
I2C requires 1K pull-up resistors on both SCL as well as SDA lines.

step response

Step response curves are all about capacitive measurements. You’ll need to charge and then measure.
QTouch and FreeTouch are open source libraries that can be used for touch applications.
Materials are described by their dialectric constant. Humidity and air will change this dialectric constant. So measuring the step response on materials where the dialectric constant is changed, the field changes, so the step response curve changes. Meaning you can measure…
How to measure? Fix the voltage and measure the time or fix the time and measure the voltage. Time to measure could be in order of 10 microseconds. So resolution should be order of microsecond.
LVDT -> linear variable displacement transformer. Fairly expensive.
CVDT -> capacitance variable displacement transformer (named by Neil).
Using capacitive sensing you can create nice input devices! E.g. use CVDT to measure linear displacement to create a smooth slider (video here).
sm
outer shield is connected to ground as to protect the inner wire from any outside interference.
sm
Changing the amount of plastic in the sensor will create different capacitance so you can measure that.
you can use PIO (because it’s fast) to measure step response. In this py code the loop variable defines time to make sure to filter out outside noise (averaging to reduce noise). Smoothing filters (low pass filter) can be used too (made in software). Settle is time used for the physics to let it settle. The code measures both rising as well as falling edge.
When you do step response measurements on high frequencies, you can actually measure chemical compositions. See this application note.

Measuring a small change in a big signal doesn’t really work. A standard way to deal with this (make the big signal smaller) is to use a bridge. Resistors are e.g. 1K. One of them is a variable resistor. When all resistors match, the output is 0. When the variable resistor changes, the output can go all the way up to the max of the ADC. This way you can use the entire ADC range.
sm

If you want to measure a light using a light sensor in an environment that has variable amounts of lights, you can use synchronous detection. You basically modulate the LED light with on/off signal and the light sensor will have that on it’s output as well. Next is to only look at the modulated signal. This way you filter out the environmental light.

Doppler radars measure motion (not distance).
To measure distance, you can use optical (e.g. the VL53L0X). This measurement is done in picoseconds because light travels fast.
You can also use sonar or LIDAR.

In C code if you want to loop but the length of time of the loop should be exactly defined, you can use unrolled loops.

with capaticive sensorce, tou deal with noise using a shield. Use a driven shield is best.
sm
Other way is to make it as a taco. Almost all outsides are now grounded.