Vista Normal

Hay nuevos artículos disponibles. Pincha para refrescar la página.
Ayer — 13 Noviembre 2024Salida Principal

Intuition about Maxwell’s Equations

13 Noviembre 2024 at 09:00

You don’t have to know how a car engine works to drive a car — but you can bet all the drivers in the Indy 500 have a better than average understanding of what’s going on under the hood. All of our understanding of electronics hinges on Maxwell’s equations, but not many people know them. Even fewer have an intuitive feel for the equations, and [Ali] wants to help you with that. Of course, Maxwell’s gets into some hairy math, but [Ali] covers each law in a very pragmatic way, as you can see in the video below.

While the video explains the math simply, you’ll get more out of it if you understand vectors and derivatives. But even if you don’t, the explanations provide a lot of practical understanding

Understanding the divergence and curl operators is one key to Maxwell’s equations. While this video does give a quick explanation, [3Blue1Brown] has a very detailed video on just that topic. It also touches on Maxwell’s equations if you want some reinforcement and pretty graphics.

Maxwell’s equations can be very artistic. This is one of those topics where math, science, art, and history all blend together.

Teaching Computers to Read — Sort Of

12 Noviembre 2024 at 21:00

If you ask someone who grew up in the late 1970s or early 1980s what taught them a lot about programming, they’d probably tell you that typing in programs from magazines was very instructive. However, it was also very boring and error-prone. In fact, we’d say it was less instructional to do the typing than it was to do the debugging required to find all your mistakes. Magazines hated that and, as [Tech Tangents] shows us in a recent video, there were efforts to make devices that could scan barcodes from magazines or books to save readers from typing in the latest Star Trek game or Tiny Basic compiler.

The Cauzin Softstrip was a simple scanner that could read barcodes from a magazine or your printer if you wanted to do backups. As [Tech Tangents] points out, you may not have heard of it, but at the time, it seemed to be the future of software distribution.

We were impressed that [Tech Tangent] had enough old magazines that he had some of the original strips. Byte Magazine had tried to promote a similar format, but there was no hardware made to read those barcodes.

Of course, there were other systems. For example, the HP-41C famously had a barcode scanner, although creating your own was clunky unless you reverse-engineered the “proper” format (which was done). The basic hardware used there also worked with Byte’s format, but you still had to interface the odd scanner to your computer.

Cauzin sidestepped all this with their product, which was simple-to-interface hardware with software support for the major platforms. However, by the time it was on the market, cheap magnetic media and modem-based bulletin boards were destroying interest in loading software from paper.

This is a great look at an almost forgotten technology. You could probably build something modern to scan these if you had the urge. These days, it would be easy enough to design your own system. Modern laser printers would probably make very dense barcodes.

We wouldn’t suggest making a Cauzin guitar, though. These days we have QR codes and even colorful barcodes.

AnteayerSalida Principal

Z80 Testing the 80s Way

12 Noviembre 2024 at 09:00

According to [MTSI], if you used a Z80 chip back in the 1980s, it almost certainly passed through the sole Fairchild Sentry 610 system that gave it the seal of approval.

The Sentry was big iron for its day. The CPU was a 24-bit device and ran at a blistering 250 kHz. Along with a tape drive and a specialized test bed, it could test Z80s, F8s, and other Mostek products of the day. There was a disk drive, too. The 26-inch platters stored under 10 kilobytes. Despite the relatively low speed of the CPU, the Sentry could test devices running up to 10 MHz, which was plenty for the CPUs it was testing. The actual test interface ran at 11 MHz and used an exotic divider to generate slower frequencies.

According to the post, an informal count of the number of chips in the device came up with around 60,000. That, as you might expect, took a huge power supply, too.

From some 1975 corporate literature:

