#0023: Repairing short circuit damage within a ribbon cable

#0023: Repairing short circuit damage within a ribbon cable

Preamble

Sometimes you might come across damage within a ribbon cable similar to the example. The minor burn damage on the example featured was done by a liquid causing a short circuit between two exposed copper pads. As it burned, it created a break between an exposed pad, and it’s respective trace. Cutting the circuit in the process. The short also caused some of the other pads to oxidise, and some minor burning of the ribbon cable’s plastics. This will be a quick tutorial on repairing such a fault.

Please note: I have no images before the initial cleaning and prepping stage. This is because I was halfway through this repair, when I decided that it may be good to document it.

Tools and materials:

  • scalpel
  • tweezers
  • isopropyl alcohol
  • cotton earbuds
  • soldering iron
  • lead solder
  • copper strand from a wire
  • side cutters
  • multimeter

Step 1: Identifying and logging the damages

This should always be a first step before attempting a repair. The reason for this is that the initial pre-work cleaning, is likely to clean away a lot of contextual clues about the location and severity of all the damages. A good visual inspection and initial assessment can save time later on, due to not having to track down any circuit damage that got masked or hidden by cleaning.

Step 2: Cleaning the local area

First thing I did after identifying the location of any potential damage I wanted to repair, was to clean it. In this case I needed to first scrape off the more obvious patches of oxidation and burnt/melted materials using a scalpel. Then thoroughly clean off the pads of the ribbon cable using isopropyl alcohol and a cotton earbud. I paid special attention to the tiny burn hole next to the most damaged pad, making sure to remove any conductive materials from it by scraping it out thoroughly.

Step 3: Test to confirm faults

Using a multimeter in continuity mode, I tested for continuity between the pads surrounding the burnt spot. Perhaps it still contained conductors (such as pieces of the broken pad) that may cause a future short. After being satisfied that it did not; I focused on the particular pad that sustained the most damage, and tested for continuity across this pad and it’s respective trace to see if it was still connected. It was not. All other pads had continuity with their respective traces.

Step 4: Fixing confirmed faults

After identifying only a single fault; this being a break between a pad and it’s trace. I moved to repair it. Firstly I endeavoured to bridge the gap by just tinning across it from the pad to it’s trace. The thought process was that that the mere mass of the solder itself would be enough to bridge the tiny gap. It did not. After that initial failure, I decided that I required a bridging medium; something for the solder to adhere to. In this case I decided to use a single copper strand from a wire.

Using a scalpel, I removed some insulation from the ribbon cable trace above the broken pad. This was in order to have something on that side to comfortably solder the copper strand to. After which, I soldered the wire whilst using a pair of tweezers to hold the tiny copper strand down in place.

Step 5: Cleaning up after a repair

The next step involves cleaning up any messes I might’ve caused during the repair. In this case, whilst trying to initially tin the broken pad, I also tinned the neighbouring pads accidentally. In trying to remove the bulk of the solder, I caused further damage by starting to burn the plastic that the pads are set into. In the end I decided to just leave it be. The repair needed to be functional, not aesthetically pleasing. I did consider using a desoldering braid to remove all the solder, however I was very likely to cause more damage trying, so I opted to just leave it be.

In the end the after-fix clean consisted of just clipping off the excess wire with a side cutter and cleaning off any flux residue with an isopropyl dipped cotton earbud.

Please note: There is no electrical connection between adjacent pads. The burnt plastic between the pads just looks like solder. I told ya it was ugly.

Step 6: Testing the repair

Next. I performed a quick continuity test on the repair with a multimeter; both testing for continuity across the pad to it’s trace; and testing for a lack of continuity across neighbouring pads. These tests take basically no time to do and can set my mind at ease. I do these types of tests even when a visual inspection indicates that it’s not necessary.

The real test is putting the device back into service and seeing if it functions as expected. In this case the ribbon cable that I repaired was from a laptop’s integrated keyboard. Although the ribbon cable fitted more snugly into it’s receptacle or socket than I wanted. It still fitted and functioned properly. The keyboard was fully functional after this repair. Huzzah!

Closing thoughts

I apologise if this article came off as a little patronising; especially given the quality of the example repair, the missing “before” picture, and the fact that it contains mistakes front and centre. Generally, I find step-by-step guides like this one difficult to write, without sounding either needlessly pedantic or excessively didactic. Anyway, even if the exact specifics are not useful to you, I hope the general steps would be. Identify. Clean. Test. Fix. Clean. Test. Then Profit. That is if it works, if not: then go back to testing for faults.

Thank you for reading.

#0022: Equipment recommendation list for a hobbyist repair technician

#0022: Equipment recommendation list for a hobbyist repair technician

behold mein craphouse

Preamble

This is a quick and dirty list of the equipment (tools, and consumables) I use, specifically with regards to repairing devices. Hopefully, this list proves useful to any other hobbyist repair technicians or people interested in electronics in general. The equipment list is split into three categories based on need: Necessities, Nice-to-haves, and Useless dreck. Each item has a quick summary explaining it’s use relative to it’s category. Other than the broad categories, the items are in no particular order.

Quick list

Necessities:

  • Temperature controlled soldering iron
  • Leaded solder
  • Lead-free solder
  • Tweezers
  • Bench power supply
  • A good vacuum desoldering pump
  • Desoldering braid
  • Pry tools
  • Isopropyl alcohol
  • Rosin flux
  • Multi-bit screwdriver set / screwdriver set
  • A cheap multimeter
  • PPE: safety glasses
  • PPE: gloves
  • Spares and parts
  • LCR component tester
  • Side cutter
  • Digital camera
  • Portable computer
  • Helping hands
  • Hot air SMD rework station
  • Kapton tape
  • Shrink wrap
  • Lighter
  • Pen and pad
  • Small containers
  • Work mat
  • Mobile light source
  • Cleaning supplies

Nice-to-haves:

  • Soldering iron tip tinner
  • A good wire stripper
  • Solder mask and UV curing torch
  • Oscilloscope
  • Hot glue gun
  • Soldering gun
  • PCB board holder
  • Precision screwdriver set
  • Desktop fan
  • Filter mask
  • Temperature sensor module
  • Isolation transformer

Useless dreck:

  • Cheap vacuum desoldering pump
  • Cheap wire stripper
  • Flux pens
  • Alcohol based liquid flux
  • Heated vacuum desoldering pump
  • Soldering iron sponge

Necessities

Temperature controlled soldering iron

A variable temperature setting is needed to work effectively with materials with different melting points and thermal mass conductivity.

Leaded solder

More versatile and friendly to work with than the lead-free variant due to it’s lower melting point and better flow. Necessary to perform maintenance on a soldering iron tips (tip tinning).

Lead free solder

If you have leaded solder, then lead free solder is largely redundant if all you primarily care about is solder effectiveness. Lead-free solder does however have it’s use cases. The main trade off between them is that leaded solder is more effective as a solder, however lead-free doesn’t contain lead, which is toxic. Any use case where you definitely do not want lead in the device, lead-free would be the way to go. A good example of this, is any device that comes in contact with foodstuffs such as kitchen appliances.

Tweezers

Tweezers are needed to manipulate tiny components, such as surface mounted components. They are also useful for holding materials affected by heat. Get a firm pair of metal tweezers, the cheap ones bend when you exert force on them, meaning that you lose control on the object you are gripping. It also means that you cannot grip the object tightly, otherwise the tweezer will start to bend. I recommend having multiple tweezers, an L-bend pair of tweezers for comfortably interfacing with SMD components, and a larger (stronger) pair of straight tweezers (with teeth/grips) for general use.

Bench power supply

Necessary for powering a range of devices and components under test. It needs to have variable voltage outputs and a current limiter. It also needs to be able to provide enough power for powering the devices under test.

A good vacuum desoldering pump

Although generally less effective at removing solder from a joint than a length of flux infused desoldering braid would be, it is still very useful due to it’s reusability. It helps me keep my recurring materials cost down.

Desoldering braid

This is probably the best way to actually remove solder from a solder joint. Works best when infused with additional rosin flux.

Pry tools

A small collection of pry tools will assist in opening the various plastic clips that you will encounter when opening consumer devices.

Isopropyl alcohol

An excellent cleaning agent and light solvent. Useful for effectively removing many materials, from adhesive, to rosin flux, and even good for removing water (moisture) from devices.

Rosin flux

Necessary agent for assisting solder to flow effectively. Additional flux is necessary in many cases where the flux that comes within flux core solder is insufficient, or in cases of desoldering a joint without first applying additional (flux core) solder to the joint.

Multi-bit screwdriver set / screwdriver set

A good set of screwdrivers (including security bits) is basically mandatory for a repair tech of any stripe. They facilitate the access and disassembly of devices, necessary for repair.

Cheap multimeter

A multimeter is an absolute necessity. At the most basic level, a multimeter is used to test suspect components to gage their health and functionality. They have many functions that a very useful, such as continuity, voltage, current, and resistance testing. However they also have some gimmicky functions (at lest in the cheaper models), such as NCV testing, or transistor testing (which is not very good on multimeters in general).

Generally cheaper multimeters are fine for low voltage applications, such working on battery operated consumer devices. Their core functions are accurate enough that it shouldn’t become an issue. However if you are wanting to work on higher voltage devices. Such as mains powered devices, than a more expensive notable name brand multimeter (e.g. Fluke) is necessary at that point due to it’s safety feature set.

PPE: Safety glasses

You will use some form of safety glasses sooner or later. The only question is whether it happens before or after something either sharp or hot flies straight into your eyeballs.

PPE: Gloves

Very useful for handling hot materials, and/or isolating your skin form various toxic, corrosive, or abrasive materials. This could include anything from lead metal, to battery acid, to liquid plastic. Get gloves appropriate to the materials you’ll be handling.

Spares and parts

How can you call yourself a repair tech, if you don’t have at least some spare parts or devices either laying around; or stuffed into boxes somewhere. Either bought or salvaged, it really doesn’t matter. What matters is that there are many discrete parts in devices that are virtually irreparable. Basically this includes every small component from passives, such as: resistors, diodes, and capacitors; to active componentry such as integrated circuits and transistors. They’ll all need replacing once they’ve fried.

LCR component tester

This is a good addition to a multimeter. It’s typically used to test various components’ inductance (L), capacitance (C), or resistance (R). I however predominantly use mine to gauge the health of electrolytic capacitors, by testing their equivalent series resistance. I personally bought mine when I got into recapping old monitors. However, you can also us an LCR meter to identify various unlabelled components, such as SMD (surface mounted device) capacitors, resistors, and transistors.

Side cutter

A nice little sharp side cutter is invaluable when it comes to performing various tidying up jobs around a PCB circuit. These little clippers are great for trimming the leads of through hole components, and cutting smaller gage wires that are nestled deep in a device. It also functions as a good as wire stripper, however user’s will have to carefully strip the insulation from cables.

Digital camera

I use a digital camera to document my exploration through a device. That way I have evidence of how it looked before I started messing with it’s insides. An example use case would be documenting which random coloured wires were soldered where. By the time the user finds and fixes a fault within a device, details such as the specific configuration of wires connecting to any given board may slip their mind. So it helps in such circumstance to have documented evidence.

Computer

