HackerBox 0084: Rework

by HackerBoxes in Circuits > Soldering

3498 Views, 6 Favorites, 0 Comments

HackerBox 0084: Rework

HB0084 Whole Box.png

Welcome to HackerBox 0084 where we will explore PCB rework tools and techniques. Configure development tools for the ESP8266 D1 Mini 2.4GHz Wi-Fi Module. Assemble a minimal embedded test platform using the ESP8266 D1 Mini module, OLED display, input buttons, and an output RGB LED. Leverage the minimal embedded test platform to implement a graphical game, packet capture tool, and other network security experiments. Apply a logic probe to debugging digital circuits and test jumper wire connections while making wire mods. Perform a bodge wire modification to repair an RGB LED circuit. Extend the number of MCU output pins by making PCB cuts and jumps to add a digital SIPO shift register configured to drive multiple LEDs. Deadbug mod a PISO shift register to extend the number of MCU input pins and support a sixteen button keypad. Assemble an SMD soldering practice kit to improve surface mount soldering skills.

HackerBox is the original monthly subscription box for electronics, computer technology, and hacker culture. Each HackerBox is a discovery box, which means all members await and enjoy a new surprise each month. Tech, toys, knowledge, and fun. It's like having a hacker convention, your birthday, and the first day of school - every month - right in your mailbox.

There is a wealth of information for current and prospective members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we'd really appreciate it if you can take a few minutes to read the FAQ.

Supplies

This Instructable contains information for getting started with HackerBox 0084. The full box contents are listed on the product page for HackerBox 0084 where the box is also available for purchase while supplies last. If you would like to automatically receive a HackerBox like this right in your mailbox each month, you can subscribe at HackerBoxes.com and join the party! Subscribers save at least $15 every month and get each new HackerBox shipped immediately off of the production line.

A soldering iron, solder, and basic assembly tools are generally needed to work on the monthly HackerBox. A computer for running software tools is also required. Have a look at the HackerBox Workshops for basic tools and a wide array of introductory activities and experiments.

The most import thing you will need is a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.

WEAR SAFETY GLASSES WHEN SOLDERING, WHEN TRIMMING WIRE LEADS, OR WHEN CUTTING, DRILLING, ETC.

PCB Rework

Rework.png

PCB Rework can be any handmade repair or modification of a printed circuit assembly that lies outside the normal (usually automated) manufacturing process.

Aside from touching up manufacturing defects, those working in design often encounter a need for rework techniques while testing out prototype iterations. For example, when a PCB has an incorrect component footprint, part availability changes, or you simply connect the wrong pins in the schematic. Such errors are to be expected during prototyping (that is why we prototype) and we can often do a little hand rework to test out a proposed correction before spinning the next revision of the PCB.

As you would imagine, rework techniques can also be quite important to those involved in reverse engineering or making mods to existing products.

The simplest rework examples generally include replacing or reflowing a component that was missing, the wrong value, didn't flow properly, or was oriented incorrectly. This type of work can sometimes be done with just a soldering iron, but usually performed with a hot air rework station. If you haven't seen hot air rework in action, take a look at this video from SparkFun.

Slightly more advanced rework technique generally involves trace cutting and jumping. Use of wire added to a board can be called "jumpers", "wire mods", "white wires", "bodge wires", and so forth. Wire mod work can get pretty involved when wiring in an entire chip (dead bug or otherwise), or swapping pin order on an entire bus slot connector. This beauty popped up recently on Hackaday.

Some of the most advanced rework techniques can deal with rebuilding lifted pads/traces, working with BGA (ball grid array) devices, or making mods to finished deliverable products that must remain visually tidy as well as mechanically robust.

The website for Circuit Technology Center (a company that offers professional rework services) features several excellent guides, photos, and videos that teach about different PCB rework techniques.

Tools Used in PCB Rework

tools.png

HackerBox 0084 includes some interesting tools to add to your workbench. They should come in handy while experimenting with PCB rework. They include a dental pick, a spool of enameled magnet wire, a PCB cleaning brush, polyimide tape, and a hobby knife (with assorted blades).

Let's describe these along with various other tools that may be used in rework:

Safety First

Everyone needs safety glasses! You should also consider fume extraction especially if not working in a well ventilated area or working anywhere for extended periods. It also helps to keep your workspace organized enough to avoid burning, poking, or cutting yourself, your furniture, etc.

Magnification

A lighted magnifier or even just magnifying glasses are very useful to start. Some will opt to graduate to microscopes or high magnification camera systems.