“Optimized for engineering, sophisticated production needs, QA and test center operations, the Sentry 610 is the most versatile analytical tester available for engineering and production. It can perform the widest range of tests for the broadest range of components. At user option, the Sentry 610 can perform high-speed MaS/LSI, PCB, and bipolar tests simultaneously. It offers complete testing at the wafer level and through automatic handlers at full-rated device speeds up to 10 MHz. The wide choice of peripherals gives the Sentry 610 system massive data handling capacity to manipulate, analyze, compute and generate reports on test procedures in analyzing MaS/LSI.”

These days, you are as likely to stick test hardware on the IC as have a big machine on the outside. And even then, you probably wouldn’t have something this elaborate. But in its day, this was high-tech for sure.

The Z80 sure has had a long lifespan. It shouldn’t surprise you that Z80s need to be tested, just like everything else.

Cheap Sensor Changes Personality

11 Noviembre 2024 at 06:00

If you want to add humidity and temperature sensors to your home automation sensor, you can — like [Maker’s Fun Duck] did — buy some generic ones for about a buck. For a dollar, you get a little square LCD with sensors and a button. You even get the battery. Can you reprogram the firmware to bend it to your will? As [Duck] shows in the video, you can.

The device advertises some custom BLE services, but [Duck] didn’t want to use the vendor’s phone app, so he cracked the case open. Inside was a microcontroller with Bluetooth, an LCD driver, a sensor IC, and very little else.

The processor is an ARM Cortex M0, a PHY6222 with very low power consumption. The LCD is a very cheap panel with no drivers onboard. All the drive electronics are on the PCB. The sensor is a CHT8305C which uses I2C.

Luckily, the PHY6222 has a publically available SDK with English documentation. The PCB has two sets of UART pads and it is possible to flash the chip via one of the UARTs.

Eventually, [Duck] put a custom firmware on the box, but we were intrigued by the idea that for a buck you could get a little low-power ARM module with an LCD and a sensor. It seems like you could do more with this, although we are sure the LCD is not very general purpose, surely this little box could act as a panel meter, a countdown timer, or lots of other things with some custom firmware.

These are, of course, knock offs of the slightly more expensive Xiaomi sensors, and those are flashable, too. We aren’t sure how accurate either sensor is, but humidity measurement is a complex topic.

Component Tester Teardown

10 Noviembre 2024 at 18:00

In the modern age, when you hear “component tester” you probably think of one of those cheap microcontroller-based devices that can identify components and provide basic measurements on an LCD screen. However, in the past, these were usually simple circuits that generated an XY scope plot. The trace would allow an experienced operator to identify components and read a few key parameters. [Thomas] tears down an old Hameg device that uses this principle in the video below.

The unit is in a nice enclosure and has a feature that controls the amount of current the unit uses in the excitation signal. It plugs into the wall, and you can connect the component under test with either test leads or a socket. The output, of course, is a pair of BNCs for the scope’s X and Y inputs.

Compared to some homebrew projects that are similar, the PCB inside the device seems more complex. The output of most devices like this uses the line frequency (50 or 60 Hz). This one, however, has its own drive oscillator that operates at a different frequency.

Each type of component has a tell-tale trace on the scope. We found the tunnel diode trace especially interesting. Capacitors are circles, diodes make a definite step shape. There’s a table from the manual near the end of the video.

Most of these devices are much simpler, using a transformer to generate the AC sweep and a simple mechanism to measure the current. That makes them quite easy to build and they are still surprisingly useful.

Building a DIY Nipkow Disk Display

10 Noviembre 2024 at 12:00

Before flat screen technologies took over, we associate TV with the CRT. But there were other display technologies that worked, they just weren’t as practical. One scheme was the Nipkow disk, and [Bitluni] decided to build a working demonstration of how such a system works.

Essentially, there’s a spinning disk with a spiral pattern of holes in it. As the disk spins, a light behind it turns on or off. If you time everything right, you get an image that can move. This particular model uses stepper motors, which is a bit of a modern concession.

The result was actually much better than you might guess, but a far cry from a modern display device, of course. The screen material needed a little tweaking, but even the initial results were very impressive. If this were trying to be practical, it would probably require a bit more work on the light source and screen.