I typically use my small old (intel atom) laptop computer. I use it to host tutorials (both video and textual), datasheets, schematics, and for use as a typewriter to jot down notes if I don’t want to use a pen and pad for whatever reason. One could also load on the thing various entertainment media for getting through long sessions of laborious work. Basically music and audio books. Additionally, I also use it to store catalogues of the photographs I take when assessing devices.

When it comes to work bench computers, I have a general preference for computers that are inexpensive and that use very little power to operate. Inexpensive, because they are likely to get damaged in one way or another. Either by off-spray, a slip with a blade, a drop, melt damage, anything really. And low power, because the computer is also most likely going to be powered on for extended periods of time, most likely just displaying documents whilst playing music in the background. Essentially, not really doing much in terms of processing computations. So an older small portable with a lower power processor is ideal for this use case.

On the other hand a desktop for example is likely unsuitable for this task, both due to it’s power consumption, and due to the desk space that it will require. Additionally, there is also the temptation with a more powerful rig, to ‘take a short break’ by playing video games, or rabbit holing youtube videos. Such distractions are painful experiences on an intel atom processor, hence its likely to keep a person on task easier.

Helping hands

Helping hands hold workpieces in place securely, enabling the user to work on them confidently. They may initially seem like a ‘nice-to-have’. However I find that for many things, such as soldering wires together, or connecting various cables to plugs; helping hands that can hold all these small fiddly components are exceptionally helpful.

Hot air SMD rework station

An SMD rework station is just a fancy name for hot air station. It has a nozzle that outputs air hot enough to melt solder. If you are working with miniscule surface mounted devices or components, then an SMD rework station is something that you really aught to have. Especially when it comes to installing or removing larger surface mounted devices such as IC (integrated circuit) chips.

Kapton tape

A great companion to a hot air station is the Kapton tape. This is a heat resistant adhesive tape. It is useful in that it allows an operator to localise any heat from the hot air station, by applying the insulative kapton tape to the surrounding componentry. Kapton tape is especially useful in preventing many tiny components from accidentally falling off a PCB when the user applies heat to a large neighbouring component. This happens a lot when dealing with any larger logic ICs, because they tend to be surrounded with many tiny surface mounted ceramic capacitors. Which are needed to provide them with apt power.

Shrink wrap

A great step up from using electrical tape to insulate connections in wires is by using shrink wrap. Shrink wrap is more water resistant and offers a more permanent and professional looking insulation to connections.

Lighter

A lighter is a great cheap alternative to a hot air station or heat gun, when you want to shrink heat shrink.

Pen and pad

Good for taking on the fly notes and sketching schematics, diagrams, or what have you. I think that nothing beats the convenience of using a pen and pad to jot down whatever pops into mind.

Small containers

A couple of small containers on the desk are an absolute must for working continuously in an organised manner. I have several knocking about; including a long metal tray for holding screws, a small pot for holding small garbage like solder from a vacuum pump or wire and tape trimmings, and a glass ashtray for holding various components. It’s good to have several little containers like this with dedicated uses.

Work mat

A good mat is necessary to protect your work table from any damage. I personally use a small cutting mat for everything, including soldering. Although a silicon heat map would be more appropriate for that, but a cutting mat has more general applications. Mats are especially useful for tables with multiple uses, such as writing or drawing. Tables that are better left unscratched and flat.

Mobile light source

Mobile light sources include devices like: torches or desk lamps. These are necessary for seeing small details, such as silkscreen on an IC chip, and especially useful for photography which often requires higher levels of light for the camera to capture details properly.

Cleaning supplies

Every repair will need a good clean at some point. This is a bit of a catch all category for the general cleaning stuff that I use. I keep a fair range of stuff close to hand. Firstly, I have a couple of dirty rags or shop towels, these are for either really dirty devices, or devices that are contaminated with something that means I’ll have to chuck the rag after use. Secondly I have some clean microfibre cloths for wiping down display screens and the like. These are for light dusting and polishing jobs essentially. Thirdly, I have a paintbrush which I use for cleaning dust out of difficult areas on devices, such as from between the fins of a heatsink or from a populated PCB board in general. Essentially for removing the bulk of dust from uneven and crowded surfaces.

I also carry cleaning solutions. In addition to the solvents like isopropyl alcohol, I also carry two spray bottles. One is filled with tap water and the other is filled with a 10:1 tap-water and washing up liquid mix. The dilute washing up liquid, I use as a catch all cleaning agent. Its good as a basic emulsifier, allowing me to remove oils from a device. It is also generally good for removing random sticky stains and substances from a device without damaging it. For example as an initial wet wipe down of a filthy monitor screen. The clean water bottle is used to aid the removal of any sticky residue that may linger after the application of the washing up solution. I keep cleaning with just water until the device chassis (or screen, or whatever) has no residue of any cleaning agent left on it.

Additionally I also use cue tips or earbuds. These are very effective at cleaning in very localised areas. I mostly couple these with some isopropyl alcohol; by soaking the earbud’s head in alcohol it can very effectively remove both caked on dry thermal paste or wet paste from CPUs without leaving any residue or contaminants.

Nice-to-haves

Soldering iron tip tinner

This is a specialised tool that just cleans soldering iron tips. It’s more convenient to use than tinning a soldering iron manually using leaded solder. But the results are basically the same.

A good wire stripper

A good wire stripper is a tool that will quickly and reliably strip insulation from wire. Its a tool of convenience, enabling a user to strip wire in a fraction of the time that it would take to do so with a side cutter or knife.

Solder mask and UV curing torch

If you work a lot with PCBs. For example repairing water damaged PCBs that have violently short-circuited to the point that they incurred burnt out sections. After scraping out all potential conductors such as the burnt out materials. A solder mask paste, is useful for sealing and insulating the damaged sections afterwards. It is what I consider a permanent and professional repair. The accompanying UV torch, assists the solder mask in drying quickly. A hacky alternative to filling blown holes in PCBs with solder mask, would be to use hot glue.

Oscilloscope

Oscilloscopes are useful if you get into analysing and repairing devices that deal with a lot of logic or sound signals. Things like computers and audio amplifiers. Where you’ll need to measure the signal outputs of various ICs in order to track down where the fault lies.

Hot glue gun

This is the hacks best friend. I use it a lot in in prototypes and as a way to make “temporary” repairs to various devices. Its great for filling in gaps in repaired plugs, and chassis, and even for setting electronics into a box.

Soldering gun

A powerful (~200 Watt) soldering gun is useful in any instance where you need a significant jump from the everyday soldering iron. It has the thermal mass and watt output to effectively solder to large heatsinks, such as a metal chassis. Soldering guns are also useful for effectively melting/welding plastics when coupled with a wide tip and low temperature setting.

PCB board holder

Useful for securing a workpiece. It is as useful as the helping hands, but more specialised due to it’s design being specialised for holding PCB boards only.

Precision screwdriver set

If you already have a screwdriver kit or the multi-bits kit you may either encounter screws that are too small for your screwdriver set, or screws that are deeply recessed into a device. The thin channel of the screws recession may be too deep and/or too thin for the larger screwdrivers.

Desktop fan

Its just a fan. It blows the fumes away from your face as you work, and helps cool workpieces down quicker. It’s nice to have when you want it, but in most cases it is unnecessary.

Filter mask

Necessary if you work with any really toxic fumes. I am not talking about rosin flux fumes when I say toxic. I’m referring to using a filter mask when melting/welding plastics.

Temperature sensor module

A largely single use tool that is good for calibrating a temperature controlled soldering iron (which has the function of temperature calibration).

Forceps

This is good for reaching deep into larger devices and clipping to and pulling specific objects around.

Isolation transformer

If you intend to work on any mains powered devices, then an isolation transformer is a must for safety concerns. Its another line in defence between you and death by electricity.

Useless dreck

Cheap vacuum desoldering pump

They don’t generally have the suction necessary to be worth using.

Cheap wire stripper

They tend to cut deeper than the insulation and cut strands within the wire. They are not better than a set of clippers or even a knife. There is no reason to use this type of wire stripper above more general tools.

Flux pens

They tend to contain diluted low quality rosin flux that lost the majority of it’s effectiveness of helping solder flow, in return for being in a true liquid form. Which allows it to wick in the pen. If you want a low quality flux in pen form. This is for you. It may useful for applications of SMD soldering. However it doesn’t make a notable difference over soldering with just flux core solder.

Alcohol based liquid flux

The flux is less effective due to being diluted in alcohol. Its effectiveness is reduced to the point that it doesn’t have a notable difference over using a flux core solder alone. The flux itself however is much easier to apply because it is a liquid. Rather than the pure rosin flux which is an amber like solid, or flux paste. This type of flux tends to be marketed as a no mess or no residue flux, that claim is true. However it is not a very effective flux.

Heated vacuum desoldering pump

The one I have, had a fragile tip that cracked due to the heat and use. It is also a thermoregulated unit; that has no way for the operator to control the actual temperature output. It outputs heat that can easily damage a work piece if held on it too long, at the same time it may not melt the solder in a timely manner. The actual vacuum pump mechanism however is serviceable.

Soldering iron sponge

I generally do not like soldering iron sponges due to the fact that they require watering first, and when you actually use it to clean solder off of the soldering iron, the cold moisture of the sponge causes a sudden thermal loss in the iron. Meaning that the user will have to wait for the iron to reheat after each cleaning. I just find that the iron wool tip cleaners are just superior as they do not require prep to clean the soldering iron, nor do they cause thermal loss in the iron, and finally they even clean the tip better than the sponge does. Tip cleaners can scrape oxidation from the iron’s tip, which the wet sponge can not.

Closing thoughts

I should mention that the categories of tools are based on my particular use cases, skill set, and preferences. Yours may and likely will vary. I have categorised the tools according to my general needs; putting the core list of tools that I use with most projects in ‘necessities’, the specialised tools that I seldom use but enjoy having in ‘nice to haves’; and finally the tools that I either did not enjoy using or had other tools (including general use tools) that did their jobs better, into the ‘useless dreck’.

Just because I categorised the various tools as such does not mean necessary that others would do the same. A lot of it is based on taste and personal priorities as well. The various rosin flux products come to mind as a good example of this. The ones in the ‘useless dreck’ categories are not without merit, it’s just that I did not care for them.

I hope this crude little list is of some value (if not then at least entertaining) to you.

Thank you for reading.

#0021: Repairing an LCD with missing segments

#0021: Repairing an LCD with missing segments

Preamble

This is a quick guide to repairing a specific fault found on undamaged low information monochrome numerical LCDs. Such the ones present within calculators. As such it will not go into detail about the functioning of LCDs in general, types of LCDs available, or any other information outside of the scope of simply repairing the missing displayed segments fault.

What is an LCD?

An LCD or Liquid Crystal Display, is a type of flat panel display. At its most basic an LCD operates by using the properties of liquid crystals coupled with polarisers. Polarisers are a type of optical filter that only allow light waves to funnel through them in a particular orientation. In other words, they remove light scatter; only allowing it through in a uniform manner. This, coupled with the liquid crystals’ property of altering their physical orientation when in the presence of an electric current; means that the narrow beams of light that make it into the crystal solution can either be allowed to pass through, or blocked, depending on the orientation of the crystals within the solution.

