IoT device dropping WiFi connection? Here’s a possible solution…

I have several temperamental WiFi devices with unstable WiFi connections—they often disconnect from my original 2.4 GHz WiFi network. Here’s are some example devices:

ESP-based smart devices, e.g. low-cost “smart” relay to control HRV

Airport Express (generation 1 and 2) used for AirPlay (high-quality WiFi audio streaming)

LG appliances: range, wash tower, microwave…

smart switches/bulbs, mostly Meross (particularly: mss810)

The majority of affordable IoT devices on the market only support 2.4 GHz WiFi—no 5 GHz WiFi support at all. I tried a lot of things, including changing advanced WiFi settings, but nothing helped… until I moved them to an isolated VLAN.

My WiFi Router supports multiple “guest networks”. That’s really just a user-friendly name for a VLAN. A VLAN isolates devices so they can’t “see” the rest of your network traffic but still have internet access.

The LG appliances were the most painful. They would drop the WiFi connection within a day and sometimes get completely locked out. Even power-cycling them wouldn’t restore the connection. Eventually they would “forget” the WiFi settings entirely, causing me to have to start over re-adding them to my network.

So I created a dedicated “guest network” (VLAN) for my LG appliances. I reprogrammed them to use that new unique network SSID and immediately noticed that the disconnections stopped. That turned out to be the magic fix — not just for the LG stuff, but for other problematic devices too.

Particularly annoying was trying to use AirPlay with my completely obsolete AirPort Express units.I refuse to give up on them–I love the quality and convenience of AirPlay.

People say “just use Bluetooth” but that is a bad choice for audiophiles in the Apple ecosystem. With most third-party (non-Apple) Bluetooth devices, Apple devices default to a low quality audio codec for transmitting audio–Low Complexity Sub-band Coding (SBC) codec. This really kills audio quality. AirPlay, on the other hand, is bit-wise transparent audio transmission. Audio quality becomes entirely dependent on the receiving device’s DAC, amp and speakers—which is exactly how it should be.

AirPort Express gen1

Back to the point, when they were on my regular 2.4 GHz network, the AirPort Express units would drop audio frequently—long audio gaps, multiple seconds at a time. Since moving them onto the IoT VLAN, they’ve been rock-solid. Streaming now works flawlessly.

So if you have IoT devices that constantly drop off your 2.4 GHz WiFi, check your router for VLAN or “guest network” settings. If the router doesn’t explicitly mention VLANs, don’t overthink it—a guest network is effectively the same thing. Give it a try.

Blogging for 5 years and counting

Received a nice note from the WordPress.com team:

ACHIEVEMENT

Happy Anniversary with WordPress.com!

You registered on WordPress.com 5 years ago.

Thanks for flying with us. Keep up the good blogging.

Troubleshooting Go-tcha for Pokémon GO

A frequent issue with the popular Go-tcha Pokémon GO accessory is that it just suddenly stops working. This is usually exhibited by an inability for it to connect to Pokémon GO running on your mobile device.

Here are the troubleshooting steps that usually restores its functionality.

1. Delete the Go-tcha device from the Pokémon GO app:

Pokéball menu→SETTINGS→Pokémon GO Plus→AVAILABLE DEVICES→”eject” button:IMG_0975

2. Delete the device from your mobile phone’s Bluetooth devices:

This procedure varies depending on your particular device and operating system. Find your mobile device’s Bluetooth settings and in something like “My Devices” or “Available Devices” find your Got-cha device which will be shown as “Pokemon GO Plus“. Select it and choose its settings menu: (Android gear icon or iOS circled i icon iOS_info ) and choose “FORGET” or “Forget This Device“.

IMG_0976

NOTE: Occasionally this procedure is more successful if a mobile device restart is done at this stage. I’ve never needed to but others have reported needing to restart the mobile device between these steps.

3. Re-launch Pokémon GO app:

Terminate it from running in the foreground or background and launch it again.

I assume you’re familiar with how to do this on your particular device and operating system given how frequently this has to be done to resolve a plethora of other issues.

4. Connect the Go-tcha to Pokémon GO app:

Pokéball menu→SETTINGS→Pokémon GO Plus→AVAILABLE DEVICES

Turn on the Go-tcha by briefly touching its button until the Go-tcha animation appears.

Your mobile phone’s operating system should pop-up a Bluetooth pairing request dialog box. Verify that it’s your Go-tcha (Pokémon GO Plus) that’s trying to connect and choose “Pair“.

