Creating A Bode Analyzer From A Microcontroller

Electrical engineers will recognize the Bode plot as a plot of the frequency response of a system. It displays the frequency on the x-axis and the phase (in degrees) or magnitude (in dB) on the y-axis, making it helpful for understanding a circuit or transfer function in frequency domain analysis.

[Debraj] was able to use a STM32F407 Discovery board to build a Bode analyzer for electronic circuits. The input to the analyzer is a series of sine wave signals with linearly increasing frequency, or chirps, preferably twenty frequencies/decade to keep the frequency range reasonable.

The signals from a DAC are applied to a target filter and the outputs (frequencies obtained) are read back through an ADC. Some calculations on the result reveal how much of the signal is attenuated and its phase, resulting in a Bode plot. The filtering is done through digital signal processing from a microcontroller.

While the signals initially ran through a physical RC-filter, testing the Bode plotter with different circuits made running the signals through a digital filter easier, since it eliminates the need to solder resistors and capacitors onto protoboards. Plotting is done using Python’s matplotlib, with the magnitude and phase of the output determined analytically.

It’s a cool project that highlights some of the capabilities of microcontrollers as a substitute for a pricier vector network analyzer.

Continue reading “Creating A Bode Analyzer From A Microcontroller”

Engineering For The Long Haul, The NASA Way

The popular press was recently abuzz with sad news from the planet Mars: Opportunity, the little rover that could, could do no more. It took an astonishing 15 years for it to give up the ghost, and it took a planet-wide dust storm that blotted out the sun and plunged the rover into apocalyptically dark and cold conditions to finally kill the machine. It lived 37 times longer than its 90-sol design life, producing mountains of data that will take another 15 years or more to fully digest.

Entire careers were unexpectedly built around Opportunity – officially but bloodlessly dubbed “Mars Exploration Rover-B”, or MER-B – as it stubbornly extended its mission and overcame obstacles both figurative and literal. But “Oppy” is far from the only long-duration success that NASA can boast about. Now that Opportunity has sent its last data, it seems only fitting to celebrate the achievement with a look at exactly how machines and missions can survive and thrive so long in the harshest possible conditions.

Continue reading “Engineering For The Long Haul, The NASA Way”

To Make Reproduction Train Whistles, The Old Ways Are Best

Late last year, artist [Steve Messam]’s project “Whistle” involved 16 steam engine whistles around Newcastle that would fire at different parts of the day over three months. The goal of the project was bring back the distinctive sound of the train whistles which used to be fixture of daily life, and to do so as authentically as possible. [Steve] has shared details on the construction and testing of the whistles, which as it turns out was a far more complex task than one might expect. The installation made use of modern technology like Raspberry Pi and cellular data networks, but when it came to manufacturing the whistles themselves the tried and true ways were best: casting in brass before machining on a lathe to finish.

The original whistles are a peek into a different era. The bell type whistle has three major components: a large bell at the top, a cup at the base, and a central column through which steam is piped. These whistles were usually made by apprentices, as they required a range of engineering and manufacturing skills to produce correctly, but were not themselves a critical mechanical component.

In the original whistle shown here, pressurized steam comes out from within the bottom cup and exits through the thin gap (barely visible in the image, it’s very narrow) between the cup and the flat shelf-like section of the central column. That ring-shaped column of air is split by the lip of the bell above it, and the sound is created. When it comes to getting the right performance, everything matters. The pressure of the air, the size of the gap, the sharpness of the bell’s lip, the spacing between the bell and the cup, and the shape of the bell itself all play a role. As a result, while the basic design and operation of the whistles were well-understood, there was a lot of work to be done to reproduce whistles that not only operated reliably in all types of weather using compressed air instead of steam, but did so while still producing an authentic re-creation of the original sound. As [Steve] points out, “with any project that’s not been done before, you really can’t do too much testing.”

Embedded below is one such test. It’s slow-motion footage of what happens when the whistle fires after filling with rainwater. You may want to turn your speakers down for this one: locomotive whistles really were not known for their lack of volume.

Continue reading “To Make Reproduction Train Whistles, The Old Ways Are Best”

Using An FPGA To Navigate China’s Railroads

If you’re headed over to mainland China as a tourist, it’s possible to get to most of the country by rail. China is huge though, about the same size as the United States and more than twice the size of the European Union. Traveling that much area isn’t particularly easy. There are over 300 train terminals in China, and finding the quickest route somewhere is not obvious at all. This is an engineering challenge waiting to be solve, and luckily some of the students at Cornell Engineering have taken a stab at efficiently navigating China’s rail system using an FPGA.

The FPGA runs an algorithm for finding the shortest route between two points, called Dijkstra’s algorithm. With so many nodes this can get cumbersome for a computer to calculate, but the parallel processing of a dedicated FPGA speeds up the process significantly. The FPGA also includes something called a “hard processor system“, or HPS. This is not a soft-core, but dedicated computing hardware in the form of an ARM Cortex-A9. Testing showed that utilizing both the HPS and the FPGA can speed up the computation by up to ten times over a microcontroller alone.

This project goes into extreme detail on the methodology and the background of the math and coding involved, and is definitely worth a read if you’re interested in FPGAs or traveling salesman-esque problems. FPGAs aren’t the only dedicated hardware you can use to solve these kinds of problems though, if you have a big enough backpack while you’re traveling around China you could also use a different kind of computer.

Continue reading “Using An FPGA To Navigate China’s Railroads”

Engineering The Perfect Throw For Rock Skipping