Interestingly, the Nipkow disk arrangement was just as suitable for scanning as displaying. Instead of a light behind the wheel, you simply used a light sensor. Of course, in practice, getting everything synchronized and mass-producing high-resolution sets would have been a tremendous challenge a century ago.

Not that people didn’t try. There were even color systems using mechanical wheels. In the 1930s, people were sure your TV would contain spinning disks.

Inside an Arcade Joystick

10 Noviembre 2024 at 06:00

If you ever played an arcade game and wondered what was inside that joystick you were gripping, [Big Clive] can save you some trouble. He picked up a cheap replacement joystick, which, as you might expect, has a bunch of microswitches. However, as you can see in the video below, there are some surprising features that make sense when you think about it.

For one, there are plates you can put on the bottom to limit the joystick’s travel depending on the game. That is, some games only want the stick to move up and down or left and right. The knobs are quite nice, and [Clive] mentions the size and thread of the knob with the idea you could use them in different applications. You can also buy replacement knobs if you don’t want to get the whole assembly.

The mechanics are rugged but straightforward. The circuit board is surprisingly stylish but also simple. Still interesting to see what’s inside one of these, even though the schematic is extremely simple.

If you need an excuse to use one of these, how about an arcade table? If you aren’t a woodworker, grab a 3D printer instead.

Retrotechtacular: Computer-Generate Video 1968 Style!

9 Noviembre 2024 at 06:00

[Classic Microcomputers] read in a book that there was a computer-generated film made in the late 1960s, and he knew he had to watch it. He found it and shared it along with some technical information in the video below.

Modern audiences are unlikely to be wowed by the film — Permutations — that looks like an electronic spirograph. But for 1968, this was about as high tech as you could get. The computer used was an IBM mainframe which would have cost a fortune either to buy or to rent the hours it would take to make this short film. Now, of course, you could easily replicate it on even your oldest PC. In fact, we are surprised we haven’t seen any recreations in the demoscene.

The end credits list [John Whitney] working under an IBM research grant as the author of the film. The programming was by [Jack Citron], and it was apparently put together at the UCLA School of Medicine.

According to [Classic Microcomputers], the display was static and black and white, but animation on 16mm film and color filters made it more interesting.

Was this the birth of the demoscene? Usually, when we watch old IBM videos, it is of the data center, not the data!

DIY Digital Caliper Measures Up

9 Noviembre 2024 at 00:00

You might wonder why [Kevin] wanted to build digital calipers when you can buy them for very little these days. But, then again, you are reading Hackaday, so we probably don’t need to explain it.

The motivation, in this case, was to learn to build the same mechanism the commercial ones use for use in precise positioning systems. We were especially happy to see that [Kevin’s] exploration took him to a Hackaday.io project which led to collaboration between him and [Mitko].

The theory behind the mechanism is simple but does get into some ugly-looking trigonometry. Electrically, you feed eight sine waves with different phases into the assembly and measure the phase of the signal you receive.

Pulse density modulation is sufficient for the driving signals. The math is a bit more complex, but nothing you can’t do with a modern CPU. To set the correct parameters, a PC-based test setup allowed different runs to determine the best parameters for the final implementation.

Of course, the whole thing still needs some packaging to use as either a practical pair of calipers or for unrelated positioning duty. But it does work and it should be straightforward to adapt it for any purpose.

We’ve looked inside calipers before. If you are only making measurements with calipers one way, you may be missing out.

Teaching a Pi Pico E-Ink Panel New Tricks

8 Noviembre 2024 at 09:00

We’ve noticed that adding electronic paper displays to projects is getting easier. [NerdCave] picked up a 4.2-inch E-ink panel but found its documentation a bit lacking when it came to using the display under MicroPython. Eventually he worked it out, and was kind enough to share with the rest of the class.

These paper-like displays draw little power and can hold static images. There were examples from the vendor of how to draw some simple objects and text, but [NerdCave] wanted to do graphics. There was C code to do it, but it wasn’t clear how to port it to Python.