Once pairing is complete, the Go-tcha device should show up under “AVAILABLE DEVICES” in the Pokémon GO app’s settings menu. Touch select it to initiate the connection and wake up the Go-tcha again, if necessary, by briefly touching its button.

Congratulations! Your Go-tcha is (probably) working fine again!

9/10 times this is all that’s required to restore Go-tcha functionality.

In the unlikely event that you still have issues with the Go-tcha, here are a few more advanced troubleshooting steps.

Reset your Go-tcha device:

Reset your Go-tcha by inserting and removing the Go-tcha from the charge cable, while the cable is powered, in quick succession 10 times.

This is usually more successful if you’ve first deleted (forgotten) the device from the Pokémon GO app and your mobile device per steps 1 and 2 above.

Alternatively, allow your Go-tcha to completely drain its battery. Touch its button to verify that it cannot turn on and is completely drained, and then charge it up.

Update your Go-tcha device:

If you have never updated your Go-tcha device’s firmware, you may want to download the official Go-tcha app and use it to update the Go-tcha: https://www.go-tcha.co.uk/

Restart your mobile device:

Delete (forget) the Go-tcha device from the Pokémon GO app and your mobile device per steps 1 and 2 above. Perform a mobile device restart. Continue with step 3 and 4.

Steps to Fix Google Chrome SSL Self-Signed Certificate Error

For websites that are not deployed for production, still in the development phase or for personal use, it’s a common practice to use a self-signed certificate for SSL. However, an SSL certificate from a Certificate Authority (CA) that is not validated (e.g. self-signed) will trigger the following error in Google Chrome:

ssl_error

The specific error is:

“NET::ERR_CERT_AUTHORITY_INVALID”

It is inconvenient to have to click through this error every time you access one of these personally trusted sites. I used to get this error accessing the web GUI of the VMware vSphere ESXi 6.5 because the installation process essentially creates a self-signed certification for SSL to use.

After quite a bit of research I found the solution. Much of the information I found was for older versions of the Google Chrome browser—where this was considerably easier.

Here are the detailed steps required to download/export the SSL certificate of a specific SSL website and install it on your local machine to avoid the error for that website when browsing it henceforth.

Download and save the certificate

Using the Google Chrome browser, enter the SSL URL into the address bar. Upon loading, the error should occur.

Turn on Developer Tools with keyboard shortcut <Ctrl>+<Shift>+<i> or the menu item:
dev_tools

Navigate to the “Security” tab in Developer Tools:view_cert

Click the “View certificate” button.

In the pop-up “Certificate” dialog box, click the “Details” tab:cert_details

Click “Copy to File…” button.

In the pop-up dialog box, click Next, Next, choose a filename and location (Desktop?), etc.

The certificate is now saved as a file in your local machine.

Import certificate into your trusted store

Explore/navigate to the certificate file just saved (Desktop?).

Right-click it and choose “Install Certificate”:install

Click the “Local Machine” radio button:local_machine

Click Next and then click the “Place all certificates in the following store” radio button. Then use the Browse button to navigate to and select “Trusted Root Certification Authorities” and then the OK button:trusted_store

Click Next, Finish, OK!

Post Scriptum

Apparently there are free certificates available from sources such as https://letsencrypt.org/. I plan to explore this in the near future and will update this blog article with my findings.

Apple iOS Camera Connection Kit tips

Lately I was looking for a convenient way to get hundreds of photos (picture files) into an iPad. The picture files were in my main photo library in my Windows PC but not in iTunes or in iCloud. A Camera Connection Kit seemed useful for this purpose.

generic Camera Connection Kit
I have an Apple brand one for Lightning connector based devices and a generic aftermarket one for Dock connector devices.

I ran into difficulty successfully importing pictures from an SD Card into the iOS device. I could always successfully get the pictures onto the SD Card using a USB adapter for Windows, however, depending on several parameters such as file system format, folder structure and filenames, I was unsuccessful in having the iOS device see any of the photos at all or, in some cases, all of them with only a subset available.
Here is the magic combination that finally worked for me:

File system: FAT32

Folder structure: Design rule for Camera File system (DCF) compliant subfolder named DCIM

Filenames: 8.3 short filename (SFN) compliant

Conclusion

If you format the SD Card with FAT32, create a folder called DCIM, and copy pictures that are restricted to 8.3 short filename convention, you should have success being able to import the pictures into your iOS device using a compatible Camera Connection Kit.

2016 DECOMPRESSION STOP blog report