The specific type of LCDs we are dealing with are low information monochrome single line seven-segment displays. These types of simple LCDs are typically used in devices that predominantly output numbers. But may also display static symbols, such as the “E” in calculators for numbers that are too large to display without index notations. These types of LCDs are most commonly associated with pocket calculators. However they have been used with such devices as: alarm clocks, multimeters, solar charge controllers, battery monitors, household mains electricity meters; and I have even seen them used as a display on an electronic keypad lock.

I think this type of LCDs popularity is mostly due to it’s relative simplicity and low operating costs. It follows the KISS design philosophy. Keep It Simple Stupid. If a device would not notably benefit from a more complicated display, if all that it displays are simple numbers and basic symbols; then there is little reason to incur the (production and operating) costs of increasing design sophistication beyond this type of display.

As for the mechanics of how liquid crystals work, I like to (keyword) imagine a matrix of magnetic rods. At rest, the viewer can only see them from the top, and considering their microscopic size, this renders them essentially invisible. Whereas when a current is passed through them, the entire matrix of rod shaped crystals reorientate themselves to reveal the entire length of each of the rods. This greater surface area against the polarised light from the viewing angle, makes them appear opaque. There’s more to it than that, but that’s the general mental model I use to conceptualise the process. Although strictly speaking it isn’t accurate.

So how does a basic monochrome seven-segment LCD actually display information?

An LCD of this type is mapped with discrete segments. These primarily consist of seven dashes arranged in a number ‘8’ pattern. These are the core seven segments that are used to display numbers. Additionally LCDs have segments in the shape of static symbols; such as a period on calculator, or a colon on an digital clock.

Every discrete segment is given a set of electric probes. These probes are designed to allow a current to pass across the segment’s liquid crystals. This is how the liquid crystals within each individual segments are switched on and off. It operates in an analogous way to seven-segment LED displays. I.e. they both require an a electric current to be passed across each individual segment in order to activate it. Additionally, this electric current is controlled by a display controller IC (Integrated Circuit). Which translates any numerical values into display data (active segment and inactive segment map) that it uses to power it’s display accordingly.

example of an LED display
LCD segment map
segment circuit animation

Missing segments fault (on undamaged LCDs)

First of all, I specify that the LCD is undamaged because if the LCD you are attempting to repair is damaged, (e.g. has a crack across it); then chances are this fault is not the major contributor to your LCD’s malfunctions. That being said, missing segments on undamaged LCDs are likely caused by a break in the particular missing segment’s individual electric circuit supplying it.

Earlier I likened LCD seven-segment displays to their LED counterparts. This is because both require an individual IC controlled circuit that connects with each discrete display segment. Its just that with LEDs, its a lot easier for people to understand what is happening, when some of a displayed number’s LED segments fail to turn on. The failure to activate can be intuited due to a break in it’s branch of the circuit.

In this case the break in the segment’s circuit is usually caused between the LCD module and the underlying PCB; which hosts all device circuitry, including the display controller. This break usually occurs within or around the bridging material between the LCD and PCB. Namely the elastomeric connector (trade name: “Zebra strip”). This black and pink rubber like material is a soft electric conductive material that conducts electric signals across the naked pads of the PCB to the LCD and vice versa. It does this by having many tiny channels (or layers) of conductors and insulators, that alternate across it’s black strip. This black strip is then sandwiched with a pink insulator that runs the length of the outer sides of the elastomeric strip. This configuration allows the elastomeric strip to act like a large assortment of miniscule wires that electrically connect together whatever pads or traces that they touch at either of their ends.

The circuit break in this missing segments fault could be caused by two main things. Firstly, it could be due to an electric insulator getting in between the elastomeric strip and the exposed pads of the LCD and PCB. This could come in the form of a build up dust or grim, or even oxidation of the exposed PCB pads. To repair this, just clean all the pads and the elastomeric strip itself. I recommend using isopropyl alcohol and a cotton ear bud or cue tip. Just saturate the bud with the alcohol and scrub until it’s clean. Then reassemble the device and test.

Alternatively, this fault could also be caused by a separation between the elastomeric connector and it’s adjoining contacts. I.e. it has lifted off or away from the pads that is it supposed to be pressed against. This is usually caused by vibration. Typically, there will be a method of mechanically tightening or pressing the elastomeric connector against it’s pads. Such as a screw or adhesive, which with time and vibration (and maybe a little heat) can become undone enough that it allows the connector enough space to move away from it’s pads. To repair this, just re-tighten the screw or re-secure the elastomeric connector with tape if needs be.

The fault in the case with the example unit; I believe was caused by both a build up of dust between the contacts and the elastomeric connector, and also the connector physically separating from the LCD. The separation was caused by a loosening of the self tapping screws which held in place a bracing bar. This bracing bar applied pressure to the assembly consisting of the PCB, strip, and LCD, which sandwiched them together and kept them in place. That got loose, the strip moved slightly, and then dust got into the gaps that it created. After a good cleaning and tightening, it now works flawlessly.

Closing thoughts

When it comes right down to it, this is as simple as a repair really gets. No replacement of parts; just a basic disassembly and cleaning. It is essentially maintenance.

In my opinion, this type of repair is especially good for an aspiring repair tech with no confidence. The tools needed are basic, there are no additional parts (i.e. expenses) required, and the device being worked on it likely inexpensive; so there should be little in the way of consequences of failure. Such as fear of damaging a device, which may put people off from just ‘aving a go. Essentially the repair has little in the way of friction that may prevent a person from trying. It a good confidence builder.

Lastly, I just wanted to raise awareness encase you ever come across this type of fault in the future. It is easily repairable; and hopefully you’d be more inclined to at least give it a go, rather than discard the unit and purchase a new one as is usually the case for these types of cheaper mass market products.

Th-th-th-th-that’s all folks!
Thanks for reading.

#0020: Plastic welding techniques

#0020: Plastic welding techniques

Preamble

This is an introductory tutorial on welding plastics. The goal of this tutorial is to be a rather brief yet sufficient guide, that will allow the reader to be able to weld shut cracks and holes in plastic containers to the point of being water tight. It will cover welding technique, tooling, plastic types, PPE, and best practices. Everything an aspirant will need to effectively weld plastic containers.

Tools and materials

Tooling:

  • temperature controlled soldering iron or gun
  • (optional) fan

Materials:

  • appropriate donor plastic strips
  • (optional) duct tape or electrical tape

Personal Protective Equipment:

  • safety glasses
  • filter mask
  • thin rubber gloves

Core tool summary

As you can see the core tools and materials list is tiny. All you really need is a hot piece of metal to melt the plastic; and donor plastic material to flow into the various cracks and holes. This material is to reinforce and buttress the affected areas against any structural stress. That’s it.

Temperature controlled soldering iron

I specify a temperature controlled soldering iron (or gun) because you actually need relatively low temperatures to weld plastic; just enough to melt it, but not enough to burn the material. Most thermoregulated soldering irons would be too hot, because they are specced for melting solder. A material that generally has a higher melting point than many plastics. If the your iron is glowing red (even a little bit), then it’s probably a couple of hundred degrees (celsius) too hot.

Additionally, it would be beneficial if the soldering iron had a large thermal mass to enable it to maintain a stable temperature whilst it is in active use. I.e. actively transferring heat into the workpiece. A bit with a large surface area will also be useful, this is to effectively melt a good area of material at a time. Working with smaller bits makes the job more tedious. A smaller bit also concentrates the heat across a smaller surface area, which could cause heat spikes in the workpiece and consequently burn the local plastic. For the reasons above are why I chose to use a soldering gun with it’s widest tip rather than my usual general purpose soldering iron.

Plastic donor material

There’s not actually much to say about this. I like to make sure that the donor plastic is the same type of plastic as the item under repair is made of. This is to assist them in chemically bonding together more effectively. If you don’t want to purchase plastic donor strips like I have; you can alternatively just cut up similar items (i.e. items made from the same material) and use that. I have also seen many people use zip-ties as a donor plastic due to their convenient strip shape.

When selecting a donor plastic, look for a recycling symbol on the donor item (e.g. water bottle). Here it should have a few letters under it. These indicate what type of plastic the item is made from. Another thing to keep in mind when selecting a donor plastic is the food grade safety factor. To know whether or not a container is food safe, look for the knife and fork symbol. Specifically, when repairing a food grade container: do not assume that just because the donor plastic is the same type, as the food grade plastic container; that the donor is also food grade. Even if it initially is, the repair itself my change the chemical structure of the plastic to the point that it will now leech into any food (or drink) stored in it.

A good example is the container I repaired for this article. It was initially a food safe box, but now after the repair, even though it is now watertight again and I repaired it with the same type of plastic (PP); I would not use it for food, for fear of it leeching toxins into my foodstuffs.

common plastic types:

  • PET (Polyethylene Terephthalate) typically used in water bottles
  • PP (Polypropylene) general use plastic for containers
  • HDPE (High-density Polyethylene) typically used in milk bottles

Additional tools

Apart from the essentials, a fan will also help; both to blow any toxic plastic fumes away from you and to help cool the piece quickly as you work on it. Sometimes I find that as I work, an entire section of the container can suddenly soften to the point of almost liquefying, meaning that I will have to wait until it reconstitutes somewhat before work can continue. This however is an excellent state for moulding the pliable material to seal any cracks. Other than that, some duct tape may be useful to make the repair look more presentable and to give it a little more structural strength after a complete repair. Tape can also be used to hold the piece in place, as you weld the cracks.

Recommended PPE

As for PPE: I highly recommend wearing safety glasses and a filter mask. You really don’t want to risk globs of hot plastic flicking into your eyes accidentality. Especially since, if you are anything like me: chances are that your face is very close to the workpiece, in order to see every little detail. You also probably don’t want to suck up all those toxic fumes from any burning plastic either, so a cheap filter mask will help avoid that.

I would also recommend wearing a pair of thin rubber gloves. Although the plastic shouldn’t reach any serious temperatures before melting, a pair of gloves helps you comfortably shape any jellied plastic by hand; should you wish to do so.

Plastic welding techniques

I usually start by placing any loose container segments back into the gaps and holes that they broke out from. In a similar manner to welding metals, I then tack the loose segment into place. This is done by melting small spots across the circumferences of the segments; i.e. melting little bridges across the cracks. Do enough to keep each break out piece in place, or to stabilise a crack (in the case where there aren’t any breakout pieces, just cracks). For any holes where the original broken out piece has gone missing, you’ll have to use the sections of donor material to fill them in. I recommend melting the complete area into jelly, and shaping the mixed plastic mass into form. This is in order to properly blend the plastics into a watertight seal.

As an alternative to tack welds, some sticky tape can be used to hold a breakout piece in place while you weld. But this can get messy when you introduce heat near that tape. Depending on the type of tape you used, just some residual heat can cause the tape’s adhesive to turn into a sticky treacle that cakes the work area. The heat resistant kapton tape may be useful here, but it seems like a waste of resources using it for this application.

The general technique I employ in the actual repair, is by melting the donor strip onto the crack of the container. Then with the broadest side of the soldering gun’s tip, I scrap the extra material into the container’s crevasses. Like a plasterer covering a brick wall; pushing the plastic deep into it’s valleys. Then once one side is completed (exterior, interior), do the same for the other side of the fissure. That’s the short of it.

