Vista Normal

Hay nuevos artículos disponibles. Pincha para refrescar la página.
Hoy — 25 Diciembre 2024Salida Principal

Pi’s Evil Twin Goes for Infinity

25 Diciembre 2024 at 03:00

Most people know about the numerical constant pi (or π, if you prefer). But did you know that pi has an evil twin represented by the symbol ϖ? As [John Carlos Baez] explains, it and its related functions are related to the lemniscate as pi relates to circles. What’s a lemniscate? That’s the proper name for the infinity sign (∞).

[John] shows how many of the same formulas for pi also work for the lemniscate constant (the name for ϖ). Some  (as John calls them) “mutant” trig functions use the pi-like constant.

Mathematically, a circle is a point (the center) with a curve that describes x2+y2=r2. The lemniscate is a particular instance of a Cassini oval where r2=cos2θ. We all know the circumference of a circle—basically, the perimeter—is 2π; the perimeter of the lemniscate is 2ϖ.

Why does any of this matter? Well, [John] shows how it connects to elliptic curves and the Gauss constant.

Like pi, the lemniscate constant probably never ends, but it is roughly 2.622057. Will this be useful in your next project? Probably not. Will it help you win some bar bets? Maybe.

Then again, if you are bored calculating more digits of pi, here’s something new to try. Not that you need that many digits.

Ayer — 24 Diciembre 2024Salida Principal

Calling Pink Floyd

24 Diciembre 2024 at 09:00

[Corelatus] said recently that “someone” asked them to identify the phone signals in the 1982 film The Wall, based on the Pink Floyd song of the same name. We suspect that, like us, that someone might have been more just the hacker part of the brain asserting itself. Regardless, the detective work is fascinating, and you can learn a lot of gory details about phone network in-band signaling from the post.

The analysis is a bit more difficult because of the year the film was made. At that time, different countries used slightly different tone signaling standards. So after generating a spectrogram, the job was to match the tones with known standards to see which one best fit the data.

The signal was not common DTMF, as you might have guessed. Instead, it was a standard known as SS5. In addition to the tones being correct, the audio clip seemed to obey the SS5 protocol. SS5 was the technology attacked by the infamous blue box back when hacking often meant phone phreaking.

The same phone call appears on the album, and others have analyzed it with some even deeper detective work. For example, the call was made in 1979 from a recording studio by [James Guthrie], who called his own phone in the UK, where his next-door neighbor had instructions to hang up on the operator repeatedly.

If you want to see and hear the entire clip (which has several phone-related audio bits in it), watch the video below. The sequence of SS5 tones occurs at 3:13.

Usually, when we hear tones in music, we think of Morse code. As for phone phreaking, we hear it’s moved to street kiosks.

AnteayerSalida Principal

Faster Integer Division with Floating Point

23 Diciembre 2024 at 06:00

Multiplication on a common microcontroller is easy. But division is much more difficult. Even with hardware assistance, a 32-bit division on a modern 64-bit x86 CPU can run between 9 and 15 cycles. Doing array processing with SIMD (single instruction multiple data)  instructions like AVX or NEON often don’t offer division at all (although the RISC-V vector extensions do). However, many processors support floating point division. Does it make sense to use floating point division to replace simpler division? According to [Wojciech Mula] in a recent post, the answer is yes.

The plan is simple: cast the 8-bit numbers into 32-bit integers and then to floating point numbers. These can be divided in bulk via the SIMD instructions and then converted in reverse to the 8-bit result. You can find several code examples on GitHub.

Since modern processors have several SIMD instructions, the post takes the time to benchmark many different variations of a program dividing in a loop. The basic program is the reference and, thus, has a “speed factor” of 1. Unrolling the loop, a common loop optimization technique, doesn’t help much and, on some CPUs, can make the loop slower.

Converting to floating point and using AVX2 sped the program up by a factor of 8X to 11X, depending on the CPU.  Some of the processors supported AVX512, which also offered considerable speed-ups.