WordPress.com is not preparing 2016 annual reports for blogs. They did a great job in 2015 and I was looking forward to their report of my blog. Paling in comparison, I’ve made my own report for 2016.

Traffic for my blog exploded in 2016. Despite only making three new posts, traffic more than doubled.2016_stats

This is mainly due to the popularity of my espresso machine repair post FrancisFrancis! X1 Espresso Machine DIY Temperature Control Repair. This post has been so hugely popular that I made a permanent link to it from my main menu for easy access. The individual post view statistics show this to be the case:2016_post_stats

Why only three posts?

I managed to eek out a paltry three blog posts in 2016. It was a topsy-turvy year for me.

My company merged with another and the resulting company has emerged in an exciting startup mode—a smaller team dedicated to making a successful business. This resulted in significant effort above and beyond normal but has resulted in our company being well positioned and structured for the future.

Additionally my father, diagnosed with Alzheimer’s Disease less than two years ago, has severely degraded resulting in his placement in a facility that is equipped to care for him properly. This required me to travel almost every weekend to my home town—a two hour drive each way.

These two major events kept me extremely occupied for 2016. Despite my career making large demands of my time which is competing with weekly trips to home town, I’m resolved to being more prolific in 2017.

Stay tuned!

Proper Precautions Prevent Premature Problems: Servers destined for dingy Canadian Basements

Recently I’ve been honing my virtualization skills. I’ve done this by running my own hypervisor.

I’ve experimented with Proxmox and found it to be quite user friendly and powerful, however, it’s not widely adopted in the professional world. Since I’m increasing my knowledge of virtualization for use in professional applications, I decided to delete my Proxmox environment and use VMware vSphere ESXi. They have a free bare-metal version for non-commercial use and this suits me perfectly—I can learn all about virtualization without great expenditure.

After rescuing a failing Dell R710 server and restoring it by harvesting other working components from other failed servers, I was able to cobble together a dual Xeon CPU box with 48GB of RAM (courtesy of eBay).

Finding a suitable place to operate such a beast is a challenge in my tiny old house. My basement has stone walls, a dirt floor and poor temperature and humidity control but it’s really the only practical space I have.

My first concern is critters. I routinely extract mice from the basement and there is no end to the number and variety of insects and arachnids that call my basement home. I needed to devise a first line of defense against these household members to prevent them from making my nice warm server a nest for raising their young—with its generous ventilation, the Dell R710 makes for an attractive home.

air filter mediaI needed to preserve the server’s ability to flow plenty of air for cooling while restricting openings and preventing spiders from getting inside.

A eureka moment occurred during one of my many sojourns to Home Depot. As I sidled through the ventilation products isle, I found this indispensable product. Repurposed as I envisioned, it looked ideal for my application.

Stuffing pieces of this material behind every opening of the server required dexterous scissoring. The end result is quite effective affording both sufficient airflow and discouraging, nay preventing, arachnids from infesting it. There is an added benefit of filtering the air before it enters the server and thus preventing the accumulation of dust and debris inside the server which should help reduce maintenance and problems down the road in and of itself.

front viewrear view

My last remaining concerns are temperature and humidity. These vary wildly in my old stone foundation basement with its dirt floor. For now, I’ve suspended the server from the floor joists where the temperature and humidity seem to vary the least.

Projects must end; otherwise they’re Programs

project management wordleThere is a lot confusion about the difference between Project Management and Program Management. Project Management is a fairly well established field with several competent authorities offering accreditations that are increasingly recognized by industry. On the other hand, Program Management is a much less established field primarily existing in very large organizations running multiple concurrent complex projects. There are some accreditations for Program Management and these are slowly evolving into recognizable designations in industry.

In my career I’ve run several large projects. At one point I was managing two large multi-million dollar projects that ran concurrently. At this point a Program Manager was instated to attend to the larger issues of both projects as they related to corporate governance. This falls in line with fundamental difference between Project and Program Management. Let’s explore the fundamental difference by starting with some simple definitions.

Definitions

Project Management is concerned with the completion of specific objectives within a finite well-defined time frame.

Program Management is concerned with aligning the objectives of multiple projects with each other and, in some cases, to those of the corporation at large and often is an ongoing concern with no defined ending time frame.

With these simple definitions in mind, project managers need to work towards the completion of well defined tasks. Accordingly, all projects should have a plan; a written, documented plan. This plan should be shared with stakeholders. If a project is worth doing, worth your time and effort or, more importantly, other people’s effort or corporate resources, one should write up a project plan. If the scope of the project is relatively small, then the project plan can be commensurately brief. It may comprise nothing more than a visual timeline with brief notes. Complex projects should have a more suitably comprehensive project plan.