One thing to note however, this type of repair is not pretty. Although it can be very effective structurally. This is due to the repair involving melting and blending away the cracks. Then adding material to help remove any residual weak points. Weak points which tend to linger after a repair that doesn’t use any donor plastic.

The main reason for using donor plastic is because (in my opinion) plastic shrinks in the presence of heat. In other words, as you repair it with your soldering iron, the repaired plastic is actually smaller than what it was prior. This means that the repaired crack areas are actually thinner than they were originally. So consequently bolstering it with donor material is often necessary. Although admittedly it does make it look awful.

Demonstration of initial fix and seal

Closing thoughts

In summary plastic objects can be repaired should you wish to do so. It’ll require a soldering iron set to a low temperature and some donor plastic of the same type. Take care not to burn the plastic, and for goodness sake don’t breath the fumes in. Also remember that ideally any repaired food safe containers, should no longer be considered food safe. (However that could just be my general paranoia speaking.)

That’s all folks. Best of luck with your plastic welding adventures.

Thanks for reading.

#0018: Creating and utilising QR Codes

#0018: Creating and utilising QR Codes

image of a QR code

What is a QR code?

QR codes are a type of barcode. Barcodes are a visual representation of digital (or binary) information. They are designed to be easily understandable by machines. Barcodes enable machines to do useful operations that involve interacting with the physical objects, that the barcodes are placed on. Such as sorting or counting large volumes of items accurately. For example, with packages at a mail depot, or product inventory at an automated warehouse or factory.

A QR code (or Quick Response Code), is a type of 2 dimensional barcode, otherwise known as a matrix barcode. All this means is that it represents it’s binary information visually across two axis (x and y). It does this by plotting black (1) and white (0) squares on a grid. Matrix barcodes are an evolution on the iconic one dimensional barcodes; which represent their binary information in a single array of black lines and white spaces (i.e. columns), that denote their ones and zeros respectively.

It should be noted that there are numerous different types of barcodes (both 1D and 2D) in use today. Each one is specialised to their specific applications. These specialisations manifest themselves with variations in visual design (e.g. with markers for orienting scanners with different protocols); barcode size, reflecting how much data they need to represent/encode; and data encoding ability; i.e. what type of data the barcode image represents (typically: numbers, or ASCII symbols).

The most obvious difference between one dimensional (array) and two dimensional (matrix) barcodes, is the addition of a Y dimension of information. This addition allows for a greater density of information to be stored, however it also requires more sophisticated tooling to actually read the data from the barcodes themselves. The most notable hardware difference in this regard is that one dimensional barcodes use a simple laser line scanner, whereas matrix barcodes require a camera module. Because of this, you typically can not read any matrix barcodes with hardware designed for 1D barcodes, however in many cases (providing that the software allows for it), you can use a matrix barcode scanner (e.g. smart phone) to read information from 1D barcodes.

Additionally, I make assumption that on a barcode: black denotes a one in binary and white a zero. Whereas in reality, it really doesn’t matter. This is because the interpretation of the barcode is all up to the protocol standard that it is using. For example with the case of a UPC-A type barcode, where it uses a 7 bit array to denote numbers. Different value bit arrays can symbolise the same (base 10) number depending on it’s location on the barcode.

image of a UPC-A barcode
UPC-A barcode image taken from wikipedia.org
table taken from wikipedia.org
Example of a 1D barcode in use as store’s inventory identifier

Consumer uses for QR Codes

I’ll limit this discussion to consumer use cases and applications because industrial applications are rather dry. They use QR codes in the same way they use other barcodes. Which is to orientate machines that operate with and around physical goods. This could include use cases such as at an Amazon sorting depot, barcodes are used to inform the sorting machines of what goods are in what shelves.

Where as within the consumer space; most QR codes in the wild, are simply used as a means of storing website links and affiliate information. These are designed to allow people to simply scan the code out of a magazine, business card, coupon, or what-have-you; in order to very quickly load the website hyperlink and/or fill a virtual document.

For example, a QR code at a public WIFI access point will have all the data necessary (link to login page, SSID, password) to allow the scanning smartphone to access their network. Likewise a QR code on a coupon will link to the retailer’s online store page and pass any promotional offers associated with that coupon automatically to it’s e-shop.

QR codes, at least when dealing within the consumer space, are predominantly a means of convenience. They reduce the friction encountered when user’s operate within virtual spaces. Friction such as inputting long arbitrary names or numbers (such as a WIFI network’s SSID or password); or website domain names, where a typo could expose the user to a potentially malicious imitator website.

The friction is reduced because the process of scanning a code with a modern smartphone is far easier, than inputting the data manually using (most likely) a touch keyboard into that same smartphone. Another benefit is the probability of user error (such as mistyping a password or domain name) is eliminated. This is done by automating the process of data entry and bypassing the user in that work flow. That’s what I believe constitutes the vast majority of useful applications of QR codes in the consumer space, at least this is the case when talking strictly about static QR codes.

Additionally. The Wikipedia article for QR codes list many different (specific) use cases for them in the the consumer space; however in my opinion they all boil down to the two things I mentioned earlier: following links and filling in virtual documents.

Anatomy of QR codes

The smallest unit of information on a QR code is referred to as a module. A module is a single square that is coloured either white or black. For example a version 1 QR code is made up of a 21 by 21 module grid, totalling 441 individual modules. If you were to count all the chequered squares along either axis, it will add up to 21.

Look at the below two examples, both of these QR codes are identical Version 1 QR codes. They both have the same 441 distinct modules on a 21 x 21 grid. The only difference is the actual image size. This should illustrate that (within reason) the actual pixel (or print) size of the modules doesn’t matter with QR codes. As long as the scanning devices’ cameras can fit the entire code structure within frame and focus.

Bash instructions:

qrencode -o qrc_V1_small.png -s 3 'ECC'
qrencode -o qrc_V1_large.png -s 6 'ECC'

A QR codes’ modules are organised into several structures. These include: three position markers, several alignment markers (number varies with version/size), a version information zone, a format information zone, a timing zone, an area for data and error correction keys, and finally a blank quiet zone to denote the border of a QR code.

image taken from wikipedia.org

QR code size specification

QR codes are rather versatile, they have the ability to encode: ASCII symbols (letters and numbers), media (images, sound, and video), as well as even executable programs (compiled binaries). However, although they technically have this capability, it is severely hampered by the size limitations of the QR code standard.

At the time of writing, the largest viable QR code that can be created is the ‘Version 40’ variant. QR code Version 40 can encode up to: 7089 bytes of pure numerics, 4296 bytes of alphanumerics, 2953 bytes of miscellaneous binary (e.g. media), or 1817 bytes of Japanese Kanji characters. This is done using the lowest value (level L) of error correction, thus leaving more space for actual data. So these are the absolute maximum values.

Refer to file “QRcode_version_table” below for a full list of all version specifications.

image taken from wikipedia.org

Test case of numerical barcode capacity

This was an interesting one, because although the version 40 QR code specification states that I could create a numerical QR code with a capacity of 7089 bytes. In actuality the maximum amount of data that I managed to fit into a QR code was 7080 bytes. I honestly don’t know what to make of that. The ECC (level L) was supposed to be factored into the 7089 max value, i.e that is the maximum data storage in addition to the space that the error correction takes up. So it can’t be what’s limiting me from the max value. As to what is happening, I’m not sure. It could be anything, including a limitation of the program I used to create these codes (qrencode), or it could be some unknown setting, text file associated metadata, or even some unnoticed human error in play. Hence I will include the input files I used here so that you can try it out yourself, and see where I messed up.

Bash instructions:

qrencode -r pi_decimals_7081.txt -o qrc_pi_7081.png
Failed to encode the input data: Input data too large

qrencode -r pi_decimals_7080.txt -o qrc_pi_7080.png
Successfully compiled QR code containing 7080 bytes of pure numbers
According to Xed, this file weighs 7080 bytes.

QR code Error Correction Capability

QR codes have a built in Error Correction Capability (ECC). They use the Reed-soloman error correction codes in order to facilitate a certain level of data redundancy. This enables QR codes to be readable even after they have sustained damage. Such as by getting scratched or being partially obscured by grime. This error correction facility comes in four levels: L, M, Q, and H. The error correction of each level is expressed as a percentage of the total data that can be lost whilst maintaining the QR codes readability.

This is as follows:

  • L has up to a 7% ECC
  • M has up to a 15% ECC
  • Q has up to a 25% ECC
  • H has up to a 30% ECC

Generally speaking, the error correction capability of a QR code isn’t free. The higher levels take up more of the QR code’s finite available space, space that could otherwise be used to encode more of the actual substantive data itself. This trade off between useable storage space and data read reliability, means that QR codes with higher ECC tend to be used in environments where code damage is more likely; or in applications where the printed QR code itself is going to in active operation for a longer time period. Such being attached to warehouse racking to identify the specific shelf location and product contents to an automated sorter machine.

image taken from archive.org – qrcode.com page

How to spot the ECC level on a QR code

To work out what type of ECC level set on a QR code, look towards the “format information” zone to the right of the lower left position marker. Immediately after the single column of blank (white) modules of the position marker, at the bottom of the QR code and the module just above it. These two modules display what level of ECC is employed within the QR code.

Bash instructions:

qrencode -l L -o qrc_ECC_L.png 'ECC'
qrencode -l M -o qrc_ECC_M.png 'ECC'
qrencode -l Q -o qrc_ECC_Q.png 'ECC'
qrencode -l H -o qre_ECC_H.png 'ECC'

zbarimg *.png

Using ECC to incorporate logos into QR codes

When I looked into how people actually created the fancier QR codes; the ones’ that incorporate graphics such as text and logos. I was genuinely surprised at the crudity of the methodology. I thought that it may involve something akin to passing arguments to the QR code generator to re-route the data sectors around the graphic. Nope. It’s actually laughably simple. If you wish to incorporate graphics into your QR code, just crank up the ECC to max. Output the QR code. Then slap that graphic on top the QR code using some graphics manipulation software. In this case GIMP. Done. I mean it does the job. I just don’t like the idea of purposefully damaging data integrity.

Look at the below examples. Both of these QR codes hold the same data. This being a link to this website’s homepage. The size disparity between these two is caused by the additional error correction code added to the level H QR code. It caused it to jump up a couple of versions. I’m guessing that since my logo covers more than 7% of each of the QR codes, this is the reason why the level L QR code is no longer functional, whereas the level H QR code continues to function after the addition of the logo due to the logo covering less than the 30% of it’s maximum error correction capacity. This methodology seems rather crude, but it works.

Example of a real QR code that incorporates a logo

Encoding and decoding QR codes

There are numerous ways to generate your own QR codes. I’ll just mention a few to give you an idea of where to start.

Firstly, I should mention that there are paid services that allow customers to get custom QR codes. This includes things like “dynamic” QR codes, that can supposedly keep a tally of the number of times they have been scanned. However if you aren’t using them for professional applications. I generally wouldn’t recommend using paid services like these. This is a tinkerer’s blog after all. That being said, I mention them here just to make you aware of their existence.

All the tools that I mention from this point are free to use and readily available. If you are using a Linux based operating system, or virtual machine, or use bash in Windows. I recommend downloading and using two programs: “qrencode” and “zbar-tools”. Both are available in the Ubuntu main repository. This is actually what I primarily used to create and test all the codes in this article.

