A RISC-V LISP Compiler…Written In Lisp

Ah, Lisp, the archaic language that just keeps on giving. You either love or hate it, but you’ll never stop it. [David Johnson-Davies] is clearly in the love it camp and, to that end, has produced a fair number of tools wedging this language into all kinds of nooks and crannies. The particular nook in question is the RISC-V ISA, with their Lisp-to-RISC-V compiler. This project leads on from their RISC-V assembler by allowing a Lisp function to be compiled directly to assembly and then deployed as callable, provided you stick to the supported language subset, that is!

The fun thing is—you guessed it—it’s written in Lisp. In fact, both projects are pure Lisp and can be run on the uLisp core and deployed onto your microcontroller of choice. Because who wouldn’t want to compile Lisp on a Lisp machine? To add to the fun, [David] created a previous project targeting ARM, so you’ve got even fewer excuses for not being able to access this. If you’ve managed to get your paws on the new Raspberry Pi Pico-2, then you can take your pick and run Lisp on either core type and still compile to native.

The Lisp-Risc-V project can be found in this GitHub repo, with the other tools easy enough to locate.

We see a fair few Lisp projects on these pages. Here’s another bare metal Lisp implementation using AVR. And how many lines of code does it take to implement Lisp anyway? The answer is 42 200 lines of C, to be exact.

Building An Automotive Load Dump Tester

For those who have not dealt with the automotive side of electronics before, it comes as somewhat of a shock when you find out just how much extra you have to think about and how tough the testing and acceptance standards are. One particular test requirement is known as the “load dump” test. [Tim Williams] needed to build a device (first article of three) to apply such test conditions and wanted to do it as an exercise using scrap and spares. Following is a proper demonstration of follow-through from an analytical look at the testing specs to some interesting hand construction.

Manhattan-style layout

The load dump test simulates the effect of a spinning automotive alternator in a sudden no-load scenario, such as a loose battery terminal. The sudden reduction in load (since the battery no longer takes charging current) coupled with the inductance of the alternator windings causes a sudden huge voltage spike. The automotive standard ISO 7637-2:2011 dictates how this pulse should be designed and what load the testing device must drive.

The first article covers the required pulse shape and two possible driving techniques. It then dives deep into a case study of the Linear Tech DC1950A load dump tester, which is a tricky circuit to understand, so [Tim] breaks it down into a spice model based around a virtual transistor driving an RC network to emulate the pulse shape and power characteristics and help pin down the specs of the parts needed. The second article deals with analysing and designing a hysteric controller based around a simple current regulator, which controls the current through a power inductor. Roughly speaking, this circuit operates a bit like a buck converter with a catch diode circulating current in a tank LC circuit. A sense resistor in the output path is used to feedback a voltage, which is then used to control the driving pulses to the power MOSFET stage. [Tim] does a good job modeling and explaining some of the details that need to be considered with such a circuit.

Continue reading “Building An Automotive Load Dump Tester”

Are CRT TVs Important For Retro Gaming?

We always thought the older console games looked way better back in the day on old CRTs than now on a modern digital display. [Stephen Walters] thinks so too, and goes into extensive detail in a lengthy YouTube video about the pros and cons of CRT vs digital, which was totally worth an hour of our time. But are CRTs necessary for retro gaming?

The story starts with [Stephen] trying to score a decent CRT from the usual avenue and failing to find anything worth looking at. The first taste of a CRT display came for free. Left looking lonely at the roadside, [Stephen] spotted it whilst driving home. This was a tiny 13″ Sanyo DS13320, which, when tested, looked disappointing, with a blurry image and missing edges. Later, they acquired a few more displays: a Pansonic PV-C2060, an Emerson EWF2004A and a splendid-looking Sony KV24FS120. Some were inadequate in various ways, lacking stereo sound and component input options.

A poor analog cable coupled with rendering inaccuracy gives a nice filtering effect

