Week 10. Output devices¶

Group Assignment¶
The goal of this group assignment was to measure the power consumption of an output device and understand its importance in real-world applications. Since my final project involves the use of 12V LED strips, we decided to use it as a practical example and investigate how much LED strip length I can safely use in my project.
For this, we performed current measurements, analyzed the operational and thermal limitations of the MOSFET, and considered real-world conditions that could affect the system’s performance, such as ambient temperature, PCB heating, and thermal losses during long-term operation. Based on the collected data, we calculated the safe operating limits and the maximum LED strip length that can work reliably and stably in my project.
This assignment helped me better understand that when designing an electronic system, it is not enough to ensure that the circuit simply works correctly. It is equally important to understand how much current the system consumes, how the components operate within their limits, and how heat can affect the overall system performance. Studying the behavior of the MOSFET was especially useful, as I realized that the maximum values listed in a datasheet do not always reflect real operating conditions.
Through this experience, I gained a clearer understanding of the safe limits for using a 12V LED strip in my final project and how to design the system so that it can operate reliably, safely, and over the long term without overheating or risk of damage. You can read more in detail at the link below.
Individual Assignment¶
Individual Assignment¶
This week, I also had to repair and re-mill my board because I encountered several issues during testing. I am referring to the PCB that I designed and fabricated during Week 8’s Electronics Production assignment, where I documented its full design and fabrication process in detail. During testing, I discovered that the voltage regulator on the previous board had been damaged and stopped working. In addition, due to power overload, the power connector had detached from the board along with its copper traces. After re-milling the board, I also realized that I had accidentally placed the power connector in the wrong orientation during the PCB design process, which turned out to be a design mistake that was only discovered after the board had already been fabricated.
However, these issues did not stop me, and I continued the process by soldering all my components onto the board and continuing with testing and development.

As part of this week’s individual assignment, I connected a short 12V LED strip to my custom board as an output device and integrated the photoresistor sensor that I had developed in previous weeks. My goal was to test how the input from the light sensor could be used to automatically control the LED strip.
The program continuously reads the values from the photoresistor and compares them with a predefined threshold value. When the ambient light level decreases and the measured value falls below the threshold, the 12V LED strip is switched on through the MOSFET. When the light level increases again, the LED strip is automatically turned off.
const int ldrPin = A0;
const int ledStripPin = D0;
int threshold = 500;
void setup() {
pinMode(ledStripPin, OUTPUT);
Serial.begin(115200);
}
void loop() {
int lightValue = analogRead(ldrPin);
Serial.print("Light value: ");
Serial.println(lightValue);
if (lightValue < threshold) {
digitalWrite(ledStripPin, HIGH);
}
else {
digitalWrite(ledStripPin, LOW);
}
delay(100);
}

After uploading the code and testing the system, it operated as expected. The photoresistor successfully responded to changes in ambient light, while the microcontroller controlled the LED strip through the MOSFET. When the sensor was covered or placed in a darker environment, the LED strip turned on automatically. When exposed to brighter light, it turned off again.
The final system successfully demonstrated the interaction between an input device (photoresistor) and an output device (12V LED strip). The board was able to read sensor data, process it, and safely control a higher-power output device through the MOSFET.
Conclusion¶
In this assignment, I successfully tested the output functionality of my board by controlling a 12V LED strip using a photoresistor sensor. The system responded correctly to changes in ambient light and automatically switched the LED strip on and off. This process also helped me improve my PCB design, troubleshooting, and hardware testing skills, which will be valuable for the development of my final project.