The zbar-tools toolkit comes with two relevant programs. zbarimg and zbarcam. zbarimg is used to scan local images of QR codes and can output that data either to standard output (usually the shell), or piped into a file. zbarcam has similar functionality, except it can use the computer’s camera to capture a QR code.

Alternatively, for quick QR code generation you could use an online website. I don’t want to recommend any for liability reasons, as there are lots of random websites that can do this. What I found interesting though is that the search engine duckduckgo.com actually can generate QR codes as well. I came across it rather by accident, as it returned QR codes with the search term data within it.

To use DDG to create a QR code, just type in “qrcode” followed by a space and then whatever textual data you want in it. I find this method rather novel, and probably good for simple quick and dirty codes. However it lacks the precision of functionality that a program like qrencode gives you. Such as the ability to specify the module size, and ECC level of the generated QR code; qrencode does this by passing arguments to the program.

TLDR

Tools to create QR codes

  • Linux: qrencode
  • websites: duckduckgo.com, etcetera
  • paid services for business including dynamic QR codes

Tools to decode/scan QR codes

  • android phone apps
  • (zbar-tools) zbarimg & zbarwebcam

Encoding and decoding binary QR codes

To encode a file (such as an image) into a QR code, you need to pass an additional option to qrencode. Use the -8 argument to specify 8 bit mode. You also need to use the -r option to specify a file input.

qrencode -8 -r input_image.png -o output_qrcode.png

To decode a QR code image of a binary into a file. You have to pass the below options to zbarimg, to allow it to know that it is dealing with a binary file. Additionally you then need to pass the output from zbarimg into a file. Otherwise it’ll just output the data into standard output (i.e. the shell itself).

zbarimg --raw --oneshot -Sbinary qr_code.png > output_file.png

One thing to note. Versions of zbarimg (zbar-tools) older than version zbar-0.23.1 do not have the capability to decode binary files. Additionally, at the time of writing the version of zbar within the Ubuntu repository was zbar-0.23; an older version without the capacity to decode binaries.

Alternatively decoding a binary QR code without specifying the output format, or without piping the contents into a file; instead just letting it output into the shell: will cast the contents as ASCII text. Instead of a file it will output a string of nonsense characters. However the first couple of legible characters should consist of file metadata that can tell you what format the binary data is in. The below example is the same QR code as above but outputted as ASCII rather than as a binary.

QR-Code:‰PNG

\00\00\00
IHDR\00\00\00Œ\00\00\00Œ\00\00\00!¢Öi\00\00IDATxÚíݱmƒ@†á8rÏ\00´i#s¤af`7™Ã‹¸e\006Hé”|`r<oé\ù^}÷c[>õ}ÿ‚}ójHBÎNJ¢Xã?5M“ÙÞµm»øwÿt•‘$u‡´uZîýíclõõö9»f–ªª2ÛÄ»v;¦÷$IÝa¥Óݑ©ëzvÍårIؐ1½'Iêê.§“áDïI’ºƒº;HïI’ºI$$DHI$$’@H"	$$’@H"	$oéúE’7ãK’ºCuÞe>—ϵÍmïùLª$©;ü—ÓÝfI‡$‘’HI ‰$’HIG%Ù+³^¼ÈžTw8%IÝauZ®ë:»yGY–IzO’ÔH"	$aûa6œd I$!ïº3Ì®w	$u’HI0ÌJH‚aÖ0uGHINw†YIIêÎ0k˜I$$’`˜…$‘ìaV’ÔH"	$Á0+I 	†YÃ,ÔH"	$‘’@I 	$‘„58ö™OßýÞ/[¿ÁeI’¤gh:Ã5cëcþš$Iâ®aO“4ñåb©¾cëh,ÛRIzô¶AÂ\“³ Éé.[¾¯.ñw¦×ÿüéJӒ$IÒîó”j½;’4Ž‰59˶T’Á‘‚Sß÷wEa_žÈЈ$©;¬Tw$”#_{G}¨õ—´\00\00\00\00IEND®B`‚

Closing thoughts

QR codes are basically ubiquitous today. They are present everywhere. And applicable in many use cases ranging from anything; from storing simple web links, to gaming uses such as markers for augmented reality. I recently found a tiny one that was printed into the underside of my kettle. Why is it there? Just because. The point is that they are everywhere.

Additionally, the technology is exceptionally accessible. Having a surprisingly small learning curve. This coupled with the fact that quality creation tools (like qrencode) are freely available, means that if you for whatever reason would like to use a QR code within your work; there is little reason not to do so.

If I am perfectly honest however. I personally don’t see much actual utility for me other than inserting a QR code linking to my website, or email within a business card. Perhaps, even in printed articles – as a means of linking in additional online resources. It’ll certainly have a lower level of friction, than printed hyperlinks have.

If I’m honest. The main real appeal of this technology to me is the novelty of storing binary information within a printable medium. The fact that you can encode an actual binary (so long as it is smaller than 2.9kb) into a paper medium, is wondrous. Check the links below for a Youtube video of a person who encoded an entire executable game into a static QR code. Not a web link to game. The game itself. Imagine storing actual games, into a book. Tiny games, but still. Cool.

Anyway, happy QR coding. Thank you for reading.

Some fun

Links, references, and further reading

https://www.youtube.com/watch?v=ExwqNreocpg

Scan Barcode QR Code From Webcam & Image File in Linux

The purpose of QR Codes

QR Codes basics

https://en.wikipedia.org/wiki/QR_code#storage

https://en.wikipedia.org/wiki/Binary_number

http://qrcode.meetheed.com/question14.php?s=s

https://www.linux-magazine.com/Online/Features/Generating-QR-Codes-in-Linux

https://www.binaryhexconverter.com/ascii-text-to-binary-converter

https://en.wikipedia.org/wiki/EAN-8

https://en.wikipedia.org/wiki/Universal_Product_Code#Check_digit_calculation

https://en.wikipedia.org/wiki/Barcode#Symbologies

https://en.wikipedia.org/wiki/Binary_number

How To Convert Images Into ASCII Format In Linux

http://www.qrcode.com/

https://web.archive.org/web/20130127052927/

http://www.qrcode.com/en/qrgene2.html

https://www.thonky.com/qr-code-tutorial/error-correction-table

https://scanova.io/blog/blog/2018/07/26/qr-code-error-correction/

https://www.qrcode-tiger.com/qr-code-error-correctionhttps://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction

https://medium.com/@r00__/decoding-a-broken-qr-code-39fc3473a034

#0017: Creating a Toy Drag Racer Car

#0017: Creating a Toy Drag Racer Car

Prelude

This will be the first in a series of articles on making crap from garbage. I intend to build on this initial car, by adding more functionality and complexity down the line later. The purpose of this series of articles is to illustrate how accessible our hobby actually is. All you really need is access to information, basic tools, and most importantly: a little motivation and imagination.

Basic drag racer toy car.

As you can probably tell from the pictures; this toy car once had additional components that I removed for this write up. These included: 4 LED “””head-lights””” (2 white, 2 red); a jumper cable and switch, to allow the motor to be run using only one of the batteries at a time (for a slower speed); and additional wiring to allow the motor to run in reverse. Essentially whatever bollocks I felt like lazily sticking into the thing.

This should however illustrate that you can keep adding complexity to the basic frame work … Yeah, that’s why I reused the same haggard little tupperware container with the two unused switches: to make a point. It wasn’t abject laziness at all. Nah.

One could even keep adding complexity and replacing components until a simple drag racer can turn into a self steering robot. This could be done by using ultrasonic sensors, microcontrollers, and servo motors just as an example. However the basic framework is a good starting point.

Toy demonstration

Making the thing.

Tools and materials.

So what do you need to make this masterpiece? A soldering iron will help but twisted wire connections and electrical tape will do. Work with whatever you have on hand. I’ll just list out what I used.

Tooling:

  • soldering iron
  • heat gun
  • DC power supply
  • multimeter
  • precision knife

Consumables:

  • electrical tape
  • heat shrink
  • hot glue

Materials:

  • wires
  • tupperware box
  • gears and wheels kit
  • switches
  • AA battery holder
  • AA batteries
  • rubber-band (elastic band)
  • 3 volts DC motor

Build process.

Its largely self explanatory from looking at the pictures but I’ll give ya a quick write up if you insist on reading. Nerd. Anyway, get either a cheap wheels and gears kit (yes I am a hippo-crit) from an online store, or salvage wheels from broken toys if you have any, or use bottle caps even. You can even make decent wheels from either cardboard or by working random stiff plastic with a saw and a file.

Next, cut appropriate holes into the plastic box, sardine can, old butter tub, or whatever you’re calling a chassis. Then affix the motor into the chassis using hot-glue or tape. I wanted to use a belt driven system for no other reason than I wanted to use a belt driven system. So I used a couple of belt pulleys from the gear kit and a near dead elastic band as a drive belt. I know what you are thinking, and yes it is very unreliable.

If I were to redesign this for simplicity and reliably; I would just insert the motor directly into one of the rear wheels and power it that way. Better yet you can use two motors, one for each rear wheel. Anyway, next, throw in a switch, a useless fuse just for fun, and an occupied battery pack. Done. Enjoy.

The project is so simple it seems silly didactically going through every step of slapping it together. Just look at the pictures: yours should be like that but good. The point is to make it using the materials on hand. Improvise as a matter of course.

One thing that might be good to improvise on is by using a salvaged battery holder if you can not find one. I know not everyone has access to broken Poundland fairy lights. For example the motor here came from a cheap hand held fan. I could easily use it’s chassis moulded battery holder instead and just butcher it to fit. No worries.

To source the material I recommend a discount store like the aforementioned Poundland or the 99P shop. You could probably get all the materials for less than a fiver. And if you’re really on a budget, then I recommend the dumpster behind Poundland. Don’t ask me how I know.

Belt demonstration

Schematic

It’s not really necessary given the simplicity of the circuit. But I’ve included one never the less for the sake of completeness.

made with digikey.com/schemeit/

Circuit power use.

To satisfy some curiosity I decided to measure the power usage of the motor, and power delivery that the batteries can supply. I did it to give me an idea of how much power the batteries are able to provide, and how much of that available power the single motor uses. That way I’d know what’s limiting performance, should that become a concern. And it will once I decide to start adding components, such as additional motors.

Results:

Tested with a 6 Ampere max bench power supply against mismatched old batteries. Guess which performed better?

(BPS = Bench Power Supply)
BPS powered Motor (spinning freely): 3V @ 0.25A (0.75 W)
BPS powered Motor (jammed): 3V @ 2.71 (8.13 W)
Battery powered Motor (spinning freely) #1: 3V @ 0.18A (0.54 W)
Battery powered Motor (jammed) #1: 3V @ 2.02A (6.06 W)
Battery powered Motor (spinning freely) #2: 3V @ 0.29A (0.87 W)
Battery powered Motor (jammed) #2: 3V @ 0.70A (2.10 W)

My conclusion on the circuits power usage is that the junk batteries that I used for this application are not able to provide the maximum amount of current that the motor can use when spinning freely in the first test. And in the second test although the batteries performed nominally when free spinning, when the motor was jammed causing it to draw more current; the batteries failed to provide the needed current. So the batteries are the limiting factor here. Probably because they’re dying. From this slapdash test, I can tentatively conclude that if I wanted to add an additional motor, I’d also need to scale the power supply relatively … or use new batteries.

