Tooltips

Life wasn't meant to be easy...but shouldn't be that expensive either! This collection of tools and tips can ease the pain a little.
  1. An elevated blank PCB can hold header pins vertically when soldering a Nano onto them. Can handle single row header as well.



  2. Use stackable ice cube trays to hold resistors, transistors, diodes, etc. Much cheaper than storage drawer cabinets. Search for components in a spreadsheet to get the cube coordinates. You can get Excel for Android phone too.







  3. Scavenge broken-down scanners or junk photocopiers for parts, especially the scanning lens. The magnification power is fantastic and most useful for checking solder joints.



  4. The ATTINY85 mini dev board has 3 breadboard-unfriendly header holes on the side. One workaround is to solder the header on top of the board. The other is to bend and solder 22AWG wires so that they jut out the side of the board to plug into breadboard.



  5. Some boards like the cheap ebay PAM8403 amplifier have uncommon header pitch ie the width between pins is not 2.54mm(0.1 inch). Fortunately 22AWG solid core wires fit exactly into the plastic spacer holes so you can make custom headers to fit rebel boards. The wires are stiff enough to insert into breadboard like pins.



  6. The best way to mount those $5-for-25 pushbutton switches to the side of a box is 3D-print a case for the body and drill a hole for the stem. View the Fusion 360 design here and download the export/STL files from this link.



  7. When you don't have a dual gang potentiometer to test a circuit and can't be bothered rushing out to get one, just join 2 single pots with a small piece of plastic and tape the shafts together. Not pretty but cheap and close enough. Remember to wire the terminals in a mirror-image to sync the change in resistance when the pots rotate.







  8. For those using the ESP32's ADC, be aware analogRead do not return values that correspond to the voltage level in a linear manner. Here's a link to the non-linearity issue . There are workarounds available but the general consensus is use an external ADC chip like ADS1115.

  9. To develop portable code that runs on multiple hardware platforms, use the compiler architecture flags eg:
    #if defined(ARDUINO_ARCH_ESP32)
      #define LED4 34
    #elif defined(ARDUINO_ARCH_STM32)
      #define LED4 PB6
    #elif defined(ARDUINO_ARCH_AVR)
      #define LED4 10
    #endif
    
    Microprocessors using the ATmega328p (like the Uno), define __AVR_ATmega328__.
    Microprocessors using the ATmega32u4 (like Leonardo), define __AVR_ATmega32U4__
    Microprocessors using the ATtiny85 chip (Trinket, Gemma, Digispark), define __AVR_ATtiny85__
    Microprocessors using the ATmega2560 chip (Mega), define __AVR_ATmega2560__
    Due and DigiX define: __SAM3X8E__, and __arm__
    Teensy 3.0 defines: __MK20DX128__, __arm__, and CORE_TEENSY
    Teensy 3.1 defines: __MK20DX256__, __arm__, and CORE_TEENSY
    
  10. Those nifty PCB holder with a magnifying glass is great when you need a third hand to hold your PCB while soldering. But they have one problem - the thumbscrew on the collar will eventually crush the tail of the alligator clip leading to a wobbly bite. Not good if you're trying to be a helpful alligator. To prevent the death-crush, cut off a short piece from a bamboo chopstick and slide it into the tube. Alligator now gets a solid tail.



  11. When you need 4.5V from a 4-battery(6V) holder, make a dummy battery from a nail or screw of equivalent length.



  12. Good spirit levels, especially the long aluminium types are expensive eg. a 1.2m Stabila level costs around $100 at Bunnings. Here's a DIY one made from a roadside throwaway fluorescent tube holder made of solid aluminium. After gutting and cleaning the interior, a $10 23cm Stanley level taped to the tube was just as effective.

     

  13. To store an opened tube of silicone sealant for re-use later, unscrew the nozzle, place a ring of seleant around the base and screw it back tight. Put a blob around the tip. Allow to dry for 24 hours before storing it in the fridge. This worked perfectly on a tube stored for 6 months before being used again. Just clean the base and replace the nozzle which are freely available at Bunnings.