Screenshot of a terminal showing the HELP command in action - outputting descriptions of other commands

Let’s Make SCPI More Helpful

The SCPI (Standards Command for Programmable Instruments) protocol is exceptionally popular in lab and workspace tools, letting you configure and fetch data from oscilloscopes and lab scales alike in a standardized way. However, when interfacing with a SCPI device, you need to use a programming guide document if you want to know the commands for any of the inevitably extended features; essentially, SCPI isn’t as human-friendly as you might want. [MisterHW] argues that SCPI could use more discoverability by proposing a HELP? command.

This proposal is so intuitive, it makes you wonder why it isn’t in the base spec. It adds a built-in command that provides information on other commands. Internally, the description is just an extra string parameter that you add to your command definition code, and you can use it to describe the parameter types and ranges it takes. The output is both human-readable and machine-parseable, and as it’s stored within your code, it’s way quicker to update the description string than it is to re-release programming guides. Which are themselves prone to being outdated as-is, so decreasing reliance on them is a win-win.

The proposal makes a lot of sense, and [MisterHW] is willing to back it up with a pull request to the most popular SCPI library, libscpi. Whenever the pull request finally goes through, you will have the option to easily add the HELP? command support to whatever SCPI-connected device you might have brewing.

While the old devices will eventually fade, SCPI is not about to die out – hackers keep building devices with SCPI as the communication protocol, as the spec is quite powerful. For instance, here’s this fancy temperature logger, or this Source Measurement Unit – both of them use SCPI for hacker-to-device data transfer, and it’s likely to be libscpi under the hood. Ever wondered what SCPI is all about? Check out our overview!

All About USB-C: Pinecil Soldering Iron

As many people have pointed out, what matters with USB-C isn’t just the standard, it’s the implementations. After all, it’s the implementations that we actually have to deal with, and it’s where most of the problems with USB-C arise. There is some fault to the standard, like lack of cable markings from the get-go, but at this point, I’m convinced that the USB-C standard is a lot better than some people think.

I’d like to walk you through a few USB-C implementations in real, open-source, adjacent, and just interesting products. They’re all imperfect in some way – it can’t be otherwise, as they have to deal with the messy real world, where perfection is a rarity.

Today, let’s check out the Pinecil. A soldering iron by Pine64, released a few years ago, keeping the price low and quality high. It sports both a barrel jack and a USB-C port for its power input – a welcome departure from the Miniware iron strategy, where neither the barrel-jack-only TS100 nor the low-power proprietary-tip TS80 irons quite did it. And, given its design around TS100 T12-style tips, it’s no wonder Pinecil took a well-deserved spot in hobbyist world.

Can’t Just Pull The Trigger

Now, you might be thinking that Pinecil ought to be a simple device. The usual way to get high power out of a USB-C port is a Power Delivery (PD) trigger IC, and you could merely use that. However, if you’ve read the USB-C power article, you might remember the 45 W vs 60 W charger scenario, where such an arrangement would fail immediately. Overall, the configurability of trigger ICs is quite low, and when encountering a PD compatibility problem with some PSU, you can’t do anything about it except replace the IC with a slightly-different-logic IC- if a replacement even exists, and it usually does not. This is costly and limiting for a real-world use product. Continue reading “All About USB-C: Pinecil Soldering Iron”

Swap The Clock Chip On The Mac SE/30 With An ATTiny85

As [Phil Greenland] explains in the first part of his excellent write-up, the lithium battery used to keep the real-time clock (RTC) going on the Macintosh SE/30 has a nasty habit of exploding and leaking its corrosive innards all over the board. Looking to both repair the damage on a system that’s already had a battery popped and avoid the issue altogether on pristine boards, he started researching how he could replace the battery with something a bit more modern.

Damage from a ruptured RTC battery.

It turns out, the ATtiny85 is pin-compatible with the Mac’s original RTC chip, and indeed, [Andrew Makousky] had already written some code that would allow the microcontroller to emulate it. This is actually a bit more complex than you might realize, as the original RTC chip was doing double-duty: it also held 256 bytes of parameter random access memory (PRAM), which is where the machine stored assorted bits of info like which drive to boot from and the mouse cursor speed.

But after getting the mod installed, the computer refused to start. It turns out the project targeted earlier machines like the Macintosh Plus and SE, and not his higher-performance SE/30. Thanks to community resources like this KiCad recreation of the SE/30’s motherboard, contemporary technical documents, and his trusty logic analyzer, [Phil] was able to figure out that the timing was off — the code was simply struggling to respond to the faster machine. Continue reading “Swap The Clock Chip On The Mac SE/30 With An ATTiny85”

All About USB-C: Power Delivery

