Automated Resistor Sorter with GUI

Introduction

Our project is a resistor sorter that allows users to input multiple resistors, measure their resistance, and sort them into predefined bins or return them to the user. For a video of our sorter, please see our Project Demo.

From the onset, we wanted to make a project that approached a realizable product where users can input multiple resistors and easily have them sorted for them. The project involved coordinating physical hardware with motor controllers and a user interface. We implemented the mechanical hardware via 3D printed polylactic acid (PLA) plastic for low cost and the rapid iteration on designs. To control the physical constructions, a servo, stepper motor, and solenoid are controlled via the PIC32 and drive transistors to allow the resistors to be sorted. Finally, the user interface allows easy and intuitive interaction with the system. These three sections culminate in a design that provides a basis for a potential product providing basic laboratory assistance.

Contents

Figure 1: Full System Image
Figure 2: Full System Rendering

High Level Design

Rationale

We wanted a novel project that could be used in the laboratory to improve the lab in some way. The resistor sorter was determined to be a project that had not been done before, with suitably difficult hurdles, and a meaningful/useful impact.

Background Math

The most basic background for measuring resistance is simply to apply Ohm’s law, V=IR, to the resistor, given a known voltage or current, and then measuring the other. The resistance can then be calculated as R = V/I. It is important to note that we simply cannot apply any voltage or current that we wish to an unknown resistor. If we apply a large voltage to a small resistor, we could potentially exceed the 15mA maximum that can be sourced from a port pin on the PIC32.[3] If we supply too large a current to a large resistor, we will exceed the voltage values the microcontroller can read or the maximum power dissipation (P = I2R) of the resistor. Thus, we have implemented an autorange feature using the Charge Time Measurement Unit (CTMU) current source to adjust the current gradually upward.

Logical Structure

Measuring a resistor using our resistor sorter consists of the following actions, Detailed in Figure 3:

  1. Mode Selection – Choose mode of operation and, if applicable, input the custom bin limits.
  2. Feed Resistor – Activate the solenoid and feed a resistor from the feed queue to the measurement arm.
  3. Measurement – Lift the resistor on to the contacts, pass a test current across the resistor using the CTMU current source, measure the voltage, and calculate the resistor value
  4. Sorting – Determine the appropriate bin for the resistor based on the value, rotate to and drop the resistor into the bin, and appropriately reset the arm for feeding again.
Figure 3: Basic Operation Flowchart

Hardware & Software Tradeoffs

For the most part, our final project was a highly mechanical task and thus could only be accomplished using hardware for tasks such as rotating bins, feeding resistors, and the mechanical sorting arm. The main tradeoffs were in determining user interaction with the sorter. We decided on a predominantly software based GUI instead of an array of switches to allow greater customization of bins and use with few inputs.

We had multiple sensors available including different pushbuttons and potentiometers, so different implementations were possible. The final design, a 10-turn potentiometer and one select button, was decided by the need for an ability to choose a value between 1 and 1000 with a degree of accuracy. Linearly interpolating a 10-turn potentiometer seemed the simplest, hassle free method of implementation. This removed the option for selection buttons (akin to a directional pad) or a potentiometer with fewer turns. Furthermore, we planned to include only one button (the select button) to simplify operation.

To navigate menus with a 10-turn potentiometer, thresholding would be too tedious. In keeping the number of input devices low, more buttons were also not an option. Therefore, for navigation, the derivative of the potentiometer’s change is recorded. This directional value determines the selection bar’s movement. Also, the edge values of the potentiometer are hard coded into the GUI. These will always display their corresponding edge case, to prevent a user being at the potentiometer’s limit and unable to move towards the selection they desire.

Applicable Standards

There are two notable standards that apply to our design. The first is IEEE Standard 118-1978, “For Resistance Measurement” [10]. This standard outlines different approaches for measuring the resistance of a circuit component, based on that component’s approximate resistance and the precision of measurement desired. In particular, the standard outlines a number of bridge circuits that could be used for high precision measurement of resistors Since most lab resistors have 5% tolerance, a low precision approach is sufficient for this application. In particular, the Voltmeter-Ammeter approach described in section 4.1.1 was chosen.

The Second notable standard that applied to our design is ISO 9241, “Ergonomics of Human-System Interaction.” Since our design was to contain a user interface, we wanted this user interface to be as easy to understand as possible. Unfortunately, this standard is behind a significant paywall and is not accessible through Cornell resources, so we were not able to consult it in its entirety. However, we want to work to make our user interface as simple and intuitive to use by minimizing hidden features, and providing few, easy to understand points of interface.

