Categories
Hardware

How to choose the right power adapter or charger for your devices

The Bilbo Baggings “After all...why not? Why shouldn’t I keep it?” scene from “Lord of the Rings”, but with Bilbo holding a power adapter instead of the ring.
We’ve all been Bilbo.

If you’re like most people, you probably have a collection of old power adapters and chargers that you’ve held onto, even though the devices they used to power are long gone. You probably thought that someday, one of them might come in handy:

This article will help you figure out if an adapter is compatible with a given device.

A little terminology

Before we begin, let’s make sure we’re using the same words to refer to the different “plugs” on an adapter or charger…

Photo of a power adapter, with arrows pointing out the connector and plug.

  • By plug, I mean the part of the adapter or charger that you plug into the wall.
  • By connector, I mean the part of the adapter or charger that you plug into the device.

With that out of the way, let’s begin!

How to tell if a power adapter or charger is right for your device

A pile of power adapters.

Step 1: Is the adapter’s polarity correct for your device?

Although you could do steps 1 and 2 in either order, I prefer to get the “device killer” question out of the way first. That question is: Does the connector’s polarity match the device’s polarity? Simply put, you want to find out which part of the connector is positive and which part is negative.

In DC current, which is the kind of current that an adapter provides, the polarity determines the direction in which current will flow through the device. You do not want current to flow into your device in the reverse direction.

Here’s a connector and its parts. The sleeve is the outer metal part, while the tip is the inner metal part:

Close-up photo of a power adapter connector, with arrows pointing out the sleeve and tip.

Both your adapter and device should have some kind of label or tag that indicates their polarity. It should be either negative sleeve/positive tip, which is indicated by this symbol…

“Negative sleeve / positive tip” symbol for power adapter connectors.

…or positive sleeve/negative tip, which is indicated by this symbol:

“Positive sleeve / negative tip” symbol for power adapter connectors.

Are the polarity markings on both the adapter and the device are the same?

  • Yes: If the polarity markings on both are the same, you can proceed to the next step.
  • No: If the polarity markings are different, DO NOT proceed to the next step, and definitely DO NOT plug the connector into the device.
  • If the are no polarity markings on the adapter: See the SPECIAL BONUS SECTION at the end of this article.

Step 2: Does the adapter’s connector fit into your device?

With the adapter’s plug NOT plugged into an outlet, can you plug the connector into the device?

  • Yes: If the connector fits, you can proceed to the next step.
  • No: If the connector doesn’t even fit, you can be pretty certain that this adapter isn’t going to work for the device.

Step 3: Do the voltage and current coming from the adapter match the voltage and current required by the device?

If you’ve reached this step, you’ve now taken care of the simple matches: The adapter will push current into your device in the right direction, and the connector fits.

Now it’s time to look at the numbers, namely voltage and current.

  1. Look at the voltage (measured in volts, or V for short) and current (measured in amperes, or amps or A for short) marked on the adapter.
  2. Look at the same values marked on the device.

Do the voltage and current values on the adapter and device match?

  • Yes: If the numbers match, you’re good! You can use the adapter to power the device.
  • No, both numbers don’t match: Don’t use the adapter to power the device.
  • No, one of the numbers matches, and one doesn’t: If only one of the numbers doesn’t match, don’t write off the adapter as incompatible yet. Consult the table below:
…and it’s LOWER than what your device needs …and it’s HIGHER than what your device needs
If the voltage (V) doesn’t match…

MMMMAYBE.

Your device might work, but it also might work unreliably.

Simpler devices, where electricity is converted directly into some kind of result (such as a light, or a speaker) are more likely to work than more complex ones (such as a hard drive, or anything with a processor).

NO! WILL PROBABLY RUIN YOUR DEVICE.

Your device might work. The additional voltage may overheat and damage your device.

If the current (A) doesn’t match…

NO! WILL PROBABLY RUIN YOUR ADAPTER.

Your device might work. Your device will attempt to draw more current than the adapter is rated for, which may overheat and damage the adapter.

GO FOR IT!

The adapter’s current rating states the maximum that it’s capable of delivering.