Really I should’ve tested it with two fresh 1.5 volt alkaline batteries as a control. Then I could’ve tested the motor, by adding an additional two fresh 1.5 volt batteries (in 3 volt series) parallel with the base two, to allow for a higher circuit current output without increasing voltage. That would’ve been a better test. But I took all the photos for this maybe two months prior to doing this write up on it; and I don’t feel like going back to it for something this minor. However, I will for the next article that uses this drag racer. This test was bad.

Closing thoughts.

Why make this thingy? (technical term)

I wanted to make a very basic bare-bones motorised toy car. The reason for this is that I think its a really good project to get a complete beginners feet wet in electronics, and more broadly in getting to actually making things in general. The scope of the project is small and its largely practical. There is very little in the way of actual measurements and maths. In addition, the tooling needed and materials used are basic and readily available, as they are salvaged cheap electronics and household sundries.

I think something like this is ideal for children especially since once they’re done, they end up with a toy they made themselves. Every time they play with it, they might get that little endorphin kick saying ‘I made that’ and before you know it — they’ve been bitten by the bug.

Another reason why a project like this is good is because unlike how many get a start in the general electronics hobby today – i.e. by purchasing kits and completing them. Creating something useful or of-value from junk promotes and develops a better skill-set then just putting together pre-made puzzles. Sure kits can develop people’s technical skills in doing so (like soldering), a familiarity for the various components involved, and even some trouble shooting and diagnostic abilities in order to get the thing that they put together actually working.

Usually though, in my experience once the kit is complete; be it an electronic dice, an AM radio, or what have you. It is done. At which point it is put down and forgotten. This is unless the person gets interested in one of the higher concepts the kit introduced them to; like in the case of how putting together a DIY radio kit can become a gateway to repairing radios or the ham radio hobby as a whole.

This is of course a good thing. However in general, purchasing kits has in my opinion limited returns (such as mentioned above), and can get overly consumeristic in nature. Buy the kit, make the kit, buy the next kit, make the next kit; and so forth. So what do you do when you don’t have the funds for the next kit, or have a child that becomes bored and thinks that’ll all this hobby has to offer.

Well that’s where one has to become inventive. Create your own kit. And from what? Whatever is around. Putting together machines of your own creation from junk develops imagination and creativity in people. It teaches them to see more than what an item is, instead it promotes seeing the parts it is made up of, and what it could become.

That old microwave the neighbour left out. Is actually not just worthless e-waste. It is actually a magneto, various high power resistors you can use as a resistive load in your experiments, and even a high voltage transformer that’s likely to get you killed. Obviously I am joking about the microwave, I am not advocating for inexperienced or immature people start with mains power electronics. Learn, but learn safely. I.e. Low voltage direct current devices.

Working with salvage also gives people very localised and consequently practical (read valuable) experience. This is because they’ll be working and tinkering with the local devices available to them. The same ones in their everyday environments, and in doing so they will gain insights into their workings. Insights that may lead them to modifying and repairing some of the same items for future fun and profit.

Note: I read over this, and even I can tell it’s pretty bloody preachy. I am not saying kits are bad, they are just another avenue for this hobby. Sometimes it’s nice to play with something that isn’t already broken. However I do think that (certainly basic) kits are transitionary. You make kits then you move on to fucking about with whatever takes your personal interest. And like I stated, kits are often a gateway drug to your chosen field.

Make no mistake what you are reading is the toned down version. The first draft was hard for even me to read without rolling my eyes in my skull. No need to thank me for sparing you that, but you are most welcome.

Thanks for reading.

#0016: Software recommendation: Firefox Monitor and haveibeenpwned?

#0016: Software recommendation: Firefox Monitor and haveibeenpwned?

https://monitor.firefox.com/

https://haveibeenpwned.com/

Preamble

In a bid to make more immediately useful content, I’d like to start recommending some of the various tools that I use. In this case it is an online service. Namely Mozilla’s Firefox Monitor; or more to the point, it is actually the website: haveibeenpwned.com (HIBP), which Firefox Monitor uses to enable it’s service.

What do they do?

In essence Firefox Monitor and HIBP are used to check whether or not an email address is associated with a recorded data-breach. Keyword: “recorded”. It does this by using a database of known breaches provided by haveibeenpwned.com.

The purpose of this service is to allow people to ascertain whether or not, an online account (and the user information there in) associated with the email address: has been compromised in a known data breach; and thus in need of immediate remedy. Things like: changing passwords, recovery phrases, and generally being aware that any potentially sensitive information associated with that account, such as: full name, mother’s maiden name, GPS location, education, birth date, telephone, city, school, or business information has now circulated within the hacker community.

Additionally, it helps to know which company is to blame for the spike in volume of spam and phishing emails, that will most certainly accompany said breach. I don’t know about yourself, but that’s something I’d certainly like to know.

Why is this service important?

It is my belief that every solution begins with awareness, the awareness of the problem. Only then can we move to better the situation. This tool gives you exactly that.

In my opinion, the main reason why I think this tool is important is because the companies involved in the data breaches themselves are loath to make their customers aware of them. Even though it is in their user’s best interests; it is not in the businesses best interests to advertise any breaches beyond the legally mandated/enforced minimum. Furthermore, who knows what that actually even is when dealing with global or multinational companies that operate over many legal jurisdictions. This is especially true when dealing with larger companies with entire legal teams at their disposal.

This service is important because (still just my opinion): companies in general tend to quietly patch any security vulnerabilities as they find them, and move on hoping no-one has noticed. This is especially true when there is no internally confirmed security breach.

Whenever a confirmed breach does happen, the first thing that the company responsible does is downplay the scope and severity of it. This may (and probably does) include: not even publicly reporting the breach until it is already made public elsewhere, often at a much later time. In many cases there is even resistance to acknowledge fault after the breach is made public. This is most likely a bid to exonerate themselves of any potential legal liabilities involved.

At the very least acknowledgement of fault could be seen as weakness. Weakness that will shake public confidence in the company and/or service. Therefore it is in their best interest to maintain the general illusion of control and/or competence. It’s corporate PR 101. It’s just a shame that the company and it’s users’ interests don’t align within this circumstance.

Why should people use these tools?

Both Mozilla Firefox Monitor and HIBP are free to use publicly available tools. Both tools come from reasonably trusted sources. Firefox Monitor is the product of an open-source community driven effort, giving it a certain level of transparency. And HIBP was developed by Troy Hunt, an authority on the topic of digital security. Even if you don’t know who Mr Hunt is (and I didn’t prior to this post), the fact that the Mozilla team decided to use his HIBP database for Firefox Monitor means that they are vouching for it.

More importantly, the tools themselves can assist an individual with regards to protecting their personal information online. They do this by allowing the individual that exact thing that I mentioned earlier: awareness. Awareness of whether or not that person’s email associated account information has been circulated, and which company is at fault for it.

For example: if you used the tool and because of it now know that, an account associated with your email with company X has been breached; and along with that breach your “security questions” were revealed. Then now you know to both remove, and not to use those particular security questions, with any future account … ever. As they are basically permanently compromised. Forewarned is forearmed.

taken from https://github.com/mozilla/blurts-server

Difference between Firefox Monitor and haveibeenpwned?

Firefox monitor is a very slimlined version of the HIBP tool that gives the lay user just what they need, without overwhelming or putting off said lay user. It is rather idiot proof; merely requiring user’s to input their emails and press enter. That’s it. Firefox monitor also has been bundled in with a few basic articles on good security protocol, that may be helpful to the average user. Common sense stuff a lot of it, but you know what they say about common sense.

Although Firefox is the simpler tool to use, it must be said that HIBP is a far more robust tool. And the one that I recommend. This is because in addition to searching email addresses, it allows searching via: passwords, and domain names. The website also allows users to browse a catalogue of breached websites without running a search. Extracts below.

Ever wondered how many accounts have been breached because they used the password “love”? Wonder no more. According to HIBP, its 356006 times.

I have also perused a nice little selection of companies from HIBP’s catalogue of known breaches that you may find interesting.

Personal experience with a data breach.

Just an aside if anyone is interested. From reading the above “Why is this service important?” section, you might have gotten the idea that I may be ever so slightly cynical about the companies involved in security breaches like these.

Frankly speaking, whenever data breaches do happen, I do not consider the corporations involved to be “victims” of cybercrime, as many others seem to do. It is a nauseating sentiment. One that condones bad behaviour. This is because it is my personal belief that the vase majority of the cases are due to one core thing: a dereliction of duty. Them failing in their duty to protect the data that they collected. Little more.

In addition to consuming the various news articles about data breaches over the years. Ones that had the general themes of corporate incompetence. Like for example: employees carrying around sensitive data on unencrypted thumb-drives, only to lose them on the train. I also have a few examples of companies that leaked my very own personal information. All of this has coloured my opinions thus.

The most memorable is the online virtual tabletop gaming website roll20.net. The thing that rubbed me the wrong way about them is that at no point during the process did they ever take any accountability for allowing it to happen. They did eventually outline what information was taken, but they never offered an apology for their lax in security. Instead they covered it up with boiler plate (legal friendly) corporate speak.

Example: “The investigation identified several possible vectors of attack that have since been remedied. Best practices at Roll20 for communications and credential cycling have been updated, with several code library updates completed and more in development.” Assuming that is indeed true, the same could literally be said by any company involved in a similar data breach – just change the names.

Although from what I understand by reading the article that they linked in their post, technically (purely technically) this appears as though it’s not their fault. But rather it was due to the underlying technology that they used. At least that is the implication presented. I’d argue that they still made the decision to use said tech, and thus vouched for it by doing so. Making them responsible, at least tangentially. At least enough for a simple sorry. The closest their customers got to an apology was a “Frankly, this sucks.” Writing it in an official company blog post that they passed for a conclusive public report; authored by Jeffrey Lamb, the Data Protection Officer.

I remember thinking at the time that whoever was writing this was good at the bland formalities of corporate speak, but otherwise is (and excuse my French): a fucking dickhead. You have to keep in mind reader, that they only knew of their own data breach because of a third party report. One that was published months after the fact. The report was published in February of 2019, and the breach happened (according to Mr Lamb) sometime late 2018. No apology warranted, not even for missing the hack, until a third party told you about it months after the fact. They then go on write their conclusive report in august of 2019. So nearly a year, between data breach and the final public debrief, where they outline exactly what data was exposed. I call that incompetence. “Data Protection Officer” more like resident salary sucker.

The ultimate lack of accountability is what really rubbed me up the wrong way here. And why would they be accountable, there is little in the way of consequence it seems for these messes. There are even examples of customers defending roll20 in the comments, referring to them as “victims” of cybercrime. They aren’t the victims here idiot, you are! I’ll include some choice examples of this for your entertainment. Its customers like that, that make businesses feels like they don’t have to be accountable either for their actions, or in this case general inaction with regards to proactively protecting customer data. Please read through the example comment thread.

