Interference Patterns Harnessed For Optical Logic Gates

The basics of digital logic are pretty easy to master, and figuring out how the ones and zeroes flow through various kinds of gates is often an interesting exercise. Taking things down a level and breaking the component AND, OR, and NOR gates down to their underlying analog circuits adds some complexity, but the flow of electrons is still pretty understandable. Substitute all that for photons, though, and you’ll enter a strange world indeed.

At least that’s our take on [Jeroen Vleggaar]’s latest project, which is making logic gates from purely optical components. As he himself admits in the video below, this isn’t exactly unexplored territory, but his method, which uses constructive and destructive interference, seems not to have been used before. The basic “circuit” consists of a generator, a pair of diffraction patterns etched into a quartz plate, and an evaluator, which is basically a pinhole in another plate positioned to coincide with the common focal point of the generator patterns. An OR gate is formed when the two generators are hit with in-phase monochromatic light. Making the two inputs out of phase by 180° results in an XOR gate, as destructive interference between the two inputs prevents any light from making it out of the evaluator.

Continue reading “Interference Patterns Harnessed For Optical Logic Gates”

USB-C Programmable Power Supply For Any Project

USB-C Power Delivery 3.0 (PD3.0) introduces a new Programmable Power Supply (PPS) mode, which allows a device to negotiate any supply of 3.3-21 V in 20 mV steps, and up to 5 A of current in 50 mA steps. To make use of this new standard, [Ryan Ma] create the PD Micro, an Arduino-compatible development board, and a self-contained software library to allow easy integration of PD3.0 and the older PD2.0 into projects.

The dev board is built around an ATMega32U4 microcontroller and FUSB302 USB-C PHY. The four-layer PCB is densely packed on both sides to fit in the Arduino Pro Micro Form factor. The board can deliver up to 100W (20 V at 5 A) from an appropriate power source and shows visual feedback on the PD status through a set of LEDs.

The primary goal of the project is actually in the software. [Ryan] found that existing software libraries for PD take up a lot of memory, and are difficult to integrate into small projects. Working from the PD specifications and PD PHY chip data sheet, he created a lighter weight and self-contained software library which consumes less than 8 K of flash and 1 K of RAM. This is less than half the Flash and RAM available on the ATmega32U4.

[Ryan] is running a Crowd Supply campaign (video after the break) to get some of these powerful boards out in the wild, and has released all the source code and schematics on GitHub. The PCB design files will be released during the last week of the campaign, around 25 January 2021.

USB-C and power delivery are not simple standards, but the ability to add a high-speed data interface and a programmable power supply into almost any project has real potential.

Continue reading “USB-C Programmable Power Supply For Any Project”

Hackability Matters

The Unix Way™ provides extreme hackability. The idea is that software should be written as tools to accomplish discrete tasks, and that it should be modular, extensible, and play well with others. It’s like software as a LEGO set — you can put the blocks together however you want, within limits, and make stuff that’s significantly cooler than any of the individual blocks alone.

Clearly this doesn’t work for all applications — things like graphics editors and web browsers don’t really lend themselves to being elegant tools that integrate well with others, right? It’s only natural that they’re bloaty walled gardens. What happens in the browser must stay in the browser, right?

But how sad is it that the one piece of software you use all day, your window into cyberspace, doesn’t play well with the rest of your system? I’d honestly never really been bothered by that fact until stumbling on TabFS. It’s an extension to Chrome that represents the tabs on your browser as if they were files on your local system — The Unix Way™. And what this means is that any other program that can read from or write to a file can open tabs, collect them, change webpages on the fly, and so on. It opens up the browser to you.

This is tremendously powerful. Don’t like the bookmarking paradigm of your particular browser? Writing your own would be a snap in Python — and you could do cleverer things like apply a little machine learning to handle putting them in categories. Want to pop open (or refresh) a set of webpages at a particular time every day? Cron, or its significantly more complicated counterpart systemd, and a couple lines of code will do that. Want to make a hardware button that converts dark mode to light mode and vice-versa for every website starting with “H”? Can do.

I’m picking on browsers, but many large pieces of software are inaccessible in the same way — even if they’re open source, they don’t open up channels for interaction with user code or scripts. (Everything “in the cloud” or “as a service”, I’m looking at you! But that’s a further rant for another day.) And that’s a shame, because most of these “big” pieces of software actually do the coolest things.

So please, if you’re working on a big software package, or even just writing a plug-in for one, do think about how you can make more of its abilities available to the casual scripter. Otherwise, it’s just plastic blocks that don’t fit with the rest of the set.

TV Turned Automatic Etch A Sketch With Raspberry Pi

Considering one of the biggest draws of the original Etch a Sketch was how simple it was, it’s always interesting to see the incredible lengths folks will go to recreate that low-tech experience with modern hardware. A perfect example is this giant wall mounted rendition of the iconic art toy created by [Ben Bernstein]. With a Raspberry Pi and some custom electronics onboard, it can even do its own drawing while you sit back and watch.

At a high level, what we’re seeing here is a standard Samsung LCD TV with a 3D printed Etch a Sketch shell mounted on top of it. That alone would be a pretty neat project, and had [Ben] just thrown some videos of designs getting sketched out onto the display, he could have achieved a similar end result with a lot less work. But where’s the fun in that?