Your device will work. It will draw only the current it needs from the adapter.

SPECIAL BONUS SECTION:
What if the adapter doesn’t have polarity markings?

Believe it or not, it happens. In fact, I have one such adapter, pictured below:

Close-up photo of the label portion of a power adapter that specifies the manufacturer (Kempower), the model number (KA3A1202000), input and output voltages and currents — but NOT the polarity.
No polarity markings. Not helpful at all.
Tap to view at full size.

As you can see, its label section lists a lot of information, but not the polarity. This means you’ll have to determine the polarity yourself, or you can take a leap of faith.

If you want to determine the adapter’s polarity yourself

If you want to determine the polarity yourself, you’ll need a voltmeter. Set it up to read DC voltage in the range of the adapter. In the case of the adapter above, it’s rated to output 12 volts (V), so I set my meter to read a maximum of 20 V. I put the positive probe inside the connector so that it made contact with the tip, and touched the negative probe to the sleeve. A positive number appeared on the display:

Multimeter being used to measure voltage coming from adapter, with the display showing a positive voltage.

With the positive probe touching the tip and the negative probe touching the sleeve, a positive voltage means that current is flowing from the tip to the sleeve, which in turn means that the tip is positive and the sleeve is negative.

If the number were negative, it would means that current was flowing from the sleeve to the tip, which in turn means that the sleeve is positive and the tip is negative.

In fact, when I put the positive probe on the sleeve and the negative probe on the tip of the same adapter, this is what happened:

Multimeter being used to measure voltage coming from adapter, with the display showing a negative voltage.

Note that the voltage reported is negative. In other words, the current appears to be flowing backwards  — from the negative probe to the positive probe —because I had the probes backwards. Once again, this indicates that current is flowing from the tip to the sleeve, which means that the tip is positive and the sleeve is negative.

If you want to take a leap of faith

If you don’t have a multimeter handy, you can always take a leap of faith and assume that your adapter has a positive tip and a negative sleeve, which is how most adapters are designed. The tip is well-protected and difficult to touch by accident. Since current flows from positive to negative, you prevent accidental shorts and electrocution by making the hard-to-reach tip positive and the easy-to-reach sleeve negative.

Categories
Hardware Music Uncategorized

Putting my ’90s synth — the Korg Wavestation A/D — back on active duty

The Korg Wavestation A/D

Front view of the Korg Wavestation A/D rackmount synthesizer
The best damned synth of 1991. Tap to view at full size.

Long before I became an accordion player, I was a synth player. Over the years, I’ve bought and then sold or given away a number of synths, but there’s one that I kept: A Korg Wavestation A/D.

The Korg’s Wavestation A/D is the rack-mount version of the Korg Wavestation EX keyboard synth, which in turn is a revised and expanded model of the original Korg Wavestation. The Wavestation series of synths set itself from the other synths of the era by using a technology called wave sequencing, which could be described as building sounds by pasting sequences of different waveforms together, in a way similar to George Martin’s cut-and-paste approach to the calliope sounds on the Beatles’ Being for the Benefit of Mr. Kite!.

I bought the Wavestation from my friend, Canadian TV/film composer Stephen Skratt, back in 1993, when I was playing keyboards in a band with my schoolmates at Crazy Go Nuts University

Joey deVilla as a university student circa 1992, on stage with the band “Volume”.
Me, circa 1992.

…and I’ve done other live gigs with it (that’s me in the pink wig)…

Stephen Skratt, Joey deVilla, and Karl Mohr jamming on keyboards in 1999.
Stephen Skratt, me, and Karl Mohr jamming on keyboards in 1999.

…and I’ve even used it for some multimedia software projects:

Opening screen of "Welcome to Echo Lake", a multimedia promo for Delrina's "Echo Lake" family album application.
My first software deliverable after graduating from University: A multimedia promo for family album software.

I’ve held onto it ever since, having taken it from Kingston to Toronto, then San Francisco during the dot-com bubble and back, and it’s now at my current home in Tampa.

