Assembly Instructions for the SG-µMD1 for MPLAB Version 1.2 PCB

Version 1.01 (22-Aug-20)

Copyright © 1994-2022
Samuel M. Goldwasser
--- All Rights Reserved ---

For contact info, please see the
Sci.Electronics.Repair FAQ Email Links Page.

Reproduction of this document in whole or in part is permitted if both of the following conditions are satisfied:
  1. This notice is included in its entirety at the beginning.
  2. There is no charge except to cover the costs of copying.

Table of Contents


Author and Copyright

Author: Samuel M. Goldwasser

For contact info, please see the Sci.Electronics.Repair FAQ Email Links Page.

Copyright © 1994-2016
All Rights Reserved

Reproduction of this document in whole or in part is permitted if both of the following conditions are satisfied:

1. This notice is included in its entirety at the beginning.
2. There is no charge except to cover the costs of copying.


µMD1 is intended for use in hobbyist, experimental, research, and other applications where a bug in the hardware, firmware, or software, will not have a significant impact on the future of the Universe or anything else. While every effort has been made to avoid this possibility, µMD1 is an on-going development effort. We will not be responsible for any consequences of such bugs including but not limited to damage to the wafer FAB you picked up on eBay for $1.98 + shipping, financial loss from the use of 37 spools of ABS due to the office 3-D printer fabricating a part 25.4x too large in all dimensions, or bruising to your pet's ego from any number of causes directly or indirectly related to µMD1. ;-)


Thanks to Jan Beck for selecting the chipKIT DP32 and writing and testing initial versions of the firmware and GUI. And for getting me interested in actually getting involved in this project. If anyone had told me six months ago that I'd be writing code in C, MIPS assembly language, and Visual Basic - and enjoying it (sort of) - I would have suggested they were certifiably nuts. ;-) Jan maintains the master GUI source code as well as slightly different versions of the firmware and a development blog on the overall project. And a version of the firmware providing basic readout of displacement on any Bluetooth wireless device with a terminal APP, or with a bit more polished presentation (though not the complete GUI) on Android devices, may be found on Jan's Web site. See that and more under "References".


This document provides assembly instructions for the minimal configuration to enable the SG-µMD1 V1.2 PCB to support the downloading of the bootloader and other firmware directly via MPLAB, or via USB.

SG-µMD1 V1.0 PCB MPLAB Version with ZIFF Socket. V1.2 is Nearly Identical

The 28 pin SDIP ZIFF socket is plugged into a leaf-spring socket which is plugged into a machine-pin socket. The stack is glued together on the edges so that it easily plugs into the socket on the SG-µMD1 PCB. Installing a right-angle header for JP6 would be beneficial as a straight header blocks the Reset and Program buttons. Of course, the PIC32 can be plugged directly into the on-board socket.

All components are through-hole and except as noted in the detailed assembly procedure, should seat flush on the PCB. They shouldn't be suspended in mid-air swinging in the breeze. :) Most components are identified on the silk-screen and with only a few exceptions, the label won't be obscured when the part is installed.

SG-µMD1 V1.0 Single Axis PCB shows the PCB populated with the parts for a single axis system without sensors. Only the parts below the headers are required for MPLAB and USB download support.