The key was to use the image2cpp website (we’ve used it before, but you can also use GIMP). Instead of C code, though, you get the raw bytes out and place them in your Python code. Once you know the workflow, it isn’t that hard, and this is an inexpensive way to add a different kind of display to your projects. The same image conversion will help you work with other displays, too.

We aren’t sure what driver chip this particular display uses, but if you have one with the UC8151/IL0373, you can find some amazing MicroPython drivers for those chips.

DIY Lock Nuts

8 Noviembre 2024 at 00:00

If you have a metal lathe just looking for some work, why not make your own lock nuts? That’s what [my mechanics insight] did when faced with a peculiar lock nut that needed replacing in a car. We can’t decide what we enjoyed more in the video you can watch below: the cross-section cut of a lock nut or the oddly calming videos of the new nut being turned on a lathe.

The mystery of the lock nut, though, isn’t how it works. The nylon insert is just a little too small for the bolt, and the bolt, being harder than nylon, taps a very close-fitting hole in the nylon as you tighten it. The real mystery is how that nylon got in there to start with.

As the video shows, you fabricate the nut with an open area to accept the nylon ring. Then, you use a tool to crimp the edges down to trap the ring. The video shows all the pieces being made: the nut, the ring, and the crimping tool.

As you might deduce, the crimping tool has to be harder than the nut material, so that takes some extra effort. But all the work is done on the lathe except the crimping. He uses a vise, but we’d imagine that an arbor press is more commonly used.

Lock washers and nuts seem like a simple topic, but it is way more complex than you probably thought. Way more complex.

Thanks to [the gambler] for the tip!

Reviewing the World’s 2nd Smallest Thermal Camera

7 Noviembre 2024 at 09:00

A thermal camera is a very handy tool to have, and [Learn Electronics Repair] wanted to try out the Thermal Master P2 for electronic repair, especially since it claims to have a 15 X digital zoom and 1.5 degree accuracy. The package proudly states the device is the “World 2nd Smallest Thermal Camera” — when only the second best will do.

The camera is tiny and connects to a PC or directly to a tablet or phone via USB C. However, it did look easier to use on the end of a cable for probing things like a PC motherboard. The focus was fairly long, so you couldn’t get extremely close to components with the camera. The zoom somewhat makes up for that, but of course, as you might expect, zooming in doesn’t give you any additional resolution.

He also compares the output with that of a multimeter he uses that includes an IR camera (added to our holiday gift list). That multimeter/camera combo focuses quite closely, which is handy when picking out a specific component. It also has a macro lens, which can zoom up even more.

We’ve looked at — or, more accurately, through — IR cameras in the past. If you are on a tight budget and you have a 3D printer, you might try this method for thermal imaging, but it doesn’t use the printer the way you probably think.

Check Your Clip Leads

7 Noviembre 2024 at 06:00

[Matthias] bought cheap clip leads online and, wisely, decided to check them. We’ve had the same experience that he’s had. Sometimes, these cheap leads are crimped and don’t make good contact. However, you can usually solder them and completely fix them. Not this time, however, as you can see in the video below.

The resistance for the leads was a bit on the high side, which is usually a sure sign of this problem. But soldering didn’t really make a big difference. A homemade clip lead, for example, read under 20 milliohms, but a test lead from the new batch read about 260 milliohms even after being soldered.

A thermal camera indicated the problem was actually the wire. At first, he thought the wire was just very thin. While it was thin, that wasn’t the real problem. The wire looked normal enough, but sanding the wire showed that it might be only copper-coated. Turns out, a magnet would grip the clip leads meaning they were iron wires coated with copper.

We were amazed at how many leads he was able to find with iron in them, primarily those with clips on at least one end. Oddly, mouse cables were also magnetic.

So, the lesson is to test the resistance and pass a magnet over those wires. Depending on your application, a few hundred milliohms might not matter. But you should at least know that some of your clip leads may have an order-of-magnitude difference in conductivity.

If you need an easy milliohmeter, there are plenty of options. You can even just haywire something up on a breadboard, or — like in the video — use a 1A current and measure millivolts.

