The Rules of Debugging

As a Farmboy, an Electronics Engineering Technologist and an Electrical Engineer, I’ve been debugging things almost my entire life. It now seems like it is a way of life!

I can recall many times having this internal conversation:

What is wrong with this thing? What’s it supposed to do? Why isn’t it do that now?!

 

I’ve always known there was a thought pattern that I followed instinctually as I troubleshooted whatever I was working on. Whether it was a farm implement, a circuit board or a embedded software program, I followed the same pattern and methods every time. I accredit this process to Dad, to my training in school and to all practical experience troubleshooting busted things I encountered on the farm, in the lab or on the job.

So now, in the spirit of sharing knowledge, here is a list of debugging rules (as compiled by David Agans) that you can follow as you make yourself into a first class troubleshooter.

  1. Understand the system
  2. Make it fail
  3. Quit thinking and loo
  4. Divide and conquer
  5. Change one thing at a time
  6. Keep an audit trail
  7. Check the plug
  8. Get a fresh view
  9. If you didn’t fix it, it ain’t fixed!

 

Everybody likes a good story, right?  I will get to work and put my thoughts and experiences into words and iterate this article in public for you.

In the meantime, check out the debugging war stories that David Carney shared over at the Macroware Technology Blog.

An Altitude & Airspeed Datalogger

A long time ago, in a galaxy far, far away, I created an altitude and airspeed data logger. It was a project that I did for one of my university courses.

At that time, I designed the system around the venerable Motorola HC11 microprocessor. I used their MC68HC11EVBU Universal Evaluation Board. I still have the project all together. This is what it looks like today:

HC11 Altitude and Airspeed Datalogger board

HC11 Airspeed and Altitude Datalogger board

 

Here is a close up of the sensor section:

HC11 Altitude and Airspeed Datalogger board close-up

HC11 Altitude and Airspeed Datalogger board close-up

 

Here is the schematic for the SensorBlock.

Here is the schematic for the MonitorMemory.

And if you are courageous, here is my project report: EE498 Report – An Airspeed and Altitude Data Logger (2014)

Altium PCB Project Templates

I came across a very valuable Altium resource recently and I wanted to share it with you.

Petr Tosovsky put together two sample Altium PCB Project Templates. One is a two layer PCB and the second is a four layer PCB.

 

Here is Petr’s project summary description from his README.txt file:

= Altium PCB Project Template =

PCB Project Template is sample project template for Altium Designer with all necessary settings of source documents and settings of output generation process. It should make starting of a new project easier. Please read Terms of use at the end of this file.
The template was created and is using features of Altium Designer 13.3.
Design rules in this template are set according to Seeed Studio Fusion service, what is international and I think affordable service which I successfully used for my hobby projects. The difference of 2 layer and 4 layer board template is in the PCB file (number of layers, documentation details) and in the setup for generation output files.

 

The awesome thing that Petr has done is he has made his project files freely available. Here are his licensing terms:

= Terms of use =
The template is provided free of charge with no warranty or liability.
Feel free to modify the template by your own needs. I would like to encourage you to share your modifications with others.
Please let me know your feedback on this template. Any comments are welcome. You can contact me via email PetrTos (a) gmail.com .

Petr Tosovsky
2013-07-29
Altium Designer Addons page

 

If you are an Altium user then you are aware that Altium has a huge number of settings and configurations available. You know you will have to setup those config options everytime you start a new project. Well, you can save yourself that hassle by creating  some project templates. Once you put them into the Alitum file system hierarchy then you can start a new PCB project by simply selecting your desired project template. Poof! A miracle will occur and all those pesky config options will be setup automatically.

This is where Petr’s sample projects become super valuable. You can use them as a excellent starting point in creating your own PCB project templates for Altium.

Make sure to check out Petr’s sample Altium PCB project files today.

 

U&I QuickturnPCB

When I looked around for a board house to fabricate the pcb for my SNAPwidget V1, my friend recommended U&I QuickturnPCB.

At first, I was hesitant because South Korea is so far away but then I calmed down and gave them a try.

I submitted my design online via their website

SW-V1-3D-1

and I received a package via FedEx seven days later.

photo 1

They even panelized my design for me. Impressive!

 

Here is the final build results:

SNAPwidget

Expansion board for SNAPwidget V2

Since the SNAPwidget V2 board is looking so good, I thought it should have a mate. So, I made a prototyping board that plugs on to the top of the board.

The holes are 0.100″ spacing and their stride on the board matches the stride of a standard breadboard.

By the way, did you know that the stride of the standard breadboard is based on a 0.300″ pin width of an LS74xx IC?

 

The EXP-SW-V2 looks like this:

EXB-3D-2