Writing Arduino Libraries, An Expert View

The Arduino IDE has a bit of a split personality. On the one hand, it is a simple environment where you can just pick and choose a few libraries, write a few lines of code, and make lots of interesting things. On the other hand, it is also an ecosystem in which many different boards and libraries can be supported. Writing a great library that everyone can easily use takes a little forethought. There is an official style guide, but a recent post by [Nate] from Sparkfun points out lessons learned from writing more libraries than most people.

Of course, as you might expect, some of this is a matter of opinion, and [Nate] admits that. For example, they always use the serial port at 115,200 baud, but they do note that 9,600 baud is also popular. They also suggest making code as readable as possible, which is usually good advice. In the old days, writing terse code might lead to higher efficiency, but with modern compilers, you ought to get a tight final result even when doing things in a pretty verbose fashion.

Continue reading “Writing Arduino Libraries, An Expert View”

MIL-SPEC Keyboard Now Salutes USB

When [easyjo] picked up this late ’80s Marconi mil-spec keyboard for cheap, he knew it wouldn’t be easy to convert it to USB — just that it would be worth it. Spoiler alert: those LEDs aren’t a mod, they’re native. They get their interesting shape from the key traces, which are in the four corners.

Despite having way-cool buttons such as WPNS HOLD, and the fact that Control is on the home row where it belongs, this keyboard does not look fun to type on at all for any length of time. Of course, the point of this keyboard is not comfort, but a reliable input device that keeps out dust, sweat, liquids, and the enemy.

This is probably why the controller is embedded into the underside of the key switch PCB instead of living on its own board.  [easyjo] tried to analyze the signals from the existing 26-pin connector, but it didn’t work out.

So once he was able to decode the matrix, he removed the controller chip and wired the rows and columns directly to an Arduino Leonardo. Fortunately, the LEDs were just a matter of powering their columns from the front side of the board.

The availability of certain kinds of military surplus can make for really interesting modernization projects, like adding POTS to a field telephone.

Via r/duino

RC Ground Effect Vehicle Skims Over The Water

In the 1960s the Soviet Union began experimenting with what they called ekranoplans, ground effect vehicles (GEVs) that were something of a hybrid between a ship and a large airplane. Their stubby wings didn’t provide enough lift for the vehicle to fly in the traditional sense, the craft essentially rode on a cushion of pressurized air produced by the aerodynamic interaction between the wings and the surface of the water. But after decades of testing, the ekranoplan never became much more than a curiosity for American intelligence agencies to ponder over.

Now [Peter Sripol] has built his own version of what the CIA dubbed the “Caspian Sea Monster”, and judging by the video of him “flying” it around a lake, the design seems to tick all the boxes. The advantage of a GEV is that it’s far faster than a ship and more fuel efficient than an aircraft of similar size. They also operate low enough to avoid enemy radar, which made them very appealing for military applications. Not that any of those characteristics apply to an RC vehicle, but at least it looks cool.

Ironically, it took some extra effort for [Peter] to keep his scratch built ekranoplan from getting airborne. Built out of foam covered with aluminum tape, the craft was light enough that even the tiny wings were enough to break it free from the ground effect if it got going fast enough. It didn’t help that the electric ducted fan motors used were probably a bit too powerful as well.

But by carefully adjusting the throttle and control surfaces, [Peter] was able to keep his craft firmly planted in the ground effect most of the time. Seeing the large RC craft floating just a few inches over the water is very impressive, and thanks to the application of some Soviet-style iconography on its burnished aluminum body, it looks like found-footage from a Cold War test program.

Hackaday readers will likely be familiar with [Peter] and his exploits. From building his own human-scale airplane out of foam board to convincing a cordless drill that it can fly, he’s creations have never been overly concerned with the status quo.

Continue reading “RC Ground Effect Vehicle Skims Over The Water”

Raspberry Pi 4 Offers Up 2 GB For The Price Of One

The Raspberry Pi 4 represents a significant performance increase over previous generations, unlocking potential applications that were simply beyond the abilities of these diminutive Single Board Computers (SBCs) in the past. Some would even argue that the Pi 4, with a quad-core Cortex-A72 running at 1.5 GHz, now holds its own as a lightweight ARM desktop computer for those interested in finally breaking free from x86.

In light of the considerable upgrade in processing power, the choice to outfit the base model Pi 4 with just 1 GB of RAM always seemed a bit odd. So it’s little surprise that the Raspberry Pi Foundation has decided to shift things around and lower the price of the 2 GB model to the traditional $35. In a blog post this morning, Eben Upton said that with RAM prices falling over the last year, the company thought it was time they passed the savings onto the customer.

This change comes just two days before the Pi’s 8th birthday. There has been speculation that the Pi 4 is capable of operating with 8 GB of RAM and unveiling that news to coincide with this anniversary would have been a clever marketing move. Alas, it looks like we’ll have to continue to wait.

