Understanding Linear Regression

Although [Vitor Fróis] is explaining linear regression because it relates to machine learning, the post and, indeed, the topic have wide applications in many things that we do with electronics and computers. It is one way to use independent variables to predict dependent variables, and, in its simplest form, it is based on nothing more than a straight line.

You might remember from school that a straight line can be described by: y=mx+b. Here, m is the slope of the line and b is the y-intercept. Another way to think about it is that m is how fast the line goes up (or down, if m is negative), and b is where the line “starts” at x=0.

[Vitor] starts out with a great example: home prices (the dependent variable) and area (the independent variable). As you would guess, bigger houses tend to sell for more than smaller houses. But it isn’t an exact formula, because there are a lot of reasons a house might sell for more or less. If you plot it, you don’t get a nice line; you get a cloud of points that sort of group around some imaginary line.

Continue reading “Understanding Linear Regression”

DIY Driving Simulator Pedals

In the driving simulator community, setups can quickly grow ever more complicated and expensive, all in the quest for fidelity. For [CNCDan], rather than buy pedals off the shelf, he opted to build his own.

[Dan] has been using some commercial pedals alongside his own DIY steering wheel and the experience is rather lackluster in comparison. The build starts with some custom brackets. To save on cost, they are flat with tabs to let you know where to bend it in a vise. Additionally, rather than three sets of unique brackets, [Dan] made them all the same to save on cost. The clutch and throttle are a simple hall effect sensor with a spring to provide feedback. However, each bracket provides a set of spring mounting holes to adjust the curve. Change up the angle of the spring and you have a different curve. The brake pedal is different as rather than measure position, it measures force. A load cell is perfect for this. The HX711 load cell sensor board that [Dan] bought was only polling at 10hz. Lifting a pin from ground and bodging it to VDD puts the chip in 80hz, which is much more usable for a driving sim setup.

[Dan] also cleverly uses a 3d printed bushing without any walls as resistance for the pedal. Since the bushing is just the infill, the bushing stiffness is controlled by the infill percentage. Aluminum extrusion forms the base so [Dan] can adjust the exact pedal positions. To finish it off, a bog standard Arduino communicates to the PC as a game controller.

The project is on GitHub. Perhaps the next version will have active feedback, like this DIY pedal setup.

Continue reading “DIY Driving Simulator Pedals”

Edison Phonograph Plays The Cylinders

You might be old enough to remember record platters, but you probably aren’t old enough to remember when records were cylinders. The Edison Blue Amberol records came out in 1912 and were far superior to the earlier wax cylinders. If you had one today, how could you play it? Easy. Just build [Palingenesis’] record player. You can even hear it do its thing in the video below.

The cylinders are made of plaster with a celluloid wrapper tinted with the namesake blue color. They were more durable than the old wax records and could hold well over four minutes of sound.

Continue reading “Edison Phonograph Plays The Cylinders”

Let The Wookie Win With This DIY Holochess Table

If you have seen Star Wars, you know what is being referenced here. Holochess appeared as a diversion built into the Millennium Falcon in the very first movie, way back in 1977. While not quite as iconic a use of simulated holograms as tiny Princess Leia begging for hope, it evidently struck a chord with [Maker Mac70], given the impressive effort he’s evidently gone through to re-create the game table from the film.

The key component of this unit is a plate from Japanese firm ASKA3D that scatters light from displays inside the table in just such a way that the diverging rays are focused at a point above its surface, creating the illusion of an image hovering in space. Or in this case, hovering at the surface of a acrylic chessboard. Granted, this technique only works from one viewing angle, and so is not a perfect recreation of a sci-fi holoprojector. But from the right angle, it looks really good, as you can see in the video below.

There are actually six SPI displays, driven by an Arduino GIGA, positioned and angled to project each character in the game. Placing two of the displays on 3D printed gantries allows them to move, allowing two creatures to battle in the center of the table. As [Maker Mac70] admits, this is quite a bit simpler than the Holochess game seen in the film, but it’s quite impressive for real world hardware.

If this all seems a little bit familiar, we covered an earlier floating display by [Maker Mac70] last year. This works on similar principles, but uses more common components which makes the technique more accessible. If chess isn’t your forte, why not a volumetric display that plays DOOM? If you’re interested in real holograms, not Sci-Fi, our own [Maya Posch] did a deep dive you may find interesting. Continue reading “Let The Wookie Win With This DIY Holochess Table”

The Owon HDS160 Reviewed

These days, if you are in the market for a capable digital voltmeter, you might as well consider getting one with an oscilloscope built-in. One choice is the Owon HDS160, which [Kerry Wong] covers in the video below. The model is very similar to the HDS120, but the multimeter in the HDS160 has more counts–60,000 vs 20,000 as you might expect from the model number.

The internal chip is an HY3131, which is rated at 50,000 counts which is odd since the meter is 60,000 counts, but presumably the meter uses some capability of the chip, possibly putting it out of spec. The oscilloscope is the same between the two models. Almost everything else works the same, other than the capacitance measuring feature, as the video shows.

The difference in cost between the two units isn’t much, so if you are shopping, the small extra cost is probably worth it. Not that a 20,000 count meter isn’t perfectly fine for most normal uses.

[Kerry] really likes scopemeters. He gets excited about bench scopes, too.

Continue reading “The Owon HDS160 Reviewed”

Flow Visualization With Schlieren Photography

The word “Schlieren” is German, and translates roughly to “streaks”. What is streaky photography, and why might you want to use it in a project? And where did this funny term come from?

Think of the heat shimmer you can see on a hot day. From the ideal gas law, we know that hot air is less dense than cold air. Because of that density difference, it has a slightly lower refractive index. A light ray passing through a density gradient faces a gradient of refractive index, so is bent, hence the shimmer. Continue reading “Flow Visualization With Schlieren Photography”

An oscilloscope display is shown, showing two plots. A blue plot is shown at one level, and over multiple exposures at different places, it jumps to a higher level. Another yellow trace is shown which, at some point after the blue trace has jumped to a higher level, also jumps cleanly to a higher level. The yellow line is labeled "CFD output," while the blue line is labeled "leading edge discriminator."

A Constant-Fraction Discriminator For Sub-Nanosecond Timing

Detecting a signal pulse is usually basic electronics, but you start to find more complications when you need to time the signal’s arrival in the picoseconds domain. These include the time-walk effect: if your circuit compares the input with a set threshold, a stronger signal will cross the threshold faster than a weaker signal arriving at the same time, so stronger signals seem to arrive faster. A constant-fraction discriminator solves this by triggering at a constant fraction of the signal pulse, and [Michael Wiebusch] recently presented a hacker-friendly implementation of the design (open-access paper).

A constant-fraction discriminator splits the input signal into two components, inverts one component and attenuates it, and delays the other component by a predetermined amount. The sum of these components always crosses zero at a fixed fraction of the original pulse. Instead of checking for a voltage threshold, the processing circuitry detects this zero-crossing. Unfortunately, these circuits tend to require very fast (read “expensive”) operational amplifiers.

This is where [Michael]’s design shines: it uses only a few cheap integrated circuits and transistors, some resistors and capacitors, a length of coaxial line as a delay, and absolutely no op-amps. This circuit has remarkable precision, with a timing standard deviation of 60 picoseconds. The only downside is that the circuit has to be designed to work with a particular signal pulse length, but the basic design should be widely adaptable for different pulses.

[Michael] designed this circuit for a gamma-ray spectrometer, of which we’ve seen a few examples before. In a spectrometer, the discriminator would process signals from photomultiplier tubes or scintillators, such as we’ve covered before.