Simply put, the Wavestation is a beautiful-sounding synth, and even 30 years later, it still sounds great. If you’d like to hear what it sounds like, check out this video by Espen “I am the 80s” Kraft:

Bringing the Wavestation back to active duty

One of my plans for this year is to create a series of videos covering software development and other tech topics including security. Those videos will include music, and I thought that while there’s nothing wrong with licensing some music, why not write my own?

With that in mind, I pulled the Wavestation out of its closet, where it had been sitting, plugged in my small MIDI keyboard controller (the original version of the M-Audio Axiom 25), hooked it up to powered speakers, and turned it on:

The good news was that it still worked. The screen came to life, and pressing keys resulted in those rich Wavestation sounds:

LCD display of Korg Wavestation A/D displaying the name of the currently selected sound: “The Wave Song”.
Tap to view at full size.

The bad news, which I was expecting, was that while the built-in sounds in ROM remained, all three RAM banks which held the sounds that I had lovingly created so very long ago were gone. They had been replaced by copies of the ROM sounds. I no longer had a synth with 200 sounds (or in Wavestation parlance, “performances”, or in general synth terms, “patches”) — I had four identical banks of 50 sounds:

Page 4 from the “Korg Wavestation A/D Performance Notes” manual, which shows the 50 “performances” (synth patches) in ROM.
Page 4 from the Korg Wavestation A/D Performance Notes manual. Tap to view at full size.

I suspected that the battery that maintained the contents of the Wavestation’s RAM had died long ago. I confirmed this theory by tweaking the settings for one of the sounds in RAM, turning the synth off and back on again, then checking my edited sound. It had reverted to a copy of the ROM sound on which it was based.

I’ve done RAM battery replacements on numerous devices over the years, so I felt comfortable with going inside the Wavestation to see how big a chore replacing the battery would be.

The first step was to pop the top panel from the Wavestation. It’s a pretty simple process where you remove six screws — two on each side, and two on the back. Here’s what the inside looks like, as viewed from the front panel:

Korg Wavestation A/D with the top panel removed, as viewed from the front panel.
Tap to view at full size.

Here’s what it looks like from above:

Korg Wavestation A/D with the top panel removed, as viewed from directly overhead.
Tap to view at full size.

If you’ve ever had to replace the battery of an early- to mid-1980s synthesizer with battery-backed memory, you’ve probably dealt with the annoyance of that battery being soldered in. This was probably a cost-cutting measure (compared to today’s prices, synths in the ’80s were quite expensive), and manufacturers probably believed that we’d all upgrade to later models long before those batteries died.

I found a pleasant surprise waiting for me on the Wavestation’s main printed circuit board:

Korg Wavestation A/D with the top panel removed, as viewed from directly overhead, with the battery clip pointed out: “OMG! A proper battery clip!”
Tap to view at full size.

It was a proper battery clip, and in it, a battery that I had in plentiful supply in my tool closet: The ever-lovin’ CR2032 3-volt battery, which powers all sorts of things, including the CMOS RAM on ThinkPads, which I covered in an earlier article.

Close-up of Korg Wavestation A/D main circuit board, with battery clip in center.
Tap to view at full size.

The clip makes it easy to swap out the battery. Pressing against the spring pops the battery out:

Close-up of Korg Wavestation A/D main circuit board, with battery clip in center and battery popped out.
Tap to view at full size.

With the battery replaced, I put the top back on the Wavestation, powered it up, changed the name of one of the sounds in RAM, and powered down and unplugged the Wavestation. I plugged it back in and powered it up, and yes, the change remained in RAM!

LCD display of Korg Wavestation A/D displaying the name of the currently selected sound with its updated name: “IChangedTheName”.
Tap to view at full size.

In case you were wondering what the Wavestation sounds like, here’s a sample:

This recording isn’t of me playing a tune, but just holding down one or more keys. It shows the sort of complex sounds that the Wavestation can make.

Next step: Restore those factory RAM sounds

