Roll Your Own Python Debugger

Debugging might be the one thing that separates “modern” programming from “classic” programming. If you are on an old enough computer — or maybe one that has limited tools like some microcontrollers — debugging is largely an intellectual exercise. Try a program, observe its behavior, and then try again. You can liberally sprinkle print statements around if you have an output device or turn on LEDs or digital outputs if you don’t. But with a debugger, you can get a bird’s-eye view of your program’s data and execution flow.

For some languages, writing a debugger can be hard — you usually use at least some system facility to get started. But as [mostlynerdness] shows, Python’s interpreter wants to help you create your own debugger, and you can follow along to see how it’s done. This is accessible because Python has a built-in debugging core that you can use and extend. Well, regular Python, that is. MicroPython has some low-level support, and while we’ve seen attempts to add more, we haven’t tried it.

Of course, you may never need to build your own debugger — most of the IDEs have already done this for you, and some of the code is, in fact, lifted from an open code base and simplified. However, understanding how the debugging plumbing works may give you a leg up if you need to create custom logic to trap an error that would be difficult to find with a generic debugger. Plus, it is just darn interesting.

Like many Python things, there are some version sensitivities. The post is in four parts, with the last two dealing with newer API changes.

We can’t promise that Python can debug your hardware, though. We always thought the C preprocessor was subject to abuse, but it turns out that Python has the same problem.

Putting 3D Printed Screw Threads To The Test

One of the challenges with 3D printing is seeing how far designs can be pushed before they break. This includes aspects like flexible hinges and structural components, but also smaller details such as screw threads. Often metal inserts with threads are added to FDM 3D prints by melting them into the plastic, but might 3D printed threads be sufficient for many cases?  This is a question which [Adam Harig] sought to investigate in a recent video while working on parts that would connect to a rather expensive camera.

Trusting expensive camera gear to 3D printed threads... (Credit: Adam Harig)
Trusting expensive camera gear to 3D printed threads… (Credit: Adam Harig)

Rather than risking the camera, a few stand-in cubes printed in PLA+ (AnkerMake brand) were used, with these and their internal thread being exposed to destructive testing. For the measuring equipment only a luggage/fishing scale was used. The difference between the test parts was the amount of infill, ranging from 10 to 100% infill, with 0.2 mm layer height. After this the test involved pulling on the metal hook screwed into the plastic test item with the scale, up to the point of failure or the human element giving up.

The results are rather interesting, with the 100% infill version scoring better than than the 50% infill version (the next step down), with [Adam] giving up on trying to pull the test unit apart and with the scale maxed out. This gave him enough confidence to use this design to lift his entire camera off the table. What’s perhaps most interesting here is that the way the test items were printed, the layers experienced a peeling force, which as the final clips in the video show seemed to often result in the bottom layers giving away, which was the part not being held together by the metal screw inside the item. What the effect of dynamic loads are is something that should possibly also be investigated, but it does show that FDM printing screw threads is perhaps not that silly.

(Thanks to [Pidog] for the tip)

Continue reading “Putting 3D Printed Screw Threads To The Test”

Radioactive Water Was Once A (Horrifying) Health Fad

Take a little time to watch the history of Radithor, a presentation by [Adam Blumenberg] into a quack medicine that was exactly what it said on the label: distilled water containing around 2 micrograms of radium in each bottle (yes, that’s a lot.) It’s fascinatingly well-researched, and goes into the technology and societal environment surrounding such a product, which helped play a starring role in the eventual Food, Drug, and Cosmetic Act of 1938. You can watch the whole presentation in the video, embedded below the break. Continue reading “Radioactive Water Was Once A (Horrifying) Health Fad”

Wind Tunnel Uses The Last Straw

If you watch the movies, there isn’t much to a wind tunnel. Just a fan and a tunnel, right? The truth is there’s a lot more to it than that, and [ejs13] shows you how you can make a small tunnel with some basic supplies. One of the requirements for a useful tunnel is to have laminar flow — that is, flow in uniform layers with little, if any, mixing. This tunnel achieves laminar flow using an array of soda straws to direct the flow. In fact, there are 150 straws in total. You can see a short clip of the wind tunnel in action below.