Summer is here (at least in the Northern Hemisphere) and World’s Greatest Uncle [Mark Rober] is at it again with his nieces and nephews. This time he’s all about skipping stones, that shoreline pastime that kids sometimes find frustrating and adults find humiliating when trying to demonstrate the technique.

But what exactly is the proper technique? [Mark] didn’t know, so he built a robot to find out. Yes, we know it’s not a robot – it’s just a commercial clay pigeon launcher with a few modifications — but work with us here. His idea is to build a rig that can eliminate as many variables as possible when a human tries to skip a stone, and work back one variable at a time to find the perfect set of factors. The prototype in the video below did a respectable job skipping stones, but it was nowhere near optimal. [Mark] then engaged the kids on a careful exploration of the mechanics of rock skipping using the rig, eventually going so far as to eliminate variability in the rocks by making clay pigeons of his own. The results are fantastic; at a 20° approach angle and a 20° tilt of the rock relative to the water, those artificial stones just seem to go on forever. Even skipping natural stones was much improved by what they learned, which is completely counter to the age-old advice to release as low and as parallel to the water as possible.

The real gem in this video, though, is [Mark] describing his engineering design process. Watch and learn, because he clearly knows a thing or two about turning ideas into fun stuff, such as enormous Super Soakers, fully automatic snowball guns, and dart-catching dartboards.

Continue reading “Engineering The Perfect Throw For Rock Skipping”

The Engineering Analysis Of Plastic-Dissolving Lubricant

Over the years, E3D has made a name for themselves as a manufacturer of very high-quality hotends for 3D printers and other printer ephemera. One of their more successful products is the Titan Extruder, a compact extruder for 3D printers that is mostly injection-molded plastic. The front piece of the Titan is a block of molded polycarbonate, a plastic that simply shouldn’t fail in its normal application of holding a few gears and bearings together. However, a few months back, reports of cracked polycarbonate started streaming in. This shouldn’t have happened, and necessitated a deep dive into the failure analysis of these extruders. Lucky for us, E3D is very good at doing engineering teardowns. The results of the BearingGate investigation are out, and it’s a lesson we can all learn from.

The first evidence of a problem with the Titan extruders came from users who reported cracking in the polycarbonate case where the bearing sits. The first suspect was incorrectly manufactured polycarbonate, perhaps an extruder that wasn’t purged, or an incorrect resin formulation during manufacturing. A few whacks with a hammer of each production run ruled out that possibility, so suspicion turned to the bearing itself.

After a few tests with various bearings, the culprit was found: in some of the bearings, the lubricant mixed with the polycarbonate to create a plastic-degrading toxic mixture. These results were verified by simply putting a piece of polycarbonate and the lubricant in a plastic bag. This test resulted in some seriously messed up plastic. Only some of the bearings E3D used caused this problem, a lesson for everyone to keep track of your supply chain and keep records of what parts went into products when.

The short-term fix for this problem is to replace the bearing in the Titan with IGUS solid polymer bushings. These bushings don’t need lubricant, and therefore are incapable of killing the polycarbonate shell. There are downsides to this solution, namely that the bushings need to be manufactured, and cause a slight increase in friction reducing the capability of the ‘pancake’ steppers E3D is using with this extruder.

The long-term solution for this problem is to move back to proper bearings, but changing the formulation of the polycarbonate part to something more chemical resistant. E3D settled on a polymer called Tritan from Eastman, a plastic with similar mechanical properties, but one that is much more chemically resistant. This does require a bit more up-front work than machining out a few bearings, but once E3D gets their Tritan parts in production, they will be able to move back to proper bearings with the right lubrication.

While this isn’t a story of exploding smartphones or other disastrous engineering failures, it is a great example of how your entire supply chain goes into making a product, and how one small change can ruin an entire product. This is real engineering right here, and we’re glad E3D finally figured out what was going on with those broken Titan extruders.

Hardware Heroes: Isambard Kingdom Brunel

There are some notable figures in history that you know of for just one single thing. They may have achieved much in their lifetimes or they may have only been famous for Andy Warhol’s fifteen minutes, but through the lens of time we only know them for that single achievement. Then on the other hand there are those historic figures for whom there is such a choice of their achievements that have stood the test of time, that it is difficult to characterize them by a single one.

[Isambard Kingdom Brunel], in front of the launching chains for the Great Eastern. [Public domain]
Isambard Kingdom Brunel, in front of the launching chains for the Great Eastern. [Public domain]
Such is the case of Isambard Kingdom Brunel, the subject of today’s Hardware Heroes piece. Do we remember him for his involvement in the first successful tunnel to pass beneath a river, as a builder of some of the most impressive bridges on the 19th century, the innovator in all aspects of rail engineering, the man behind the first screw-driven ocean-going iron ship, or do we remember him as all of those and more?

It is possible that if you are not British, or in particular you are not from the West of England, this is the first you’ve heard of Brunel. In which case he is best described as a towering figure of many aspects of engineering over the middle years of the 19th century. His influence extended from civil engineering through the then-emerging rail industry, to shipbuilding and more, and his legacy lives on today in that many of his works are still with us.

Engineering: The Family Trade

Brunel’s father, Marc Brunel, was an engineer and refugee from the French Revolution who found success in providing the British Navy with a mass-production system for wooden pulley blocks as used in the rigging of sailing ships. He enters this story for his grand project, the world’s first tunnel to be dug under a navigable river, beneath London’s River Thames from Rotherhithe to Wapping, and for his patented tunneling shield which made it possible to be dug.

Continue reading “Hardware Heroes: Isambard Kingdom Brunel”