Random Wire Antenna Uses No Wire

6 Noviembre 2024 at 06:00

Ideally, if you are going to transmit, you want a properly-tuned resonant antenna. But, sometimes, it isn’t practical. [Ham Radio Rookie] knew about random wire antennas but didn’t want a wire antenna. So, he took carbon fiber extension poles and Faraday tape and made a “random stick” antenna. You can check it out in the video below.

We aren’t sure what normal people are doing with 7-meter-long telescoping poles, but — as you might expect — the carbon fiber is not particularly conductive. That’s where the tape comes in. Each section gets some tape, and when you stretch it out, the tape lines up.

We aren’t sure how these poles are constructed, but the video claims that the adjacent sections couple capacitively. We aren’t sure about that as the carbon fiber won’t be very conductive, but it probably isn’t a very good insulator, either. Then again, the poles may have a paint or other coating along the surface. So without seeing it, it is hard to say what’s coupling the elements.

He admits this is experimental and there is more work to do. However, it seems cheap and easy to setup. The hardest part is tapping an M10 hole in the end cap to allow things to mount.

We suppose you could make your own tubes, but it hardly seems worth the trouble. If you cut or drill this stuff, you might want to take precautions.

Heathkit Signal Generator Gets an Update

23 Octubre 2024 at 05:00

[DTSS_Smudge] correctly intuits that if you are interested in an old Heathkit signal generator, you probably already know how to solder. So, in a recent video, he focused on the components he decided to update for safety and other reasons. Meanwhile, we get treated to a nice teardown of this iconic piece of test gear.

If you didn’t grow up in the 1960s, it seems strange that the device has a polarized line cord with one end connected to the chassis. But that used to be quite common, just like kids didn’t wear helmets on bikes in those days.

A lot of TVs were “hot chassis” back then, too. We were always taught to touch the chassis with the back of your hand first. That way, if you get a shock, the associated muscle contraction will pull your hand away from the electricity. Touching it normally will make you grip the offending chassis hard, and you probably won’t be able to let go until someone kindly pulls the plug or a fuse blows.

These signal generators were very common back in the day. A lot of Heathkit gear was very serviceable and more affordable than the commercial alternatives. In 1970, these cost about $32 as a kit or $60 already built. While $32 doesn’t sound like much, it is equivalent to $260 today, so not an impulse buy.

Some of the parts are simply irreplaceable. The variable capacitor would be tough to source since it is a special type. The coils would also be tough to find replacements, although you might have luck rewinding them if it were necessary.

We are spoiled today with so many cheap quality instruments available. However, there was something satisfying about building your own gear and it certainly helped if you ever had to fix it.

There was so much Heathkit gear around that even though they’ve been gone for years, you still see quite a few units in use. Not all of their gear had tubes, but some of our favorite ones did.

Give Your SMD Components a Lift

22 Octubre 2024 at 23:00

When you are troubleshooting, it is sometimes useful to disconnect a part of your circuit to see what happens. If your new PCB isn’t perfect, you might also need to add some extra wires or components — not that any of us will ever admit to doing that, of course. When ICs were in sockets, it was easy to do that. [MrSolderFix] shows his technique for lifting pins on SMD devices in the video below.

He doesn’t use anything exotic beyond a microscope. Just flux, a simple iron, and a scalpel blade. Oh, and very steady hands. The idea is to heat the joint, gently lift the pin with the blade, and wick away excess solder. If you do it right, you’ll be able to put the pin back down where it belongs later. He makes the sensible suggestion of covering the pad with a bit of tape if you want to be sure not to accidentally short it during testing. Or, you can bend the pin all the way back if you know you won’t want to restore it to its original position.

He does several IC pins, but then shows that you need a little different method for pins that are near corners so you don’t break the package. In some cases for small devices, it may work out better to simply remove them entirely, bend the pins as you want, and then reinstall the device.

A simple technique, but invaluable. You probably don’t have to have a microscope if you have eagle eyes or sufficient magnification, but the older you get, the more you need the microscope.