Existing Technology and Intellectual Property:

There are many recent projects targeting similar functionality and some older patents for the core functionality. The recent projects encompass a similar sorting mechanism and user interface, but mostly lack the feed mechanism we have to make the project even more automatic. The two patents US2468843, “Apparatus for electrically testing and classifying resistors” filed in 1945 and US3003630, “Apparatus for electrically testing and classifying resistors” filed in 1960 use a rotating resistor feed mechanism and basic sorting into compartments. The later patent expands on the first by adding functionality for sorting complex impedances. This functionality surpasses that of ours, but comes at the cost of increased system complexity.

None of the patents utilizes a microcontroller-based autoranging functionality such as our device, and moreover, the age of past patents means that they are no longer in force, given that it is well beyond 20 years from their filing date. There is possibility for classifying our modern design into new intellectual property.[12][13]

Hardware Design

Mechanical Design

The hardware of this project serves the purpose of controlling the feed of resistors incrementally into the system, measuring the resistance, and placing the resistor into the appropriate bin. The user places mostly straight resistors into the feed slot, and the feed slot outputs one resistor at a time into the measurement arm via a mini solenoid that pushes one resistor from the stack over an edge. The measurement arm then rotates up and presses against the measurement surface to read a resistance value. Finally, the arm swings down to drop the resistor into the spinner before finally returning to the neutral position for resistor catching.

Design Philosophy

This project is designed to be printable, modular, and modifiable. In total, there are 8 independent pieces that fit together. The eight pieces and their purposes, approximate sizes, and images are shown below. All pieces are designed to slot together, and they are solidified with hot glue (other glues would suffice, but the rapid curing time of hot glue enables faster construction).

Part Description Approximate Size (L x W x H mm)
1 Base 270 x 154 x 140
2 Spinner 160 x 160 x 38.5
3 Measurement Servo Holder 148 x 56 x 96
4 Measurement Arm 75 x 15 x 56
5 Feed Mount 40.4 x 78.8 x 100
6 Feed Slide – In 57.7 x 11.5 x 69
7 Feed Slide – Out 22.3 x 11.5 x 69
8 Feed Plunger 5.1 x 2.75 x 63

Hardware Components

  1. Base: The base is designed to hold the other components. It has mostly empty space to hold control circuitry and the PIC32 if moved off the Mircostick. The pegs on the center hold the stepper motor in place for spinner operation, and the measurement and feed mechanisms attach to the vertical posts.
Figure 4: Base Rendering

Spinner: The spinner is designed to be large enough for straight resistors to fit easily. The bottom has a 10-pointed star shape engraved in it to attached to the stepper motor. The storage is split into 6 sections with one of them being a slot to return the resistor to the user immediately after measurement.

Figure 5: Spinner Rendering

Measurement Servo Holder: This arm is designed to extend off from one post and house the servo to control the measurement arm. Metal electrodes are attached to two edges of the measurement edge to facilitate measurement. The servo hole is matched to the S3003 servo. The empty spaces in the arm are designed to minimize material used in the print.

Figure 6: Measurement Servo Holder Rendering

Measurement Arm: The small arm screws into the servo and is the primary movement tool for the resistor post-feed. The arm is slanted so that the resistor stays in the groove when horizontal and upright for measuring, but slides out when lowered to drop the resistor. The center divot prevents the resistor from sliding around and allows the bulb of the resistor to not interfere with the measurement via the wire leads.

Figure 7: Measurement Arm Rendering

Feed Mount: The feed mount attaches to the other post and provides a place for feed solenoid and mount the other feed parts. The two parts of the feed slide are glued to this piece along with the mini solenoid.

Figure 8: Feed Mount Rendering

Feed Slide – In: This part holds the resistors to be sorted. The grove in the center guides the resistors through the feed mechanism, and the thin gap makes it so only one resistor can go through the mechanism at a time. The cut opening in the top allows the user to straighten out resistors that are tangled.

 

Figure 9: Feed Slide – In Rendering

Feed Slide – Out: The output section of the slide guides the resistors after the plunger into the measurement arm. The open top of this piece prevents jamming and allows view of the mechanism working for checking functionality.

Figure 10: Feed Slide – Out Rendering

Feed Plunger: The plunger fits in between the input and output feed slide. When the solenoid is not powered, the plunger is flush with the input slide. One resistor can fit on the plunger at a time, and when the solenoid is activated it extends to allow the resistor to roll down the output slide.

Figure 11: Feed Plunger Rendering

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.