A large video section discusses the reasons for the early TV standards. US displays (and many others using NTSC) were designed for 525 scan lines, of which 480 were generally visible. These displays were interlaced, drawing alternating fields of odd and even line numbers, and early TV programs and NTSC DVDs were formatted in this fashion. Early gaming consoles such as the NES and SNES, however, were intended for 240p (‘p’ for progressive) content, which means they do not interlace and send out a blank line every other scan line.  [Stephen] goes into extensive detail about how 240p content was never intended to be viewed on a modern, sharp display but was intended to be filtered by the analogue nature of the CRT, or at least its less-than-ideal connectivity. Specific titles even used dithering to create the illusion of smooth gradients, which honestly look terrible on a pixel-sharp digital display. We know the differences in signal bandwidth and distortion of the various analog connection standards affect the visuals. Though RGB and component video may be the top two standards for quality, games were likely intended to be viewed via the cheaper and more common composite cable route.

Continue reading “Are CRT TVs Important For Retro Gaming?”

Building A 3D Printed Scanning Tunneling Microscope

YouTuber [MechnicalRedPanda] has recreated a DIY STM hack we covered about ten years ago, updating it to be primarily 3D-printed, using modern electronics, making it much more accessible to many folks. This simple STM setup utilises a piezoelectric actuator constructed by deliberately cutting a piezo speaker into four quadrants. With individual drive wires attached to the four quadrants. [MechPanda] (re)discovered that piezoelectric ceramic materials are not big fans of soldering heat. Still, in the absence of ultrasonic welding equipment, he did manage to get some wires to take to the surface using low-temperature solder paste.

As you can tell, you can only image conductive samples

A makeshift probe holder was glued on the rear side of the speaker actuator, which was intended to take a super sharp needle-like piece of tungsten wire. Putting the wire in tension and cutting at a sharp angle makes it possible with many attempts to get some usable points. Usable, in this instance, means sharp down the atomic level. The sample platform, actuator mount and all the connecting parts are 3D-printed with PA-CF. This is necessary to achieve enough mechanical stability with normal room temperature fluctuations. Three precision screws are used to level the two platforms in a typical kinematic mount structure, which looks like the only hard-to-source component. A geared stepper motor attached to the probe platform is set up to allow the probe to be carefully advanced towards the sample surface. Continue reading “Building A 3D Printed Scanning Tunneling Microscope”

Making A Split-Anode Magnetron

YouTuber The Science Furry has been attempting to make a split-anode magnetron and, after earlier failures, is having another crack at it. This also failed, but they’ve learned where to focus their efforts for the future, and it sure is fun to follow along.

The magnetron theory is simple enough, and we’ve covered this many times, but the split anode arrangement differs slightly from the microwave in your kitchen. The idea is to make a heated filament the cathode, so electrons are ejected from the hot surface by thermionic emission. These are forced into a spiral path using a perpendicular magnetic field. This is a result of the Lorentz force. A simple pair of magnets external to the tube is all that is needed for that. Depending on the diameter of the cavity and the gap width, a standing wave will be emitted. The anodes must be supplied with an alternating potential for this arrangement to work. This causes the electrons to ‘bunch up’ as they cross the gaps, producing the required RF oscillation. The split electrodes also allow an inductor to be added to tune the frequency of this standing wave. That is what makes this special.

Fizz, pop, ah well.

The construction starts with pre-made end seals with the tungsten wire electrode wire passing through. In the first video, they attempted to coat the cathode with barium nitrate, but this flaked off, ruining the tube. The second attempt replaces the coiled filament with a straight wire and uses a coating paste made from Barium Carbonate mixed with nitrocellulose in a bit of acetone. When heated, the nitrocellulose and the carbonate will decompose, hopefully leaving the barium coating intact. After inserting the electrode assembly into a section of a test tube and welding on the ends, the vacuum could be pulled and sealed off. After preheating the cathode, some gasses will be emitted into the vacuum, which is then adsorbed into a nearby titanium wire getter. At least, that’s the theory.