This is one of those examples of why profiling is so important. If you’d had asked us if converting integer division to floating point might make a program run faster, we’d have bet the answer was no, but we’d have been wrong.

As CPUs get more complex, optimizing gets a lot less intuitive. If you are interested in things like AVX-512, we’ve got you covered.

Optimizing Your Linux Shell Experience

22 Diciembre 2024 at 18:00

Are you familiar with Huffman encoding? That’s where you pick shorter codes for more frequent letters. Morse code is the same way, in that the most-used letters are the shortest. [Matheus Richard] had the same idea for optimizing your workflow in the Linux shell. The idea is to measure what commands you use the most and make them shorter.

If you use zsh, it is easy to find out what commands you are using the most. If you use bash, [Matheus] helpfully offers a command to give you a similar result (the original post limits the list to the last entry which we are sure is a typo):

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10

Once you know the commands you use the most, you can use your shell’s aliasing or scripts to shorten them up. For example, in [Matheus’] case, git was a very common command. This led to aliases:

alias gc="git commit --verbose"
alias gp="git push"
alias gprom="git pull --rebase origin main"

Not only does this save typing, but you lessen your chance for typos: “git comit”, for example. Another idea is to alias your common errors, for example setting an alias for “git” as “gti”.

These are small things, but they are definitely time savers. Be sure to read the rest of the post, as there are a number of other optimization ideas. [Matheus] definitely has a thing for zsh, but there are many other shells out there. Some of them are even evolving towards more modern programming languages.

Inside a Diamond Plant

22 Diciembre 2024 at 06:00

While you tend to think of diamonds as ornamental gemstones, diamonds also have many important industrial uses, and many of those diamonds are now synthetic polycrystalline diamonds. How are they made? [JerryRigEverything] takes us behind the scenes at a diamond manufacturing facility, something you don’t get to see every day. Check out the giant presses that exert about a million pounds of pressure in the video below.

The process starts with diamond powder, which is just what it sounds like. Although you can get real diamond powder, most uses today start with synthetic diamonds. The powder has many uses in cosmetics and as an abrasive. But the video will combine it with cobalt and table salt to form diamond shapes.

The salt is a high-temperature electrode. The process requires temperatures of nearly 1400C (2500F) and a lot of pressure. Common talc, some metal electrodes, and a heater tube are also used in the process.

The press can convert a little diamond dust into a diamond in about 10 minutes. However, because the machines are so dangerous, they are each set in their own blast room, which is sealed when the press is in operation.

While this press was — no pun intended — impressive, we’ve seen bigger. Nothing like this will show up in your garage anytime soon, although, as the video shows, you can buy 3D printer nozzles made from the material. As for a press, you might have to just settle for an arbor press.

It’s Official: The North Pole is Moving

21 Diciembre 2024 at 03:00

Every scout knows how to read a compass, and that there is a magnetic north and a true north. That’s because the Earth’s magnetic field isn’t exactly aligned with the North Pole. Every five years, the US National Oceanic and Atmospheric Administration (NOAA) and the British Geological Survey (BGS) get together to decide if magnetic north is still the same as it was before. This time, it isn’t.

The update is to the WMM — the World Magnetic Model. Magnetic north has shifted away from Canada and towards Siberia, a trend that has been ongoing for the last 20 years.

The magnetic pole seems to be decelerating. It is possible that it can change abruptly enough to warrant an emergency update outside the normal five-year cycle. The BGS says if you traveled from South Africa to the UK using the old WMM, your final position would be about 150 km off compared to using the new WMM.

Of course, automated systems will get updates, so there is no need to adjust your phone or GPS unit manually. However, older gear or compasses are getting increasingly less accurate. The North Star, by the way, isn’t exactly to the North, either. For small trips, being a little off of true north probably isn’t an issue.

There have been emergency updates before. While a basic compass is simple to make, that shouldn’t stop you from overcomplicating it.

