Search This Blog

Monday, 11 October 2021

Electronic Load  Tester V1


As a long time hobbyist and electronics scrounger, I have accumulated a substantial collection of small power supplies in various forms.  I like to re-use them whenever possible, but the basic specs on the label (if any), do not tell much of a story.  I usually pick several that look promising for a particular project, and test them.

Testing involves going to my junk power resistor box and selecting several of different values, adding some alligator jumpers and a couple of meters to the collection, grabbing a piece of paper and a pencil, and starting the laborious process of  measuring voltage and current at different currents (being careful not to pick up any really hot resistors!).  It works, but it can take a while.

I note that Aliexpress and eBay offer a number of electronic modules to help with this process.  They usually have a small MCU, a display and a few buttons, a small heatsink and a fan.  Add your own power supply, case and connectors...  They generally start at $20 and go way up from there.  Reviews suggest they do work, but may not be capable of the power ratings advertised.  As a hobbyist and EE, with a good junk parts collection, I should be able to do at least as well as the bottom end of this selection.  And so it begins....

Electronic Load Tester V1

Preliminary Specifications:

I try to reuse what I have on hand, as well as meet a general set of goals, for any project, so specifications tend  to be iterative, depending on what I find.  In general, I want to test DC output supplies, including batteries, up to a few 10's of Volts, and out to several Amps.  I'd like the process to be easy, and it should collect data, and send them to a PC for further use and analysis.  I'd like the measurements to be fairly accurate, and I'd like the device to have reasonable ability to keep from destroying itself.  I'd like it to look nice, so it should be in a case of some type. So, off to the junk pile!!

Rear View (Note fan and USB Connector)


I have collected a number of old Cable TV Convertor boxes.  These are a nice size and reasonably robust.  They have small certified power supplies built in, fed from 110Vac, that typically provide useful regulated voltages like +5 and +12..  They include a small number of Pushbuttons, that sometimes can be reused, and a small 7-segment LED display.  They are modular inside, and fairly easy to remove the un-needed parts (the RF mod / demod boxes, the control MCU, etc.)  They have a built in IR remote control receiver, but let's not get carried away; it's just an Electronic Load, folks!

Inside: Original PCB, added Arduino Nano, Heatsink, Protoboard

A salvaged power supply provides a couple of nice Darlington NPN power transistors, , 6A.  One is perfect to use as a load device.  An old desktop computer motherboard provides a nice heat sink and 12V fan.

I like Arduino devices, and keep a bunch around, so a 5V Nano, with a small carrier board that provides easy connection to I/O pins, is added to the BOM.  Similarly a 16x2 LCD with an I2C backpack is added.  I also keep a bunch of these around; very cheap and easy to work with, if a little dated these days...

The Load is best provided in the form of a Current Regulator.  Past experience says this is best done in hardware, but needs the Nano to provide the Current Reference for the Regulator.  So some form of D to A and a good OpAmp are next.  In my samples collection is a MAX5354 in an 8 pin DIP package.  Easy to work with, and provides a serial input dual registered 10b DAC, and a partially committed opamp, more than suitable for a current regulator.  In fact, the datasheet has a reference design for exactly this purpose!  Add a small 0.7V Reference voltage source for the regulator, based on a 1N4148 and some filtering, and that part is ready.

I wanted to keep the 7-segment display, but there aren't quite enough output pins on the Nano.  But I2C expanders work very well, so I added a PCF8574 to act as the switched ground connection for the segments.  The displays are common anode, and the digit switches on the hi side are already on the CATV PCB, and designed to be run from a MCU.  PCF8574 ICs are also very inexpensive, and I keep a bunch around for jobs like this...

Add a 2N2222A to provide Nano control of the 12V cooling fan, and hook up the 12V transistor switch already on the CPU, to the Nano, so I can control the existing Relay that provides power to the 110V switched outlet on the back of the CATV box.  Not sure what I will use it for, but seems to be a no-brainer...

Heatsink Bottom: NPN Darlington, LM35

I am worried about power, and overheating of the load device.  Reviews warn of this problem with the purchased units, so I added a LM35 temperature sensor to the bottom of the heat sink, next to the power transistor.  Easy to do, and seems like cheap insurance.  And now I have something to display on that 2 digit LED display!

The Construction

