uController Code Profiler Debugs Your Microcontroller

When working on digital circuits that operate at high frequencies it helps to have some special tools on hand. Things like oscilloscopes and logic analyzers are priceless when something isn’t working right. Another great tool would be this hardware-based profiler that [Mike] came up with while he was working on another project.

The profiler connects to USB and shows up as a serial port. Normally [Mike] used a set of LEDs to get information about how his microcontrollers work, but for this project that wasn’t enough. The uController Code Profiler can provide the main loop running time, time functions and sections of code, keep track of variables, and a few other tasks as well, all with nanosecond resolution.

The source code isn’t provided but a hex file is available, along with a schematic and an include file, if you want to try this one out on your next project. Like this homemade logic analyzer, this could be a powerful tool in your microcontroller arsenal. Simply include the file with various pieces of your code to get it up and running!

Exploding Multimeter Battle Royale

If you check out eBay, Amazon, or the other kinda-shady online retailers out there, you’ll quickly find you can buy a CAT III (600V) rated multimeter for under $50. If you think about it, this is incredible. There’s a lot of engineering that needs to go into a meter that is able to measure junction boxes, and factories in China are pushing these things out for an amazing price.

Over on the EEVBlog, these meters are being pushed to the limits. Last month, [joeqsmith] started a thread testing the theory that these cheap meters can handle extremely high voltages. A proper CAT III test requires a surge of electrons with a 6kV peak and a 2 ohm source. With a bunch of caps, bailing wire, JB Weld and zip ties, anyone can test if these meters are rated at what they say they are. Get a few people on the EEVBlog sending [joeqsmith] some cheapo meters, and you can have some real fun figuring out how these meters stack up.

The real experiments began with [joe smith]’s low energy surge generator, a beast of a machine that can be measured with an even beastlier high voltage scope probe. This is a machine that will send a voltage spike through anything to short out traces on poorly designed multimeters.

How did the cheapo meters fare? Not well, for the most part. There was, however, one exception: the Fluke 101. This is Fluke’s My First Multimeter, stuffed into a pocketable package. This meter is able to survive 12kV pulses when all but two of the other brands of meters would fail at 3kV.

What’s the secret to Fluke’s success? You only need to look at what the Fluke 101 can’t do. Fluke’s budget meter doesn’t measure current. If you ever look inside a meter, you’ll usually find two fuses, one for measuring Amps and the other for all the other functions on the scope. There’s quite a bit of engineering that goes into the current measurement of a meter, and when it goes wrong you have a bomb on your hands. Fluke engineers rather intelligently dropped current measurement from this budget meter, allowing them to save that much on their BOM.

There’s an impressive amount of data collected by [joeqsmith] and the other contributors in this thread, but don’t use this to decide on your next budget meter; This is more of an interesting discovery of how to make a product that meets specs: just cut out what can’t be done with the given budget.

2D Printed Tachometer For A Lathe

If you ever wanted a reason to have DC lighting pointed at the spinny part of your mill and lathe, [Bill] tells a great story. One day, he noticed the teeth on his lathe chuck would change color – red, then blue, then red. His conclusion was the fluorescent lights above his workbench was flashing, as fluorescent lights normally do.

Imagine if the teeth on [Bill]’s chuck weren’t painted. They would appear stationary. That’s usually a bad thing when one of the risks of using a lathe is ‘descalping.’ Buy an LED or incandescent work light for your shop.

This unique effect of blinking lights got [Bill] thinking, though. Could these fluorescent lights be used as a strobe light? Could it measure the RPM of the lathe?

And so began [Bill]’s quest for a 2D printed lathe tachometer. The first attempt was to wrap a piece of paper printed with evenly space numbers around the chuck. This did not work. The flash from his fluorescent bulb was too long, and the numbers were just a blur. He moved on to a maximum-contrast pattern those of us who had a ‘DJ phase’ might recognize immediately.

By printing out a piece of paper with alternating black and white bands, [Bill] was able to read off the RPM of his chuck with ease. That’s after he realized fluorescent lights blink twice per cycle, or 120 times a second. If you have a 3″ mini-lathe, [Bill] put the relevant files up, ready to be taped to a chuck.

Need Timing Diagrams? Try Wavedrom

When working with anything digital, you’re going to end up reading or writing a timing diagram before long. For us, that’s meant keeping (text) notes, drawing something on a napkin, or using a tool like Inkscape. None of these are ideal.

An afternoon’s search for a better tool ended up with Wavedrom.

Just so you know where we’re coming from, here’s our list of desiderata for a timing diagram drawing solution:

  • Diagrams have a text-based representation, so their generation can be easily scripted and the results versioned and tracked throughout project development
  • Command-line rendering of images, because we like to automate everything
  • Looks good
  • Simple to use for common cases, but flexible enough to do some strange stuff when needed
  • Output modifiable when absolutely necessary: SVG would be nice

Basically, what we want is graphviz for timing diagrams.

Wavedrom nails four out of these five at the moment, and has promise to cover all of the bases. Give the online editor demo a try. We found it intuitive enough that we could make simple diagrams without even reading the fine manual. The tutorial has got you covered for more esoteric use cases.

