One Small Step: All About Stepper Motors

The primary feature of stepper motors is listed right within their name: their ability to ‘step’ forwards and backwards, something which they (ideally) can do perfectly in sync with the input provided to their distinct coils. It’s a feature that allows the connected controller to know the exact position of the stepper motor, without the need for any sensor to provide feedback after a movement, saving a lot of hardware and effort in the process.

Naturally, this is the optimal case, and there are a wide number of different stepper motor configurations in terms of coil count,  types of rotors and internal wiring of the coils, as well as complications such as skipped steps due to mechanical or driver issues. Despite this, in general stepper motors are quite reliable, and extremely versatile. As a result they can be found just about anywhere where accurate, step-based movement is desirable, such as (3D) printers and robotics.

For each application the right type of stepper motor and driving circuit has to be determined, of course, as they also have many reasons why you’d not want to use them, or just a particular type. When diving into a new stepper motor-based project, exactly what are the considerations to pay attention to?

Continue reading “One Small Step: All About Stepper Motors”

Reverse-Engineering The Polynomial Constants In The Pentium’s FPU

Die photo of the Intel Pentium processor with the floating point constant ROM highlighted in red. (Credit: Ken Shirriff)
Die photo of the Intel Pentium processor with the floating point constant ROM highlighted in red. (Credit: Ken Shirriff)

Released in 1993, Intel’s Pentium processor was a marvel of technological progress. Its floating point unit (FPU) was a big improvement over its predecessors that still used the venerable CORDIC algorithm. In a recent blog post [Ken Shirriff] takes an up-close look at the FPU and associated ROMs in the Pentium die that enable its use of polynomials. Even with 3.1 million transistors, the Pentium die is still on a large enough process node that it can be readily analyzed with an optical microscope.

In the blog post, [Ken] shows how you can see the constants in each ROM section, with each bit set as either a transistor (‘1’) or no transistor (‘0’), making read-out very easy. The example looks at the constant of pi, which the Pentium’s FPU has stored as a version with no fewer than 67 significand bits along with its exponent.

Continue reading “Reverse-Engineering The Polynomial Constants In The Pentium’s FPU”

How Crane Games Are Playing Claw Games With The Player

Fresh from AliExpress, [Big Clive] got another fascinating item to tear down: a crane claw, as used in those all too familiar carnival games. These games feature a claw the player moves into position above a pile of toys or other items. Lower the claw gently down in the hopes that it grabs the target item. In a perfect world, the claw will move your prize and deposit it, via a chute, into your waiting hands. Of course, everyone knows that these games are rigged and rely less on skill or luck than the way that they are programmed, but the way that this works is quite subtle, as you can see in the video below.

Despite how complex these crane claws may appear, they are simply solenoids, with the metal rod inside providing the claw action. The weight of the rod and claw section opens the claw via gravity. The strength of the claw is thus fully dependent on how strongly the solenoid is being driven, which, as [Clive] demonstrates, depends on the voltage and the duty cycle. At only 12V, the target plushie will easily slip away again as the claw barely has any strength, while at 24V, it’s pretty solid.

Continue reading “How Crane Games Are Playing Claw Games With The Player”

Programming Ada: Atomics And Other Low-Level Details

Especially within the world of multi-threaded programming does atomic access become a crucial topic, as multiple execution contexts may seek to access the same memory locations at the same time. Yet the exact meaning of the word ‘atomic’ is also essential here, as there is in fact not just a single meaning of the word within the world of computer science. One type of atomic access refers merely to whether a single value can be written or read atomically (e.g. reading or writing a 32-bit integer on a 32-bit system versus a 16-bit system), whereas atomic operations are a whole other kettle of atomic fish.

Until quite recently very few programming languages offered direct support for the latter, whereas the former has been generally something that either Just Worked™ if you know the platform you are on, or could often be checked fairly trivially using the programming language’s platform support headers. For C and C++ atomic operations didn’t become supported by the language itself until C11 and C++11 respectively, previously requiring built-in functions provided by the toolchain (e.g. GCC intrinsics).