Needless to say, you can’t do this with BGA packages. SMD tools used to be exotic, but cheap soldering stations and fine-tipped irons have become the norm in hacker’s workshops.

Nuclear Tomb Must Survive

22 Octubre 2024 at 02:00

It is hard to imagine that much we built today will be used ten years from now, much less in a hundred. It is hard to make things that last through the ages, which is why we are fascinated with things like ancient pyramids in Mexico, Egypt, and China. However, even the oldest Egyptian pyramid is only about 5,000 years old. [Mark Piesing] at the BBC visited a site that is supposed to lock up nuclear waste for 100,000 years.

This particular project is in France, but there are apparently dozens of similar projects around the world. Locating these nuclear tombs is tricky. They need to be in a geologically stable area that won’t contaminate water. They also prefer areas already depleted of resources to lessen the chance someone will be digging nearby in the far future. You also need people to agree to have these facilities in their communities, which is probably the most difficult thing to find.

Burying anything 500 meters underground is a challenge. But we were interested in how you’d plan to keep the material safely away from people for 20 times longer than the pyramids have stood next to the Nile.  Anything could happen over that timescale, and it seems unlikely that you’ll have an organization that can last that long and stand watch over these dangerous vaults. If they poke around in these holes, future archeologists could deal with a very real cursed tomb.

Of course, the whole idea is controversial. But putting that aside, how would you design something to last 100,000 years and stay secure? Let us know in the comments. It would be good practice for that generation ship to Bernard’s Star.

We’ve seen that it is hard to keep a clock running for even 100 years. Already, 50-year-old computers seem incredibly antique. What will tech be like in 100,000 years?

The 1983 Clock Four Decades in the Making

21 Octubre 2024 at 20:00

In 1983, a 14-year-old [Will] saw an LED clock in The Sharper Image store. At $250, it stayed in the store. That was a lot of money back then, especially for most teenagers. But [Will] didn’t forget. After high school, he and a friend planned to build one from scratch. They worked out how they would do it and did a little prototyping, but never really finished. Well, they never really finished at the time. Because 33 years later, [Will] decided to finally put it together. Check it out in the video below.

[Will’s] learned a lot since his original design, plus we have tech today that would have seemed like magic in the late 1980s. But he wanted to stay true to the original design, so there’s no microcontroller or smart LEDs. Just binary counters and a lot of LEDs. There’s even a 555 doing duty as a reset timer.

The original design used the 60 Hz signal from the AC power supply. [Will] made that one concession to modern times and powered the clock from USB-C. That meant adding a reference oscillator, which is a good thing, anyway, as he explains in the post.

The result looks good and we don’t envy him soldering 275 SMD parts! He even graciously made a few and sent one to his old friend.

We don’t know why we were surprised [Will] soldered all those parts. He’s a key member of the people who put on the SMD soldering challenge each year at Supercon. Most LED clock projects from those days used 7-segment displays.

An SAO for Hams

21 Octubre 2024 at 14:00

Generally speaking, the Hackaday Supercon badge will always have a place for SAO (rebranded as “Supercon add-ons”), and that makes sense. We did originate them, after all. This year, though, we’ve gone all in on SAO, and, in particular, we’ve asked to see more SAOs with communication capabilities. The standard has always had an I2C bus, but few people use them. I decided I wanted to set an example and cook up a badge for Supercon. Was it hard? Yes and no. I’ll share with you a little about the board’s genesis and the issues I found. At the end, I’ll make you a special offer, if you are going to Supercon.

The Idea

The front of the SAOGNR — the SAO connector is, of course, on the back

I’ve been a ham radio operator for a very long time. In fact, July was my 47th anniversary in the radio hobby. Well, that’s not true. It was my 47th year with a license. I had been listening to shortwave long before then. So, I wanted to do something with Morse code. You don’t have to know Morse code to get a license these days, but a lot of hams enjoy it.

