Skip to main content

Posts

Showing posts from November, 2017

Oscilloscope assisted debugging

Concept External test equipment is a powerful but often overlooked tool for debugging particular kinds of software problems. In particular, test equipment like oscilloscopes and logic analyzers are well suited to investigating timing related issues on embedded systems. Why is test equipment suited to helping with issues related to timing? Oscilloscopes and logic analyzers can easily provide microsecond or better measurements and, unlike software based monitoring approaches, they aren't affected by other software running on the system. Embedded systems are ideal for this approach as they both provide the io outputs required for timing measurement, and often lack the advanced debugging facilities found in desktop/laptop processors and operating systems that would make this approach less necessary. At the conclusion of  debugging some 1-Wire bus contention issues  I was still seeing CRC errors reported periodically. Here is how I used an oscilloscope to track down the likely c

Bus contention on a 1-wire bus

Background I've been playing around with the Maxim  DS18B20 digital temperature sensor. These are neat devices that provide a digital temperature, which means they provide an actual Celsius reading in digital form, with a pretty high level of accuracy, +/- 0.5C from -10C to 85C. They are also quite compact. Here is the typical TO92-3 form factor that the DS18B20 comes in. Why not a thermistor connected to an ADC? Your microprocessor may not have an accurate enough or linear enough ADC to let you attain the desired temperature accuracy. In my case I'm using the Espressif ESP32 . The ESP32 is a great processor but its ADC still needs some work . Code to linearize the ADC results was added earlier this year but the biggest missing piece is proper calibration of the ADCs vref. Without this the scaling of ADC values can vary by several percent. Good news is that factory calibration is possible and should be coming. Thermistors also have a non-linear resista

Designing and building a workbench

We have a stack of lumber, copper pipe, and trim that has been on the basement floor in our last house and that we moved over to our new house. It's tough to keep the material organized, the pipes, trim and lumber is stacked together and tough to get at. It's not an effective use of floor space and the lumber and pipes are quite long, some of the pieces are 10' long. If I built a 10' long workbench I could store the material below it, either on the floor or shelves, and it would provide space to work on projects and storage space for a chop saw and other tools. I've used Tinkercad to make some 3D mockups for work projects before and it worked pretty well. Tinkercad can be used to create designs for 3D printing but in this case I used it to visualize the workbench and determine how to construct it. 3D model Here is the 3D design that you can view, duplicate, and edit. The dimensions of the lumber in the model should be correct. Note that the scale is