Week 10
- lazimshaheel3
- Apr 13, 2022
- 2 min read
In this weeks class we went more in-depth with analog input and output with an introduction to serial output and using a servo motor for the first time.
We started off with a discussion on analog-to-digital converter (ADC, A/D, or A-to-D), which is a system that that converts an analog signal, such as a sound picked up by a microphone or light entering a digital camera, into a digital signal, before we moved on to PWM.
We learn that Pulse Width Modulation is a technique for controlling the average power provided by a digital signal. It involves the transmission of square wave signal of a fixed frequency, but of varying length of wave parts and also PWMs two main components which are frequency (rate at which the switching happens) and duty cycle (the proportion of ‘ON’ time to the entire Period for the signal)
We then performed an experiment with where we test an LED as we turn a potentiometer then proceeding to use serial plotter to observe the chart on our screens

Exercise
• Explain the analog to digital converter (ADC)
It is a system that converts analog signals, such as a sound picked up by a microphone or light entering a digital camera, into a digital signal. An ADC may also provide an isolated measurement such as an electronic device that converts an input analog voltage or current to a digital number representing the magnitude of the voltage or current.
• Which ports in Arduino can be used for ADC?
3, 5, 6, 9, 10, 11 pins are capable of analog output
• How to write to Serial Port in Arduino?
By opening the serial monitor and type something in the field and pressing 'send'
• How a potentiometer works?
A device that provides a varying amount of resistance when its shaft is turned.
We then changed the LED with a servo motor after we calibrated it.
Comments