How to debug electronic circuits?

Not sure why, but I really like the basic stuff, the components, one of which is the LED. I believe that many MCU interviewers will ask many questions when checking the depth of thinking and basic knowledge of interview candidates (electronic engineers). One of the more common questions is how to debug a faulty circuit (eg: how to debug a simple LED flashing circuit).

Here's a question that an interviewer asked me when I was looking for a job years ago, and it went something like this:

There are two boards, each with similar components and the exact same firmware. This is a blinking (once per second) LED circuit with onboard power, microcontroller (MCU), LEDs, etc. One board LED blinks fine, but the other board LED does not light up.

LED blinking circuit

How do you go about debugging it? I'd love to know the approach you're going to take, what tools are you going to need, what are you going to check along the way?

If you're an embedded engineer, and if you don't already have experience with debugging in this area, this is also a good exercise for you.

Now, take a look at the simple circuit diagram shown above and list any potential problems you can think of.

I assume (and believe) that you have now made a list of faults that you think are causing the LEDs not to light up, and can compare with the list provided to see if our thinking is the same.

Now, we start debugging, as described below:

before booting. Use a good multimeter and check the following:

1. Check the resistance, voltage, etc. of some components against a good circuit board

a). Check whether all components are normal

b). Are there any problems such as virtual soldering of components, continuous soldering, or PCB short circuit or open circuit?

c). Whether the polarized components are soldered to the circuit in reverse polarity

2. Think of the circuit flow as the power supply from the microcontroller to the LEDs. Now check the following points one by one:

a). Check whether the power supply of the input connector is normal?

b). Does the power supply section produce the correct voltage?

3. Check whether the microcontroller is working?

a.) If the reset circuit is correct, are the voltage levels on the pins correct?

b.) Is the oscillator circuit working and is there a waveform output?

c.) Use a multimeter or oscilloscope to detect flicker pulses on the GPIO?

4. If the detection GPIO in the previous step has a flashing pulse, the LED still does not work? Then check the resistance value to see if the LED is broken or reversed.

Above, we check the correct value of components, short circuit, open circuit, reverse polarity installation, etc. in turn.

That's it, for this simple circuit, it may seem easy, but for complex circuits it can be very challenging to debug, so please be patient.

The debugging process is summarized as:

debug = ((problem found + solution found) * patience) + fix + verify

Hope, this can help you understand how to solve the problem, look at the parts of the circuit one by one, you may have heard a sentence, no matter how complex things are composed of basic components, the same is true for circuits, if you master the basic units, you can also do complex circuits. Quickly simplify and analyze according to the method of debugging basic components.

If you like my articles, follow me and you will be notified when new articles are published.

Thanks for reading!

 

Guess you like

Origin blog.csdn.net/m0_67034740/article/details/124097252