It Isn’t WebAssembly, But It Is Assembly In Your Browser

You might think assembly language on a PC is passe. After all, we have a host of efficient high-level languages and plenty of resources. But there are times you want to use assembly for some reason. Even if you don’t, the art of writing assembly language is very satisfying for some people — like an intricate logic puzzle. Getting your assembly language fix on a microcontroller is usually pretty simple, but on a PC there are a lot of hoops to jump. So why not use your browser? That’s the point of this snazzy 8086 assembler and emulator that runs in your browser. Actually, it is not native to the browser, but thanks to WebAssembly, it works fine there, too.

No need to set up strange operating system environments or link to an executable file format. Just write some code, watch it run, and examine all the resulting registers. You can do things using BIOS interrupts, though, so if you want to write to the screen or whatnot, you can do that, too.

The emulation isn’t very fast, but if you are single-stepping or watching, that’s not a bad thing. It does mean you may want to adjust your timing loops, though. We didn’t test our theory, but we expect this is only real mode 8086 emulation because we don’t see any protected mode registers. That’s not a problem, though. For a learning tool, you’d probably want to stick with real mode, anyway. The GitHub page has many examples, ranging from a sort to factorials. Just the kind of programs you want for learning about the language.

Why not learn on any of a number of other simulated processors? The 8086 architecture is still dominant, and even though x86_64 isn’t exactly the same, there is a lot of commonalities. Besides, you have to pretend to be an 8086, at least through part of the boot sequence.

If you’d rather compile “real” programs, it isn’t that hard. There are some excellent tutorials available, too.

The Hello World Of GPT?

Someone wants to learn about Arduino programming. Do you suggest they blink an LED first? Or should they go straight for a 3D laser scanner with galvos, a time-of-flight sensor, and multiple networking options? Most of us need to start with the blinking light and move forward from there. So what if you want to learn about the latest wave of GPT — generative pre-trained transformer — programs? Do you start with a language model that looks at thousands of possible tokens in large contexts? Or should you start with something simple? We think you should start simple, and [Andrej Karpathy] agrees. He has a workbook that makes a tiny GPT that can predict the next bit in a sequence. It isn’t any more practical than a blinking LED, but it is a manageable place to start.

The simple example starts with a vocabulary of two. In other words, characters are 1 or 0. It also uses a context size of 3, so it will look at 3 bits and use that to infer the 4th bit. To further simplify things, the examples assume you will always get a fixed-size sequence of tokens, in this case, eight tokens. Then it builds a little from there.

Continue reading “The Hello World Of GPT?”

My Glasses Hear Everything I’m Not Saying!

There was a time when you saw someone walking down the street talking to no one, they were probably crazy. Now you have to look for a Bluetooth headset. But soon they may just be quietly talking to their glasses. Cornell University researchers have EchoSpeech which use sonar-like sensors in a pair of glasses to watch your lips and mouth move. From that data, they can figure out what you are saying, even if you don’t really say it out loud. You can see a video of the glasses below.

There are a few advantages to a method like this. For one thing, you can speak commands even in places where you can’t talk out loud to a microphone. There have been HAL 9000-like attempts to read lips with cameras, but this is power-hungry and video tends to be data intensive.

Continue reading “My Glasses Hear Everything I’m Not Saying!”

Dyson Hair Dryer Becomes Jet Engine

While Dyson makes some good products, they aren’t known for being economical. Case in point: [Integza] spent $500 on a hair dryer. While he does have a fine head of hair, we suspected he wasn’t after it for its intended purpose, and we were right. It turns out he wanted to make it into a jet engine! Why? Oh, come on. The fact that you read Hackaday means you don’t need that question answered. Watch the video below to see how it all turned out.

What got [Integza]’s attention was the power of the very small motor. So he immediately, of course, opened it up. The build quality is very impressive, although for $500, shouldn’t it be? While we are sure the Dyson dryer is more robust than our $9 Revlon special, it seems doubtful that it would handle the high temperatures of a jet exhaust. In fact, he’s had plastic meltdown while trying to build a jet before. So this time, he had a different plan.

That plan involved designing a replacement shell for the dryer and having it 3D printed in metal, which may have cost almost as much or more than the dryer. It came out great, though — and some fuel lines and a spark plug later, he was ready to fire it up.