Push for On, Hold for Off, AC Edition

18 Diciembre 2024 at 19:30

A common theme in modern consumer electronics is having a power button that can be tapped to turn the device on, but needs to be held down when it’s time to shut it off. [R. Jayapal] had noticed a circuit design for this setup when using DC and decided to create a version that could handle AC-powered loads.

The circuit relies on a classic optoisolated triac to switch the AC line, although [R. Jayapal] notes that a relay would also work. The switch circuit consists of two transistors, a comparator, a flip flop and a monostable. As you might expect, the button triggers the flip flops to turn the triac on. However, if you hold the switch for more than a few seconds, a capacitor charges and causes the comparator to trip the output flip flop.

The DC circuit that inspired this one is naturally a bit simpler, although we might have been tempted to simply use the output of that circuit to drive a relay or triac. On the other hand, the circuit is set up to allow you to adjust the time delay easily.

Given the collection of parts, though, we wonder if you couldn’t press some 555s into service for this to further reduce the part count. If relays are too old-fashioned for you, you can always use a solid-state relay or make your own.

The World Morse Code Championship

18 Diciembre 2024 at 03:00

If you were in Tunisia in October, you might have caught some of the Morse Code championships this year. If you didn’t make it, you could catch the BBC’s documentary about the event, and you might be surprised at some of the details. For example, you probably think sending and receiving Morse code is only for the elderly. Yet the defending champion is 13 years old.

Teams from around the world participated. There was stiff competition from Russia, Japan, Kuwait, and Romania. However, for some reason, Belarus wins “almost every time.” Many Eastern European countries have children’s clubs that teach code. Russia and Belarus have government-sponsored teams.

Morse code is very useful to amateur radio operators because it allows them to travel vast distances using little power and simple equipment.  Morse code can also assist people who otherwise might have problems communicating, and some assistive devices use code, including a Morse code-to-speech ring the podcast covers.

The speed records are amazing and a young man named [Ianis] set a new record of 1,126 marks per minute. Code speed is a little tricky since things like the gap size and what you consider a word or character matter, but that’s still a staggering speed, which we estimate to be about 255 words per minute. While we can copy code just fine, at these speeds, it sounds more like modem noises.

Learning Morse code isn’t as hard as it sounds. Your computer can help you learn, but in the old days, you had to rely on paper tape.

Single Crystal Electrode Lithium Ion Batteries Last a Long Time

16 Diciembre 2024 at 09:00

Researchers have been testing a new type of lithium ion battery that uses single-crystal electrodes. Over several years, they’ve found that the technology could keep 80% of its capacity after 20,000 charge and discharge cycles. For reference, a conventional cell reaches 80% after about 2,400 cycles.

The researchers say that the number of cycles would be equivalent to driving about 8 million kilometers in an electric vehicle. This is within striking distance of having the battery last longer than the other parts of the vehicle. The researchers employed synchrotron x-ray diffraction to study the wear on the electrodes. One interesting result is that after use, the single-crystal electrode showed very little degradation. According to reports, the batteries are already in production and they expect to see them used more often in the near future.

The technology shows promise, too, for other demanding battery applications like grid storage. Of course, better batteries are always welcome, although it is hard to tell which new technologies will catch on and which will be forgotten.

There are many researchers working on making better batteries. Even AI is getting into the act.

Finally… a Man Page for Life

16 Diciembre 2024 at 03:00

How often have you wished to have an instruction manual — or, at least, a Unix man page — for life? Well, your wait is over. Of course, you probably were hoping for instructions on how to navigate life, but [cve’s] mott program plays life inside a man page. That might not be as useful as a real manual for life, but it is still pretty cool.

To understand what’s happening, you have to understand how man pages work. They use an old form of markup known as roff, which later begat nroff and troff. While roff is made to do crude word processing at the dawn of Unix, it is also a Turing-complete language.

