1 of 17

Lecture 8 – Hardware Debugging

ENGR029

Spring 2024

Prof. Maggie Delano

2 of 17

Agenda

  • Hardware Debugging Tools
  • Hardware exercises in the lab (and work on lab 2)

3 of 17

Hardware Debugging Tools

  1. Two main categories: static (power off) and dynamic (power on)
  2. Examples of static debugging:
    1. Reviewing datasheets
    2. Checking a circuit node by node and chips pin by pin
    3. Checking your math
    4. Confirming resistor values w/ multimeter
  3. Examples of dynamic debugging:
    • Test a circuit modularly (one function at a time)
    • Move through the signal chain from beginning to end
    • Use an oscilloscope and/or multimeter
    • Use a function generator in place of your input signal

4 of 17

Tools

  • Your eyes
  • Your hands
  • Resistor guide
  • Multimeter
  • Oscilloscope
  • Signal generator

5 of 17

Multimeter

Voltage**

Resistance

Current**

Short/diode

Temp.*

Battery

Voltage is measured in:

__________________

Current is measured in:

__________________

* Different probes needed

** Probes change configuration depending on what you are measuring

6 of 17

7 of 17

Oscilloscope

Trigger level

Trigger level

Time / division

(Horizontal zoom)

Volts / division

(vertical zoom)

Cursors and

measurement

Probes

Menu

knob

Pause

8 of 17

Oscilloscope Modes

  • Coupling modes
    • DC (Signal + Offset)
    • AC (Only Signal)
    • Ground
  • Impedance
    • 1 M (high Z, used with scope probes)
    • 50 Ohm (use to measure w/ 50 Ohm probe)
  • Further reading

9 of 17

Oscilloscope Probes

  • The oscilloscope probe involves a connection to the measured signal and ground
  • The probe is placed in parallel with the measured signal
  • What is better, a higher impedance probe or a lower impedance probe?

Probe tip

1MΩ

1MΩ

5V

Probe ground

????

10 of 17

Oscilloscope Uses

  • Oscilloscopes are very useful for tracking signals over time
  • Use them to step through key nodes in your circuit: compare what you see from the oscilloscope with what you expect to see.
    • If you don’t know, spend some time reviewing the circuit, and if you’re still stuck, talk to Prof. Delano about it.
  • If you don’t see what expect to see, that’s an area to pay closer attention to.
  • Start testing with something you know the value of, e.g. 5V supply, to confirm your setup works
  • When possible, work your way forward through signal chain; if something is messed up early, it impacts everything else down the chain!

11 of 17

Function generator

  • Used to generate a known voltage waveform to test circuits
    • Square wave, triangle wave, sine wave
  • Main parameters: frequency, amplitude, offset
  • Connect BNC probe; red end is signal, black end gets connected to ground

12 of 17

(Arbitrary) Function generator (AFG)

  • Two options for function generators in the lab: protoboards (left) or some scopes (right)

Turn on AFG, configure, then plug into “AFG out” on back w/ BNC cable

Configure w/ knobs, use 22 gage wire to connect a signal to right 3 pins, be sure ground is also connected

13 of 17

AFG Limitations

  • AFGs output what is known as a “single ended” signal; this is fine for most applications, but we can’t just connect the red end to the positive input on the IA and the black input to the negative side
  • Instead, we can test the IA by connecting the negative input to 2.5 V and the positive input to our signal generator

14 of 17

Debugging Exercise 1

  • Practice setting up the function generator; configure it for a 1 kHz, 1 Vpp sine wave. Check your results using an oscilloscope.

15 of 17

Debugging Exercise 2

  • Set the function generator to 1 Hz, 50 mVpp. Check your results using an oscilloscope.
  • What is a good value for the time scale (horizontal axis) for this signal?
  • What about the signal (vertical axis)?

16 of 17

Debugging Exercise 3

  • Set up the INA114 as shown below. Confirm you can measure a 1 Hz sine wave at the output of the INA114.
  • What are the appropriate horizontal and vertical axes used to check the output?
  • Feel free to use this 1 Hz sine wave and oscilloscope settings as you test the rest of your circuit.

INA114

GND

Vref = 2.5V

RG

5V

2.5V

AFG �(red)

Output

When I tested this setup, I found a gain to be about half of the expected gain; this is likely due to us grounding one input and is not an issue for the lab.

17 of 17

Debugging Exercise 3

Chip: LM324

C1 = 0.001 uF

C2 = 1 uF

C3 = 1 uF

R1 = 3.6 MΩ

R2 = 1 kΩ

R3 = 1 kΩ

R4 = 1 kΩ

R5 = 2 kΩ

R6 = 2 kΩ

square wave generator

Sallen-Key Low Pass Filter

Ignore the pin numbers; check the LM324 datasheet as we are using a different op amp