Did it work? You bet. Test equipment was melted accidentally, and eventually, the engine looked like it flamed out. But it generated some very hot exhaust. We’d like to say that no tomatoes were harmed during the production of the video, but we can’t because of our well-developed sense of ethics. Poor tomatoes! We might have used a Mr. Bill doll, but that probably infringes on someone’s copyright.

If you don’t want so much melting, maybe try water cooling. If you could make this reliable, the modification to your car becomes obvious.

Continue reading “Dyson Hair Dryer Becomes Jet Engine”

The Real John Wick-Style Bullet Proof Suit

If you’ve seen the John Wick movies, you’ve probably had to suspend your disbelief about many things, but the bulletproof suits are perhaps the hardest thing to swallow. They look like stylish suits but are impervious to just about anything at any range. What’s more is when you are hit, they seem to absorb all impact with no effect on the wearer at all.

You can keep running, firing, or karate kicking while the suit takes all of the bullets. You can even pull your jacket up over your face if you want to protect that million-dollar smile. Physics, of course, tells us that a suit like this is pretty much impossible. Except that they actually exist. Granted, the real-life suits don’t have the magic physics-defying powers of Mr. Wick’s suit, but if you have the cash, you can get a smart-looking suit that protects you from getting killed by a bullet.

Real Life, Part I

In the movies, the suits supposedly have Kevlar in them just like a real piece of ballistic body armor. The problem is, Kevlar is bulky. However, most of the real body armor you see — like a vest on a SWAT team operative — is made from Kevlar or similar ballistic fibers like Twaron, Goldflex, or Dyneema. They also have plates made of metal or ceramic. Continue reading “The Real John Wick-Style Bullet Proof Suit”

Debouncing For Fun And… Mostly, Just For Fun

In our minds and our computer screens, we live in an ideal world. Wires don’t have any resistance, capacitors don’t leak, and switches instantly make connections and break them. The truth is, though, in the real world, none of those things are true. If you have a switch connected to a lightbulb, the little glitches when you switch are going to be hard to notice. Hook that same switch up to a processor that is sampling it constantly, and you will have problems. This is the classic bane of designing microcontroller circuits and is called switch bounce. [Dr. Volt] covers seven different ways of dealing with it in a video that you can see below.

While you tend to think of the problem when you are dealing with pushbuttons or other kinds of switches for humans, the truth is the same thing occurs anywhere you have a switch contact, like in a sensor, a mechanical rotary encoder, or even relay contacts. You can deal with the problem in hardware, software, or both.

Continue reading “Debouncing For Fun And… Mostly, Just For Fun”

Homemade Scope Does Supercapacitor Experiments

We’ve always been a little sad that supercapacitors aren’t marked with a big red S on a yellow background. Nevertheless, [DiodeGoneWild] picked up some large-value supercapacitors and used his interesting homemade oscilloscope to examine how they worked. You can watch what he is up to in his workshop in the video below.

Supercapacitors use special techniques to achieve very high capacitance values. For example, the first unit in the video is a 500 F capacitor. That’s not a typo — not microfarads or even millifarads — a full 500 Farads. With reasonable resistance, it can take a long time to charge 500F, so it is easier to see the behavior, especially with the homemade scope, which probably won’t pick up very fast signals.

For example, A 350 mA charging current takes about an hour to bring the capacitor up to 2.6 V, just under its maximum rating of 2.7 V. Supercapacitors usually have low voltage tolerance. Their high capacity makes them ideal for low-current backup applications where you might not want a rechargeable battery because of weight, heat, or problems with long-term capacity loss.

The real star of the video, though, is the cast of homemade test equipment, including the oscilloscope, a power supply, and a battery analyzer. To be fair, he also has some store-bought test gear, too, and the results seem to match well.

Supercapacitors are one of those things that you don’t need until you do. If you haven’t had a chance to play with them, check out the video or at least watch it to enjoy the homebrew gear. We usually look to [Andreas Spiess] for ESP32 advice, but he knows about supercaps, too. If you really like making as much as you can, you can make your own supercapacitors.

Continue reading “Homemade Scope Does Supercapacitor Experiments”