You do need groff installed and, of course, man. If you have all that, you can get a live demo with:

curl https://codeberg.org/cve/mott/raw/branch/main/mott.1 | man -l -

We’ll leave understanding all the macros involved as an exercise for the reader, but we are certainly impressed with the audacity of the idea and the implementation.

We would ask if it could play Doom, but we are afraid someone would answer yes and then show us. If you think markup is old-fashioned, don’t be too sure. (Although the underlying project is now at a new URL)

A Self Balancing Bike for Crash Dummy Billy

14 Diciembre 2024 at 12:00

We aren’t sure there’s enough information in the [We Make Machines’] video to easily copy their self-balancing bike project, but if you want to do something similar, you can learn a lot from watching the video. Building sufficient gyros to keep the bike stable required quite a bit of trial and error.

There are some tricks to getting a stable heavy weight to rotate without a lot of vibration and problems. The gyros go on the rider’s saddle, so you aren’t going to be able to ride in the normal fashion. However, a substantial motor drives the wheels so there’s no need to peddle.

The first attempt to self-balance stayed stable for about 10 seconds. Some of it was fine-tuning code, but noise from the gyros also threw off the angle sensor. A higher-quality sensor seemed promising, but it didn’t really fix the problem. Instead of using PID, the guys tried an LQR (Linear Quadratic Regulator) algorithm. Once that was sorted and a servo allowed for steering, it was time to let the bike roam free.

Then disaster struck as the bike lost its cool in a parking lot, causing damage. After repairs, they found issues that confused the angle sensor. They didn’t have the stomach to fit a third sensor onboard, so they put Billy the Crash Dummy onboard and decided to try to run him and the bike off a ramp. That didn’t exactly work out, though. After two attempts, the bike was effectively totaled, although Billy seems to have survived with no more than a bruised ego.

We were dismayed that they didn’t really complete the project, but it does seem like they learned a lot, and maybe that will help someone else out in the future.

We have seen working bikes before. We also have seen some truly strange bike projects.

The Stern-Gerlach Experiment Misunderstood

13 Diciembre 2024 at 19:00

Two guys — Stern and Gerlach — did an experiment in 1922. They wanted to measure magnetism caused by electron orbits. At the time, they didn’t know about particles having angular momentum due to spin. So — as explained by [The Science Asylum] in the video below — they clearly showed quantum spin, they just didn’t know it and Physics didn’t catch on for many years.

The experiment was fairly simple. They heated a piece of silver foil to cause atoms to stream out through a tiny pinhole. The choice of silver was because it was a simple material that had a single electron in its outer shell. An external magnet then pulls silver atoms into a different position before it hits some film and that position depends on its magnetic field.

If electrons randomly flew around the nucleus like a cloud, you’d expect a cloudy line on the film. If the electrons had a fixed number of possible electron orbits, the film would show a series of points. In the end, the result was a big surprise — it was neither of the expected patterns. Instead, they got something shaped like the outline of some lips.

They realized that the horizontal deflection occurred even without the magnet, so what looked like two lines were really two points, and that implies that the electrons must be in one of two positions. However, the truth is more complicated.

In fact, Schrödinger’s equations appeared later and shed more light on how the electrons could orbit. It also seemed to imply that the earlier experiment should have been a single spot on the film. The answer turned out to be quantum spin.

According to the video, this was a lucky mistake. The experiment was perfect for measuring quantum spin, but it was unlikely that anyone would have thought to perform it for that purpose. By trying to prove one thing, they had actually proved another thing that no one understood yet. Science is strange and wonderful.

Spin is a big deal in many quantum computers. If you need a refresher on electron orbitals, it is a topic we cover periodically.

The Disappearing Capacitor

12 Diciembre 2024 at 19:00

As part of a phosphorescence detector, [lcamtuf] has been working with photodiodes. The components, like all diodes, have some capacitance at the junction, and this can limit performance. That’s why [lcamtuf] turned to bootstrapping to make that parasitic capacitance almost disappear.