A low power soldering iron with narrow tip and thin (e.g., #22 AWG) rosin-core solder will be required. DO NOT even think about attempting this without suitable soldering equipment. It's well worth the investment. A Weller soldering gun or propane torch will not work. :) Rosin core solder is also essential. And while I'm quite confident that you never make mistakes, a means of component removal such as a de-soldering pump (e.g., SoldaPullt™) will be highly desirable. Screwing up component removal can easily ruin the PCB and is not covered under the unlimited limited warranty. :-)

Proper soldering technique will be such that the exposed solder on each pad should be shiny with a concave profile. It should not be a blob and just needs to fill the hole. Solder is not glue. Some excess solder doesn't hurt anything but looks unprofessional. A 10X magnifier may come in handy for inspection. Residual rosin can be cleaned off with isopropyl alcohol or an environmentally-friendly electronic solvent. However, leaving the rosin alone is also acceptable (if ugly).

Total assembly time should be well under two hours for someone proficient in fine soldering. Cutting component leads to 1/4 to 3/8 inch before installation will simplify soldering as the long leads won't be poking you in the face. :( :) Then trim flush after soldering.

The USB driver is NOT required for MPLAB, only a USB port or charger to provide 5 VDC power. CAUTION: If using a charger, confirm that its output is close to 5 VDC. This should always be true for those from name brands like Apple. But others that are non-genuine or counterfit may be all over the map.

Instructions for using MPLAB to download the bootloader are in the µMD1 manual (where you came from).

Schematic for the SG-µMD1 Version 1.2

The schematic for the SG-µMD1 Version 1.2 PCB may be found at SG-µMD1 Version 1.2 Schematic. This includes everything on the board. For MPLAB, all that's needed are the PIC32-specific parts and parts associated with JP6.

Printing out the schematic and having it available for reference while assembling the PCB may be helpful.

SG-µMD1 PCB Layout Version 1.2

Refer to the SG-µMD1 board layout below.


SG-µMD1 V1.2 PCB Layout Diagram (Left) and Populated PCB with MPLAB Parts Outlined in Yellow (Right)

This shows a PCB populated for a 3-axis system with the required MPLAB parts highlighted. In essense, most parts below mid-board are required to run the PIC32 and for it to communcate with the MPLAB programmer and USB. The only parts above mid-board that are required are LD4 and it's assoicated resistors and transistor. Also a header for JP6, and C14 should be installed (not shown).

Step-by-Step "Heathkit™-style" Instructions for SG-µMD1 PCB Version 1.2 MPLAB Support ONLY

Only parts for MPLAB support are addressed here. Additional parts can always be added later if desired.

Print out this document so each step can be checked off ( ) as it is completed.

  1. ( ) Confirm that all parts are present and undamaged:

  2. ( ) Install the USB Micro B connector on the top of the PCB. For the through-hole type, first solder the through-hole tabs. Confirm that the connector is flush on the board before soldering the pins. The tabs and pins may not quite poke through the PCB so assure that solder actually flows down inside the holes and reaches them. Take care to avoid solder bridges between the very closely spaced pins.

    The through-hole USB connector is installed at a right angle to the PCB. If you would prefer one that faces sideways and are comfortable soldering an SMD connector with legs that are only 1.3 mm apart and barely accessible even with a narrow-tip soldering iron, they are readily available from electronics distributors or eBay and should be compatible with the PCB layout pattern. One may even be included in this kit but its mounting tabs may need to bent down to fit the PCB holes.

    Note that once other parts are installed, it's virtually impossible to correct any soldering errors on the SMD connector.

    Or if you can locate a through-hole connector that installs flat on the PCB, contact me via the email links at the top of this page. :)

  3. ( ) Install a jumper wire between the two right-most pads of JP7 (near the USB connector). For µMD1 there should never really be any need so use external power.
  4. ( ) Install IC2 (MCP1703T, TO92). It should stand off from the PCB by 1/8th inch or so. Make sure the outline matches
  5. ( ) Install C10,C11 (4.7 uF). Note polarity: Positive is marked on the PCB and is also the square pad. Negative on the capacitor is marked by a line.

  6. ( ) Install LD0 (3 mm LED). The anode is the longer lead and the square pad on the PCB. The cathode is the shorter lead and the flat on the body of the LED. Cut the leads about 1/10" from the body if the LED can't be inserted to sit flush on the PCB. Take care not to overheat or stress the leads on the LED when soldering.

  7. ( ) Install R26 (10K ohms, brown-black-orange-gold).

  8. ( ) Smoke test #1: Plug the board into a live USB A socket or charger via the included USB A to USB Micro B cable. LD0 (Power) should come on immediately. If a DMM is available confirm that the voltage measured across pins 28 and 27 of IC1 is between 3.2 V and 3.4 V. Unplug. And, uh, nothing should smoke. ;-)

  9. ( ) Install R34,R35,R37 (51 ohms, green-brown-black-gold).
  10. ( ) Install R39 (200 ohms, red-black-brown-gold).
  11. ( ) Install R40 (680 ohms, blue-gray-brown-gold).
  12. ( ) Install R23,R24,R30,R31,R38 (10K ohms, brown-black-orange-gold).

  13. ( ) Install C6,C7 (33 pF). These may not be labeled on the silk-screen. They are adjacent to pins 8,9 and 10,11 of IC1.

    Note: The 33 pF and 0.1 µF capacitors may appear identical. Inspect their marking to identify them.

  14. ( ) Install C3,C8,C9,C14 (0.1 µF). Some of these may not be labeled on the silk-screen. 0.1x0.2 inch parts having rounded ends without part numbers are 0.1 µF caps. They are near VR1, and pins 23,24 and 27,28 of IC1, an JP6.

    Note: The 33 pF and 0.1 µF capacitors may appear identical. Inspect their marking to identify them.

  15. ( ) Install C4 (4.7 µF). Note polarity: Positive is marked on the PCB and is also the square pad. Negative on the capacitor is the line.

  16. ( ) Install C5 (10 µF to 22 µF tantalum capacitor, yellow gum drop.) Pay particular attention to the polarity. These tend to explode eventually if installed backwards. The labeling should face away from the PIC32 socket.

  17. ( ) Install LD4 (3 mm LED). The anode on the LEDs is the longer lead and the square pad on the PCB. The cathode is the shorter lead and the flat on the body of the LED. Take care not to overheat or stress the leads on the LED(s) when soldering.

  18. ( ) Install R23,R24 (10K ohm, brown-black-orange-gold).
  19. ( ) Install Q4 (2N3904 transistor).
  20. ( ) Install BTN1,BTN2 (pushbuttons). Press in place flush against the PCB. Solder all 4 pins on each.
  21. ( ) Install SKT1 (28 pin SDIP socket). The cutout on the socket should match the cutout on the PCB. First solder two diagonal corner pins and confirm the socket is flush against the PCB. Then solder the rest.

  22. ( ) Install X1 (8 MHz crystal in sardine can).

  23. ( ) Carefully inspect for unsoldered pins, solder bridges and other blemishes. Correct as needed. THIS IS ESSENTIAL! It would be bad form to blow the PIC32 due to an errant blob of solder. :(

  24. ( ) Install 6 pin socket strip or right angle header at JP6 if desired. Note that the holes for JP6 are slightly offset (zigzag) so inserting a 6 pin header will be snug without a mating connectoor.

  25. ( ) Carefully plug in the PIC32 confirming that all pins are seated and none are bent. The dot or cutout on the chip should match the PCB labeling.

  26. ( ) Smoke test #2. :) Plug the board into a USB A socket on your PC or laptop or charger using the included cable. The power LED should come on. And no smoke. :)

  27. ( ) If the PIC32 has the bootloader installed, Press Reset (BTN1) and hold it while also pressing Program (BTN2). Release Reset and then release Program. LED1 (LD4) should be flashing rapidly indicating that the board is salivating in anticipation of having new and improved firmware uploaded to it. ;-) This confirms that the button circuitry is functional. There should be no actual need to load firmware as the latest version for µMD1 will have been pre-installed so press Reset to exit boot mode. Remove the USB cable.

    If nothing happens even after multiple attempts, the PIC32 isn't running for any number of reasons, or the bootloader is not present (as would be the case if the PIC32 were ordered from an electronics distributor). In that case go to the next step.

  28. ( ) Follow instructions for using MPLAB to download the bootloader. For this, the PCB must be powered from external 5 VDC or USB, NOT the programming header. Once the bootloader is installed, UECIDE can be used to download firmware. Details on both are in the Micro Measurement Display 1 (µMD1) Installation and Operation Manual.

  29. ( ) Congratulations! It should now be possible to run internal programs and/or to program the PIC32 via MPLAB.

  30. ( ) If the µMD1 firmware is downloaded and the µMD1 GUI is run, REF and MEAS may be counting slowly at random since the inputs to the PIC32 are not connected to any line receivers and are floating. Touching their respective pads may affect the behavior.