It doesn't take long to remove the parts I don't want from inside the CATV box, and find reasonable places to add the Nano and it's carrier board, the heat sink, and a protoboard to hold the several extra components I am adding.  Making a cutout in the plastic case for the LCD is easy, and the front panel has room for a couple of banana jacks.  The hardest part is checking all the mechanical clearances as I add items! The CATV box worked before I took it apart, so I work through just enough reverse engineering of the built in PCB to identify the places I need to add wiring:  the power supply voltages, the LED connections, the logic level inputs and outputs that get connected to the Nano for control purposes.  I layout and build the protoboard with sockets for the ICs, and small connectors for the off-board wiring (yes, I have a big box of salvaged small connectors and wiring harnesses!).  I want to be able to test the added components incrementally, just in case something goes wrong...

The Software:

Of course most of this stuff is useless without the software!  I am still a fan of the original Arduino IDE, and have not looked at all the alternative IDEs that have appeared.  So everything is in Arduino's version of C++, and makes extensive use of libraries I have experience with, or modules I have written myself, and can easily re-use.

This is not a very complex or time critical application, so a simple time-sliced round robin execution control design is fine.  I use the SimpleTimer library for time based execution, with 2 instances, one running at 20mS for most functions, and a second running at 1 Sec, to handle periodic CSV data output via the USB port.  I also use the printf library for somewhat easier formatting of data, for use with the USB port, and the LCD display (be aware that printf does not handle floating point data!).

I like the Bounce2 library for PB debounce; sufficient for my purposes, and not overly complicated.  works well with the SimpleTimer function.

A 20mS loop works well for PB debounce and for LED display updates, which are multiplexed.  The other functions do not need this speed, so the 20mS loop contains logic to produce 5 equal time slices, which repeat every 100mS.  The other functions are distributed across these slices. One handles updates to the LCD display, a second handles data collection from the sensors, another handles fan control based on temperature (ON at 40 Deg C, OFF at 30 Deg C), along with overtemp checks, which will shut down the Current Regulator if necessary.  A third handles the automated load test function, called the Ramp Test.  The 5th slice is spare.

Several of the devices (the LCD, the LED I/O Expander, and the hi-side Voltage and Current sensor) are I2C devices, so the Wire library is included, along with the hd44780 Library, for the LCD interface.

Additional modules I wrote for this application include:

A - data and control bit packing and outputting of the serial data stream to the MAX5354.

B - data collection and calibration of temperature from the LM35, and current and voltage from the INA219 hi side sensor.  Temperature readings can be jittery, so they are filtered using a simple Moving Average filter.  8 stages did a good job.  the MovingAverage.h library is used for this.  Also, the Voltage readings from the INA219 sensor are combined according to the spec sheet to provide a total voltage reading.  Since I also include a reverse polarity protection diode on the high side of the Electronic Load, this voltage is further  modified to account for the voltage drop, using the diode datasheet specs, along with a logarithmic curve fit, a function of the measured current, to correct further for the forward diode voltage drop as a function of current.  That provides a very accurate measure of the applied test voltage, at the connection terminals.  The INA219 current measurement is checked with an external meter, and is shown to be very accurate also.

C - 7-segment data conversion, output via I2C, and digit selection multiplexing

The Static Test Function:

In addition to having an OFF Mode which displays the device Title screen and shuts off the current regulator, the device has a Static Test Mode that simply allows the current regulator reference to be incremented and decremented via the PBs, while the relevant data (Reference Current, Actual Current, Actual terminal volts, and Temperature) is displayed on the LCD screen.

Title Screen

Static Test Screen Mode

The Ramp Test Function:

Of more interest is the automation of the Load Test process.  This involves a Data Entry screen, that lets the user enter:

  • the starting current (mA, 0 to 3200)
  • the ending current (mA, 0 to 3200)
  • the current increment amount (mA, 0 to 1000)
  • the time increment (units of 1/10 Second, 0 to 100)

Once this data is entered, the user can move to the Ramp Test screen, which automatically starts the Ramp Test, and displays the test data as for the Static Test, updated 10x per Second.  Data is also sent out the USB port, in CSV format, at a rate of 1x per Second.  The Ramp Test will begin at the starting current reference, and increment the actual current reference by the current increment amount, every time increment amount, until the ending current reference is reached. The Ramp Test will continue, repeating itself as necessary, until the user leaves the Ramp Test screen. 

Ramp Test Data Entry Screen

Ramp Test Screen

The LCD Display logic:

I have used LCDs in other small projects, and have had a need to easily configure and operate them with multiple display screen datasets, and multiple screens of input data.  I have previously surveyed some of the available libraries for this purpose, and eventually developed my own module set, that is sufficient for my needs, easy to configure, and not an overly large amount of code. Control is intended to use only 3 input PBs: a SELECT, an UP, and a DN button.  When changing the input data fields, the amount of change of the field data is a function of the data field's current value: 

  • Range 0-10, change by 1; 
  • Range 10-100, change by 10; 
  •  Range 100-500, change by 50; 
  • Range >500, change by 100

In this application, I have done the following:

  • Screens selected with "SELECT" PB (1->2->3->4->1):
  • Screen 1 = Title Screen, output is 0 mA
  • Screen 2 = Simple Test. UP and DN increment or decrement the static load current (mA)
  • Screen 3 = Load Ramp Test monitor. Also outputs CSV data 1/Second to USB
    • Ramp Test turned ON / OFF when entering / leaving this Screen
  • - Screen 4 = Input Ramp Test Config choices

On Input Screen 4:

  • Use UP to select 1st input field,
  • use SELECT to move across the 4 input fields, then back to screen select mode
  • for each input field, use UP and DN PBs to change input field value
Ramp Test Sample Output:

For my purposes, it is sufficient to capture the CSV data strings using the Arduino's Serial monitor, and then Copy & Paste the data of interest into a Spreadsheet, for review and graphing.  A sample is shown, for a typical basic wall wart power supply, rated at 12Vdc and 800mA output:

It is also possible to use other DAQ interface functions on a PC, to automatically capture the CSV data, and further process  or display it.  Possible modules include:

  • Terminal Program that saves received data to a file
  • Arduino IDE Graphic Monitor (only supports 1 auto-scaled axis)
  • Gobetwino PC tool (Win). OK, but needs special code in Arduino
  • PLX-DAQ V2.11 (Win; Excel). Needs special Code in Arduino. Not tested.
  • OpenDAQCalc V1.f (Win, Linux, Excel, Calc). Looks good; small code bugs...
  • MatLab (>R2014). $$$, Not tested.
  • Aggsoft’s Advanced Serial Data Logger (Win). $$$, Not tested.
In Closing - Final Results:

So how did I do?  The updated Specs:
  • Max 24V dc, 3.2 A Load. H/W OpAmp Current Regulator (MAX5354)
  • Minimum Voltage: 1.4V @ 100mA, 1.8V @ 1Amp
  • Arduino Nano Controller, 16x2 LCD display
  • provide both Static testing, and Ramp Test
  • Re-use most CATV Box parts (power, relay, LEDs, IR Rcvr, PBs)
  • add I2C I/O Exp to drive LED digits, display Heatsink Temperature
  • add cooling fan (ON @ 40 Deg C), LM35 Temperature sensor
  • INA219 I2C hi-side V & A sensor, input protection diode
  • add MAX5354 10b serial DAC, 2SD1276 Darlington Transistor, heat sink
  • add fan transistor switch, connect relay and fan transistors to Nano
  • connect LED digit transistors, IR receiver output, to Nano
  • send measured data out USB in CSV form, for capture on PC


1. Software:
  • Source Code: Request from the Author as above by email.
  • Compiler - Arduino IDE V1.8.16 running on Win10
  • SimpleTimer Library: included in Arduino IDE, no Version, Mods by Bill Knight March 2017
  • Bounce2 Library: V2.60.0, by Thomas O Fredericks
  • MovingAverage Library, V1.0.3 by Pavel Slama 2018
  • hd44780 Library: V1.3.2 by Bill Perry, Nov 2020, with I2C extensions
  • Adafruit_INA219 Library: V1.1.1, by Bryan Siepert & Kevin Townsend, Adafruit

2. Hardware:
  • MAX5354 Datasheet:
  • INA219 Adafruit Guide:
  • PCF8574 Datasheet:
  • 2SD1276 PNP Darlington Datasheet:
  • LM35 Datasheet:

Tuesday, 10 August 2021

 Updating A Legacy Stereo Receiver

We have used a SONY Receiver for our main room TV, Radio, Media Player audio needs for many years, and have been satisfied with it.  However, the FM receiver section has recently developed some apparent AGC problems, and no longer maintains an even volume, fluctuating slowly and unpredictably.  Some internal poking, and a look at the maintenance manual I have for it, show that the FM tuner is a sealed unit, purchased by SONY from a third party, so prob. not something I can repair.

Sticker Shock...