The technique appears in several Analog Devices datasheets that presents a mystery. An op amp circuit that would normally limit changes to about 52 kHz has an unusually-placed JFET and claims to boost the bandwidth to 350 kHz.

The JFET turns out to be in a voltage-follower configuration. The photodiode sees approximately the same voltage on both terminals, so the internal capacitor can’t charge and, therefore, doesn’t impose any limits on rate of change.

Of course, a better way to think of it is that tiny changes cause an immediate response to counteract them, and so the capacitor’s charging and discharging are kept to a minimum.

It really isn’t important that the capacitor is not charged, but rather that the capacitor doesn’t increase or decrease charge. This leads to a second design, which imposes a DC bias voltage on the diode but prevents any signal from causing the capacitor to change from its precharged value.

Photodiodes seem exotic, but honestly, all semiconductor diodes are photodiodes if you let the light get to them. It seems that capacitors and op amps are always at loggerheads.

Pico Logic Analyzer Gets New Version

12 Diciembre 2024 at 09:00

[Happy Little Diodes] built a Pi Pico logic analyzer designed by [El Dr. Gusman] using the original design. But he recently had a chance to test the newest version of the design, which is a big upgrade. You can see his take on the new design in the video below.

The original design could sample 24 channels at 100 MHz and required two different PCBs. The new version uses a single board and can operate up to 400 MHz. There’s also a provision for chaining multiple boards together to get more channels.

You can set the level shifters to use 5V, 3.3V, or an external voltage. Since [Happy] is working on a ZX Spectrum, the 5V conversion is a necessity.

One thing that a cheap logic analyzer lets you do is dedicate it to a particular purpose. In fact, by the end of the video, we see a dedicated connector to make it easier to attach the board to a ZX Spectrum.

The code is on GitHub, although it warns you there that you that version 6 — the one seen in the video — isn’t stable, so you might have to wait to make one on your own. The software looks impressive and there may be some effort to integrate with Sigrok.

If you missed our coverage of the earlier version, you can still catch up. Dead set on Sigrok support? [Pico-Coder] can help you out.

 

Cheap FPGA PCIe Development

8 Diciembre 2024 at 06:00

Typically, if you want to build an FPGA project inside a PC, you’d need a fairly expensive development board that plugs into the bus. However, [CircuitValley] found some IBM RS-485 boards that are little more than a PCIe board with an Intel FPGA onboard. These are widely avaiable on the surplus market for around $20 shipped. He’s been documenting how to use them.

The FPGA onboard is a Cyclone IV with about 21,000 logic elements and a little over 750 kbits of memory. The board itself has configuration memory, power management, and a few connectors. The JTAG header is unpopulated, but the footprint is there. You simply need to supply a surface-mount pin header and an external JTAG probe, and you can program. Even if you aren’t interested in using an FPGA board, the reverse engineer steps are fun to watch.

The situation reminds us a little of the RTL-SDR — when a device uses a programmable device to perform nearly all of its functions, it is subject to your reprogramming. What would you do with a custom PCIe card? You tell us. Need a refresher on the bus? We can help. Thinking of building some sort of FPGA accelerator? Maybe try RIFFA.

Microchess Remembered

8 Diciembre 2024 at 00:00

Playing chess has always been a bellwether for computers. The game isn’t trivial, but the rules are managably simple. However, the game is too complex to be easily solved entirely, so you have to use tricky software to play a credible game. Big computers do have an advantage, of course. But Microchess — arguably the first commercial game for home computers — was able to play on tiny machines like the Kim-1. [Joachim Froholt] interviewed [Peter Jennings] — the man behind Microchess to learn the whole story of its creation.

In 1960, [Jennings] was ten years old and had to persuade the local librarian to let him read adult books on electronics and computers. Five years later, a ham radio teletype and some circuitry helped him practice chess openings and was the first of many chess-playing machines he’d build or program.