foo

Clearly, some good thought has been put into the waveform description language, WaveJSON; it’s mostly readable and makes the essentials quick and easy. Because you can also enter straight SVG, it leaves the door open for full-fledged lunacy.

Wavedrom is written in JavaScript, and built for embedding in webpages; that’s the way they intend us to use it. On the other hand, if you want to run your own local version of the online editor, you can download it and install it locally if you’d like.

Our only quibble is that the standalone, command-line application wouldn’t generate images without the GUI on our Arch system. (Looks like there are some Google Chrome dependencies?) Otherwise, we think we’ve found our solution.

There are other applications out there. Drawtiming looks good, but we can’t quite get our head around the file format and the graphic output isn’t as flexible as we’d like: it only outputs GIF and we’re more into SVG because it can be edited easily after the fact.

There are font-based solutions that let you “type” the timing diagrams. We found Xwave and “Timing Diagram Font“. These work but aren’t particularly flexible; if you want something to happen at odd times, you’re out of luck. Plus, it just feels like a dirty hack, as if that were a bad thing.

Latex users can use tikz-timing, which makes sketching out your timing diagrams as much fun as laying out a very complex table in Latex (that is: not fun at all). On the other hand, it looks good, is ultimately flexible, outputs PDF, and would be scriptable if someone put the time in to write a nice frontend.

So for the next little while, we’re trying out Wavedrom.

What do you use for making timing diagrams?

Improving Active Loads

[Texane]’s job requires testing a few boards under a set of loads, and although the lab at work has some professional tools for this it seemed like a great opportunity to try out the Re:load 2. It’s a nifty little active load that’s available can of course be improved with an injection of solder and silicon.

While the Re:load 2 is a nice, simple device that can turn up to 12 Watts directly into heat, it’s not programmable. The ability to create and save load profiles would be a handy feature to have, so [Texane] took a Teensy 3.1 microcontroller and installed a resistor divider in front of the Re:load’s amplifier. A simple script running on a computer allows [Texane] to set the amount of current dumped and automate ramps and timers.

There is a more fundamental problem with the Re:load; the lowest possible current that can be dumped into a heat sink is 90mA. [Texane] replace the amplifier with a zero-drift amp that brought that 90mA figure down to 7mA.

Of course the Re:load and Teensy 3.1 are sold in the Hackaday store, but if you’re looking for a ready-built solution for a computer-controlled active load you can always check out the Re:load Pro, a fancy-smanchy model that has an LCD. The Pro costs more, and [Texane] just told you how to get the same features with the less expensive model we’re selling, though…

DIY Car Wheel Bearing Puller

Cars are the greatest. They get you to where you need to go… most of the time. They can also let you down at the worst moment if a critical part fails.  Wheel bearings get a lot of use while we drive and [Dmitriy] found out the hard way how quickly they can fail. Instead of getting cranky about it, he set out to change the damaged bearing himself. In the process he made a pretty neat DIY bearing puller.

Some wheel bearings, on the front of a 2WD truck for example, are only held on by one large nut and easily slide off the spindle. This was not the case for the rear of [Dmitriy’s] AWD Subaru. The rear bearings are press-fit into a bearing housing. These are hard to remove because Outer Diameter of the bearing is actually just slightly larger than the Inner Diameter of the bearing housing. This method of retaining parts together is called an ‘interference fit‘.

BearingPuller2

[Dmitriy’s] gadget uses one of Hackaday’s favorite simple machines, the screw, to slowly force the bearing out of its housing. It works by inserting a threaded rod through the bearing and bearing housing. Each side has a large washer and nut installed as well as a PVC pipe spacer providing support for the threaded rod. As the opposing nuts are tightened, one washer presses against the bearing and the bearing slowly slides out of the housing. Installation of the new bearing is the same except the tool is reversed to press the bushing into the housing.

Continue reading “DIY Car Wheel Bearing Puller”

DIY Super Accessory For Your Dremel

Little jobs require little tools and you can’t get much more littler than a Dremel. For his tiny tasks, [sdudley] has built a Dremel-powered base station that features a table saw, drum sander and router table. Overall, it is about one cubic foot in size and is almost entirely made from ‘1 by’ dimensional lumber. The Dremel power plant was actually used to make the base, specifically slowly removing material at the clamping points that hold the rotary tool secure to the base. The Dremel is held in an upright position and pokes out through the center of the table for both the drum sander and router configurations. To use this as a table saw, the Dremel is mounted almost horizontally on the base. A Mini Saw attachment has to be purchased for the table saw configuration but it does a great job at holding a vertically spinning saw blade.

After the break there’s a nice video of this tool’s use and assembly (it’s even worth watching just for the musical accompaniment that takes you on a wild ride through several genres of music). For those who want to make one for themselves, [sdudley] has made his part templates and assembly guide available in PDF format on his Instructables page. If you’re looking for something a little larger, check out this circular saw converted to a table saw.

Continue reading “DIY Super Accessory For Your Dremel”