Melting Solder

Basic work can be done with a normal soldering iron. Eventually, adding a hot air gun to your tool set can be very useful.

Removing Soldering

Desoldering braid is cheap and easy to use. Suction devices can be quite helpful as well.

Tweezers

Are available in different shapes and can optionally have slide locks or cross locks to hold onto components. For SMD components, some like to use a vacuum pen with suction pads.

Dental Picks

Can be useful for lifting a component while applying heat, prying up a tiny pin, gentle scraping, or anything where you find yourself wishing that you had a very tiny finger.

Mod Wire

Wire for this purpose is generally very, very thin (between 30 and 38 gauge) and must be solid (not stranded) preferably pure copper. Some like to use enameled magnet wire and some use insulated "wire wrap wire".

While magnet wire looks like plain copper wire, it actually has an enamel coating. The coating prevents wrapped turns of the magnet wire in a motor, speaker, transformer, etc. from shorting against one another. Likewise it will prevent runs of mod wire from shorting against contacts, traces, or other mod wires. A big advantage to using magnet wire is that it doesn't really have to be stripped. The enamel coasting can be melted off with a soldering iron during, or just before, the magnet wire is soldered into place.

Precision Cutters

These are required for, among other things, cutting mod wires.

Hobby Knife

Various blade shapes and sizes are useful for cutting traces, removing traces, lifting pads, repairing pads, etc.

Polyimide Tape

Is made from an insulator capable of withstanding very high temperatures. The tape can hold wires and/or components in place. It can also be used to insulate between conductors. Polyimide is usually referred to by the DuPont trademark Kapton Tape (Wikipedia).

Due to its large range of temperature stability and its electrical isolation ability, Kapton tape is used in electronic manufacturing as an insulation and protection layer on electrostatic-sensitive and fragile components. As it can sustain the temperature needed for a reflow soldering operation, its protection is available throughout the whole production process, and Kapton is often still present in the final consumer product.

Solder Flux

Flux serves a threefold purpose: it removes any oxidized metal from the surfaces to be soldered, seals out air thus preventing further oxidation, and by facilitating amalgamation improves wetting characteristics of the liquid solder. Some fluxes are corrosive, so the parts have to be cleaned with a damp sponge or other absorbent material after soldering to prevent damage. Several types of flux are used in electronics. (Wikipedia)

A recent HackerBox included a syringe of gel flux. Check out the box guide for HackerBox 0080 (specifically Step 12).

Shrink Tubing

In addition to its usual insulating qualities, tubing can be used to add mechanical stability/rigidity and also to insulate a through hole when passing a mod wire within - from one side of a PCB to another.

Glue and/or Other Adhesives

Obviously useful for sticking things into place. Wire dots (or other tiny "stickers") are also useful.

PCB Cleaning Brush and/or Swabs

Can be used along with a solvent for removing flux residue. Isopropyl alcohol is usually one of the best options and it's cheap and easy to find.

Solder Mask Ink

During rework, small areas of solder mask (the layer that gives the PCB its color) often get scraped up or completely removed. If there is a reason to repair this (usually involving masking the flow of solder or perhaps purely cosmetic), solder mask ink can be used.

Exclusive HackerBox Rework Kit

rework kit.png

The HackerBox Rework Kit Includes:

  • Exclusive HackerBox Rework PCB
  • ESP8266 D1 Mini 2.4GHz Wi-Fi Module
  • OLED 1.3 inch Display
  • 4x4 Tactile Button Matrix
  • Eight Bit LED Module
  • Five WS2812B RGB LEDs
  • 74HC165N Shift Register
  • 74HC595N Shift Register
  • 10K SMD 1206 Size Resistors
  • Male 2.54mm Header Pins

Test and Configure the Microcontroller Module

D1 Mini.png

The D1 Mini Microcontroller (MCU) Module features an ESP8266 microcontroller with built-in 2.4GHz Wi-Fi support, an antenna, a microUSB port, and an onboard USB interface chip.

Before Soldering the module, let's make sure we can program it and test some things out...

Configure the development tools:

  • Download an install the Arduino IDE Software
  • Start the IDE
  • Open File > Preferences from the menu bar
  • Add https://arduino.esp8266.com/stable/package_esp8266com_index.json into the box labeled Additional Board Manager URLs. The box can have multiple URLs, just separate them with commas.
  • Open Tools > Board > Boards Manager
  • Find and select esp8266
  • Click the install button
  • Don’t forget to select your ESP8266 board from Tools > Board menu after installation.
  • Select Tools > Board > ESP8266 Boards > LOLIN(WEMOS) D1 mini (clone)