For those who are invested in the 1 GB model, have no fear. Rather than delete the product from the lineup entirely, the company will be keeping it available for anyone who needs it. So if you’ve got a commercial or industrial application that might not take kindly to the hardware getting switched out, you’ll still have a source of spares. That said, the pricing for the 1 GB model won’t be changing, so there’s no cost advantage to using it in new designs.

Combined with news that compatibility issues the Pi 4 had with generic USB-C power supplies was fixed with an under the radar board revision, it seems there’s never been a better time to upgrade to the latest and greatest version of everyone’s favorite Linux board. Happy Birthday, Raspberry Pi.

Hands-On: Smarty Cat Is Junior’s First Slide Rule

You may remember that I collect slide rules. If you don’t, it probably doesn’t surprise you. I have a large number of what I think of as normal slide rules. I also have the less common circular and cylindrical slide rules. But I recently picked up a real oddity that I had to share: the Smarty Cat. It isn’t exactly a slide rule but it sort of is if you stretch the definition a bit.

Real Slide Rules

A regular slide rule takes advantage of the fact that you can multiply and divide by adding logarithms. Imagine having two rulers marked in inches or centimeters — it doesn’t matter (see the adjoining image). Suppose you want to add 5 and 3. You count off 5 marks on one ruler and line it with up the zero inch mark on the other ruler. Now you count off 3 marks on the second ruler and that position on the first ruler will indicate the result. Here it lines up with the 8 mark, which is, of course, the correct answer.

That’s a simple addition. But if you can convert your numbers into logarithms, add the logarithms, and then back out to a regular number, you can multiply.

Continue reading “Hands-On: Smarty Cat Is Junior’s First Slide Rule”

Nixies Adorn A Cold War Relic To Make A Geiger Clock

Say what you will about the centrally planned economies of the Soviet bloc during the Cold War, but their designs had a brutal style all their own. When one comes across an artifact from that time, like a defunct Polish Geiger counter from 1971, one celebrates that style the only way possible: by sticking Nixies tubes on it and making it into a Geiger clock.

Right off the hop, we’ve got to say that we’re in love with the look of [Tom Sparrow]’s build. And we’ll further stipulate that most of the charm comes from the attractive Bakelite case of the original Geiger counter. This looks like the real deal, with the marbleized look presumably caused by different color resins mixing in the mold. [Tom] did an admirable job bringing back the original shine with some polish and elbow grease; no doubt the decades had taken their toll on the original shine. The meter was gutted to make room for the clockworks, which is an off-the-shelf Nixie module. The tubes stick through holes drilled in the top; a pair of LEDs adorn the front panel and an incandescent bulb provides a warm glow behind the original meter. Combined with the original rotary switch and labels, the whole thing has a great look that’s perfect for a desk.

We’ve featured a lot of retro-classic Nixie builds, from digitizing a 1940s radio to a 1970s multimeter turned into a dice-roller. As for Nixie clocks, we’re just glad to take a break from the Nixie steampunk trend for a bit.

[via Dangerous Prototypes]

Recording Video In The Era Of CRTs: The Video Camera Tube

We have all watched videos of concerts and events dating back to the 1950s, but probably never really wondered how this was done. After all, recording moving images on film had been done since the late 19th century. Surely this is how it continued to be done until the invention of CCD image sensors in the 1980s? Nope.

Although film was still commonly used into the 1980s, with movies and even entire television series such as Star Trek: The Next Generation being recorded on film, the main weakness of film is the need to move the physical film around. Imagine the live video feed from the Moon in 1969 if only film-based video recorders had been a thing.

Let’s look at the video camera tube: the almost forgotten technology that enabled the broadcasting industry.

It All Starts With Photons

The principle behind recording on film isn’t that much different from that of photography. The light intensity is recorded in one or more layers, depending on the type of film. Chromogenic (color) film for photography generally has three layers, for red, green and blue. Depending on the intensity of the light in that part of the spectrum, it will affect the corresponding layer more, which shows up when the film is developed. A very familiar type of film which uses this principle is Kodachrome.

While film was excellent for still photography and movie theaters, it did not fit with the concept of television. Simply put, film doesn’t broadcast. Live broadcasts were very popular on radio, and television would need to be able to distribute its moving images faster than spools of film could be shipped around the country, or the world.

An image dissector tube

Considering the state of art of electronics back in the first decade of the 20th century, some form of cathode-ray tube was the obvious solution to somehow convert photons to an electric current that could be interpreted, broadcast, and conceivably stored. This idea for a so-called video camera tube became the focus of much research during these decades, leading to the invention of the image dissector in the 1920s.

The image dissector used a lens to focus an image on a layer of photosensitive material (e.g. caesium oxide) which emits photoelectrons in an amount relative to that of the intensity of the number of photons. The photoelectrons from a small area are then manipulated into an electron multiplier to gain a reading from that section of the image striking the photosensitive material.

Cranking Up the Brightness

Iconoscope diagram, from Vladimir Zworykin’s 1931 US patent.

Although image dissectors basically worked as intended, the low light sensitivity of the device resulted in poor images. Only with extreme illumination could one make out the scene, rendering it unusable for most scenes. This issue would not be fixed until the invention of the iconoscope, which used the concept of a charge storage plate.