It’s important to document any project plan for several reasons:

1) Project status briefing: Projects require regular updates to be provided to stakeholders. Having a project plan will manage stakeholders’ expectations. Additionally, it provides a baseline to establish and measure the continuing progress and ultimate success of the project.

2) Schedule end date: Projects must end, period. Resources are assigned, effort is gauged, goals are documented, and outcomes defined—all bounded and definitively constrained by a hard calendar date and documented for all to see in the project plan.

Conclusion

If there is no end date planned and scheduled then either it’s a Program—which can be ongoing by definition—or, more likely, you will be wasting time and effort.

Make a project plan, define an end date and work smartly towards success.

 

2015 in review

The WordPress.com stats helper prepared a 2015 annual report for my blog.

Here’s an excerpt:

A San Francisco cable car holds 60 people. This blog was viewed about 3,500 times in 2015. If it were a cable car, it would take about 58 trips to carry that many people.

Click here to see the complete report.

Vintage HiFi Amplifier gets Remote Volume Control

1985My parents invest heavily in a very high-end audio system comprising Klipsch Heresy II speakers driven by a Luxman LV-105 amplifier. The sound is like nothing I have ever heard since. Although lacking in low end bass, the mid-range supplied by the famous Klipschorn driver is stunning. The warmth and clarity of the Luxman amplifier fills the living room with unforgettable sonic excellence. Decades later we supplemented the bass of the Klipsch main speakers with a massive 15″ PSB powered subwoofer and added center and surround speakers to make an unbelievable 5.1 surround sound system driven by a new Marantz home theater amplifier.

The Luxman amplifier was relegated to the cottage where it drove a pair of medium-sized speakers I designed and made during my university electrical engineering years. Recently, during a downsizing of my parents’ belongings, the Klipsch speakers narrowly escaped impending doom when I insisted on rescuing them and promptly installed them in the cottage to once again be driven by the Luxman amplifier.

Now we have remarkable stereo sound once again—this time at the cottage—to enjoy digital music sources such as iPods and Android mobiles. One inconvenience prevails; we must get up from the comfy listening position to manually adjust the classic analog volume control!

TL;DR

This has, by far, been the most ambitious and extensive project I have undertaken recently. As such, it is getting a commensurate blog post replete with gory detail. For the faint of heart, here is a brief summary:

I designed an IR remote volume control to be retrofit into this classic amp. Centered around an Arduino Pro Micro, it listens to IR commands from existing IR remotes with volume up/down buttons and controls a stepper motor which uses a toothed belt drive to turn the original volume control.

The Challenge

Preserve performance parameters as paramount whilst padding pleasure via progressive promotion of imperceptible push-button phonic power provisioning

In other words, maintain its quality but add the convenience of IR remote volume control.

The Luxman LV-105

lv-105

LV-105 valves

The Luxman LV-105 amplifier represents quintessential vintage craftsmanship with a timeless appealing design.

A design feature appreciated by audiophile enthusiasts is the vacuum tube window. With the pre-heater mode enabled, the warm glow of the always-on valves beckons you to engage with it.

More information about this classic integrated amplifier may be found at hifiengine.com, audio-database.com, thevintageknob.org and classic-audio.com to name a few.

C-3PO memeThe vintage Luxman brochure uses wonderful 80’s lexicon that compels me to employ an appropriate meme. It describes Luxman’s technology as employing “computer speed transistors” (love it!) and “tubes […] traditionally regarded as the ultimate electronic device for audio” in their “BRID Integrated Amplifier” series.

BRID circuitI simply cannot resist showing one more techy graphic showing the concept of this hybrid amplifier design.

Look at the fantastic juxtaposition of classic analog valves next to ultra-modern MOSFET power transistors—elegant and simply beautiful.

Modifications

The first step, disassembly was handled diligently and conscientiously. I was thankful to have a copy of the service manual to guide me. Removal of the main front panel bezel required a disconcerting amount of force. I did manage to remove it—none the worse for wear—and proceeded to modify its retaining tabs so that subsequent removal will be easier by requiring much less force.

 

 

 

IR Remote Volume Control Design Background

AliExpress IR remote volume controlWhen I started researching this project for how best to integrate an IR remote volume control, I initially ordered a kit from AliExpress. It includes everything from an IR remote control to an audio taper potentiometer. I thought I would swap out the analog amplifier’s original volume potentiometer with the motor controlled one in this kit.