Parts List for SG-µMD1 Version 1.2 MPLAB ONLY

These are the required parts to run the PIC32 for the purposes of programming via MPLAB or USB.

 Reference    Type      Part/Value             Function
   BTN1    Pushbutton   SPST NO                Reset
   BTN2    Pushbutton   SPST NO                Program

    C3     Capacitor    0.1 µF                 IC1 3.3 V bypass
    C4     Capacitor    4.7 µF                 IC1 VBUS bypass
    C5     Capacitor    10-22 µF Tant.         IC1 VCAP bypass
    C6     Capacitor    33 pF                  IC1 crystal bypass
    C7     Capacitor    33 pF                  IC1 crystal bypass

    C8     Capacitor    0.1 µF                 3.3 V bypass
    C9     Capacitor    0.1 µF                 3.3 V bypass

    C10    Capacitor    4.7 µF                 VIN bypass
    C11    Capacitor    4.7 µF                 3.3 V bypass

    C14    Capacitor    0.1 µF                 3.3 V bypass

    IC1    IC           PIC32MX250F150B-50I/S  PIC32 28 pin SDIP
    IC2    IC           MCP1703T               3.3 V regulator TO92

    LD0    LED          3 mm LED               Power LED
    LD4    LED          3 mm HB LED            RB3 LED (chipKit LED1)

     Q4    Transistor   2N3904                 LED driver

   PCB1    PCB          SG-µMD1-PCB            Blank SG-µMD1 PCB V1.2

    R22    Resistor     51 ohm, 1/8 W          PIC32 reset
    R23    Resistor     10K ohm, 1/8 W         PIC32 reset
    R24    Resistor     200 ohm, 1/8 W         PIC32 reset
    R25    Resistor     680 ohm, 1/8 W         PIC32 crystal

    R26    Resistor     10K ohm, 1/8 W         Power LED current limiting
    R30    Resistor     10K ohm, 1/8 W         Program button bias network
    R31    Resistor     10K ohm, 1/8 W         Program button bias network

    R34    Resistor     51 ohm, 1/8 W          P32_PGD series resistor
    R35    Resistor     51 ohm, 1/8 W          P32_PGC series resistor

    R39    Resistor     10K ohm, 1/8 W         RB3 (LED1) current limiting

   SKT1    Socket       28 pin, 300 mil        Socket for PIC32
   SKT4    Socket       6 pin, SIP             Socket strip for JP6

   USB1    Connector                           USB Micro B female connector

    X1     Crystal      8.0000 MHz             PIC32 master clock


  1. Some 0.1 µF bypass caps may not have reference designators on the silk-screen but their location should be obvious. Refer to the photo of the populated board.

  2. As with the chipKit DP32, VIN must be +5 VDC.

-- end V1.01 --