Alternatives Don’t Need To Be Bashed

By default, bash is the most popular command language simply because it’s included in most *nix operating systems. Additionally, people don’t tend to spend a lot of time thinking about whatever their computer uses for scripting as they might for other pieces of software like a word processor or browser. If you are so inclined to take a closer look at this tool that’s often taken for granted, there are a number of alternatives to bash and [monzool] wanted to investigate them closely.

Unlike other similar documentation that [monzool] has come across where the writers didn’t actually use the scripting languages being investigated, [monzool] is planning to use each of these and accomplish specific objectives. This will allow them to get a feel for the languages and whether or not they are acceptable alternatives for bash. Moving through directories, passing commands back and forth, manipulating strings, searching for files, and manipulating the terminal display settings are all included in this task list. A few languages are tossed out before initial testing even begins for not meeting certain specific requirements. One example is not being particularly useful in [monzool]’s preferred embedded environments, but even so there are enough bash alternatives to test out ten separate languages.

Unfortunately, at the end of the day none of the ten selected would make a true replacement for bash, at least for [monzool]’s use case, but there were a few standouts nonetheless. Nutshell was interesting for being a more modern, advanced system and [monzool] found Janet to be a fun and interesting project but had limitations with cross-compiling. All in all though this seemed to be an enjoyable experience that we’d recommend if you actually want to get into the weeds on what scripting languages are actually capable of. Another interesting one we featured a while back attempts to perform as a shell and a programming language simultaneously.

Electric Motors Run Continuously At Near-Peak Power

For a lot of electrical and mechanical machines, there are nominal and peak ratings for energy output or input. If you’re in marketing or advertising, you’ll typically look at the peak rating and move on with your day. But engineers need to know that most things can only operate long term at a fraction of this peak rating, whether it’s a power supply in a computer, a controller on an ebike, or the converter on a wind turbine. But this electric motor system has a unique cooling setup allowing it to function at nearly full peak rating for an unlimited amount of time.

The motor, called the Super Continuous Torque motor built by German automotive manufacturer Mahle is capable of 92% of its peak output power thanks to a unique oil cooling system which is able to remove heat and a rapid rate. Heat is the major limiter for machines like this; typically when operating at a peak rating a motor would need to reduce power output to cool down so that major components don’t start melting or otherwise failing. Given that the largest of these motors have output power ratings of around 700 horsepower, that’s quite an impressive benchmark.

The motor is meant for use in passenger vehicles but also tractor-trailer style trucks, where a motor able to operate at its peak rating would mean a smaller size motor or less weight or both, making them easier to fit into the space available as well as being more economically viable. Mahle is reporting that these motors are ready for production so we should be seeing them help ease the transportation industry into electrification. If you’re more concerned about range than output power, though, there’s a solution there as well so you don’t have to be stuck behind the times with fossil fuels forever.

Thanks to [john] for the tip!

A Handheld Gaming PC With Steam Deck Vibes

Since its inception, the Steam Deck has been a bit of a game changer in the PC gaming world. The goal of the handheld console was to make PC gaming as easy and straightforward as a walled-garden proprietary console like a Switch or Playstation but still allow for the more open gaming experience of a PC. At its core, though, it’s essentially a standard PC with the parts reorganized into handheld form, and there’s no reason any other small-form-factor PC can’t be made into a similar system. [CNCDan] has the skills and tools needed to do this and shows us how it’s done.

The build is based around a NUC, a small form factor computer that typically uses the same low-power mobile processors and graphics cards found in laptops but without the built-in battery or screen. This one has an AMD Ryzen 7 processor with Radeon graphics, making it reasonably high-performing for its size. After measuring out the dimensions of the small computer and preparing for other components like the battery, joysticks, buttons, and even a trackpad, it was time to create the case. Instead of turning to a 3D printer, this one is instead milled on a CNC machine. Something tells us that [CNCDan] prefers subtractive manufacturing in general.

With all the parts assembled in the case, the build turns into a faithful Steam Deck replica with a few bonuses, like an exposed Ethernet port and the knowledge that everything can easily be fixed since it was built from the ground up in the first place. The other great thing about builds like these is they don’t need an obscure NUC for the hardware; you can always grab your old Framework mainboard for handheld gaming instead. Reminded us of the NucDeck.

Continue reading “A Handheld Gaming PC With Steam Deck Vibes”

Ethernet From First Principles

For someone programming in a high-level language like Python, or even for people who interact primarily with their operating system and the software running on it, it can seem like the computer hardware is largely divorced from the work. Yes, the computer has to be physically present to do something like write a Hackaday article, but most of us will not understand the Assembly language, machine code, or transistor layout well enough to build up to what makes a browser run. [Francis Stokes] is a different breed, though, continually probing these mysterious low-level regions of our computerized world where he was recently able to send an Ethernet packet from scratch.