Compile and upload a first program:

  • Open File > Examples > Basics > Blink
  • Connect the MCU module to the computer using a microUSB cable
  • Hit the arrow icon to compile and upload the Blink sketch
  • The blue LED on the MCU module (next to antenna) should blink slowly
  • Experiment with the delay values in the sketch to get different LED timing

Initial Assembly of the Rework Kit

initial kit build.png

Let's start by building a minimal ESP8266 setup. This requires the Rework PCB with only four (optionally five) items:

  • ESP8266 D1 Mini MCU Module
  • OLED 1.3 inch Display
  • 4x4 Tactile Button Matrix
  • ONE WS2812B RGB LED (position D1)
  • (optional) Six Pins from the Male Header (position J4)

Solder the D1 Mini MCU module to the PCB. Match up the silkscreen drawing of the notch for the reset button. This will result in the metal shielding of the ESP8266 facing down against the PCB and the USB connector near the edge of the board.

Be sure to properly orient the WS2812B RGB LED. The little white corner marking on the LED goes to the upper left to match the corner marking in the white paint of the PCB silkscreen.

PCB Schematic

The three items connected to the ESP8266 MCU are noted in green on the schematic. You can see that this minimal setup is a very simple system using only seven I/O lines from the MCU Module:

  • D8 for the RGB LED
  • D1, D2 for the OLD Display
  • D3, D5, D6, D7 for Four Buttons

Simple, but awesome. In fact, these I/O pin assignments were selected to exactly match those used in the Wi-Fi Nugget from HackerBox 0073. Accordingly, you can use the code and examples from the HackerBox 0073 box guide (specifically, Steps 3 and 4) including the Arkanoid game, packet monitor, and other Wi-Fi security experiments. As you can see from the schematic. The four buttons map to the top row of the 4x4 button matrix.

Logic Probe

Logic probe.png

A logic probe is a low-cost hand-held test probe used for analyzing and troubleshooting the logical states (boolean 0 or 1) of a digital circuit.

To use the probe, attach two DuPont jumpers to connect the GND pin to the target board's ground, and the VCC pin to the logic high rail (5V or 3V3 to match the signal being tested) of the target board.

Press the pogo pin against a test point, pad, or component lead to see if it is Logic High (H), Logic Low (L), or High-Z (HI) meaning that it is disconnected or not being driven high or low. This is useful for debugging logic circuits and also for testing jumper wire connections while making wire mods.

Theory of Operation

The Logic Probe is based on an LM339 Voltage Comparator. Sets of voltage dividing resistors are used to provide voltage rages to compare against.

When VCC is set to 5V:

  • Signal > 2.4V illuminates the Red LED (logic high)
  • Signal < 0.6V illuminates the Green LED (logic low)
  • Signal floating or between 0.6V and 2.4V illuminates Blue LED (HI-Z)

When VCC is set to 3V3:

  • Signal > 1.49V illuminates the Red LED (logic high)
  • Signal < 0.39V illuminates the Green LED (logic low)
  • Signal floating or between 0.39V and 1.49V illuminates Blue LED (HI-Z)

Adding More RGB LEDs

More RGB.png

There are three additional RGB LED landing pads on the PCB (D2-D4). These can be populated, but you may notice a missing net in the PCB between LEDs D3 and D4. This is the perfect place to test making your first wire mod connection.

Soldering with Magnet Wire

A common method is to simply hold the magnet wire over the pad/lead to be connected and press it in with a hot soldering iron. Since the enamel coating has to cook off, the iron needs to stay in place for 6-7 seconds as opposed to the usual 2-3 seconds for heating a regular solder joint. If there is a heat sensitive component in play and you do not want to heat the component for 6-7 seconds, simply remove the enamel coating first as a separate step before bringing the wire onto the component.

Extra Rework Challenge

Solder the D4 LED to the PCB as usual and then rip it off with pliers or a small flathead screwdriver. This will probably lift one or more of the solder pads and give you something to experiment with repairing without damaging anything else on the PCB. Such a repair can probably be done entirely with wire mod jumps. Don't worry about destroying the LED, there is an extra one included to use after you rework the damaged PCB landing area.

Test the RGB LED Chain

Use Tools > Manage Libraries to install FastLED by Daniel Garcia

Open File > Examples > FastLED > DemoReel100

Change:

  • DATA_PIN to D8
  • LED_TYPE to WS2812B
  • NUM_LEDS to 4