The iconoscope added a silver-based capacitor to the photosensitive layer, using mica as the insulating layer between small globules of silver covered with the photosensitive material and a layer of silver on the back of the mica plate. As a result, the silver globules would charge up with photoelectrons after which each of these globule ‘pixels’ could be individually scanned by the cathode ray. By scanning these charged elements, the resulting output signal was much improved compared to the image dissector, making it the first practical video camera upon its introduction in the early 1930s.

It still had a rather noisy output, however, with analysis by EMI showing that it had an efficiency of only around 5% because secondary electrons disrupted and neutralized the stored charges on the storage plate during scanning. The solution was to separate the charge storage from the photo-emission function, creating what is essentially a combination of an image dissector and iconoscope.


In this ‘image iconoscope’, or super-Emitron as it was also called, a photocathode would capture the photons from the image, with the resulting photoelectrons directed at a target that generates secondary electrons and amplifies the signal. The target plate in the UK’s super-Emitron is similar in construction to the charge storage plate of the iconoscope, with a low-velocity electron beam scanning the stored charges to prevent secondary electrons. The super-Emitron was first used by the BBC in 1937 for an outdoor event during the filming of the wreath laying by the King during Armistice Day.

The image iconoscope’s target plate omits the granules of the super-Emitron, but is otherwise identical. It made its big debut during the 1936 Berlin Olympic Games, with subsequent commercialization by the German company Heimann making the image iconoscope (‘Super-Ikonoskop’ in German) leading to it being the broadcast standard until the early 1960s. A challenge with the commercialization of the Super-Ikonoskop was that during the 1936 Berlin Olympics, each tube would last only a day before the cathode would wear out.


Schematic diagram of an orthicon video camera tube.

American broadcasters would soon switch from the iconoscope to the image orthicon. The image orthicon shared many properties with the image iconoscope and super-Emitron and would be used in American broadcasting from 1946 to 1968. It used the same low-velocity scanning beam to prevent secondary electrons that was previously used in the orthicon and an intermediate version of the Emitron (akin to the iconoscope), called the Cathode Potential Stabilized (CPS) Emitron.

Between the image iconoscope, super-Emitron, and image orthicon, television broadcasting had reached a point of quality and reliability that enabled its skyrocketing popularity during the 1950s, as more and more people bought a television set for watching TV at home, accompanied by an ever increasing amount of content, ranging from news to various types of entertainment. This, along with new uses in science and research, would drive the development of a new type of video camera tube: the vidicon.

The vidicon was developed during the 1950s as an improvement on the image orthicon. They used a photoconductor as the target, often using selenium for its photoconductivity, though Philips would use lead(II) oxide in its Plumbicon range of vidicon tubes. In this type of device, the charge induced by the photons in the semiconductor material would transfer to the other side, where it would be read out by a low-velocity scanning beam, not unlike in an image orthicon or image iconoscope.

Although cheaper to manufacture and more robust in use than non-vidicon video camera tubes, vidicons do suffer from latency due to the time required for the charge to make its way through the photoconductive layer. It makes up for this by having better image quality in general and no halo effect caused by the ‘splashing’ of secondary electrons caused by points of extreme brightness in a scene.

The video cameras that made it to the Moon during the US Apollo Moon landing program would be RCA-developed vidicon-based units, using a custom encoding, and eventually a color video camera. Though many American households still had black-and-white television sets at the time, Mission Control got a live color view of what their astronauts were doing on the Moon. Eventually color cameras and color televisions would become common place back on Earth as well.

To Add Color

Video transmission from the Apollo 10 spacecraft on 18 May 1969.

Bringing color to both film and video cameras was an interesting challenge. After all, to record a black and white image, one only has to record the intensity of the photons at that point in time. To record the color information in the scene, one has to record the intensity of photons with a particular wavelengths in the scene.

In the Kodachrome film, this was solved by having three layers, one for each color. In terrestrial video cameras, a dichroic prism split the incoming light into these three ranges, and each was recorded separately by its own tube. For the Apollo missions, the color cameras used a mechanical field-sequential color system that employed a spinning color wheel, capturing a specific color whenever its color filter was in place, using only a single tube.

So Long and Thanks for All the Photons

Eventually a better technology comes along. In the case of the vidicon, this was the invention of first the charge-coupled device (CCD) sensor, and later the CMOS image sensor. These eliminated the need for the cathode ray tube, using silicon for the photosensitive layer.

But the CCD didn’t take over instantly. The early mass-produced CCD sensors of the early 1980s weren’t considered of sufficient quality to replace TV studio cameras, and were relegated to camcorders where the compact size and lower cost was more important. During the 1980s, CCDs would massively improve, and with the advent of CMOS sensors in the 1990s, the era of the video camera tube would quickly draw to a close, with just one company still manufacturing Plumbicon vidicon tubes.

Though mostly forgotten by most, there is no denying that video camera tubes have a lasting impression on today’s society and culture, enabling much of what we consider to be commonplace today.