In the case of Ada there has been a reluctance among the language designers to add support for atomic operations to the language, with the (GNU) toolchain offering the same intrinsics as a fallback. With the Ada 2022 standard there is now direct support in the System.Atomic_Operations library, however.

Continue reading “Programming Ada: Atomics And Other Low-Level Details”

Creating Temporal Light Reflections With Metamaterials

Owing to the wave nature of light there are many ways that such different waves can interact with each other, but also with materials. Everyone knows about reflecting light with a mirror, which is a property of materials like metals, but specific structures can cause the light to behave in a way that creates rather amazing results.

Examples of this are cases of iridescence in nature (like butterfly wings) and eye color, where the perceived colors are the result of environmental light interacting with these structures rather than pigmentation or dyes. An even more interesting interaction has now been demonstrated by reflecting multiple microwave radiation beams off each other, creating a time reflection.

The study by [Emanuele Galiffi] et al. (shared copy) was published in Nature Physics. By creating a metamaterial that allows for temporal coherent wave control (CWC) the electromagnetic radiation was controlled to where it allowed for this kind of unusual interaction. The key here being that there is no major constructive or destructive interaction between the two waves as with spatial CWC, rather the wave reflect off each other, or more specifically the time interface.

Although the popular reporting talks about ‘turning back time’ and ‘watching the back of your own head in a mirror’, the impact is far less dramatic: in the article conclusion the researchers mention unveiling new light-matter interactions in the microwave- and other parts of the spectrum, as well as new ways to control and shape light.


Top image: Temporal coherent wave control and photonic collisions enabled by time-interfaces. (Credit: Emanuele Galiffi et al., Nature Physics, 2023)

Repairing A BPS-305 30V Bench Power Supply

When [Tahmid Mahbub] recently reached for his ‘Lavolta’ BPS-305 bench supply, he was dismayed to find that despite it being a 30V, 5A-rated unit, the supply refused to output more than 15V. To be fair, he wasn’t sure that he had ever tried to push it beyond 15V in the years that he had owned it, but it had better live up to its specs. Ergo out came the screwdriver to open the power supply to see what had broken, and hopefully to fix it.

After some more probing around, he discovered that the unit had many more issues, including a highly unstable output voltage and output current measurement was completely wrong. Fortunately this bench power supply turns out to be very much like any number of similar 30V, 5A units, with repair videos and schematics available.

While [Tahmid] doesn’t detail his troubleshooting process, he does mention the culprits: two broken potentiometers (VR104 and VR102). VR104 is a 5 kOhm pot in the output voltage feedback circuit and VR102 (500 Ohm) sets the maximum output current. With no 500 Ohm pot at hand, a 5 kOhm one was combined with a 470 Ohm resistor to still allow for trimming. Also adjusted were the voltage and current trimpots for the front display as they were quite a bit off. Following some testing on the reassembled unit, this power supply is now back in service, for the cost of two potentiometers and a bit of time.

Experimental setup and measured optical depth. (Credit: Josiah Sinclair et al,, PRX Quantum, 2022)

Quantum Mechanics And Negative Time With Photon-Atom Interactions

Within our comfortable world of causality we expect that reactions always follow an action and not vice versa. This why the recent chatter in the media about researchers having discovered ‘negative time’ with photons being emitted before the sample being hit by source photons created such a stir. Did these researchers truly just crack our fundamental concepts of (quantum) physics wide open? As it turns out, not really.

Much of the confusion stems from the fact that photons aren’t little marbles that bounce around the place, but are an expression of (electromagnetic) energy. This means that their resulting interaction with matter (i.e. groupings of atoms) is significantly more complicated, often resulting in the photonic energy getting absorbed by an atom, boosting the energy state of its electron(s) before possibly being re-emitted as the excited electrons decay into a lower orbit.

This dwell time before re-emission is what is confusing to many, as in our classical understanding we’d expect this to be a very deterministic process, while in a quantum world it most decidedly is not.

Continue reading “Quantum Mechanics And Negative Time With Photon-Atom Interactions”