Open Source LXI Tools Free Us From Vendor Bloat

LXI, or LAN eXtensions for Instrumentation is a modern control standard for connecting electronics instrumentation which supports ethernet. It replaces the older GPIB standard, giving much better performance and lower cost of implementation. This is a good thing.  [Martin Lund] has created the open source lxi-tools project which enables us to detach ourselves from the often bloated vendor tools usually required for talking LXI to your bench equipment. This is a partial rewrite of an earlier version of the tool, and now sports some rather nice features such as mDNS for instrument discovery, support for screen grabbing, and a LUA-based scripting backend. (API Link)

SCPI or Standard Commands for Programmable Instruments is the text-based language spoken by many instruments, allowing control and querying of an instrument. Just to be clear, SCPI is not at all a new thing, and older instruments that have GPIB or RS232 connectors, still could talk SCPI. lxi-tools is not for those. Some instruments can also be very picky about the formatting of commands, especially if they’re buggy, so the ability to interactively debug commands is very desirable. It is quite possible to make poor use of SCPI commands in your test script and end up with tests that just take far longer to execute that they need to. lxi-tools has a benchmarking tool too, which helps you to dig in and find out where all the time is going and make suitable adjustments.

We’ve not seen much about LXI on Hackaday, but we did cover using PyVISA for dealing with SCPI-over-GPIB in python.  If you have an older instrument  with GPIB and you don’t want to sell a internal organ to pay for a USB adaptor, here’s one you can make yourself.

FPGA Starter Videos To Help Soften That Learning Curve

Digi-Key have been producing YouTube videos for a number of years now, and if you weren’t aware, they’re definitely worthy of some viewing time. The playlist we’re highlighting here is a pretty good introduction to FPGAs, specifically those supported by open source tools, with low cost hardware. If you’ve always wanted to get into hacking FPGA platforms, but don’t know where to start, this is going to be a big help. After first covering what an FPGA is and is not, and why you want to use one, [Shawn Hymel] dives in to the toolchain.

We’re really lucky that the bitstream for the Lattice iCE40 was reverse engineered by the super talented Claire (née Clifford) Wolf (AMP hour interview) which enabled the project ICEstorm toolchain to be created. Leveraging Yosys for synthesis and logic mapping, Icarus verilog coupled with GTKwave for simulation, netpnr for place and route and finally the project ICEstorm bitstream tools for packing into iCE40 format and loading onto the hardware. The whole toolchain flow is managed by APIO for simplicity, that is, provided your FPGA board is supported!

Of course, [Shawn] is using the low cost (for an FPGA) ICEStick by Lattice for this tutorial series, and they’re currently hard to get (you know why by now!) but, there are many other boards you could use. If you want to play with applications coupling a ARM micro to an FPGA, then the excellent BlackIce Mx is an option, but there are many other boards now with an decent micro nestled next to an FPGA and a few peripherals for convenience.

We should mention here, that project ICEstorm and the iCE40 is not the only show in town. Project Trellis has had our eye for a while, which targets the more complex Lattice ECP5 device. Yosys and friends do support more architectures, but the available flows usually require at least some vendor tool support at this time (looking straight at you, Xilinx) but as more devices get decoded, the open source tools will grow, and we will bring you that news!

What’s nice about this Digi-Key YT series, is that it doesn’t just cover the basic toolchain flow, then drop you in at the deep end of a big learning curve. There are videos covering subjects such as finite state machines (FSMs), test-benching and simulation, using embedded (block) memories, PLLs, harder subjects like dealing with metastability and clock-domain crossing (OK, he covers one technique – there’s more than one way to skin that particular cat) before finally looking at soft cores like the RISC-V. Lots to learn, and pretty well executed if you ask us! A Github version is available, for those who can’t stand watching the videos!

Continue reading “FPGA Starter Videos To Help Soften That Learning Curve”

AR Display Shows CNC Lathe Operations In Real Time

[Kent VanderVelden] has come up with an interesting AR system to assist operators who are monitoring CNC lathes. (video, embedded, below) The idea is to first produce a ‘frozen’ video stream of the workpiece. This was achieved by placing a high-speed camera above the lathe, and triggering an image capture, synchronized to the rotational position of the workpiece. A high-speed rotary encoder, attached to the tailstock via a belt drive, feeds the current position into an Altera Terasic DE-Nano FPGA eval board. This is then compared to the position from another encoder, doing duty as an angular set point control. The resulting signal is used as the camera trigger to generate a video stream of just the frames where the angle is as selected by the operator, thus giving the impression of a frozen position. The video stream is sent over to a client device based on a Raspberry Pi 4 with a UPS hat, allowing it to be portable.