You really can’t reason with people like that. They have too much emotional stock in a corporation to admit to themselves that they got screwed by it. There were even people actually praising roll20 for it’s meagre efforts. A sum total of 2 blog posts, some notice tweets/emails, and for patching a hole in their own boat. Thanks roll20, stellar job. Shame about all my cargo sinking to the seafloor for the bottom feeders to enjoy. I mean you only lost my full name, my IP address (so my physical location), my password, oh and some of my credit card data. Don’t worry about that roll20 (not like you would), that’s my problem. Fuck those types of customers. Wankers.

Moving on. Another example of a gormless entity losing my data is ffshrine.org. A final fantasy fan site that I registered with in 2010 I believe; and haven’t used that account since 2010. Ideally, they would have flagged the account as non-active and deleted it after a couple of years. But alas, instead they just kept whatever details I gave them for the five years until their 2015 data breach. Where they lost subscriber passwords and email addresses. No warning email post event, nothing. Radio silent. I had a similar experience with tumblr back in the day. Radio silent. No accountability. Are you sensing a theme here, dear reader?

Closing thoughts.

I have written far more here then I initially wanted to, so I will keep this summary short. Tools like haveibeenpwned and Firefox Monitor are things that you as an individual can use to help protect yourself in cyberspace. They can help you take proactive measures to safeguard your own data. They can also show you evidence that the large corporations really aren’t as professional or as infallible as they like to appear.

And that when, they make mistakes; mistakes such as losing your data. It is often you that has to bare the brunt of the repercussions, with little if any repercussions to them. Maybe they incur a temporary stock dip. But the fact of the matter is, they’ll recover from it. However whatever data you provided them for safe keeping, well that’s now permanently out there. Enjoy.

For example. To this day I still get phishing emails that say something like: “hey MY_FULL_NAME, YOUR_BANK has detected multiple login attempts using PASSWORD_FROM_FFSHRINE.ORG to login. We have frozen your account because we suspect fraudulent activity. Follow the obviously dodgy link provided and give us your security questions to fix this.” Although I can recognise a phishing scam when I see one, many technology illiterate users can not.

And make no mistake, the companies that were lax in their security. The one’s that have the attitude that breaches happen; are the exact ones to blame for the perpetuation of the black market information economy. An economy that preys on people; the real victims. The people who trusted these corporations with their data, thinking it in safe hands. Not the corporations themselves whose lack of diligence and general incompetence allowed for the data that they were trusted with to be exposed.

Jeez… that got a bit preachy towards the end. Didn’t it? Sorry about that. It’s just seeing companies fobbing off their responsibilities, and then seeing customers with Stockholm syndrome defending these same companies against criticism – really ruffles my feathers.

Anyway, thanks for reading.

References, links, further reading.

https://github.com/mozilla/blurts-server

https://monitor.firefox.com/

https://monitor.firefox.com/breaches

https://monitor.firefox.com/security-tips

https://haveibeenpwned.com/

https://haveibeenpwned.com/About

https://feeds.feedburner.com/HaveIBeenPwnedLatestBreaches

https://blog.roll20.net/post/182811484420/roll20-security-breach

https://blog.roll20.net/post/186963124325/conclusion-of-2018-data-breach-investigation

Hacker who stole 620 million records strikes again, stealing 127 million more

#0013: Repair of a game controller with fatigued dome switches

#0013: Repair of a game controller with fatigued dome switches

What is a dome switch?

In order to know what dome switch fatigue is, we must first identify dome switches. Dome switches are buttons that utilise a dome made from silicon, rubber, polyurethane; or a similar material with the same elastic properties. This dome effectively acts like a spring and pushes the button back up when applied downward pressure is removed.

A typical dome switch will consist of several parts. These are: a (usually) plastic keypad key, an elastic dome, and a graphite pad. The switch key (or button) is mounted onto the elastic dome, additionally the graphite pad is attached to the concave or underside of this dome; and finally, this assembly is sat atop a patch of unconnected unmasked circuit board traces. These traces essentially function as switch terminals.

The idea is that when the downward force is applied to the key, the elastic dome is compressed; causing the graphite pad to press down on the unmasked PCB traces underneath it. This graphite pad actively bridges an electrical connection across these traces, due to graphite’s electrical conductivity.

When the connection is made across these traces, a logic level electric current (around 3.3 volts) is either pulled down to or pulled up from signal ground. It really depends on the IC (Integrated Circuit) chip that is managing and interpreting the keypad array as to the specifics. Anyway, the point is, essentially that is how the computer knows which buttons are pressed and for how long. After the pressing force is removed, the elasticity of the currently compressed dome material causes it to reset to it’s original domed profile. And in doing so it lifts the graphite pad from the traces and breaks the electrical connection.

Example of dome switches within a handset phone

Diagram of dome switch in action

image taken from: https://i.imgur.com/5K9Uy.gif

What is dome switch fatigue?

Dome switch fatigue, or more specifically dome fatigue: is when the domes within dome switches, develop a fault due to extended use that makes them no longer effectively reset their position. I.e. pop back up after they have been compressed.

The main symptom of dome fatigue is button sticking. In other words, when a button is pressed down, it either takes longer than it should to reset, or it stays down all together. This is assuming that the keypad is actually clean, as there are many reasons as to why a button might stick other than dome fatigue. Accumulated grease or oils, foreign objects (like food), and dust build up can easily cause button sticking.

Once the device has been opened, the domes themselves can be examined. Look for stress lines: thinner (often lighter) areas of material that can indicate structural weakness. I recommend comparing the suspect dome to it’s known good neighbours; adjacent domes from the same device that occupy buttons that don’t stick. Since they are from the same material stock and often from the same actual moulding as well (as is the case here), it can make spotting any actual stress signs easier. Common sense right?

As you can see in the example picture, there is a stress ring on the one of the four action button’s domes. This dome corresponds to the “A” button on an imitation USB Xbox 360 controller. Now I don’t mean to go on a tangent but I will say that imitation products like this controller are generally made to a price-point. I.e. the manufacturer cuts certain corners to bring the unit price down.

This is done in a bid to undercut the original product and sell itself as a budget alternative. In many cases the cut corners and lower quality product is mostly acceptable to the end user, as it is reflected in it’s price. However, these cuts tend to including: the sourcing of lower quality, less durable materials.

I believe this to be the issue here, although I haven’t had this controller for long. (Approximately a year.) I use this controller to mostly play platformers such as Splelunky. Since the “A” button is used to jump, it is by far the most used button; and it seems like over the time that I have owned it, I have just fatigued this particular dome. Either by some kind of repetitive flex damage (i.e. general use fatigue), or by just pressing too hard on it in moments of panic or frustration during play.

Example of “sticky button”

Example of fatigued dome

Repairing controllers with fatigued buttons

Sadly, an actual and effective repair of the dome itself is outside my capabilities. I just replaced the knackered dome with a fresh one. Well… a less knackered dome from a spares unit. As you can see I chose a third party “4 gamers” brand PlayStation2 controller as a donor unit. This is because that is all that I had on hand at the time. Additionally I am generally unwilling to purchase materials for a repair unless I have to. And to be honest, when it comes to repairing budget electronics such as this controller, it really is hard to justify spending any amount of money for materials, when one could spend a little more and purchase a new unit.

With this repair, I initially intended to replace the entire action button array (all four buttons), with domes from the spares unit. This is because the different types of domes will have different force pressure resistances, and bounce back elasticity. Which would lead to users experiencing different levels of tactile feedback or “button feel”.

At this level, I don’t mind much what the exact tactile feedback of the spares domes are; as I doubt specifying tactile feedback was much of a concern for this budget controller to begin with. Ergo this slapdash replacement wouldn’t necessarily denote a loss in overall device quality or user experience.

However I would mind if the feedback of the grouping of action buttons wasn’t uniform (or near enough). I.e. if one button was noticeably stiffer or mushier. That disparity in tactile feedback may actually become a distraction during play. It may even negatively affect a player’s performance; due to the player becoming accustomed to the tactile feedback of one button and then because of that either pressing to hard or not hard enough when they move onto another button (with a different level of resistance) in order to perform a different action. It may cause a misclick; either registering two inputs, if the new dome is significantly weaker/squishier or none at all if the new dome is significantly stiffer than the previous.

Unfortunately, I ended up just replacing the tired dome and using the rest of the three originals. Even though I have a picture of all four action button domes replaced on the controller. I dropped one on the floor shortly after that; and after 30 mins of searching. I just adapted to this strategy. In this case the new dome and the originals have similar (although not the same) level of tactile feedback to them. They aren’t different enough to be an issue. Not for me at least.

Spares unit

Application of spare dome(s)

Demonstration of device repair (before and after)

Original fatigued dome switch (green “A” button)

Although tactile feel can not be conveyed: notice the mushier, softer sound from the green “A” button when compared to the others.

Replaced dome switch (green “A” button)

The sound produced from the replaced dome is similar to the other three buttons, although they are not uniform themselves. There is an acceptable level of difference within tactile feedback across the buttons. The sound of the buttons when pressed reflects this.

Final thoughts

To sum up my basic ethos when it comes to repairing a device with fatigued domes. One, one has to replace the domes. As far as I can tell the domes themselves are irreparable. Two, When replacing the domes, it may be better to replace known good domes in a bid to get a uniformity of tactile feedback on all the buttons on a device, or at the very lest on a significant button grouping. Such as action buttons or directional (D-Pad) buttons. That’s the takeaway.

That’s all folks. Thanks for reading.

References, links, further reading

“Diagram of dome switch in action” gif taken from: https://i.imgur.com/5K9Uy.gif
https://www.mechanical-keyboard.org/advantages-and-disadvantages-of-mechanical-keyboards/
https://en.wikipedia.org/wiki/Keyboard_technology#Dome-switch_keyboard

#0010: Device analysis of a USB resistive load

#0010: Device analysis of a USB resistive load

Preamble

This will (hopefully) be a start to a series where I take a look into various devices and analyse them. My intention is to begin with very simple devices and steadily ramp up to more complicated ones as time goes on. The idea is to give the reader enough information about the device (design, function, components, etc) to the point that they can conceivably create their own. As well as in some cases recommending certain modifications, tools, adapters, or companion devices for optimal practical use.

Device information

This is a resistive load with a male USB plug interface. It’s intended function is for testing the current output of USB power-supplies and power banks. It has 2 current draw settings, these include: a 1 ampere and a 2 ampere mode. This device is operated using a two state slide-toggle switch, which allows alternating between the two current draw modes. Additionally it uses a common anode bi-colour LED as an indicator for these modes. Green for the 1 amp and red for the 2 amp mode.

The general layout and configuration of the 5 ohm wire-wound power resistors is what makes this device function. One resistor (R1) is always in circuit, in both the 1A and 2A mode. Within the 2A mode, R2 is added (in parallel to R1) to the circuit. Adding R2 in parallel to R1 reduces the circuit resistance to 2.5 ohms, which in turn draws 2 amps from the power supply.

1A mode: R1 in circuit (5V/5R=1A)
2A mode: R1 and R2 in parallel (5V/2.5R=2A)

Schematic

made using https://www.digikey.com/schemeit/
common anode bi-colour LED

Key

R1: 5 ohm wire-wound power resistor
R2: 5 ohm wire-wound power resistor
R3: 560 ohm resistor
L1: light emitting diode (green)
L2: light emitting diode (red)
S1: toggle slide switch

Recommended modifications

  • 3-state switch or additional switch (for device OFF state)
  • Heatsink / fan (to efficiently dissipate generated heat)
  • PTC resistor (as a safety temperature cut off)
  • male USB to female USB extension cable (for allowing easier multimeter access)