The rest of the parts are easy, too. A computer fan provides wind, and there’s a little bit of wood and acrylic. You’ll notice in the video that you can easily see the airflow. That’s thanks to a light source, some water, and a bit of dry ice.

Continue reading “Wind Tunnel Uses The Last Straw”

Solder Two Boards At Once With This Dual Reflow Plate

Homebrew reflow projects generally follow a pretty simple formula: find a thrift shop toaster oven or hot plate, add a microcontroller and a means to turn the heating element on and off, and close the loop with a thermistor. Add a little code and you’re melting solder paste. Sometimes, though, a ground-up design works better, like this scalable reflow plate with all the bells and whistles.

Now, we don’t mean to hate on the many great reflow projects we’ve seen, of course. But [Michael Benn]’s build is pretty slick. The business end uses 400-watt positive temperature coefficient (PTC) heating elements from Amazon controlled by solid-state relays, although we have to note that we couldn’t find the equivalent parts on the Amazon US site, so that might be a problem. [Michael] also included mechanical temperature cutoffs for each plate, an essential safety feature in case of thermal runaway. The plates are mounted at the top of a 3D-printed case, which also has an angled enclosure for a two-color OLED display and a rotary encoder.

The software runs on an ESP32 and supports multiple temperature profiles for different solder pastes. The software also supports different profiles on the two plates, and even allows for physical expansion to a maximum of four heating plates, or even just a single plate if that’s what you need. The video below shows it going through its paces along with the final results. There’s also a video showing the internals if that’s more your style

We appreciate the fit and finish here, as well as the attention to safety. Can’t find those heating elements for your build? You might have to lose your appetite for waffles.

Continue reading “Solder Two Boards At Once With This Dual Reflow Plate”

OpenMV Promises “Flyby” Imaging Of Components For Pick And Place Project

[iforce2d] has an interesting video exploring whether the OpenMV H7 board is viable as a flyby camera for pick and place, able to quickly snap a shot of a moving part instead of requiring the part to be held still in front of the camera. The answer seems to be yes!

The OpenMV camera module does capture, blob detection, LCD output, and more.

The H7 is OpenMV‘s most recent device, and it supports a variety of useful add-ons such as a global shutter camera sensor, which [iforce2d] is using here. OpenMV has some absolutely fantastic hardware, and is able to snap the image, do blob detection (and other image processing), display on a small LCD, and send all the relevant data over the UART as well as accept commands on what to look for, all in one neat package.

It used to be that global shutter cameras were pretty specialized pieces of equipment, but they’re much more common now. There’s even a Raspberry Pi global shutter camera module, and it’s just so much nicer for machine vision applications.

Watch the test setup as [iforce2d] demonstrates and explains an early proof of concept. The metal fixture on the motor swings over the camera’s lens with a ring light for even illumination, and despite the moving object, the H7 gets an awfully nice image. Check it out in the video, embedded below.

Continue reading “OpenMV Promises “Flyby” Imaging Of Components For Pick And Place Project”

Hands On With Boondock Echo

Perhaps no words fill me with more dread than, “I hear there’s something going around.” In my experience, you hear this when some nasty bug has worked its way into the community and people start getting whatever it is. I’m always on my guard when I hear about something like this, especially when it’s something really unpleasant like norovirus. Forewarned is forearmed, after all.

Since I work from home and rarely get out, one of the principal ways I keep apprised of what’s going on with public health in my community is by listening to my scanner radio. I have the local fire rescue frequencies programmed in, and if “there’s something going around,” I usually find out about it there first; after a half-dozen or so calls for people complaining of nausea and vomiting, you get the idea it’s best to hunker down for a while.

I manage to stay reasonably well-informed in this way, but it’s not like I can listen to my scanner every minute of the day. That’s why I was really excited when my friend Mark Hughes started a project he called Boondock Echo, which aims to change the two-way radio communications user experience by enabling internet-backed recording and playback. It sounded like the perfect system for me — something that would let my scanner work for me, instead of the other way around. And so when Mark asked me to participate in the beta test, I jumped at the chance.

Continue reading “Hands On With Boondock Echo”