Visualize Regular Expressions With Marbles

If you are one of those people who visualize things physically better than in the abstract, then Regex Marble Run by [bottomless] might be for you. You enter a test expression and a string, and the site generates a virtual marble machine that lets you see the regular expression pick apart the string in a physical way.

Click this link, and you’ll see the regular expression “^[hH]ack.[dD][^0-9]*$” which, if you aren’t a regular expression user, might seem a bit cryptic. However, it is fairly simple if you take it bit-by-bit.

The caret character tells it to match the start of the string. So “^dog” will match “dog” and “dog food” but won’t match “food for a dog.” The following bit “[hH]” will match either “h” or “H”. Then there is “ack” which is just what you think it is. So a string starting with “hack” or “Hack” might match (depending on the rest of the expression.

The period means match any single character. Then there’s another “[]” but this time with “dD” to match any kind of D. The next “[]” character class is a range from 0-9, but since there is a caret, the match is negated. So “[^0-9]” means match anything except a digit from 0 to 9. The “*” means we can have zero or more of these. So “HackxD” matches, but so does “HackxDXYZabc” for now. Trick question: Does “HackxDXYZabc123” match? So far, yes, but it only matches to the lowercase “c” character.

The final character, “$” means end of string. So now “HackxDXYZabc123” does not match because we are still in the middle of the string. However, “HackxDXYZabc” will match since the previous “*” “ate” the rest of the string.

Head spinning? The site will let you see each letter of a test string as a marble that falls through the different parts of the regular expression. Balls that pass wind up in the left-hand box, while failures are in the right-hand box. Will it help you? We don’t know, but it is fun to watch.

Want a refresher on regular expressions? Or perhaps you want some practice?

Birduino Plays Bird Calls On Demand With NFC-enabled Cards

All [Hannah Robertson]’s Birduino needs is for one to tap an NFC-enabled card to the reader, and the device plays one of the vocalizations associated with the bird shown on the card. It ties together a few different components into a whole, and acts as a good reference design for similar work. There are a few time-saving construction tips worth keeping in mind, too.

The major components are an Arduino Nano, an RC522 RFID reader, and an MP3 player module. Using hardware modules and breakout boards means simpler wiring and being able to take advantage of existing libraries and sample code. There are also a few other things in this build that avoid re-inventing the wheel.

A deck of bird cards plus a roll of NFC stickers equals a ready-to-scan assortment without having to design it oneself.

Rather than design, print, and cut a set of bird cards, [Hannah] found a set of bird-themed playing cards with a different North American bird on each. The back of each card gets an NFC sticker off a big roll purchased online. The result? A set of NFC-enabled bird cards with a minimum of work and fuss. The RC522 RFID reader doesn’t fully support NFC, but it works well enough to read the ID off the stickers.

When the user touches a card to the reader, the device plays one of the vocalizations from a collection of sounds for each bird. Creating the manifests and linking each card’s ID to them was a lot of manual work, but the result is great. The sound themselves come from the Cornell Guide to Bird Sounds of the United States and Canada, a $20 USD curated compilation of vocalizations from a staggering 908 bird species of North America. In a way, the biggest bottleneck is the card deck itself. At 52 cards plus two Jokers, it contains only a small subset of the total birds in the Cornell collection.

The enclosure is laser-cut clear acrylic, and here [Hannah] offers some time- and money-saving advice for anyone looking to glue acrylic to acrylic in a way that doesn’t frost or cloud the clear acrylic: Clear Gorilla Glue Gel. There are of course other glues made for this purpose, but Clear Gorilla Glue Gel (the one in a squeeze tube) is something one should be able to find in just about any hardware store. Another tip: double-check before buying, because many Gorilla Glue products are very similarly named despite being significantly different products.

Watch (and listen to) the video embedded below. If birds and their vocalizations are something that intrigues and inspires you, Cornell also has a resource for identifying birds by sound alone — we’ve seen it implemented with a Raspberry Pi and USB microphone.

Continue reading “Birduino Plays Bird Calls On Demand With NFC-enabled Cards” →

Making Photovoltaic Solar Cells With A Microwave

Although solar panels may seem like a kind of magic, they’re really quite simple devices, in their silicon form featuring nothing but the p-type silicon wafer and an n-type layer doped with e.g. phosphorus. Because of this simplicity it’s quite possible to make your own solar cells at home using only a few basic, off-the-shelf ingredients and a kiln, which in this recent video by [Dr. Semiconductor] uses a microwave kiln and thus justifies the video’s title.

Even the silicon wafer that you start with can be easily purchased online, though you have to be careful that it’s a bare wafer, without existing etchings on it. On this you need to get a phosphorus-rich layer, which is done by creating a delicious mixture of 1 mL of tetraethyl orthosilicate (TEOS), 0.3 mL of 85 wt% phosphoric acid, 5 mL of ethanol and 0.25 mL of distilled water. After low heat boiling this for 30 minutes, it is spincoated onto the cut square of silicon wafer using a spinning platform, like a PC fan.

Next, you shove the coated silicon into the kiln and put it into the microwave to bake at a fairly low power level for half an hour. In the video it took less than 50% power of the microwave to not melt the silicon, so remember that those microwave kilns get pretty hot.

With the delightful smells of freshly baked silicon now teasing your nostrils, you can then take out the doped silicon to sand or etch off the thin layer of glass that’s formed around the new PV cell. On the clear spots you can now put a gallium-indium contact on the p-type Si side and a wad of indium on the newly doped Si-P side, which are now your contacts for the PV cell.

The full recipe along with many of the issues discussed in the video can also be found on the blog article, though the video conclusion notes that many improvements are still possible. The created PV cell in the video reaches an efficiency of about 5%, but this could be improved through changes like the use of a clean-room, adding an anti-reflection coating and improving the contact with the cell.

Continue reading “Making Photovoltaic Solar Cells With A Microwave” →

An RV On A Bike

Bicycles are the ultimate form of transportation freedom. They’re easy to repair, parts are cheap, and they will travel almost anywhere for free, as long as the rider has enough calories. Their only real downside is dealing with car-dependent societies, but once a year there’s a place in the American desert that eschews all of this and [Attoparsec] decided to take this custom cargo bike modified into an RV out to Burning Man, a place and time that would be perfect for a build like this.

The build started out as a cargo bike, but not many of them have cargo areas long enough to support a sleeping human. To increase this storage capacity, the bed was extended towards the rear. Without moving the axle further back, though, this created a problem with tail-heaviness so two trailer jacks with wheels were added to the back to keep it from occasionally tipping up too far. The sleeping enclosure was built with rigid foam insulation and taped together, in a modified style common to the Burning Man event which helps keep out sun and playa dust. The bicycle recived one last upgrade to the chain to support the extra weight, and a solar-powered refrigerator, and then it was off to the desert.

The bike RV worked well in the end, and even handled a rain storm without the roof leaking. There were some problems with the customized drive train which were solved in the short term by pounding on one of the wheels occasionally with a hammer. [Attoparsec] left the event early for other reasons, though, and might not be back for a while. But vehicles like these are gaining in popularity, presuming there are safe places to ride them. [Paul Elkins] is often making ones like this gas-powered bicycle and trailer camper.

Continue reading “An RV On A Bike” →

Meshtastic Sniffer For DragonOS

Meshtastic has gained a lot of popularity over the last few years thanks to its low barrier of entry. No licenses are needed and the hardware is dirt cheap, at least when compared to a lot of ham radio gear. But while that physical barrier is low, there is a bit of a learning curve. Part of that comes from the fact that there are a lot of channels and modes that people could be communicating on, and unless the user knows that information up front it can be hard to find where the conversations are happening. [cemaxecuter] noticed this problem and built a Meshtastic sniffer into his radio-forward Linux distribution, DragonOS.

The sniffing software is built in C and comes as a complete standalone binary and does not rely on GNU Radio. With DragonOS up and running and the software loaded, it can look at the entire bandwidth that Meshtastic operates on and detect any traffic and decode it (as long as the key is known). [cemaxecuter] is using a HackRF as a software-defined radio for this project, which he notes doesn’t quite have enough bandwidth to cover every Meshtastic operating frequency, but it can get most of them. After firing up his own node, the software quickly detects it and shows its details in the terminal.

Software like this opens up a lot of opportunities for things that would be tedious, difficult, or impossible to do with with a standard Meshtastic node. Besides finding places where conversations are happening more easily, [cemaxecuter] also suggests that it could be used for wardriving and for locating or finding other networks much more easily. For those who still haven’t tried it out, take a look at this 2023 treatise on the protocol and hardware and then dive right in.

Continue reading “Meshtastic Sniffer For DragonOS” →

An Open Micro-Maniplulator Improved

If you need a micro-manipulator, you probably already have a good idea of what it does. For example, you might be moving a probe over an IC die or wafer. You might be looking at something through a microscope. The key is moving something in very small, precise increments along three axes. An open-source design for a micro-manipulator has seen significant improvements lately. You can see several videos about the device below.

The device uses stepper motors, parallel kinematics, and miniature ball joints to achieve precise motion. The recent version 4.0 update fixes a few problems. According to the GitHub page:

  • Self-collision during homing fixed.
  • Connection of the ball joint block with screws only was not well constrained and could be rotated a bit.
  • No reliable way to ensure consistent linkage rod length
  • Unnecessary ball joint friction
  • Accurate ball position heavily dependent on print quality and corner rounding
  • Rubber bands could not be changed or removed once glued in.

Continue reading “An Open Micro-Maniplulator Improved” →

One-stop Tool Shows Apple Intelligence The Door

Don’t want AI features on your Mac? Tough luck, unless one wants to imperfectly do it by hunting down settings in about a dozen different places. Even then, the multi-gigabyte models stay on disk. Unsatisfied by this state of affairs, [omlahore] created RemoveMacAI, a one-stop-shop debloater that shows Apple Intelligence the door, reclaiming its disk space on the way out.

With RemoveMacAI one has a single location from which to turn individual AI features off, delete the models behind them, and block MacOS from downloading them again by redirecting attempts to a closed local port.

What’s refreshingly nice about the tool is how transparent it is about what each setting or preset will change, and communicates clearly what exactly one loses access to by disabling it. Want it all gone? Easy. Use one or two features, but don’t want the rest? No problem. All changes are shown up-front before the tool changes anything, and all alterations are reversible.

Released only a couple weeks ago, to say the tool is popular would be an understatement. Windows 11 also got a “remove AI features” tool, and it requires constant updating to stay functional. Will a future MacOS update interfere similarly with RemoveMacAI? Probably, but one thing that is clear is that a tool like this resonates deeply with a nontrivial number of users.