High speed rotary encoder driven via a belt

This video stream is overlaid with details of the current machine position, as well as the LinuxCNC G-code being executed and a graphical representation of the operation being performed by the machine. This combined video is then fed to a Vufine VUF-110 wearable, which is minimally invasive, allowing the operator to clearly see the machine of interest. As [Kent] suggests, there are many possible usage scenarios for such a setup, including remote monitoring of multiple operating machines by a single operator.

We’ve seen a few neat machine hacks over the years, here’s a nice project adding a programmable power feed to an old lathe, and since wood lathes are often missing out some DRO love, here’s a nice way to tell them that you care.

Continue reading “AR Display Shows CNC Lathe Operations In Real Time”

A Solari Mechanical Digital Clock Hack With A Little Extra

[Alfredo Cortellini] was perusing an antique shop in Bologna, and came across a nice example of a late 1950s timepiece, in the shape of a Solari Cifra 5 slave clock, but as the shop owner warned, it could never tell the time by itself. That sounded like a challenge, and the resulting hack is a nice, respectful tweak of the internals to bring it into the modern era. Since the clock requires a single pulse-per-minute in order to track time, the simplest track often followed is to open the back, set the correct time manually by poking the appropriate levers, and then let an external circuit take over clocking it. [Alfredo] wanted autonomy, and came up with a solution to make the thing fully adjust itself automatically.

Electronics-wise, initial prototyping was performed with a Nucleo 32 dev board and a pile of modules, before moving to a custom PCB designed in Altium Designer. An STM32G031 runs the show, with a few push buttons and a SSD1306 OLED display forming the UI.

Using some strategically-placed magnets and hall effect sensors, the status of the internal mechanism could be determined. Minute advancements were effected by driving the clock’s 24V electromagnet with a DRV8871 motor driver IC, the power supply for which was generated from the USB supply via a TPS61041 boost converter. In order to synchronise the mechanism with the electronics, the unit could have been driven to advance a minute at a time, but since every hour would need sixty pulses, this could take a while given the limited speed at which that could be done reliably. The solution was to sneak in a crafty MG996R high-torque servo motor, which pushes on the hour-advancement lever, allowing the unit to be zeroed much faster. Sensing of the zero-hour position was done by monitoring the date-advance mechanism, that is not used in this model of clock. Once zeroed, the clock could then be advanced to the correct time and kept current. Firmware source, utililising FreeRTOS can be found on the project GItHub, with schematics and Fusion360 files on the Hackaday.IO project linked above.

If you were thinking you’ve seen these Solari soft-flap displays here before, you’d be quite correct, but if you’re not so much interested in marking the passage of time, but bending such devices to your other indication whims, we’ve got you covered also.

Continue reading “A Solari Mechanical Digital Clock Hack With A Little Extra”

This ESP32 Pico Wristwatch Has Plenty Of Potential

First hand-built prototype. Nurse! isopropyl alcohol, stat!

Prolific hacker [Sulfuroid] is a medical doctor by day, and an electronics hobbyist by night, and quite how he finds the time, we have no idea.

The project we want to highlight is an ESP32 based LED smart watch, which we’ll sure you’ll agree, looks pretty nicely developed so far, and [Sulfuroid] has bigger plans, as you may find, when you dig into the GitHub repo. This analog-style design uses four groups of 0603-sized LEDs, arranged circularly to indicate the passage of time, or anything else you fancy. Since there are four control buttons, a pancake vibration motor, as well as Wi-Fi and Bluetooth, the possibilities are endless.

In order to stand a hope of driving those 192 LEDs from a single ESP32-Pico-D4, it was necessary to use a multiplexed LED driver, courtesy of the Lumissil IS31FL3733 device, which can handle arrays up to 12 x 16 devices. This chip is one to remember, since it has some really nice features, such as global current control to reduce CPU overhead, automatic breathing loops for those fancy fade effects, and even includes a handy open/short detection function, so it can report back assembly problems, assisting in reworking your dodgy soldering!

Routing circular arrays is such a pain.

