
Trim Potentiometer Exercise
1. Learning Outcomes
After completing this Section, you will be able to:
- Understand how to use a trim potentiometer to adjust the threshold at which an LED switches on or off based on the LDR’s measured value.
2. Hardware Set-Up
The exercise involves connecting an LED to a pulse width modulation (PWM) Arduino output pin and controlling the brightness via the readings from the LDR sensor.
Note that while the ACE-Box can be used for all the exercises, it is not required and only the individual components are needed.
Required hardware for this exercise:
- Arduino Uno board (supported by Simulink)
- USB Cable Type A to B
- Breadboard
- LED
- 2 x 220 Ohm resistor
- LDR sensor
- Trim potentiometer
- 8 x male-male breadboard wires
Set-up the hardware as shown and following these steps:
- Place the LED on the breadboard and connect a 220 Ohm resistor to its anode.
- Connect the LED’s cathode to GND, and connect the free end of the resistor to Pin 9.
- Insert the trim potentiometer across the breadboard and connect its outer pins to 5V and GND.
- Connect the potentiometer’s middle pin (wiper) to A0.
- Add the LDR and form a voltage divider by connecting one side to 5V and the other side to a 220 Ohm resistor to GND.
- Connect the junction between the LDR and resistor to A1.
Download Now
Download the PDF version of the exercise
3. Simulink Setup
xxx
Download Now
Download the PDF version of the exercise
Advancing automatic control engineering (ACE) education through global collaboration
Powered By