Even with a new battery, I still have 3 banks of 50 sounds that each are a copy of the 50 sounds in ROM. I’d like to start off with a straight-out-of-the-box 1991 experience and get those factory RAM sounds back. In order to do that, I’ll need a couple of things:

  • The sound data, which thankfully has been preserved by Wavestation enthusiasts and can easily be found online, and
  • A USB to 5-pin DIN MIDI interface to move that data from a computer to the Wavestation:LiDiVi USB-MIDI interface.
  • The SysEx Librarian macOS application to transfer the sound data to Wavestation.

I’ll cover this process in an upcoming post.

Categories
Hardware What I’m Up To

New life for an old Raspberry Pi with a 3.5″ touchscreen

Since getting my Raspberry Pi 4 as part of the cybersecurity course I took last summer, I haven’t done any work with my older Raspberry Pi 3, which is still a decent computer, especially considering its size and price.

That all changed when I finally unboxed my Kuman 3.5″ LCD display, (a steal at $20) which my in-laws gave to me for Christmas (they went through my Amazon wishlist for gift ideas). They had no idea what it was, but figured I’d like it, which I do!

Tap to view at full size.

With a 3.5″ diagonal and 480 by 320 resolution, this screen isn’t meant for reading web pages or PDFs or writing code, documents, or spreadsheets. It’s meant to be a display for an IoT project that doesn’t need to display a lot of information, such as a weather app, smart thermostat, or even low-res videogames.

Tap to view at full size.

The screen’s not just an output device, but an input device as well, since it’s touch-sensitive. Once you’ve installed the driver, the Pi treats the screen as if it were another mouse, treating taps as mouse clicks, and the location of your tap as mouse coordinates.

Tap to view at full size.

The screen plugs directly into the Pi’s GPIO (General Purpose Input/Output), a 40-pin connector located along the top edge of the board, which it uses for power. It’s also what physically holds the screen to the Raspberry Pi.

Tap to view at full size.

The video signal is fed to the screen through a U-shaped HDMI connector that connects the Raspberry Pi’s HDMI port to the screen’s HDMI port.

Tap to view at full size.

I’ll post the results of my noodling with this new Raspberry Pi/screen combo here on Global Nerdy. It should be interesting!

Tap to view at full size.
Categories
Hardware Mobile

It’s the 14th anniversary of the original iPhone Stevenote!

On January 9, 2007, Steve Jobs said this near the beginning of the Stevenote where he introduced the original iPhone:

Three things: A widescreen iPod with touch controls, a revolutionary mobile phone, and a breakthrough internet communications device.

An iPod. A phone. And an internet communicator.

An iPod! A phone! Are you getting it?!

These are not three separate devices. This is one device…

Today is the 14th anniversary of that keynote. It caused Google to go back to the drawing board with Android. It led to the redefinition of the mobile phone and the downgrading or demise of the big hardware players of the day (BlackBerry, Motorola, Nokia, and Palm). It changed Microsoft’s trajectory, and brought about the end of Flash. It redefined the boundaries of personal computing and the web. For better and worse, it changed the way we communicate, navigate, “vegetate”, and relate.

Happy anniversary, iPhone!

Recommended reading

Categories
Hardware How To

What to do when the USB-C ethernet adapter for your Mac doesn’t work out of the box

I recently got a Mokin 10-in-1 USB-C dongle for use with my work computer, a 2019 16″ MacBook Pro, whose only connectors are 4 Thunderbolt/USB-C ports and a 3.5 mm audio jack.

The dongle worked like a charm out of the box with the notable exception of one part: The Ethernet port. I had a pretty good guess why this was happening and how to fix it.

The problem and the plan

Most dongle vendors are integrators. They may manufacture the cases and simpler electronics, but they purchase lot (or all of) the fancier tech from manufacturers, such as networking chips.

Here’s a pic showing a Mokin dongle and its internals:

From Mokin’s site. Tap to view at full size.

My plan was to find the manufacturer of the networking chip inside my dongle, then find their webpage, then hopefully find a driver.

Here’s what I did.

Step 1: Identifying the vendor

With the dongle plugged into my MacBook, I opened the Apple menu and selected About This Mac. This window appeared:

I clicked the System Report… button, which opened the System Report window:

This window provides a run-down of the hardware, software, and networking on your Mac. Its Hardware list provides information about the hardware in and attached to the computer. A lot of peripherals have information such as vendor IDs encoded to them, and you can use System Report to find it.

I expanded the Hardware menu and selected the USB item. The USB Device Tree list appeared in the window’s right pane.

I then went through the USB 3.1 Bus entries in the USB Device Tree list in search of an entry containing the word LAN. Once I found that entry, I clicked on it, which then caused its details to appear in the lower part of the right pane.

I found the information that I needed: the Vendor ID, and better still, an actual vendor name: Realtek.

This shouldn’t have been a surprise: Realtek, a chip manufacturer in Taiwan, have had the majority share of the ethernet controller market since the early 2000s. They also have a good chunk of the sound chip market, so I’m no stranger to their drivers or their distinctive “crab” logo.

Step 2: Search for the vendor’s site, and in particular, the page containing the driver you need

Now that I had a vendor name, I did a search with using the search term realtek lan 10/100/1000 driver mac. This was my first result:

What if you don’t have a vendor name, but just a vendor ID number?

In the case where you just have a vendor ID number and no name, you should consult as USB ID database, such as the one at The SZ Development:

I decided to see if I could find the driver using this route.

I entered the vendor ID reported by my Mac, 0x0BDA, in the Vendor ID field and the reported product ID, 0x8153, in the Product ID field. I clicked Search and got these results:

  • USB 10/100/1000 LAN
  • RTL8153 Gigabit Ethernet Adapter

The links that the site provides aren’t all that useful. You’ll get much farther if you simply include the result text with the words driver and mac as your search term.

Doing that took me to the same page as the previous method:

Step 3: Install the driver

From the Realtek page I found, I downloaded the installer that applied to me and ran it. It worked without a problem.

(They would be well-served by a team that could do a half-decent job localizing the language on their installer.)

Step 4: Enable wired networking

With the driver installed, it’s time to make wired networking happen!

Open System Preferences. To add wired networking, you’ll need to add a new networking service, which you do by clicking the + button at the bottom of the menu on the left side of the window:
You’ll be asked to select the interface and provide a name for the new networking service. Select USB 10/100/1000 LAN from the Interface menu, and enter whatever you like for in the Service Name field. I entered “Wired” for mine:

I clicked the Create button, which created the service and dismissed the dialog box. The new service, named Wired, appeared in the menu on the left side, with Not Connected as its subtitle.

I clicked the Apply button…

…and the Wired service went from Not Connected to Connected:

Success!

Now it was time to test the connection. I shut off wifi and ran Speedtest.net on my wired connection. The results shown below are for my work computer, which uses a VPN that I need to always keep on (or there will be. consequences):

That’s a good deal faster than I get on wireless, and I’m sure I’ll get better speeds on my personal computer when it’s not on a VPN.

Categories
Hardware Programming

Yes, you can run Visual Studio Code on Raspberry Pi

This is the first in “Cobra Pi”, a series of articles on getting the most out of your Raspberry Pi!

Yes, you can run Visual Studio Code on Raspberry Pi!

You’ve got many options for editing code or other plain text files on your Raspberry Pi. It is, after all, a Linux machine, and you’ve got all the classic command-line editors — vim, emacs, and…

And the windows-and-mouse-based Geany (text editor) and Thonny (beginner-friendly Python IDE) come along with even the bare-bones version of the Raspberry Pi OS setup.

But if you’re like about half the developers who answered the 2019 Stack Overflow survey, your “home” editor is Visual Studio Code. And yes, you can run Visual Studio Code on Raspberry Pi.

How to install Visual Studio Code on Raspberry Pi

If you go to Visual Studio Code’s “downloads” page, you’ll see this:

Tap to view at full size.

For the Raspberry Pi, you want to download the Debian package for systems with ARM processors (click on the ARM button in the .deb row).

Once downloaded, go to your Downloads directory and double-click on the the .deb file you just downloaded. You’ll see greeted with this dialog box:

Click the Install button. You’ll be presented with another dialog box, this time asking for your user password, since it’s required when installing new applications:

Enter the password you use to log into the Raspberry Pi into the Password field and click OK.

Visual Studio Code will be installed on your Pi. Once the process is done, you can launch it by clicking on the Start Menu (the raspberry icon in the upper left-hand corner)…

…and in the menu that appears, select the Programming menu. A sub-menu will appear, and one of the items will be Visual Studio Code. Click that and…

Screenshot: Visual Studio Code on Raspberry Pi
Tap to view at full size.

You’ll be in the Visual Studio Code that you know and love from Windows, macOS, and Linux! And yes, all the plugins that you’ve come to depend on will be available.

Go forth and code!

Categories
Current Events Hardware Programming

Raspberry Pi 400: A lot of computer for as little as $70!

Photo: Raspberry Pi 400, front/top view showing keyboard as seen by the user.
Tap to view at full size.

The Raspberry Pi 400 — a Raspberry Pi 4 board with 4GB RAM built into a compact keyboard — was announced just today, and the base unit (just the computer built into the compact keyboard) retails for $70!

The computer

Photo: Raspberry Pi 400, back/top view showing keyboard and ports.
Tap to view at full size.

The Raspberry Pi 400 is a slightly updated model from last year’s Raspberry Pi 4, and has these specs:

Feature Notes
Processor 1.8 GHz ARM Cortex-A72 CPU
(A little faster than the Raspberry Pi 4’s 1.5 GHz CPU)
RAM 4 GB
Networking
  • 802.11ac wifi
  • Gigabit Ethernet
  • Bluetooth 5.0
Video 2 micro HDMI ports that can each drive 4K/60 Hz video
USB
  • 2 USB 3.0 ports
  • 1 USB 2.0 port (preferably for the mouse)
Power Provided via adapter and USB-C
Additional ports 40-pin GPIO interface

The complete kit

Photo: Raspberry Pi 400 kit, showing the computer, micro HDMI to HDMI cable, The Official Raspberry Pi Beginner’s Guide, mouse, and power supply, as well as the box they came in.
Tap to view at full size.

For an extra $30, you can get the kit, which is the complete “ready to go out of the box” package. It starts with the Raspberry Pi 400 computer-in-a-keyboard unit described above, and it adds:

The kind of computer that hasn’t been seen since the 1980s

Let’s quickly take stock of what you get with just the Raspberry Pi 400, never mind the kit:

  • A fully-equipped computer with a decent processor, decent RAM, wifi/wired/Bluetooth networking with 2 fast USB ports to spare once you’ve plugged a mouse into the slower one.
  • A computer that you can do hardware experiments with, thanks to its GPIO pins, and an abundance of hobbyist-focused expansion kits.
  • A computer that you can plug into your TV.
  • A computer that costs $100.

There hasn’t been a computer like this since the machines pictured below came out…

Photo: ZX Spectrum computer

Photo: Commodore VIC-20.

…and those machines couldn’t hold a candle to the proper desktops of that era.

On the other hand, you’ll find that the Raspberry Pi 400 can easily keep up with the sort of computer that gets issued for standard office work. You could easily use it to do schoolwork or office work, and it’s actually a decent Linux software development machine and retro-style gaming console, too! And with its expansion capabilities, it’s an excellent machine for IoT and sensor projects.

This is the sort of machine that children of the 1980s and early 1990s learned on, many of whom are today’s techies…

…and this machine will probably be the machine that a lot of children of the 2020s will cut their programming teeth on, and who’ll be the techies of the 2040s and 2050s.

Given a choice between a Chromebook and a Raspberry Pi 400, I’d take the Pi, because I can do a lot more with it. In fact, I might be able to do a lot of my new job with it (which is something I might try soon, just to see what happens).

Graphic: “Cobra Pi” logo

By the bye, keep an eye on this blog for a new feature: Cobra Pi, which covers programming on the Raspberry Pi, and whose motto is: “Code hard! Fail fast! No latency!”

It’ll cover all sorts of cool programming tips, tricks, and techniques on the Raspberry Pi, including JavaScript, Python, and even C and ARM assembly language!