Upon testing, this second version burned out early on for an unknown reason, so they tried again, this time with an uncoated cathode. Measuring the emission current showed only 50 uA, which is nowhere near enough, and making the filament this hot caused it to boil off and coat the tube! They decide that perhaps this is one step too many and need to experiment with the barium coating by making simpler diode tubes to get the hang of the process!

If this stuff is over your head, you need a quick history lesson about the magnetron. Next check out this teardown. Finally, we have covered DIY magnetrons before, like this excellent DIY magnetron-powered plasma sputtering device. Yes, you read that correctly.

Continue reading “Making A Split-Anode Magnetron”

The Statial-b Open Source Adjustable Mouse

Many of us are very heavy computer users, and two items that can affect our comfort and, by extension, our health are the keyboard and the mouse. We’ve covered many ergonomic and customisable keyboards over the years, but we are not sure we’ve covered a fully adjustable mouse until now. Here’s [Charlie Pyott] with their second take on an adjustable mouse, the open source, statial-b.

[Charlie] goes into an extensive discussion of the design process in the video after the break, which is a fascinating glimpse into the methods used by a professional industrial designer. The statial concept breaks the contact surfaces of the mouse into fixed and moveable sections. The moveable sections are attached to the mouse core via a pair of ball joints connected with extendible arms, allowing the surfaces to be adjusted for both position and orientation. The design process starts with 3D scanning their ‘workhorse mouse,’ a Razer Deathadder Elite. This creates a reference volume within which the statial body should fit in its minimal configuration.

So which mouse grip style are you into?

The design has a fixed central core, with each button (including the central scroller) separately adjustable. The side panel with a pair of thumb buttons is also moveable. Creating a model in Rhino 3D working with the grasshopper visual programming environment [Charlies] explored the surface constraints for the base, claw, finger and vertical grip styles common among mouse users. This model was then fed into Fusion 360 for the detailed design. After completing the design, it was passed back into Rhino 3D to add lattice effects to the panel. This helps reduce weight and lets the internal LEDs shine through. The design is intended for resin printing, so you could go wild with the visuals by missing custom resins if you were so inclined.

Continue reading “The Statial-b Open Source Adjustable Mouse”

A DaVinci Screw-Cutting Machine

It’s not news that Leonardo DaVinci was somewhat ahead of his time, and over the centuries many of the creations in his sketchbooks have been created and proved quite functional. The guys from the YouTube channel How To Make Everything have been looking at one such sketch, a screw thread-cutting machine. At first glance, it seems a little flawed. Threads are hard to make by hand, and you can see that this thread-cutting machine needs two identical threads operating as a reference to make it work. However, as the guys demonstrate, you can create threads by hand using simple methods.

Starting with an offset blade mounted on a block with a hole through it, a dowel can be scribed with a starter thread. This can then be worked by hand to cut enough of a groove for the application. They demonstrated that the machine was viable using nothing but wood for construction. A metal blade was mounted, and some preload force was applied to it with a spring. The dowel to be cut was loaded, and the machine ran back and forth enough times to create a very nice-looking screw thread. And once you’ve made two identical threaded dowels, you can use them to upgrade the machine or even build a second. Once you have a repeatable way to make such threads, all kinds of applications become more accessible. Need a bench vice? No problem now!

Whilst the demonstration doesn’t precisely follow the plans laid out by the master inventor, they aren’t all that clear on the cutting tool after all, it’s nice to see people still wanting to build his ideas, and we’ll certainly be following along.

If you like these “from scratch” builds, you’ll like this other one. Leonardo’s work wasn’t just about machines; he was also very interested in science. Here’s a recreation of his demonstration of gravity as a form of acceleration.

Continue reading “A DaVinci Screw-Cutting Machine”