Microchess itself took six months of painstaking programming, entering hex codes into the computer. Word leaked out from a user’s group meeting (where Microchess beat a human player), and [Jennings] was swamped with requests for the program. In late 1976, the program was offered for sale as a teletype listing or, for an extra $3, a cassette tape.

The program went on to be very successful and moved to other platforms. Commodore even made a special dedicated device based on the Kim-1 to play Microchess, a piece of hardware unique enough that [Michael Gardi] honored it with one of his phenomenal replicas.

Antenna Measurement in Theory and Practice

7 Diciembre 2024 at 03:00

If you want to analyze an antenna, you can use simulation software or you can build an antenna and make measurements. [All Electroncs Channel] does both and show you how you can do it, too, in the video below.

The antenna in question is a loop antenna. He uses a professional VNA (Vector Network Analyzer) but you could get away with a hobby-grade VNA, too. The software for simulation is 4NEC2.

The VNA shows the electrical characteristics of the antenna, which is one of the things you can pull from the simulation software. You can also get a lot of other information. You’d need to use a field strength meter or something similar to get some of the other information in the real world.

The antenna simulation software is a powerful engine and 4NEC2 gives you an easy way to use it with a GUI. You can see all the graphs and plots easily, too. Unfortunately, it is Windows software, but we hear it will run under Wine.

The practical measurement is a little different from the simulation, often because the simulation is perfect and the real antenna has non-ideal elements. [Grégory] points out that changing simulation parameters is a great way to develop intuition about — in this case — antennas.

Want to dive into antennas? We can help with that. Or, you can start with a simple explanation.

VNAs and Crystals

6 Diciembre 2024 at 21:00

Oscillators may use crystals as precise tuned circuits. If you have a vector network analyzer (VNA) — or even some basic test equipment — you can use it to learn the parameters of a crystal. [All Electronics Channel] has the details, and you can see how in the video below.

There was a time when a VNA was an exotic piece of gear, but these days they are relatively common. Crystal parameters are important because crystals have a series resonance and a parallel resonance and they are not at the same frequency. You also may need to know how much loading capacitance you have to supply to get the crystal at the right frequency.

Sometimes, you want to pull the crystal frequency, and the parameters will help you figure that out, too. It can also help if you have a crystal specified as series in a parallel-mode oscillator or vice versa.

If you don’t have a VNA, you can use a tracking signal generator, as [Grégory] shows towards the middle of the video. The quality of a tuned circuit depends on the Q factor, and crystals have a very high Q factor.

We did something similar in 2018. The other way to pull a crystal frequency is a bit extreme.

LongChat for Ham Radio

5 Diciembre 2024 at 03:00

There was a time when ham radio operators were known for having long conversations over the radio — rag chewing, as they called it. A new program, LongChat, is a new entry into the ham radio software world that could bring chatting back to ham radio. [Tech Minds] has a video covering it (and using it), which you can see below.

While some people do talk using microphones or Morse code keys, there are a lot of digital modes now. Some, like RTTY or PSK31, can support conversations, but the more popular ones, like FT-8, are very stripped down. Your computer exchanges basic information with the other station’s computer, and that’s it.

The LongChat program is very new, and we were sad to see it is only for Windows so far. It also isn’t open source, so we aren’t sure if other platforms will get any love.

Like other modern modes, it uses forward error correction and can operate in as little as 300 Hz of bandwidth. Subtracting overhead, you can expect to send 40 bits per second which is about five characters per second. This isn’t for file transfer, but for leisurely chats.

The software is from  [Oguz] (TA2STO), a ham from Türkiye. His video about the software is the second video below. The original intent was to allow sensors to send data long distances on very low power.

Of course, new modes like this are only useful if people start using them and can find each other. For now, you’d probably have to do like [Tech Minds] and try it out with a friend.

If you’d rather get started with FT8 first, we can help you out. For better or worse, ham radio and computers are inextricably married.

❌
❌