Vibratory Hardware Parts Sorter "SortaMatic 2.0" Featuring Sorta-Diameter and Sorta-Thickness"
by khawes6262 in Workshop > Organizing
32 Views, 0 Favorites, 0 Comments
Vibratory Hardware Parts Sorter "SortaMatic 2.0" Featuring Sorta-Diameter and Sorta-Thickness"
Having buckets of small screws, washers, and nuts, I wanted a device to do a coarse sort. I was intrigued by vibratory bowls but they are mainly focused on part orientation of a single standard part. In my case I wanted to create device which groups common physical parameters such as thickness and part width. A linear vibration table was implemented. Mechanical motion is typically created by electromagnets acting on a mass spring table. Instead, I decided to try a stepper motor--mainly because I had one handy and did not want to bother with alignment and gap issues with an electromagnet. I also wanted to have amplitude and frequency control to study the walking nature of the part on the table. An Arduino Nano provides this control.
The upper track sorts by part height (Thickness).
The lower track sorts by part width by reducing table width vs part center of gravity.
Both tracks rely on the table being at roughly 5-10 degrees angle from horizontal.
I used a simulated sine wave to control the stepper motor.
Hand feeding is used to singulate the incoming parts.
Supplies
Table
Upper deck (part thickness sort), Pine: 3/8" x 3.5" x 28"
Upper deck beams: (2) - 3/4"x28" glued (Tightbond II) to bottom of upper deck. I used two, 1" drywall screws (predrilled to prevent cracking wood) to hold until dry on each beam.
Lower deck 1" x 1" x 24"
Gap = 1" Created by Pine blocks: (2) - 1"x1"x 2" Glued and screwed.
Working slide surfaces: 0.080" thick plastic (box store Fluorescent light diffusion sheet). Any smooth sheet would work. Do not use steel as magnetized hardware will stick in place reducing the happiness of the process. Do not use wood for this surface, as it will collect dirt and cause parts to stick. I learned the hard way!
Aluminum or plastic is a good choice. Glue the slide surface to the upper deck.
Table Flat Sheet Springs: 0.042"T x 2"W x 3.25"L Bend each sheet 0.5" from both ends to roughly 75 degrees, forming a Z pattern around 15 degree off of vertical. This bend constrains the table motion allowing parts to be thrown upwards and advanced down the table with each vibration cycle. Drill through holes for two screws on both the spring bottom and top 0.5" flanges. These will be used to attach the Upper Deck to the base. I used (4) 6-32 bolts and nuts to attach table to top of springs, spaced 1-3/8 " apart. Use lock nuts, lest the vibration cause the assembly to fall apart. Spring tops (screw holes) are mounted 5 1/4" and 18.5" from drive end. It is important to keep spring mounts positioned at a non-resonant positions on the top. Positioning the springs at the ends can create "dead zones" in the table due to resonant modes creating waves in the table, causing parts to get stuck. I took the center of mass of the table and guessed where the least resonance would occur so basically the table is split into thirds. I moved off these third mount points to not hit exactly hit the third harmonic. When testing, if the parts moves nicely on one section but stops most likely the table is resonating which produces a dead spot.
Flange bracket - This connects the stepper motor push beam to the bottom of the table. Made from Plastic scrap. base: 1-3/8"W x 2"L x 1/4"T tall with two vertical walls 0.8" x 0.25". spacing between walls + 0.25" to accommodate drive rod from motor. Drive hole located "0.4 from edge 0.27" from top. 4 Screw holes to match spring spacing on one side and mirror to other side. "1.3 x "0.85 approx.
Drive rod: 0.24" thick x 0.6" by 3.6" rectangular stock. 2.5" center to center distance of 0.25" holes.
Drive rod pins (2): 0.262" OD aluminum pins 0.75" shank length. Head size 0.4" slight tight fit. No fastener needed. Minimal mechanical play is needed to keep the machine quiet.
Motor Drive Arm: 1.75" radius. Aluminum.
Gecko stepper motor driver (can be less capable) Part Number: G203V. Electrical Interface: Step, Direction pins and ground pin.
Upper V trays: Aluminum sheet (House Fascia) two grooves to funnel parts into a single line from hand dropped area.
Upper Tray Height Sorting Wall: 3/8"W x 1/2"T x 18"L pine. Dry wall screw on right end to table. Left end is hung in space by short board with jack screw centered to set the height. Upper end of this short board is drywall screwed to the top edge of the upper table. The vertical wall has a 1/2"x1/2"x 16" right angle bent metal piece to allow a straight edge at an incline to the upper table. Right side is flush to the table. Left side is around 0.25" gap.
Lower Tray Floor Width: p. Right side has a 0.4" surface tapering down to 0" on the left. The wall is wood for simplicity. The upper needed added strength hence the right angle bent metal in that location to prevent vertical oscillation. I have not noticed any degradation with usage using raw wood in this lower area.
Table base: 3/4" plywood and 2x4. A 12"x6"x1 aluminum plate offers good weight and doubles as a place to add a jack screw to allow table tilt. The screw is 1/4" x 20 x 6" all thread. The handle is a 1 3/8" muffler clamp bracket.
Catch table: 22"x 6.5" overall. 3/8" plywood 6.25x 22". Designed to allow plastic organizer trays to be inserted and removed at will.
Feet: 1/4-20 with rubber feet. 20" apart.
Arduino Nano
5V Power (Wall wart)
4x20 LCD readout I2C interface
Potentiometers 2- 5k ohm or 10K ohm. The lower resistance keeps A/D readings more accurate. High impedance A/D inputs > 50K ohm should have a input cap. Ground on CCW outer terminal, +5V on CW outer terminal for both pots. Center wiper goes to A2 for Amplitude and A1 for Frequency (table cycles per second).
Operation
First image: typical grouping for common parts. Left are screws, middle are nuts and right are thin washers.
Recommend 4 to 5 groups. 7 or 8 have too many permutations. I find sorting for height first then taking the output pin and sorting for width. A manual sort after this width sort is still required. No machine is do it all. Add: Un happy face.
It is fun watching the presort function. I think my strategy is to just sort then leave in marked bins. Thickness 1-4 Width 1-4. Or 16 Bins. Your mind will go crazy sorting to head type (Phillips/straight), length, thread pitch, plating, stainless steel, coating.... Keep it simple. If all else fails buy a hardware kit from Amazon to keep some sanity. Good luck.
There is also a OCD element to this task as well. Also rearranged as CDO to keep some happy.
Cheers fellow hackers.
Arduino Software
Key aspects to get the Nano to work: Simulated Sine wave timing of step pulses. Standard table of time for 1 hz rate with step amplitudes from 1 to 8 pulses. This lookup table is in uS per pulse edge is scaled (faster) for 2 hz etc dependent of desired cycle frequency. 30 hz is typical but it depends on the spring constant and table mass and I think motion radius. The freq and amplitude is only updated every .5 sec due to LCD update time causing too much delay from smooth motor step operation.
Project Description: Stepper Motor Control System with Variable Amplitude and Frequency
This project implements a sophisticated stepper motor control system driven by an Arduino. The system enables precise oscillatory motion of a stepper motor, with the following key features:
- Variable Amplitude Control: The amplitude of the motor's oscillation, corresponding to the number of steps per cycle, can be dynamically adjusted using an analog input (A2).
- Variable Frequency Control: The frequency of oscillation, defining the speed of movement, is dynamically adjustable using another analog input (A1).
- Sine Wave Motion: The motor oscillates following a sine wave pattern, ensuring smooth transitions and a natural motion profile.
- Quadrant-based Direction Control: The waveform is divided into four quadrants to precisely handle directional changes and maintain balanced motion.
- LCD Display Feedback: A 16x2 I2C LCD displays the current amplitude and frequency values in real-time.
- Motor Safety and Efficiency: The motor is automatically disabled when amplitude is set to 0, conserving energy and extending motor life.
Hardware Components
- Arduino (e.g., Nano, Uno): Microcontroller to execute the program.
- Stepper Motor and Driver: Drives the motor using step and direction signals.
- 16x2 I2C LCD: Displays the current amplitude and frequency.
- Analog Inputs (Potentiometers): Adjust amplitude (A2) and frequency (A1).
- Discrete Components:
- Resistors and capacitors as needed for supporting circuits.
- Power supply for the motor and Arduino.
How the Code Works
1. System Initialization
- Motor Pins: Configured for STEP_PIN, DIR_PIN, and DISABLE_PIN. These control the motor's step pulses, direction, and enable/disable functionality.
- LCD Initialization: The LCD is set up to display amplitude and frequency in a user-friendly format.
- Data Arrays: Precomputed timing (deltaTimeArrays) and direction (directionArrays) data are stored in flash memory using PROGMEM to conserve RAM. These define the step timing and direction for each amplitude.
2. Main Loop
The program operates in a continuous loop to:
- Monitor inputs.
- Update the LCD display when required.
- Drive the motor based on the current settings.
3. Input Monitoring and LCD Updates
- Amplitude Input (A2): Mapped to an integer range of 0 to 8. A value of 0 disables the motor.
- Frequency Input (A1): Mapped to a range of 1.0 Hz to 30.0 Hz. The scaled frequency determines step timing.
- LCD Updates:
- Normally refreshed every 6 seconds to minimize flicker and processing overhead.
- Immediately updated if the frequency input changes by more than 2 A/D counts, ensuring responsiveness.
4. Dynamic Delta Time Scaling
The step delay timings stored in deltaTimeArrays correspond to a frequency of 1 Hz. To adapt to the user-selected frequency:
- A scale factor is calculated as Scale Factor=1.0Frequency\text{Scale Factor} = \frac{1.0}{\text{Frequency}}Scale Factor=Frequency1.0.
- The workingDeltaTimeArray is updated with scaled timings, maintaining the sine wave profile at the desired frequency.
5. Motor Driving Logic
The motor operates in four quadrants of the sine wave:
- Quadrants 1 & 2: Ascending and descending from the zero position to the positive peak.
- Quadrants 3 & 4: Descending and ascending from the negative peak back to zero.
Step Pulsing:
- Steps are driven using the customDelayMicroseconds function, which handles both small and large delays.
- Direction changes are managed using directionArrays, which define whether each step is clockwise (CW) or counterclockwise (CCW).
6. Key Features
- Automatic Amplitude Changes:
- When the amplitude is adjusted, changes take effect only after completing the current cycle (quadrants 1-4).
- Automatic Frequency Scaling:
- Adjusting the frequency dynamically updates the delay timing without interrupting motor motion.
- Motor Enable/Disable:
- The motor is automatically disabled when the amplitude is set to 0 and re-enabled when the amplitude is nonzero.
- Error-Free Timing:
- The customDelayMicroseconds function ensures precision for both short and long delays, avoiding issues with the delayMicroseconds function’s limitations.
Flow of Operation
- Startup:
- The motor starts in a disabled state, and the LCD initializes with "Amp: 0".
- User Interaction:
- The user adjusts amplitude and frequency using potentiometers.
- The LCD displays the updated values.
- Motor Motion:
- The motor oscillates following the sine wave profile, smoothly changing direction at peaks.
- Timing delays ensure precise and consistent step control.
- Automatic Adjustments:
- Changes in amplitude and frequency are seamlessly applied at the end of the current cycle.
Example LCD Outputs
Line 1Line 2
Amp: 4
Freq: 12.5 Hz
Amp: 8
Freq: 1.0 Hz
Advantages
- Precision Control: Sine wave motion ensures smooth oscillation with consistent step timing.
- Dynamic Adjustments: Real-time updates for amplitude and frequency without disrupting operation.
- Memory Efficiency: Use of PROGMEM minimizes RAM usage, allowing for robust operation on low-memory microcontrollers.
- Energy Saving: Automatic motor disable prevents unnecessary power usage when idle.
Applications
- Oscillating mechanisms for vibration testing.
- Automated systems requiring precise back-and-forth motion.
- Educational tools for demonstrating stepper motor control and sine wave motion.