It took hundreds of hours to print the shell.

To make his jumbo Etch a Sketch functional, [Ben] spent more than a year developing the hardware and software necessary to read the user input from the two large 3D printed knobs mounted under the TV. The knobs are connected to stepper motors with custom PCBs mounted to their backs that hold a A4988 driver chip as well as a AS5600 absolute magnetic rotary encoder. This solution allows the Raspberry Pi to not only read the rotation of the knobs when a person is using the Etch a Sketch interactively, but spin them realistically when the software takes over and starts doing an autonomous drawing.

Several Python scripts pull all the various pieces of hardware together and produce the final user interface. The software [Ben] wrote can take an image and generate paths that the Etch a Sketch can use to realistically draw it. The points that the line is to pass through, as well as variables that control knob rotation and pointer speed, are saved into a JSON file so they can easily be loaded later. Towards the end of the Imgur gallery [Ben] has created for this project, you can see the software working its way through a few example sketches.

We’ve seen several projects that motorize an Etch a Sketch to draw complex images, but this may be the first example we’ve seen where everything was done in software. This digital version doesn’t need to follow the traditional “rules”, but we appreciate that [Ben] stuck to them anyway. Incidentally this isn’t the first Etch a Sketch TV conversion to grace these pages, though to be fair, the other project took a radically different approach.

Continue reading “TV Turned Automatic Etch A Sketch With Raspberry Pi”

Doing WiFi With Software Defined Radio

Software defined radio lets RF hardware take on a broad spectrum of tasks, all based on how that hardware is utilized in code. The bladeRF 2.0 micro xA9 is one such device, packing a fat FPGA with plenty of room for signal processing chains on board. As a demonstration of its abilities, [Robert Ghilduta] set about writing a software-defined WiFi implementation for the platform.

The work is known as bladeRF-wiphy, as it implements the PHY, or physical layer of the WiFi connection, in the 7-layer OSI networking model. Modulation and demodulation of the WiFi signal is all handled onboard the Cyclone V FPGA, with the decoded 802.11 WiFI packets handed over to the Linux mac80211 module which handles the MAC level, or medium access control. Thanks to the capability baked into mac80211, the system can act as either an access point or an individual station depending on the task at hand.

[Robert] does a great job of explaining the why and the how of implementing WiFi modulation on an FPGA, as well as some basics of modem development in both software and hardware. It’s dense stuff, so for those new to the field of software defined radio, consider taking some classes to get yourself up to speed!

Lego Tank Fires Soccer Ball Cannon

Back in the 20th century, Lego Technic was a popular toy designed to teach kids about mechanical technology, and be a lot of fun to boot. Motors and pneumatics were available, but by and large you had to move your creations and make the noises yourself. That’s not the case these days, as the [Brick Experiment Channel] demonstrates with this impressive Lego tank.

The drivetrain is straightforward, using standard Lego tank treads with each side given its own motor for easy skid steering. However, the real party piece is the slingshot cannon, which launches Lego soccer balls at 60 km/h. Utilizing several motors, it’s complete with elevation adjustment for accurate ranging, and a 6 round magazine so you can (slowly) prosecute your targets with rounds downrange.

What really makes this build great is the control system, with the tank being controlled by a PS4 controller via Sbrick, a device that lets Lego motors be controlled via Bluetooth. We’d love to build a couple of Lego vehicles and have them blast away at each other. We’ve seen the technology used before for a secret heist robot. Video after the break.

Continue reading “Lego Tank Fires Soccer Ball Cannon”

Manual Antenna Tuner Shows How Homebrewing Is Done

If there’s anything about amateur radio that has more witchcraft in it than the design and implementation of antennas, we don’t know what it would be. On the face of it, hanging out a chunk of wire doesn’t seem like it should be complicated, but when you dive into the details, building effective antennas and matching them to the job at hand can be pretty complex.

That doesn’t mean antenna topics have to remain a total mystery, of course, especially once someone takes the time to explain things properly. [Charlie Morris (ZL2CTM)] recently did this with a simple antenna tuner, a device used to match impedances between a transmitter and an antenna. As he explains in the first video below, his tuner design is really just a Wheatstone bridge where the antenna forms half of one leg. A toroidal transformer with multiple taps and a variable capacitor forms an LC circuit that matches the high impedance antenna, in this case a multi-band end-fed halfwave, with the nominal 50-ohm load expected by the transceiver. A small meter and a diode detector indicate when the bridge is balanced, which means the transceiver is seeing the proper load.

The second video below shows the final implementation of the tuner; as a fan of QRP, or low-power operation, [Charlie] favors simple, lightweight homebrew gear that can be easily taken into the field, and this certainly fits the bill. A final video shows the tuner in use in the field, with a NanoVNA proving what it can do. As usual, [Charlie] protests that he not an expert and that he’s just documenting what he did, but he always does such a good job of presenting the calculations involved in component selection that any ham should be able to replicate his builds.

Continue reading “Manual Antenna Tuner Shows How Homebrewing Is Done”