Continue reading “Ethernet From First Principles”

A Tiny Chemistry Lab

While advances in modern technology have allowed average people access to tremendous computing power as well as novel tools like 3D printers and laser cutters for a bare minimum cost, around here we tend to overlook some of the areas that have taken advantage of these trends as well. Specifically in the area of chemistry, the accessibility of these things have opened up a wide range of possibilities for those immersed in this world, and [Marb’s Lab] shows us how to build a glucose-detection lab in an incredibly small form factor.

The key to the build is a set of three laser-cut acrylic sheets, which when sandwiched together provide a path for the fluid to flow as well as a chamber that will be monitored by electronic optical sensors. The fluid is pumped through the circuit by a custom-built syringe pump driven by a linear actuator, and when the chamber is filled the reaction can begin. In this case, if the fluid contains glucose it will turn blue, which is detected by the microcontroller’s sensors. The color value is then displayed on a small screen mounted to the PCB, allowing the experimenter to take quick readings.

Chemistry labs like this aren’t limited to one specific reaction, though. The acrylic plates are straightforward to laser cut, so other forms can be made quickly. [Marb’s Lab] also made the syringe pump a standalone system, so it can be quickly moved or duplicated for use in other experiments as well. If you want to take your chemistry lab to the extreme, you can even build your own mass spectrometer.

Continue reading “A Tiny Chemistry Lab”

Using AI To Help With Assembly

Although generative AI and large language models have been pushed as direct replacements for certain kinds of workers, plenty of businesses actually doing this have found that using this new technology can cause more problems than it solves when it is given free reign over tasks. While this might not be true indefinitely, the real use case for these tools right now is as a kind of assistant to certain kinds of work. For this they can be incredibly powerful as [Ricardo] demonstrates here, using Amazon Q to help with game development on the Commodore 64.

The first step here was to generate code that would show a sprite moving across the screen. The AI first generated code in all caps, as was the style at the time of the C64, but in [Ricardo]’s development environment this caused some major problems, so the code was converted to lowercase. A more impressive conversion was done in the next steps, as the program needed to take advantage of the optimizations found in the Assembly language. With the code converted to 6502 Assembly that can run on the virtual Commodore, [Ricardo] was eventually able to show four sprites moving across the screen after several iterations with the AI, as well as change the style of the sprites to arbitrary designs.

Although the post is a bit over-optimistic on Amazon Q as a tool specifically for developers, it might have some benefits over other generative AIs especially if it’s capable at the chore of programming in Assembly language. We’d love to hear anyone with real-world experience with this and whether it is truly worth the extra cost over something like Copilot or GPT 4. For any of these generative AI models, though, it’s probably worth trying them out while they’re in their early stages. Keep in mind that there’s a lot more than programming that can be done with some of them as well.

Disposable Vape Batteries Power EBike

There are a lot of things that get landfilled that have some marginal value, but generally if there’s not a huge amount of money to be made recycling things they won’t get recycled. It might not be surprising to most that this is true of almost all plastic, a substantial portion of glass, and even a lot of paper and metals, but what might come as a shock is that plenty of rechargeable lithium batteries are included in this list as well. It’s cheaper to build lithium batteries into one-time-use items like disposable vape pens and just throw them out after one (or less than one) charge cycle, but if you have some spare time these batteries are plenty useful.

[Chris Doel] found over a hundred disposable vape pens after a local music festival and collected them all to build into a battery powerful enough for an ebike. Granted, this involves a lot of work disassembling each vape which is full of some fairly toxic compounds and which also generally tend to have some sensitive electronics, but once each pen was disassembled the real work of building a battery gets going. He starts with testing each cell and charging them to the same voltage, grouping cells with similar internal resistances. From there he assembles them into a 48V pack with a battery management system and custom 3D printed cell holders to accommodate the wide range of cell sizes. A 3D printed enclosure with charge/discharge ports, a power switch, and a status display round out the build.

With the battery bank completed he straps it to his existing ebike and hits the trails, easily traveling 20 miles with barely any pedal input. These cells are only rated for 300 charge-discharge cycles which is on par for plenty of similar 18650 cells, making this an impressive build for essentially free materials minus the costs of filament, a few parts, and the sweat equity that went into sourcing the cells. If you want to take an ebike to the next level of low-cost, we’d recommend pairing this battery with the drivetrain from the Spin Cycle.

Thanks to [Anton] for the tip!