10. Input Devices¶
Group assignment¶
- Probe an input device(s)’s analog levels and digital signals
- Document your work on the group work page and reflect on your individual page what you learned
PWM as an Analog Sine Wave.¶
As an experiment on the oscilloscope we made a Simple Program using CHATGPT to get a PWM sine-wave. The schematic is very simple:
Xiao RP2040 Pin D0 --> Oscilloscope Probe CH2 --> 1k Resistor --> Oscilloscope Probe CH1 --> 105nF Capacitor --> RP2040 GND
This allows us to measure the PWM output before and after running through the resistor for smoothing.
We played around with the autoset, Manual adjustment, Comparisons and display modes.
Here’s the board setup:
And here’s the measurements we got.
First is the standalone sine wave:
And the comparison of smoothed with the resistor and unsmoothed:
Here’s a video playing around with the settings on the Oscilloscope:
Analysing signal from trigger eco pin on ultrasonic sensor¶
Here ia a video showing how we analysed signal from ultrasonic sensor echo/trigger pin, on this video we can see that the puls from the signal gets longer when distance measured gets longer. and shorter if distance measured get shorter.
Measuring varying voltage¶
The Quick Charge board made for Albert’s final project contains a potentiometer. With an appropriate Quick Charge power source, the voltage can be varied, going up to 20V. In the project, the desired output is 12V. With a multimeter, we can measure the voltage varied by adjusting the potentiometer.
In the following video, the potentiometer is being adjusted with a small screw driver. The voltage is being adjusted up and down.
Varying voltage measured with multimeter