Additional switch

Due to both states of the USB resistive load’s two-state slide-toggle switch being used during the operation of the device, the device has no plugged-in OFF state. This means that it should not be left unsupervised whilst plugged into a power-supply as it would be active at either switch state. Either adding an additional two-state switch or replacing the current one with a three state-switch, will allow the device to have an OFF state. Whether or not this is considered valuable, is largely subjective. However personally, I like the option of turning a load off without necessarily having to unplug it.

Heatsink and fan

The reason why leaving this resistive load active and unsupervised is a concern; is predominantly due to the functioning of the two large 5 ohm power resistors. These resistors dissipate around 5 watts each (5V*1A=5W) and generate considerable heat as a result. Because of this, I recommend the addition of an appropriate heatsink to be attached to these resistors in order to dissipate this resultant heat. As it is now, during continuous operation the resistors heat up to the point that they can not be handled with a naked hand. This level of heat could pose a possible burn risk, or fire hazard.

The addition of a heatsink will allow the device to run continuously without reaching these same high temperatures, it does this by dissipating the heat generated within the resistors in a more effective manner. I.e. moving it into the environment quicker, so that it doesn’t concentrate within the device. An addition of a mounted 5 volt mini fan will enable the cooler ambient air to run through the fins of the heatsink and further improve it’s ability to move heat out of the device. I specify a 5 volts fan because it can be powered from the device itself.

In addition to allowing the device to be handled after extended periods of operation, a good heatsink will in all likelihood also extend the lifespan of the two 5 ohm power resistors. It does this by dissipating any generated heat before it reaches levels that may damage either the components themselves or their neighbours. Generally speaking: devices that run cooler, live for longer.

PTC thermistor

As an alternative to the above two fairly common sense modifications; one could also choose to incorporate a Positive Temperature Coefficient (PTC) thermistor as some kind of safety shut off in the cases where the device reaches any critically high temperatures during operation; essentially as a reusable temperature fuse. The reason why I am dubious in recommending this is that: although it will make the device safer to use in a continuous application; attaching a PTC thermistor in series with the two power resistors may actually affect the resistive load’s performance if not it’s ability to function entirely. I am not sure as I am inexperienced with the application of thermistors in general, and have yet to try this particular use-case out.

My working theory is that since a PTC thermistor increases resistance as it heats up, and with this device’s current draws; it will quickly lead to a positive feedback loop where it’s resistance generates heat, which will generate more resistance, and so on until no current can pass through it – essentially becoming open circuit. I believe that the heat generated from the low resistance power resistors will kick start that sequence; and that the increasing circuit resistance from the PTC thermistor will quickly negate the the power resistors’ ability to draw current. Even if the thermistor’s resistance doesn’t increase to the point of open circuit. It only needs to be consistently higher than the power resistors’ 5 ohms in order to hamper device functionality.

Still, perhaps there is a configuration where the PTC resistor will not negatively affect the power resistors, while still being functional as a thermal fuse. Perhaps if the trip temperature of the thermistor was high enough, or it had a position on the device where it only heated up in cases of catastrophic environmental temperatures. Basically a setup that allowed for the added safety of having a thermistor in circuit without it negatively affecting the functionality of the device.

USB extension cable

I decided to create my own USB extension cable rather than use a prebuilt one. The main reason for this is that I fear that a random off the shelf unit my not be designed to handle current draws of 2 amperes (even if it’s vendor says that it is). This would mean that the cable itself would provide a level of resistance that would become a limiter to the amount of current that the resistive load can draw.

Generally if a USB cable is offering resistance, it will be in it’s cable and not in it’s plug and socket. Either the cable itself is too thin of a gauge, made of inferior materials (aluminium instead of copper), or is long enough to cause voltage drops at higher currents. With this in mind, I used thick gauge copper power cables (taken from an extension cord), and a salvaged USB plug and socket. I also made sure to keep the total length of the cable short; just being long enough to allow comfortable use of a clamp style multimeter.

Which actually brings me to the purpose of this little extension. The pictured USB extension cable is designed to allow the use of a clamp multimeter (one that can measure DC current). Alternatively, if I didn’t have a clamp multimeter, I would cut the 5 volt line in half and terminate it’s two ends with banana plugs. That way I can insert a regular multimeter in series within the circuit; and measure the actual current draws.

As an alternative to using a DIY USB extension and a multimeter, one could just buy a USB voltmeter/ammeter. Such as the one pictured. Although these things, in my opinion can skew the results: due to them (in my experience) imparting some level of resistance on the circuit; they are certainly more convenient to use. Which one a person prioritises: accuracy, or speed (neatness, etc.) will largely depend on their preferences and use-cases.

Closing statements

Although the build quality of this device is more than acceptable (i.e. it doesn’t feel like a shoddy product), it is clearly built to a price point. Only having near enough the absolute necessary components to function. I believe this to be the case, not just because of the miniscule bill of materials (BOM), or the use of inexpensive components in that list. But rather because of the in my opinion necessary things that were left out; namely a basic heatsink.

Although it actually functions fine as is; at least for short operations. If you wish to use this device safely continuously for longer periods of time than a couple of minutes, modifications will need to be made.

Sources, references, further reading

https://en.wikipedia.org/wiki/Thermistor#PTC

https://sciencing.com/difference-between-resistive-inductive-loads-12181159.html

#0009: Brief guide to creating a USB OTG cable

#0009: Brief guide to creating a USB OTG cable

What is a USB OTG cable?

USB “OTG” stands for USB “On The Go”. USB On-The-Go is a specification of the USB protocol that allows traditionally slave devices such as smart phones, to act as master devices or host systems (e.g. personal computers) when connected to either other slave devices such as digital cameras and printers; or peripherals such: USB storage disks or human interface devices (e.g. keyboard and mouse).

USB plug classifications.

There are a myriad different types and generations of USB cables available on the market today. However most obey the convention of having two different plug-socket configuration in each class specification. A type-A plug and socket for connecting with the host system (a.k.a. “A” device), and a type-B plug and socket for connecting with the slave (or “B”) device. A standard USB cable will have one male type-A plug and one male type-B plug. A USB OTG cable differs from a standard USB cable in only one significant way. The standard USB type-A plug is replaced with either a USB Mini type-A or USB Micro type-A variant. That’s it.

For example to connect a generic modern printer to a smart phone with a USB Micro type-AB socket. One would need a male USB Micro type-A to male USB type-B cable. The replacement of the USB type-A with a USB Micro type-A is what makes it an “On The Go” configuration. This means you don’t need a traditional PC to use the printer. You can connect directly with and use the mobile device to send the files to the printer in it’s stead.

Diagram of USB 2.0 connectors. Depicting USB, USB Mini, and USB Micro type-A and type-B plugs
image taken from wikipedia.org

Limitations of the USB OTG specification.

A device with OTG enabled capabilities unfortunately can not act as a general purposes host system with the same peripheral compatibilities as a personal computer. Instead they are given a Targeted Peripheral List (TPL) from their manufacturers. This is a rather limited list of general peripherals designed to work with the particular device for it’s expected use cases. This is because these devices will have limitations on them such as power output or limited supported protocols.

Unfortunately, as I see it; with the innumerable amounts of devices (smart phones, tablets, etcetera) and peripherals (with various protocols and power draws) on the market today: the best way to find out whether or not a peripheral is compatible with your particular device – is to just plug it in and see. This is also true for finding out whether or not your device supports the USB OTG functionality in general. Some might not.

I tested a couple of smart phones I had on hand, and of the four I had, only one actually supported OTG functionality. The other three simply didn’t register the peripherals (including a basic USB thumb stick) plugged into them. These were: (2011) Samsung GT-I5500, (2012) HTC Chacha, (2015) Huawei GRA-L09, and (2018) Blackview A30. Of them only the Huawei GRA-L09 worked with my OTG cable. It performed perfectly with the wireless USB keyboard-mouse combo, and the thumb drive I tested with. The Huawei even allowed connections to the other smartphones (using a Micro type-A to Micro type-B cable). It could charge the other devices, register on their end as connected to a host, but not allow access to their filesystem like a PC would allow. This last thing could be a software limitation, that will require some further tinkering to work; or possibly using some kind of third-party file browser or peripheral manager. Long story short, when it comes to compatibility: your mileage may vary.

Creating a USB Micro OTG cable.

The USB OTG specification was originally created for use with mobile devices that utilised the USB Mini standard, and later updated to include the USB Micro standard. We will create an OTG cable by modifying a Micro type-B plug to a Micro type-A plug. Then using it to create a male USB Micro type-A to USB (full size) type-A socket. This is to connect basic low power USB peripherals such as storage drives or a wireless mouse and keyboard combo. Which is my particular use case. However it should be stated that the same modifications can be made to a USB Mini type-B plug to turn it into an OTG enabled Mini type-A plug.

To create a basic USB Micro OTG cable is actually rather simple. All you essentially need to do is short the ID pin (pin 4) on the USB Micro type-B plug to ground (pin 5). This procedure effectively (i.e. electrically) turns the Micro type-B plug into a Micro type-A plug.

Unfortunately in my case, my kit USB Micro plugs only came with 4 soldering pads (for the power and data lines). It was missing a solder pad for the ID pin. This meant I couldn’t just run a small jumper from the ID pad to the ground pad. I instead had to access the ID pin directly. On one hand this makes creating the OTG cables that require some resistance value between the ID and the ground pin significantly harder. Due to no room for the resistor. However if you intend to just create a basic cable, then this method of just bridging the ID and ground pin can be useful for salvaged USB Micro plugs who in all likelihood won’t have an ID solder pad.

With this in mind, I disassembled a kit USB Micro type-B plug. Next I scraped the covering plastic on pin 4 and 5, then soldered a bridge across them. I removed the plastic to create space and headroom for the solder bridge. Otherwise, I may be unable to slide the plug head (with it’s plastic inner lining) back on. Space constraints need to be paid attention to. Reassembled the plug. Then tested for continuity using a multimeter and a USB Micro type-B socket breakout board. Id est making sure that pin 4 is grounded, and that the solder bridge wasn’t coming off.

Please note, there are other methods for creating OTG cables that involve running a specific resistor across the ID and ground pins for certain devices to work, or to enable the host and/or peripheral device to draw power from an external power source. However I am omitting them, for brevity. This is a quick guide to build a basic DIY OTG cable.

I decided to make the pictured OTG cable modular using breadboard jumper cables. The reason for this is because I intend to mix and match various plug and socket ends to create different types of cables. However, I would recommend making a more fixed and permanent cable for actual real-world use.

Modular OTG cable example

Tooling and material example

Disassembly and modification of a USB Micro type-B plug

Modular male Micro type-A to female USB type-A OTG cable in use

Modular male Micro type-A to male Micro type-B OTG cable in use

References / Sources / Further Reading:

  • https://en.wikibooks.org/wiki/Serial_Programming/USB#What_is_USB?
  • https://en.wikipedia.org/wiki/USBhttps://en.wikipedia.org/wiki/USB_hardware
  • https://en.wikipedia.org/wiki/USB_On-The-Go
  • https://en.wikipedia.org/wiki/USB_(Communications)#Signaling_state