A look at the market for upgrades was a shock!  Admittedly, I included some newer features, such as an Internet Radio capability and multi-channel decoding, but seeing prices closing in on, and exceeding $1000 suggested a look at alternate approaches might be good.  We are okay with stereo, and have other features built into our Media Server, so perhaps just an FM tuner replacement might be good enough...

A Suitable Module:

As it happens, the entry level market is chock full of small add-on modules for this purpose and others (Bluetooth reception, SD card and flash drive inputs, aux inputs, and others...).  The technical reviews I looked at suggest the quality of reception is very good.  After browsing the choices, I selected a basic unit to experiment, for a cost of under $7. 

Making it Look Nice...

Of course, it will take some packaging and a small power supply, suitable for locating with the existing SONY unit in the living room.  Over time, I have collected a number of small cast-off devices for re-use in projects, and a nice Phillips Analog cable TV converter looked like it would do nicely.  After some
hacksaw customization to eliminate the un-needed parts of the internal PCB, I was left with a nice metal and plastic case with internal 5V and 12V regulated supplies.  Some dremeling and filing allowed the new FM module to sit nicely on the front of the unit, and some further drilling and filing on the back provided a coax cable connection (for an antenna) and some RCA sockets (salvaged from a cast-off DVD player) for audio out and aux inputs.

Antenna Improvements:

This was also an opportunity to update the old 300 ohm twin-lead folded dipole FM antenna I have been using with the SONY receiver, connected to it's convenient 300 ohm input terminals.  Twin lead can be awkward to route around the shelving, and gets stiff and cracks with age, so it was worth building another.  However, the new FM module has just a solder point for an antenna connection.  A bit of digging suggested this input is likely closer to 50 - 75 ohms, so a balun would also be needed, assuming I still had some 300 ohm twin-lead somewhere is my junk box...  However, some browsing online suggested I should try a folder coax dipole instead.  No balun needed, and I could some of my plentiful supply of RG59 cable hanging around...  And re-use one of those coax cable connectors I've been saving from old cable converter boxes!!


Overall, this project has turned out well.  A small number of hours invested in a nice improvement and additional functionality for the venerable SONY receiver.  The original receiver is used in essentially the same way for TV and Media box inputs, with new functions available through the Tape input on the SONY.  The Bluetooth input capability is especially nice.

To Do's and Next Times:

Remote Control:  The new FM module comes with it's own IR Remote, a mini remote control with 21 tiny PBs.  It works, but I would have liked to control the new module with the same remote we use with the TV and the SONY (a cast-off COGECO branded universal remote).  Alas, no such luck.  The mini uses 21 NEC commands, that are well documented online, but there is only incomplete fits within the choices available from the universal remote, not enough to be even partially useful.  Not sure what to do about remote control integration. It may be time to buy / build a full function programmable remote...  Same problem exists with the media box remote, but we usually control it with a mouse.

Folder Navigation:  The USB and SD card players, for MP3 and similar music files, have no folder navigation capability, seeing only a flat list of files to play, in order.  Next time, spend a few more dollars on a module that has some basic folder navigation capability!

Multi-Channel Decode, Quad Amplifiers:  Newer versions and other devices offer both of these choices, and appear to be cost effective.  Maybe there will be a Mark II in the near future!

Saturday, 3 February 2018

Email Spam, Yahoo, DMARC and Mailing Lists: A Journey of Discovery

I belong to a small hobby organization, and assist with simple techy things that can help the group in various ways, like helping maintain the website.
A while back, the group was looking for a simpler way to be sure that they could communicate effectively and easily among the groups executive, using email.  This sounds easy, but in a group of 10, someone always seems to get left out of group emails sent from personal email accounts, or the wrong email gets included in a list, or emails get left in someone's personal list, that are no longer needed.
The group experimented with setting up a shared gmail account for this purpose, but gmail account security makes it very hard to share a single account, accessed from multiple locations.  Next up was a google discussion group, but that had it's own list of complexities.
So I suggested we just set up an Old School email list service.  You know, the ones were you define an email account, give a list of other emails to forward to, and just send anythng you want to share to it, for automatic forwarding to everyone.  The list gets maintained in one place, and we are done.
Well, they still exist, but most are commercial Marketing remailers, with tons of bells and whistles, and probably lots of other strings attached.  Some are free for entry level use, but I didn't spend too much time on them after looking into . has been around for quite a while.  They are truly free, although they do not accept just anyone.  However our group met their criteria, so we set up our first list, and populated it with some emails and started testing.  Everything went fairly well, and we were happy, until one of our members sent out a test, and we discovered that his Reply To: email had been Redacted, and replaced with "" .  An interesting problem!  Since I already had one request for advice in the hands of the FreeLists Staff, I decided to nibble at this one for a while myself.