However, after referring back to my axiom for this project to maintain the highest level of audio quality integrity, I grew increasingly concerned that the potentiometer in this kit might compromise quality. I changed tack and reasoned that I might be able to use the kit’s motorized potentiometer to drive the original volume potentiometer knob directly with a belt and pulley system. Some initial experimentation revealed that the motorized potentiometer has a clever design that included a mechanical clutch mechanism. This clutch allowed the motor to continue turning after the potentiometer hit one of its physical hard stop limits. Unfortunately this clutch also limits the torque that can be applied and I needed more torque to turn the old stiff potentiometer of the old analog amplifier’s volume control.

Back to the ol’ drawing board…

A stepper motor allows a high degree of positioning control with high torque but typically does not have absolute position feedback. A servo motor, on the other hand, does typically have position feedback but has other limitations. In my early explorations of Raspberry Pi, I had interfaced to a stepper motor by using a EasyDriver stepper motor shield peripheral. I set about designing the use of a stepper motor to drive the amp’s volume control.
The main design challenge was limiting the stepper motor to only rotate the amp’s volume control within the hard limits of its range of motion—approximately 270 degrees. I needed position feedback for the stepper motor.
precision potentiometerA precision potentiometer coupled directly to the shaft of the stepper motor would provide a variable resistance in direct proportion to absolute stepper motor shaft position. The varying resistance of the precision position potentiometer would be evaluated on-the-fly, while the stepper motor was moving, by using an analog input on the Arduino.flex shaft coupler
The precision potentiometer was mounted to the stepper motor using a special shaft coupler that allows for some flexing as well as accommodates the two different shaft diameters.

prototype_motorFor the prototype, I used a different coupler that turned out to be too noisy. Every time the stepper moved, it reverberated in the coupler. Switching to the coupler pictured above resulted in much quieter operation.

As pictured above, the potentiometer I used was double-ended so that it could be coupled to the motor on one end while the other end could host a gear to drive a toothed belt to a corresponding gear on the amplifiers volume control shaft. An online Belt length Calculator was handy in determining what belt length I needed. For experimenting, I ordered several sizes of gears and belts. By playing with the gear ratios, I was able to achieve a compromise between the speed of volume change and the step size of each volume change. This turned out to be a 1:1 gear ratio.

https://bstassen.wordpress.com/2016/05/10/arduino-powered-…e-volume-control/

Designing the Circuit and Layout

As an electrical engineer, I found the circuit design to be straightforward due to employment of off-the-shelf highly integrated peripherals such as the EasyDriver. Mechanical construction of the circuit and physical integration with the amplifier were much more complex tasks for me and took almost as much time and effort as writing the software for the Arduino.

I used the excellent Fritzing freeware to document the schematic:

schematic

Fritzing was also an extremely useful tool to aid in the design of an efficient breadboard layout.

breadboard

The prototype turned out quite nicely and didn’t take long to build.

Filtering Arduino analog input

Stepper motor position feedback is a potentiometer connected inline. Potentiometers are mechanical analog devices whose resistance varies with wiper position which is changed by rotating the control shaft. Their mechanical nature is subject to static, bouncing, jitter and other forms of mechanically induced variability that cause the resulting resistance to vary wildly especially during actuation. The solution to stabilizing this is a combination of hardware and software filtering.

The hardware part is a simple first order low pass filter using a series resistor and parallel capacitor. The values of the capacitor and resistor are dependent on the cut-off frequency desired. The 3dB cut-off frequency can be found using this formula:

Fc=1/(2πRC)
Fc is cutoff frequency
R is resistance
C is capacitance

Choosing appropriate values of C and R to achieve a specific cut-off frequency has interactions with resulting impedance, damping, and other characteristics of the filter. This level of engineering design is beyond the scope of this article. Suffice it to say that as long as you don’t use very low values for either R or C, the results should be fine. I chose a low pass cut-off frequency of 1 Hz and mid-range values of a 10 µF capacitor and a 16 kΩ resistor.

The software part of the filtering is a simple averaging routine. Without any external influence, all things being equal and not even moving the potentiometer, successive readings of a specific analog input are subject to minor variations. Thus, instead of taking one analog input reading and using that value directly to determine the next course of action for the stepper motor, I take an average of a certain number of readings over a specific time. These parameters are configurable in my Arduino code and after some experimentation, I found using four samples with an inter-sample delay of two milliseconds achieved a good compromise of filter smoothing versus delay.

to be continued…