DEBUGGING TECHNIQUES. Wiring Type of wire to use Solid core for breadboard Multiple-strand for flying leads and connections to power supply unit (PSU)

Slides:



Advertisements
Similar presentations
Amplifying Signals Breadboarding: from a diagram to an actual working amplifier.
Advertisements

Electrical team Arduino tutorial I BY: JOSHUA arduini
AnaSonde Assembly. What is the AnaSonde? *Reads temperature, pressure, and humidity data from the atmosphere *After it is sent into the atmosphere, it.
CricketSat Assembly.
Microprocessor Motor Control Spring Introduction  Stamp projects Robots  Sensors  Motor control  Logic Rocketry  Reading acceleration (“g”
Resistor Circuit Symbol
Breadboarding and Electronic Components. What is a Breadboard? Sometimes called a proto-board Reusable platform for temporarily built electronic circuits.
What have we learned so far?  When we apply a voltage, the capacitor will charge up to the applied voltage.  The capacitor charges up exponentially.
MOOD LIGHT PCB ASSEMBLY V By Phil Townshend 2008.
CSC 405 Lab 1 - Building a Simple Combinatorial Circuit In this laboratory exercise you will learn about the layout of some small-scale integrated circuits.
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
Electronic Design Project and Skills 2
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications.
Investigating Basic Circuits Pre-Activity Discussion
Final Presentation EE 296 – Micromouse Spring 2007 Friday, May 4, 2007 POST 214.
Design a Voltmeter Experiment 19. Goal Design a circuit that displays the value of unknown voltage between certain voltage ranges. – The unknown voltage.
Embedded Programming and Robotics Lesson 1 Basic Electricity and Electronics Transistor Basics Lesson 1 -- Basic Electricity1.
Chapter 1 Quick review over Electronics and Electric Components Prepared By : Elec Solv.
OBJECTIVES 1. Create correctly sized connectivity cabling.
Pulse Width Modulation (PWM) LED Dimmer Circuit
Experiment 3 Ohm’s Law.  The goals of Experiment 3 are:  To identify resistors based upon their color code.  To construct a two-resistor circuit using.
Experiment 1 Breadboard Basics
LSU 11/01/2004System Testing and Debugging1 Programming Unit, Lecture 7.
SpectraSonde Assembly. What is the SpectraSonde? Reads temperature, pressure, and humidity data from the atmosphere. The SpectraSonde doesn’t fly like.
An Inverting Amplifier. Op Amp Equivalent Circuit The differential voltage v d = v 2 – v 1 A is the open-loop voltage gain v2v2 v1v1 An op amp can be.
CricketSat Construction. Parts List Monday June14, 2013CricketSat Assembly2.
1 DC ELECTRICAL CIRCUITS ELECTRONIC TRAINER AND BREADBOARDING.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
The printed circuit board (PCB) design
Lab #5 Overview Activity #1 - Simulation of an Op-Amp inverting amplifier Activity #2 - Build and Test the Op-Amp inverting amplifier Activity #3 - Determining.
Viking Pump Flow Manager - Phase 2 Senior Design May
 Four Components of a circuit  Power supply  Conductor  Load device  Controlling device  Power Supply  Generator  Line source (wall outlet)  Transformer.
Digital LAB Lab 2. 2 The 555 timer is an 8-Pin D.I.L. Integrated Circuit or ‘chip’ What it looks like Notch Pin 1.
ENGR 6806 – Motor Control Prepared By: Rob Collett September 15, Office: EN2074.
Week 11 Design a Photoflash Charging Circuit. New Experiment Not in the lab manual. It is posted on the course Scholar site.
Stephen Joo and Daniel Kattan April 16, 2010 ECE 002, Group 8.
Mini Sumo Electronics Tutorial F09. outLINE Board Overview Components and Soldering Testing and Debugging General Advice.
The Breadboard The Breadboard Digital Electronics TM
I.C. ENGINES Practical No: 1 (17 Mar, 2014). Measurement of Cylinder Pressure If your vehicle has been running roughly or losing power, there may be a.
First, let’s review the structure and use of a breadboard.
Lab 10 Experiment 21 Design a Traffic Arrow. Just so it is clear This is it. – Last official experiment for the semester. It is your option as to whether.
Circuits Lab Introduction
Electronic Circuit Diagrams
Experiment 21 Design a Traffic Arrow.
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
CSC522 Embedded Systems Introduction to Circuit Design.
Two basic types Ceramic disk Electrolytic Has positive and negative sides Farads – unit of measure (F) Microfarads(uF) and picofarads (pF) Cans have value.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Basic Stamp OEM module By Wilmer Arellano. 2  The BASIC Stamp 2 OEM is a discreet component version of the BS2 which may be purchased in kit form. 
MSP 430 Microprocessor Project
The Basics Electronics. To familiarise yourself with electronics To have an understanding of how and why we test electronic circuits. To complete a test.
Interactive Breadboard Spring 2013 Group 21 - Simon Huynh, Norman Lee, Harrison Hilgers TA Dennis Yuan, Professor Carney.
Continuity tester a handy tool for testing circuits
The Breadboard The Breadboard Digital Electronics TM
Purpose of This Minilab
Microcontrollers, Basics Tips and Tricks with PIC MCUs
Microcontroller basics
Breadboarding and Electronic Components
Introduction to Handshaking Communication with SSC-32U
Introduction to Handshaking Communication with SSC-32
The Breadboard The Breadboard Digital Electronics TM
Circuits Lab Introduction
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Process of Debugging a Circuit
Basic Electronics Part Two: Electronic Components.
Breadboarding and Electronic Components
The Breadboard The Breadboard Digital Electronics TM
NAND/NOR Logic Gate Replacement Training tool
2019 Investing Now Summer Program
Presentation transcript:

DEBUGGING TECHNIQUES

Wiring Type of wire to use Solid core for breadboard Multiple-strand for flying leads and connections to power supply unit (PSU) Be consistent with colour coding of wires, especially power supply signal to differentiate different levels. Suggested colours of red for +5V and orange for +3V Being consistent as is easier to help debug each other’s circuits and reduces the chance of accidentally applying wrong voltages. Be consistent with colour coding signal for scope channels as we easily confuse the written colours with the channel colour. This helps when looking at the images collected from the scope later. Known the Stroop effect

Circuits Know what the expected voltages are at intermediate points in the circuit. This is what circuit simulation and hand calculations provide you. Begin with simple measurements. Is there power to all of the components in the circuit? Are all of your grounds connected to one another? Start at the very beginning of the circuit. Does the input signal exist? Move from one circuit to the next to make sure that the data flow is correct. Where possible, disconnect subcircuits and inject known input signals in and measure output. For example, disconnect the amplifier from the optical sensor and make sure that the amplifier works properly with a known input signal. This is why we breadboard a circuit before soldering the components on to a PCB. Feel (carefully) if the major components in the subcircuit are hot, but not too hot. Record your measurements! Other members of your team may want to look at them – Use their help.

mbed Electrical Make sure that the voltage supplied to power the mbed is the correct voltage, particularly when the other components in the circuit are consuming power. Voltage droop Suggestion: Connect the mbed into the pulse meter circuit after you have determined that all of the other subcircuits work properly. There are few replacement mbed available and none are free!

mbed Software Be neat and structured Split the code into small understandable sections Comments need to be accurate Ideally, there is a comment with every line of code to explain what that line does. Industry standard is that a software engineer writes about 10 lines of good code per day. Naming variables, functions, and subroutines be consistent There are some cases where a decision may be made whether hardware or software should be used to perform certain functions. Identifying the blocks of code that act like a hardware block allows others to insert or remove the software. Debugging Without a Debugger Toggle a pin and note whether there was a reaction to an input – switch between features or modes on a serial port Save old versions of your code Have a naming convention that allows you to determine which code is the latest one. Other suggestions on debugging are posted at

Debugging on a PCB Put test points at appropriate places on the PCB Test points are places where there is an a pin (or an exposed metal run, but this is not really good practice) at an input or output terminal of a component so that you can measure the voltage at these points. Test points can also be used to inject known input signals into subcircuits when disconnected from the rest of the circuit. Construct circuit on PCB in blocks Build the subcircuit that caused the most problems on the breadboard first. Characterise it with a known signal injected at a test point and power supplied to the ICs. Once it is working, continuing building the rest of the circuit. Stop to verify that the subsequent blocks function properly.

Header pins

Use IC sockets Only solder an IC directly on to your PCB if: You are exceptional at soldering and won’t overheat the component accidently solder two pins together solder the part in backwards and will never damage the part while testing the circuit. Otherwise, use an IC socket

IC socket for mbed Two female header strips 1x20 You will have to layout the holes for the header strips correctly so that the two rows of pins on the mbed line up with the two header strips. You will also have to solder the two header strips in well so that they are perpendicular to the PCB and will not flex when the mbed is pushed in place. 1x10 female header strip as an example

Label Component Locations Use your PCB as more than a way to run metal wires from one component to another. Put your names on it. Label the locations of the components With the full name of the component if possible or a code that you give to the component. Number the holes for pins or location of notch to remember how the IC and electrolytic capacitors should be placed on the board l

If you are frustrated STOP!!! Bad things happen to good circuits when the person debugging is ticked off. Same is true if you are rushing because you have other things that you must do Friday evening tend to be poor time to debug circuits if your friends are waiting for you somewhere else. Don’t wait until the end of the semester to get this project done, time pressures make for bad decision making and major errors. Also, you and your teammates will not get a good grade as there will be due dates for sections of the project throughout the semester. Debug with someone else on your team. Discussing what is observed can help you both think through the problem and find a solution.

This is a team project Figure out how to keep your teammates informed about the status of the project. It is a waste of time if you debug the software, find the errors, and fix it and then a teammate repeats the same process using the original code. Store the components, breadboards, PCBs, and software in places where the other team members can access them. It is not an acceptable excuse to say that your teammate took the circuit home over the weekend to show the parents and then forgot to bring it back to school. When there is a problem and/or a solution, everyone on the team should be aware of it. There should be note of this in the minutes from team meetings recorded by the scribe (stapled in each lab notebook) or a hand written note/copy of an in each team member’s lab notebook.