USB-C eliminates proprietary barrel plug chargers that we’ve been using for laptops and myriads of other devices. It fights proprietary phone charger standards by explicitly making them non-compliant, bullying companies into making their devices work with widely available chargers. As a hobbyist, you no longer need to push 3 A through tiny MicroUSB connectors and underspecced cables to power a current-hungry Pi 4. Today, all you need is a USB-C socket with two resistors – or a somewhat special chip in case the resistors don’t quite get you where you want to be.

You get way more bang for your buck with USB-C. This applies to power too; after all, not all devices will subsist on 15 W – some will want more. If 15 W isn’t enough for your device, let’s see how we can get you beyond.

Reaching Higher

USB-C power supplies always support 5 V and some are limited to that, but support for higher voltages is where it’s at. The usual voltage steps of USB-C are 5 V, 9 V, 15 V and 20 V ; 12V support is optional and is more of a convention. These steps are referred to as SPR, and EPR adds 28 V, 36 V and 48 V steps into the mix – for up to 240 W; necessitating new cables, but being fully backwards and forwards compatible, and fully safe to use due to cable and device checks that USB-C lets you perform.

A charger has to support all steps below its highest step, which means that 20 V-capable chargers also have to support 5 V, 9 V, and 15 V as well – in practice, most of them indeed do, and only some might skip a step or two. You can also get voltages in-between, down to 3.3 V, even, using a PD standard called PPS (or the AVS standard for EPR-range chargers) – it’s not a requirement, but you’ll find that quite a few USB-C PSUs will oblige, and PPS support is usually written on the label. Continue reading “All About USB-C: Power Delivery”

A Simple Serial Display

Often with more “modern” complex protocols involving handshaking, token exchanges, and all the other hoops and whistles accompanying them, we forget how useful and powerful serial can be. In what might be a wonderful tribute to that, [Davide Gironi] created a simple AVR-powered 16-digit serial display.

It can display two numbers, and that’s it. A MAX7219 drives the display, and the brains are an ATmega8. It’s straightforward to send new values: a start byte, a CRC, the data to display, and an end byte. A CP2102 provides a UART to USB interface to connect to a host. An EEPROM helps it remember the last numbers shown. It supports positive, negative, and floating-point numbers.

This is a beautiful example of doing one thing and doing it well. The design is simple and allows it to be used for anything. You can show the current stock market price, the time for the next two trains for your commute, or whatever else you can think of. [Davide] included a schematic, code, and a 3d printed enclosure.

Perhaps the idea could be combined with a clever design for a single-motor seven-segment display.

Continue reading “A Simple Serial Display”

Low-Cost 433 MHz Door Sensors Get Open Firmware

It’s an unfortunate reality these days that if you see a cheap piece of consumer electronics, there’s a good chance its only cheap because it’s designed to lock you into some ecosystem where you’ll either end up paying a subscription, or worse, have your personal information sold behind your back. One of the best tools we have against these sort of anti-consumer practices is the development of open source firmware replacements that put control of the device into the hands of the community, rather than a corporation.

Now, thanks to the work of [Jonathan Armstrong] we have such a firmware for the 433 MHz magnetic door and window sensors that you can pick up on AliExpress for $4 USD a piece. The new firmware not only ensures you can use these sensors with a wide array of receivers, but adds a number of new features over their stock configuration. Continue reading “Low-Cost 433 MHz Door Sensors Get Open Firmware”

Wireless CNC Pendant Implemented With ESP-NOW

As a fervent fan of twiddly and twirly widgets and tactile buttons in a device’s user interface, [Steve M Potter] created a remote control (pendant) for his CNC machine, which he explains in a recent video that’s also linked down below. In addition to all the tactile goodness, what is perhaps most interesting about this controller is that it uses Espressif’s ESP-NOW protocol. This still uses the same 2.4 GHz as WiFi would, but uses a system more akin to the pairing of a wireless mouse or keyboard.

Advantages of ESP-NOW include the lower power usage, longer range, no requirement for a router and WiFi SSID & password. As far as latency goes, [Steve] measured a round-trip latency of 2.4 ms, which is fast enough for this purpose. Since it does control a potentially dangerous machine, all transmissions are acknowledged and re-transmitted at higher power if needed.

The lower power usage means that the pendant will last a lot longer on a single charge from the 18650 Li-ion cell, while ESP-NOW’s fixed address pairing saves time when turning the pendant on. Meanwhile, on the CNC side, another ESP32 acts as the receiving end for commands, although theoretically an ESP8266 could be used as well, if size or power was a concern there.

As for the transparent enclosure? It’s to make it easier to show it off to interested folk, apparently.

Continue reading “Wireless CNC Pendant Implemented With ESP-NOW”