Compile and upload to the MCU

Additional Outputs Using a Shift Register

SIPO595 LEDs.png

Sometimes you may need more output pins than provided by a microcontroller. An easy solution is to use shift registers to extend the number of output pins. Here, we will demonstrate the 74HC595 check to control eight outputs at a time while only taking up a few pins from the microcontroller. (see Arduino ShiftOut Tutorial)

Start by soldering in the 595 chip being careful to match the semicircular notch at one end of the chip to the similar marking on the PCB silkscreen.

Also solder in the Eight Bit LED module.

Examining the schematic for the PCB, you will notice that the SIPO_Data, SIPO_Clock, and SIPO_Latch signals to the 595 chip are not connected anywhere. On the PCB they are only routed to the three tiny vias between the MCU and the 595 chip. We can connect these signals to the MCU by scraping the green solder mask off of the vias and then jumper wiring between the vias and the three necessary pins of the MCU.

  • Via to Serial Clock (pin 11) of 74HC595 Chip: Jumper Wire to pin D0 of MCU
  • Via to Register Clock (pin 12) of 74HC595 Chip: Jumper Wire to pin D3 of MCU
  • Via to Serial Data In (pin 14) of 74HC595 Chip: Jumper Wire to pin D4 of MCU

Compile and upload the attached sketch: Eight_LEDs_595.ino

This demonstrates how eight LEDs can be controlled using only three MCU outputs. Note that a chain of WS2812 RGB LEDs can be controlled using only one MCU pin. This is also thanks to shift registers.

Very relevant Hackaday post: GENERAL PURPOSE I/O: HOW TO GET MORE

Downloads

Additional Inputs Using a Shift Register

PISO165 Keypad.png

Similarly, we can use a 74HC165 parallel-in serial-out (PISO) shift register IC to add more inputs to the MCU.

We don't have footprint on the PCB for this chip, so we're going to deadbug it onto the board.

RED ARROWS

First we need to cut the five traces on the bottom of the board that originally went to the keypad.

YELLOW ARROW

Also on the bottom of the board we will jumper S0-S3 of the LED module to R4-R1 of the keypad (respectively).

BLUE ARROWS

Jumper wire 3V3 power from the VCC pin of the 8-bit LED module to pin 16 of the deadbug 165 chip.

Jumper wire GND to pins 8, 10, and 15 of the deadbug 165 chip. (We took GND from LED D1.)

PURPLE ARROW

Wire three control pins from deadbug 165 chip to MCU:

  • Pin 1 of 165 chip to D5 of MCU
  • Pin 2 of 165 chip to D6 of MCU
  • Pin 9 of 165 chip to D7 of MCU

GREEN ARROW

Wire four outputs from keypad to four pins of the deadbug 165 chip:

  • Pin 3 of 165 chip to pin C1 of Keypad
  • Pin 4 of 165 chip to pin C2 of Keypad
  • Pin 5 of 165 chip to pin C3 of Keypad
  • Pin 6 of 165 chip to pin C4 of Keypad

Finally, add four 10K pull down resistors onto pins C1-C4 of the keypad and tie the other end of each resistor to GND.

DEMONSTRATION CODE

Compile and upload the attached Keypad_Demo.ino sketch. Open the serial monitor set to 9600 board and press any of the 16 keypad switches.

ADDITIONAL INFORMATION ON USING THE 74HC165 SHIFT REGISTER

From John Woolsey

From DroneBot Workshop

Downloads

SMD Soldering Practice Kit

SMT Kit.png

Dr. Gough's TechZone Blog documented this SMD kit and a few others here. Scroll down that page to The Final Boss for information and assembly photos on this fairly challenging SMD kit.

LydianPhix also shared a nice Assembly Video on YouTube.

Note that resistors R1-R70 and capacitors C1-C10 each have a range of acceptable values and the particular values packed in a given instance of the kit may not exactly match the photos or videos, just be sure they are in the correct range.

Hack the Planet

outro.png

We hope you are enjoying this month's HackerBox adventure into electronics, computer technology, and hacker culture. Reach out and share your success in the comments below or other social media. Also, remember that you can email support@hackerboxes.com anytime if you have a question or need some help.

What's Next? Join the party and live the HackLife. Get a cool box of hackable gear delivered right to your mailbox each month and enjoy a generous member discount. Surf over to HackerBoxes.com right now to sign up for your monthly HackerBox subscription.

Please consider sharing this free Instructable with others who may be interested in learning about these subjects. We really appreciate your support!