Power and interfacing are taken care of via USB-C, with a TP4054 single Li-Ion cell charger chip handling the battery. This is a Taiwanese clone of the popular LTC4054, but that chip may be a bit hard to get at the moment. There is the common-as-muck CP2104 USB chip dealing with the emulated serial port side of things, since for some reason, the ESP32 still does not support USB. The Pico-D4 does have RTC support, but [Sulfuroid] decided to use a DS3231M RTC chip instead. We noticed the touch functionality wasn’t broken out – that could be added easily in the next revision!

We’ve covered watches a lot, because who doesn’t want custom geek-wear! Here’s a slick one, a fun one with the brains on display, and finally one using charlieplexing to get the component count down.

 

Wordle Reverse-Engineering And Automated Solving

Simplified Absurdle decision tree for a single letter guess from a set of three possible options

We don’t know about you, but we have mixed feelings about online puzzle fads. On one hand, they are great tool to help keep one sharp, but they’re just everywhere. The latest social-media driven fad, Wordle, may be a little bit too prevalent for our liking, with social media timelines stuffed with updates about the thing. [Ed Locard] was getting a bit miffed with friends’ constant posts about ‘Today’s Wordle’, and was hoping they’d get back to posting pictures of their dogs instead, so did what any self-respecting hacker would do, and wrote a python script to automate solving Wordle puzzles, in a likely futile attempt to get them to stop posting.

Actually, [Ed] was more interested in building a solver for a related game, Absurdle, which is described as an adversarial variant of Wordle. This doesn’t actually select a single word, but uses your guesses so far to narrow down a large pool of possible words, keeping you guessing for longer. Which is pretty mean of it. Anyway, [Ed] came up with a tool called Pyrdle, (GitHub project) which is essentially a command version of Absurdle, that has the capability of also solving Wordle as a byproduct. It turns out the JS implementation of Wordle holds the entire possible wordlist, client-side, so the answer is already sitting in your browser. The real interest part of this project is the approach to automated problem solving of puzzles with a very large potential set of solutions. This makes for an interesting read, and infinitely more so than reading yet another Wordle post.

And one final note; if you’re not at all onboard with this, love Wordle, and can’t get enough, you might like to install [brackendawson]’s comically titled (command) notfoundle shell handler, for some puzzling feedback on your command-line slip-ups. Well, it amused us anyway.

Puzzle projects hit these pages once in a while. Here’s the annual Xmas GCHQ puzzle, If you’re more into physical puzzles, with an electronics focus (and can solder) check out the DEF CON 29 puzzle badge!

A Tuning Fork Clock, With Discrete Logic

[Willem Koopman aka Secretbatcave] was looking at a master clock he has in his collection which was quite a noisy device, but wanted to use the matching solenoid slave clock mechanism he had to hand. Willem is a fan of old-school ‘sector’ clocks, so proceeded to build his ideal time piece — Vibrmatic — exactly the way he wanted. Now, since most time keeping devices utilise a crystal oscillator — which is little more than a lump of vibrating quartz — why not scale it up a bit and use the same principle, except with a metal tuning fork? (some profanity, just to warn you!)

Shock-mounted tuning force oscillator

A crystal oscillator operates in a simple manner; you put some electrical energy in, it resonates at its natural frequency, you sense that resonance, and feed it back into it to keep it sustaining. With a tuning fork oscillator, the vibration forcing and the feedback are both done via induction, coils act as the bridge between the electronic and mechanical worlds.

By mounting the tuning fork onto a shock mounting, the 257 Hz drone was kept from leaking out into the case and disturbing the household. This fork was specified to be 256 Hz, but [Willem] reckons the drag of the electromagnets pushed it off frequency a bit. Which make sense, since its a mechanical system, that has extra forces acting upon it.

The sector face was CNC cut from aluminium, the graphics engraved, then polished up a bit. Finally after a spot of paint, it looks pretty smart. Some nice chunks of upcycled wood taken from some building work spoils formed the exposed enclosure. On the electronics side, after totally ignoring the frequency error, and then tripping over a bunch of problems such as harmonics in the oscillation, and an incorrectly set-up divider, a solution which seemed to work was found, but like always, there are quite a few more details to the story to be found in the build log.

We’ve seen a tuning fork clock recently, like this 440 Hz device by [Kris Slyka] that the project above references, and whilst we’re talking about tuning forks, here’s a project log showing the insides of those ubiquitous 32.768 kHz crystal units.