DMARC and Spam:
In my research, I learned there is an anti-spam toolset used by major email providers world-wide, known as DMARC.  One of the things DMARC does is allow email providers to identify the domain names they use to send email from (like,,, etc), and to embed that knowledge in several secure ways in emails and in Domain Name Servers (the "address book" of the internet), to allow receiving email services to securely determine if a given email has actually come from the email service it says it originated from (the "domain name" test).

Reject or Ignore:
Email sending services can also optionally tell a receiving email service what to do with email that fails this "domain name" test: either reject the email, or ignore it (allowing the receiving email service to decide what to do about it instead).  When DMARC was first rolled out in 2012 - 2013, this failure action was defaulted to ignore, by virtually everyone who implemented DMARC.

Yahoo got Spammed:
In early April, 2014, was hit by major email spammers, who were spoofing the domain name, and creating havoc among yahoo email users and others.  Yahoo made a quick decision one weekend to change the DMARC failure action for their domain name from ignore to reject.  In doing so, all mail list and other remailing applications that included any yahoo email users, broke instantly  (their email spoofing problem was solved, though).  Not only did they fail, but the resulting error messages began bouncing back, and some of the bounces resulted in further rejects and bounces... See for further information.

Fixing Mail Lists:

Mail List and other remailing service providers needed to deal with this, including our Mail List provider  DMARC also provided some work-arounds.  See for example . At the time, Facebook page reported:
   " Freelists -     April 19, 2014 ·
     A solution to DMARC-related issues has been developed and is being tested on a handful of lists that reported deliverability problems to us. Should feedback be positive, we'll continue rolling this out to the entire site in the coming days.
     Let us ( know if you'd like advance access to the fix, which replaces the subscriber's From: address with an "address redacted" sort of message when posting IF his mail provider publishes DMARC records."
Another common fix was to ask Yahoo email users to switch to another major email provider, like Gmail or Outlook...

So why did our Member get Redacted?
Examining the email header of messages from our Rogers User showed references to Yahoo!  Now that is very interesting!  No other user of our list had such references in their email headers.  But further research quickly uncovered the fact that Rogers has outsourced it's email to!!
I then discovered the toolset at the website
I ran this for the email service, and determined that "p=reject", which is why our member's email is getting redacted.  His email provider prevents him from full use of a mail list.

In conclusion, our member gets to decide if a redacted reply address is okay when he uses our list, or if he will set up a different email account, to gain full use of the list.
We can also move forward to add a list that allows us to email amongst our total membership efficiently.

Saturday, 20 January 2018

My NAS Experiences...

About a year ago, I embarked on the learning curve needed to implement a NAS (Network Accessable Storage) Server on my home Network.  A good opportunity to put one more of those old cast-off PCs to work, and find a home for those digital photos accumulating in various places.  

System 1: NAS4Free and PIII

After reading up on the several freeware type NAS implementations available, I decided an old PIII system with 500MB RAM would be good enough.  The box was small, did not use as much power as some of the other boxes I had sitting in the corner.  I stuck an old Maxtor 40GB PATA hard drive in it for the OS and NAS software, scrounged around until I found a PCI bus SATA card to use, and installed a 1TB SATA drive for Data.  INstalled Ubuntu Server OSA, which I had some experience with, then installed my first choice, NAS4Free.  Although I got it installed okay, I seemed to have a lot of trouble setting up appropriate security to be able to see it from other Windows and Linux boxes on my Network.  Maybe it was me; others have used it successfully, but I was having lots of frustration...

Version 2: Switch to OpenMediaVault (OMV), & Pictures!

So I started over, with OMV V2.1  OMV's install ISO does a very nice job of installing Debian and OMV on the Maxtor drive, and finding and setting up the Data drive on the 1TB SATA drive I had installed.  I was able to easily setup a number of data shares, and several classes of users, and see everything easily across my network.  The web admin panel works very well.  
I started to load pictures, from my Win10 PC, and had some more learning to do.  Fortunately others have been there before, and I can refer you to Awasu Consulting's very good articles on Open Media Vault, esp. the one entitled "Configuring Open Media Vault", and the section "Uploading Files to the NAS".

Other backgrounders I found helpful include:

Soon I had uploaded many thousands of pics and videos from several vacations of the past several years, and made them available across our home network, and accessible from several different kinds of devices.  I have found Kodi to be an excellent Media Server, running on inexpensive Android based OTT boxes (about $30 each), feeding from the NAS box, and connected to TVs and a stereo in several rooms of the house.  Kodi is also easily controlled either locally on the TV, with the included IR remote control, or over WiFi, from our Android or iOS phones and tablets.  A very nice arrangement!

More Data: Movies and Music

Of course, there is lots more to do after these initial successes!  I added another 0.7TB SATA drive I had on hand, configured and shared it, and started to add Movies from our in-house collection, accumulated over a number of years.  Soon there were 200 Movies online and easily accessible, complete with supporting information courtesy of the Kodi installed movie information scraper apps.  

And all those music CDs!  Some had already been ripped, but we had lots more to do... Soon there were 1000 or so music CDs online, although since some had been ripped by different people, using different tools and formats, there was a lot of cleanup of existing digital files, so all the music was presented in a common way...  The Windows Media tools, and others, help a lot in setting this up, and Kodi is very happy using the repository so produced.

Setback 1: SATA Card Failure & System 2

And then the plug in PCI bus SATA card I was using failed....  I didn't have another, but I did have lots of other PCs in the corner.  This time I picked a slightly newer, more powerful Acer box, with all the right interfaces, 1GB of RAM, and an AMD Athlon 64b cpu, running at 2.7GHz.  A bit more power hungry, but we were happy with the results of having a NAS server online.  The hard drives installed easily, and the system booted up.  Back in business!  (I ordered another PCI SATA card, just to have around for future use).

Setback 2: Power Supply Failure, and System 3

A week ago, the power went out in our neighbourhood for a few hours.  A rare occurrence, but no big deal, except the NAS server did not restart.  Upon investigation, discovered that it's power supply, a Liteon branded 250W ATX12V supply, had failed.  Some research showed that this was a not uncommon problem in Acer PCs with this supply, once you add additional SATA drives to them!!  
A search through my collection of surplus PCs showed a few had ATX12V supplies, but not with the same motherboard connections (20pin vs 24pin power connectors).  There was also the question of just how much power the mb needed, and if the extra 4 pins were needed.  Unfortunately, Acer refuses to make any tech information on their motherboards public, so there is no way to answer these questions!  A new replacement supply was going to be about $40, but I did have a surplus PC, with the appropriate hard drive interfaces, and a better power supply reputation (an IBM / Lenovo PC).  It also had an even faster cpu, and 1.5GB of RAM.
So I moved the hard drive collection over, leaving the existing CD-ROM drive in place on the IDE0 cable, adding the Maxtor 40GB OS/NAS drive to the same cable, and plugging the 2 SATA Data drives to the 2 available SATA connectors, after removing the SATA hard drive that was originally in this machine.  I was expecting an easy reboot, and back in business.  Not so easy....


Well, I had never run into this problem before.  It was accompanied with the error: "hd0 read error"
The BIOS sees the hard drives okay, although it is enumerating them in a different order than the previous PC did.  Did this matter?  No idea...
  The system boots ok from the Super Grub Rescue CD Recovery disk, and sees the hard drives okay.  I try several Grub recovery methods, but no luck.  But sometimes the CD doesn't boot... and I realize the BIOS doesn't see the CD drive...
  After more googling, I finally realize I should check the jumper settings on the PATA devices, since they are both on the same cable...  Yup, two Masters. (Shows how long it has been since I had to configure IDE drives!)
After fixing that problem, I have reliable CD booting, but still no success with Grub repairs.
  On to a more general purpose System Rescue Bootable CD, and it's also time to disconnect the SATA drives, just in case...
  Gparted is happy with the partitions it is finding on the 40GB drive, as described in the OMV information.  However, other tools are not happy with the ext4 file system, complaining of a invalid superblock.
  I switched to using Testdisk, after finding several good references online describing how to use it effectively (it is a complex tool).  By this time, I am in uncharted territory wrt my knowledge of Linux and it's file system details, so this is both fascinating and frustrating territory.  I am learning a lot. I am using my "Practical Guide to Ubuntu Linux" (4th Edition, by Mark Sobell) a lot, too.
  I was able to obtain the list of backup superblocks on the disk, tried fsck repairs with most of them, but no success.

Reinstall OMV, V3.0.94

I was wary of a re-install, since I did not want to have to rebuild the contents of the data disks, if they had to be re-initialized.  However, after more research, it looked like OMV could mount and share existing populated data disks, and that turned out to be the case.  I downloaded the latest stable release of OMV, rebuilt the 40GB OS disk with no problems, added the 2 data disks to the system, and began reconfiguring the system on my network.  Although my previous NAS configuration notes were not quite complete, I had no difficulty mounting and sharing the drives and their data folders, adding the users I had previously setup, configuring services and access rights, and getting everything back to normal.  And my configuration notes are in great shape now!!
So overall a success, although it took several days to work through the details.

Next time, I will go to a full rebuild of the OS drive much quicker...

Thursday, 23 November 2017

New Life for Old Tablets

As a techie, I have collected a number of tablets over the years.  There's a couple of very senior Pandigital Novels (Android 1.5), a middle-aged Kobo monochrome e-reader with wi-fi (non-functional due to an auto update from Kobo that was buggy, but apparently recoverable, when I have time...), a 7 inch Chinese tablet ("Diverseway MID7007" )running Android V4.2.2, and my main tablet, a 2012-era Samsung Galaxy Tab 10.1 .  (not counting the cast off older smartphones I have accumulated, a few of which run early Android versions, and some early iPhones...)
Fig 1- About Page of my Samsung Galaxy Tab 10.1, Pre Update

Google Crashes Tablets...
However, earlier this year, the Galaxy started to show frequent crash error messages from various Google Play apps, and the Google Browser would crash often on websites with complex page components (CBC.CA was a big problem, but far from the only one).  The Firefox Browser also had a lot of trouble with complex pages.  This was making the tablet unpleasant to use for news feeds, and other uses.

So began my search for a fix.  The tablet has reasonable hardware (ArmV7 dual core 32b cpu, 1Ghz, 722MB reported RAM (likely an actual 1GB..?) , 32GB internal storage), good display, wifi, bluetooth, various sensors, GPS and excellent battery life.  The OS was at Android V4.0.4 (ICS), Samsung's last official update for this tablet model.

Emphasis on Due Diligence Research...
Some online reading identified:
1- a lot of activity noted on multiple websites, regarding Android updates for this model.  Much discussion around updates from V3 and V4.0 to:  V4.1, 4.2, 4.4, 5.0, 5.1, and even a bit of work on  V6 and V7!  Multiple sources / groups identified as involved, but most common references are to:  the Android Open Source Project (AOSP), a fork called AOKP, and the CyanogenMod CM series of Android updates.  The CyanogenMod CM series became LineAge OS series last year.  The LineAge OS series officially doesn't list any updates going back more than a few years.
2- The likely cause of Google Apps failures (google's upgrades to NEON instruction set, with no support for older cpu sets), and some likely strategies to overcome this (rollback to earlier Google apps versions, ways to prevent auto-updates, and apparently kernel? updates to simulate the NEON instruction set components otherwise missing.)
3- safe and effective procedures to perform the OS update, using tools like TWRP, CWM, Odin3...

Fig 2- AOSP Android 5.1.1 Lollipop Update Thread
The Direction Forward...
So the direction forward seemed clear.  I elected to update to an Unofficial AOSP-based Android 5.1.1 Lollipop, using TWRP and Odin3.  There is a huge amount of discussion available about this update, esp. on the xda-developers website.  This work was done / led by senior developer "decatf", for whom I have incredible respect, given not only the excellence of his work, but his extensive involvement and support of those who asked for help along the way to using his work.  Many thanks!

The First Success...
Although I have extensive background in small computing hardware and software, this class of update flashing for Android devices was new to me.  I elected to start with one of the Pandigital Novels, since no big deal if I bricked it!  There is also extensive discussion of updates for this device, including Pandigital's interesting use of variations in Models to identify regional sales areas of the same device.  It's important to know what exact model you are going to update, and most of the discussion evolved around US model #s, rather than the Canadian model # on the device I have.  But this soon got clarified, and I was able to identify a likely update candidate, and successfully update one of my Black PDNs from V1.5 to V2.1 !.  There are a few glitches, as yet unresolved, that prevent reliable operation of the Google Browser, but the likely cause is too little space in the OS partitions.  It's a known problem, with some documented fixes, so when there is time, I may look into this further, but not a priority now.  Otherwise, a very useful update, using xda-developer "terminander" 's V2.1 update, as documented on the thread "Android 2.1 on the original BPDN --- coming to a channel near you".  Again, many thanks!

So, on to the real goal, that of updating my Galaxy Tab.  Gathering the selected components was straightforward.  It is important to use a correct Samsung USB Driver to communicate between Odin3 on my W10 PC, and the tablet, in it's Download mode.  I had installed an old version of Samsung Kies some years ago in support of an early cell phone, and forgot about it.  Installing the latest Samsung USB driver package seemed to cause some problems with Odin, but the underlying cause was never clear.  After multiple uninstalls, and re-installs of a couple of versions of the Driver, and lots of Reboots, and some analysis of my USB subsytem with the marvelous USB TreeView utility (part of the MS Driver Dev Kit, and supported and improved by Uwe Sieber), I was able to see the tablet's download connection in Odin!

The Samsung standard Download / Recovery Tool is useful and deceptively simple.  So simple, in fact, that no-one really bothers to clearly and correctly describe how to invoke it, and cause it to actually begin a USB download!!  After some twiddling and references to the many partial notes online about how to get the actual download to begin, wondering all the time if this was a USB driver issue, things finally came together, and the TWRP Recovery Utility ( began to download and install, with no further issues.

Fig 3- TWRP Running on my Galaxy Tab, Prior to Backup, and Updates.

Everything else was easy from this point on!  Be sure to use decatf's update to the AOSP 5.1.1 ROM file, from 20171009 . It worked great for me.  I also installed the Google Play program set in, with no problems.
I now have an updated Galaxy Tab 10.1, running well, without the problems I had before, and with some additional capabilities, such as overclocking, I have yet to explore.
The updated Android has a different look to it, wrt V4.0.4 .  It is very familiar, since it tends to match the appearance of my Nexus 5 smartphone,  which runs Android V6.0.1 !

Fig 4- Galaxy Running 5.1.1 - Home Screen, Post Update
Fig 5- Galaxy About Page, Post Update.

Saturday, 25 March 2017

3D Printing Example...

I acquired a Prusa i3 type 3D Printer kit late last year from (EG) (Montreal; great printer, good price compared to eBay import for same printer, and great customer service from EG, btw!) The printer works reasonably well as built; the learning curve for solving the problems that occasionally appear is not trivial, but I am making progress.
We decided to use PLA only until we have a very good reason to use something else. Although I have a heated aluminum bed that works well, it is not needed for PLA work so far. I use blue painters tape (from Home Depot) to cover the bed, and get mostly good adhesion, as long as I change the tape frequently (no more than half a dozen prints in the same place, otherwise adhesion starts to become unacceptable).
A recent print that turned out well, was a case for my recently acquired Electronic Device Tester. This device, the LCR-T3-H, is a very versatile Arduino-based tester that handles many different types of 2 and 3 terminal, active and passive components. I've included some photos of several types of components being tested. The particular device I bought is based on a public domain design that is very well documented here: .
The case I built is described on Thingiverse here: .
This design was straightforward to print in PLA (despite a small amount of warping from insufficient bed sticking). The pcb is a tight fit, and the display panel backlight connections stick out a small amount past the edge of the pcb, requiring that a small section of the side wall of the case be cut out to allow the pcb to fit in the case. Still works very well.

Top view of case, shows startup info. 

Back view, base removed. ATMEGA386 smt chip, 8MHz crystal, not much else!

Back of case is a tight fit, screws not really needed. Print looks good...

Testing a Cap. One button operation, auto power off, tests battery on power up.

Inductor test.  But very small inductance looks like a Resister...

PNP xistor. also does FETs, SCRs, Diodes, etc. SMT parts too.

Monday, 15 August 2016

3D Printing: First Object Success!!

As much as I would like to build one of these printers, just because it's neat, we thought we should learn more about process and uses first. A couple of visits to the HPL MakerSpace convinced us to start there. So I decided to print a solar panel holder for Roz' Little Library (to charge the batteries that run it's computer, of course!). Several days of learning and working with TinkerCAD design tool produced a very nice design, so I registered with the Library, and scheduled a couple of hours last night on one of their MakerBot Replicator 3D Printers. We are very pleased with the outcome, and will certainly try more. Total print time: 1 hour 45 minutes. Total cost: $1.90 .

The TinkerCad Design image
Printed frame with solar panel and wiring installed.

Printing underway, on the MakerBot Replicator+ at the HPL MakerSpace. Frame is printed upside down.