Not sure why, but I really like basic things, components, one such part is LED. One of my favorite questions, when I have to check depth of thinking, knowledge, fundamentals of a candidate coming for an interview (electronics engineer) is to ask, how to debug a simple LED blinking circuit.
Question start like this:
You have two circuit boards each having similar components and exactly the same firmware. It’s a blinking (once per second) LED circuit with onboard power supply, Microcontroller (MCU), LED, etc.. One board works fine but, the other board is not working.
LED Blinking Circuit
How do you go about debugging it? I am interested to know the step by step approach you will take, what all tools you will need, what all you will check in the process?
This is also a good exercise for you if you are an embedded engineer and want to learn something new if you are not already aware.
Now, please don’t scroll down yet to see the answer, look at the simple circuit diagram shown above and make a list of potential issues you can think of. You have 10 minutes 🙂
I assume (and trust) you have made your list by now and ready to compare with the list provided below to understand if you have covered everything or not.
So, I will start debugging as mentioned below:
Before you power ON. Use a good quality multimeter and check the following:
- If all components are of desired value?
- If any dry soldering, solder bridges, any potential shorting or open PCB track issues are there?
- If any component is connected in reverse polarity, pin one of Microcontroller is soldered to pin one of the microcontroller PCB pad, etc.?
Consider the circuit flow as Power Supply to Microcontroller to LED. Now check the following points one by one:
1. Check if the power is coming properly to the input connector?
2. If the power supply section is generating the correct voltage or not?
3. Check if the microcontroller is working?
- If the reset circuit is proper, the pin is getting correct voltage level?
- If the oscillator circuit is working or not using oscilloscope?
- If blink pulse on the GPIO is coming or not, you can use a multimeter or logic analyzer or an oscilloscope?
4. If blink pulse is coming and still led is not working? Try checking resistance value, LED got broken or connected reverse. These things should get diagnosed in the previous step where we checked components for the correct value, short, open, reverse polarity.
That’s all. This might look easy w.r.t to this simple circuit but for a complex circuit, debugging could be very challenging, so have patience debugging.
My funny equation for debugging is:
Debugging = ((find problem + find solution) * lot of patience) + fix + verify
Hope, this helped you understand how to go about figuring out the problem looking at part of a circuit one by one.
If you like this article, please share with your friends.
I am working on some more interesting articles, so I encourage you to subscribe to my blog, you will be notified as soon as a new article is published.
Thank you for reading. Happy Learning to you!