I set out to do a simple board that would play some Morse code messages. But that’s just another blinking light LED with a buzzer on it, too. So, naturally, I decided it would also provide Morse code output for the I2C host. That is, the SAO could be used to convert ASCII to Morse code. Sounds simple, right? Sure.

Getting Started

I wanted to use a Raspberry Pi Pico but didn’t want to violate the SAO size requirements. Luckily, there’s an RP2040-Zero module that is quite tiny and looks more or less like a normal Pico. The two big differences are plusses: they have a reset button, and instead of a normal LED, they have a WS2812b-style LED.

Using that let me not worry about a lot of overhead on the board. Sure, it costs a few bucks more, so if you were mass-producing something, that’s not so good. But for this, it was perfect. I only had to add a speaker with a little transistor driver, which is probably unnecessary, four more WS2812B LEDs, and the SAO connector.

I was going to add a button, but I remembered from last year there is a way to use the BOOTSEL button on the module as a normal button, so I decided to cut a corner there. I could have shrunk the board, but I wanted some area for a protyping area and some cool silk screen, since I’m not artistic enough to come up with a nice outline for the board, so I kept the board full-size which is a lot of space.

The only strange thing is that the RP2040-Zero has parts on both sides, so it needs a cutout in the board. No problem. KiCAD didn’t have a good footprint for it that I could find, so I switched over to EasyEDA. They have handy integration with the parts you can get, too, so it is easy to price your board and even buy them already put together if you like.

While I waited for the boards, I decided to grab a similar Pico board and prototype the software. However, in the middle of this, I got a disturbing e-mail.

The Boards are Wrong?

The Chinese board house sent me a note: they were not sure the LEDs were connected properly. I checked, and I double-checked. They looked OK to me. I bravely asked them to build the boards as specified and went back to prototyping.

I’m not always a fan of Python, but we have a history of doing badges in Python so people can easily hack them. So I decided to stick to MicroPython. Getting the code and other features to work was a piece of cake. There is something surreal about using regular expressions to filter comments out of a file on a little microprocessor.

I2C Woe

Once I had the main features working, I set out to do the I2C when I realized an unpleasant fact. The Micropython library has I2C classes so you can host an I2C device. It does not have code that lets you be an I2C device yourself. CircuitPython apparently supports this, but I was in no mood to move the code over. Had I realized it going in, I might have made a different choice.

Luckily, an online forum had some code that directly manipulated the chip’s I2C registers and I was able to adapt that. If you are thinking of building an SAO with I2C capabilities, this is something to check before you go too far.

I stuck with the simple protocol that just lets me receive I2C commands because that’s all I needed, but there were examples of going further. For my project, I created the I2CTarget class. You tell the constructor which I2C bus you want to use, what pins you want to map to, and the I2C address you want to use. There are defaults for all of that.

Once it is running, you can check to see if data is available (call any()) and then read that data (get()). Don’t forget that reading data will block, so if you don’t want to block, check to see if anything is available first. The I2C hardware on the chip has a small FIFO, so that’s fine for this project.

I did create a subclass that allows an I2C object to act like a menu in the code. The menu object normally gets input from the user, but using this little trick lets the I2C commands fake user input.

The Boards Arrive

The board came in, as boards tend to do. I changed a few I/O pins in my code and… big sigh of relief, the LEDs were fine. A few tweaks on the code and the SAO was complete.

I left you all the files and documentation over on Hackaday.io. Maybe I went a little overboard with the documentation. You can decide. The source code is on GitHub, but you’ll find the link on the IO page.

Special Offer

Do you want one? Well, all the design files are there. Fire up your favorite way to etch boards or order them from your favorite board house. It wouldn’t be that hard to point-to-point wire one or put one on a breadboard except for the SAO connector, of course.

However, I have a deal for you. I have a limited number of these and will have them at Supercon. Find me — I’m easy to find since I mostly hang out at the soldering challenge table — and show me some code you propose to run that either uses the SAO or runs on the SAO. If I have any left, I’ll give you one, but when I’m out, I’m out. So, to be on the safe side, maybe make your own and bring it anyway.

❌
❌