`smd-channelsProduce` system — A Qt menu, XML data storage, and SolidPython 3D modeling program!

Overview of purpose – This set of programs models parts that when fastened to a flat surface form channels to guide SMD-parts-tapes, so that a parts picker – a person putting SMD parts onto a circuit board for reflow soldering – can pick parts out of the tape’s wells without it moving and spilling parts. With these guides, one can advance the tape smoothly, pull away the tape cover, and pick parts, all without spilling.

Sections in this page – 1 – Background; 2 – Using the Program, Overview; 3 – Program structure; 4 – Using the Program, with details including: 4A, Basics: How to navigate and edit cells of tables; 4B, Command Buttons and Radio Buttons; 4C, How Table 3 works; 4D, Parameters in Table 2.

1 – Background

SMD (surface mount device) electronic parts often are supplied lined up in long strips (tapes), with one part in each compartment, pocket, or well of the tape. Automatic parts picking machines handle reels of tape. For manual picking, reels or strips of cut tape are used. Parts that get spilled end up lost or incorrectly oriented, slowing down picking operations. Hence, tapes need to be organized and secured to avoid spilling parts.

The guides these programs model have channels with user-specified heights and widths. Common widths of tape include 8, 12, and 16 mm. Generally, tape thickness depends on part thickness. Thus, there’s a need to create a variety of channel sizes to support varieties of parts. This program allows creation of guides matching the bill of materials for whatever circuit board is being assembled.

2 – Using the Program, Overview

To start the program – After installation, start the program by ./smd-channelsProduce.py . With no filename given, the program opens smd-channels3.xml by default, the file used for many of the images on this page.

If you want to load a datafile other than the default, start the program by ./smd-channelsProduce.py datafilename .

Note, obtain program and data files ChannelCallbacks.py, ChannelVars.py, loadTablesForXML.py, make-xml-accessors.py, smd-channelsProduce.py, and smd-channels3.xml from ghjwp7’s smd-channels directory on github . You can install the files in a working directory or can put the .py files in directories on search paths.

What happens next – The program reads the input file. From the file data it creates a window with four parts, separated by movable split lines. Table 1, the top pane, contains tape names and tape size data, from part spec sheets or from measurements. Table 2, the next pane, contains guide-channel specifications, such as overall lengths of guides, post diameters and spacing, bridge sizes, etc. Table 3, the third pane, tells what guides to make, by listing tape names. Each pair of names (eg, names 1 & 2; names 2 & 3; names 3 & 4; etc) specifies the two sides of one guide. Pane 4 of the window contains guidelines for editing entries in the previous sections. After you review the directions, if you wish you can drag its slider line to the bottom of the window, to make more room for the other panes.

Designing guides – To model a set of guides, list the tape names you want into the left column of Table 3. (Use the string “null” as the first and last names of the list; “null” represents a tape with no width or height, which lets the first and last parts have straight outer sides.) You may wish to change part data in Table 1, or guides data in Table 2, to reflect your own preferences. (See Details.) You can also click different radio buttons in Table 2 to try different guide settings, and can change guide settings as you like. (See Details.) Click the Produce button to output a file of .scad code (in file channel-asm4.scad by default) whenever satisfied with settings.

Producing and viewing guides output –After you click Produce the first time (thus writing a .scad file), you can start openscad and load and display the file. Enable “Automatic Reload and Preview” on OpenSCAD’s ‘Design’ tab, if not already on. Now each time you produce the .scad file again, openscad will update automatically. You can also have Produce occur automatically: click AutoProd to toggle auto-production on. When it’s on, Produce runs whenever any table cell changes in value.

Guides for 5 channels with 3 posts per unit and 2 bridges (in cyan) across assembly. The x length is 100 mm and each unit width is 15 mm. Note cutbacks (red and purple) for access. Note ramped filler bars (green) where tapes are thin. The wider spaces are for tall, wide parts. (Also see orthogonal image in part 4C.)

If you enter data in the tables and arrive at a design you want to save, click Save. It will write out a file of XML data with current table values. (A Load function has not been coded yet; only the initial-parameters file gets loaded, at the moment.)

3 – Program structure

Parts of this code are re-usable for applications other than producing SMD tape guides. Comments in smd-channels3.xml explain table and data structures. ChannelCallbacks.py and ChannelVars.py act as intermediaries between app-independent loadTablesForXML.py and app-specific smd-channelsProduce.py. ChannelVars.py is created by running make-xml-accessors.py to read XML, extract table structure, and create data accessors. That is, ChannelVars.py is generated codeto change it, change the .xml file it’s based on. See file plastics/smd-channels/README for further discussion of files.

4 – Using the Program, Details

This section covers these topics: 4A, Basics: How to navigate and edit cells of tables; 4B, Command Buttons and Radio Buttons; 4C, How Table 3 works; 4D, Parameters in Table 2.

4A – Basics: How to navigate and edit cells of tables

To replace a data field, click it and type new text, or go to the field with arrow-keys, and type new text. To edit a field, double click it, then click at edit point. To toggle a radio button (where only one circle is ever marked) click it. After that, up and down arrows can move the selection dot. Note, when you change a cell’s contents, the part volumes shown in column 2 of Table 3 are recomputed, and if AutoProd is on, an OpenSCAD file is written out. (See part 4C)

Hover cursor on a Column title to see its tooltip text. To see all of the Specifications field headings, scroll the table horizontally with its scroll bar or by pressing Home, End, or arrow keys; or drag the window edge to expand its horizontal size; or click the full-page box (a square outline) in the window’s title line. To see all or more of the Tape Data rows, scroll vertically with scroll wheel or scroll bar; or expand the window’s vertical size; or drag separator lines to make one pane larger, at the cost of an adjacent pane. Click to Select a cell, column, or row. Click pink cornerbutton to Select all cells. Click and drag to Select a range of cells. To close the directions pane, drag the slider line above it to the bottom of window. To reopen the directions, point at the slider line, obtain a double arrowhead cursor, then drag the line back up.

4B – Command Buttons and Radio Buttons

As shown in the image, and as described next, command buttons include Quit, Save, Produce, and AutoProd. (Radio buttons are described after that.)

Quit closes the tables-window and exits the program.

Save opens a standard file-dialog window. This lets you specify a directory and filename to write current XML data into. The written file can be reloaded later by listing its name as a command line parameter when starting the program. [future: a Load button]

Produce runs code to generate and write out an OpenSCAD model based on current values of parameters. In current software, the output file is called channel-asm4.scad. If a command like openscad channel-asm4.scad is running, OpenSCAD will display the current 3D model.

The AutoProd button toggles autoproduce – on to off or vice versa. When its on, changing any table cell triggers a Produce cycle.

Radio buttons: As shown below, the Use column of Table 2 contains “radio buttons” (where only one button can be on). These select which set of specifications gets used when Produce is clicked. If autoproduce is on, moving the dot triggers Produce.

Portions of tables 2 and 3. The circles in the ‘Use’ column are radio buttons.

4C – How Table 3 works

This table specifies the kinds of parts to make guides for. Each name in Table 3’s Tape Type column should match one name or nickname in a row of Table 1 but is otherwise arbitrary. The Unit volume column shows an estimate of part volume, in cc or ml units. A volume number in row k corresponds to a unit having its left side named in row k, and its right side named in a previous row. [‘Left’ and ‘right’ refer to orientation in picture below.] If a volume cell is blank, the name next to it was not in Table 1. For example, row 8’s volume in the following example is blank because row 8’s name is blank, and in this example none of the Tape Types in Table 1 have a blank name or nickname.

(replace w/ corrected image)

In the image above, test and null match names (and also nicknames, which if not specified are automatically filled in with names) while C and L match nicknames only. As shown, Table 3 says to make six guide units, which constrain five channels, as seen in the following image. The assembly’s channels are sized for the parts listed in lines 2 through 6: test, L, test, C, test.

Above: Orthogonal end view of assembly (with bridges, cyan). Below: Oblique view (without bridges).

Here, the right, left, and middle channels – with prominent ramped spacing bars – are for test parts, with channel height specified as 2 mm. When this assembly is turned over and fastened to a flat plate, each of those channels will be 2 mm high and 10 mm wide. The deepest channel – second from left, without fill bars – is 6 mm high and 16 mm wide, as specified in Table 1’s line 11. The next deepest channel – second from right, with shallow fill bars – is 3.5 mm high and 12 mm wide, as specified in Table 1’s line 10.

The outer sides of the far left and right units have no ramps or overhangs. This is because null parts were specified in rows 1 and 7 of Table 3, and as shown in row 9 of Table 1, null parts have 0 overhang. If you are going to install two separate assemblies adjacently and want a channel between them, list the channel’s tape type name as the last item of one assembly and the first item of the other one, rather than ending and starting with null.

As before, except with L changed to C, making whole assembly thinner. Via Table 2’s row 4 ‘long’ spec, with 0 bridges

The image above shows the result with C instead of L in line 3 of Table 3. Unit heights are decreased by 2.5 mm because C height is 3.5 mm, vs L height of 6 mm. Because the assembly is made to a height that accommodates the thickest specified part, one can reduce parts volume and printing time by appropriate parts grouping. If you are making several assemblies, having thin parts in one assembly, thicker in another, etc., will use less plastic than if thick parts appear in every assembly.

4D – Parameters in Table 2

Portions of tables 1 and 2, showing Table 2 column headings.

Representative column headings for Table 2 are shown above and described below. Headings may differ slightly depending on version. Much of the following appears in tool tips that appear if you hover the cursor on a column label.

Column: ‘Spec-Label’ – A name for the style of channel this specification should make. To use this specification, click its corresponding Use box or row.

Column: ‘Use’ – Click a Use cell to choose its row as specifications for making units. This is a radio button – only one row is selected at once.

Column: ‘Cap Width’ – Overall width of unit; eg 10 to 20 mm; usually should exceed PostOD + 2*max(overhangs) to avoid posts interfering with channels.

Column: ‘Cap Len’ – Overall length of unit; eg 50 to 200 mm

Column: ‘Cap End-Len’ – Lengths of full-width sections at ends of unit; ie, with full overhangs, no cutouts or setbacks. Middle section of unit, between full-width parts, gets setback. That is, each guide unit has three sections: an end, a middle, another end. ‘Cap End-Len’ tells the lengths of end-sections. The middle section takes up the rest of the length, if any is left.

Column: ‘End-padding’ – Extra longitudinal length of cap projection, beyond the half-circles at ends of legs; eg 5 to 10 mm; for better adhesion during 3D printing.

Column: ‘Slack’ – Extra channel width (besides specified 8, 12, or 16 mm tape width) so that tape doesn’t bind in channel. Eg 0.1 to 0.2 mm

Column: ‘Posts’ – Number of posts to produce, eg 2 – 3 – 4

Column: ‘Post Offset’ – Offset from end-of-unit to centerline of first post

Column: ‘Post ID’ – Inside diameter (hole diameter) of post

Column: ‘Post OD’ – Outside diameter of post; wall-thickness of post is (OD-ID)/2

Column: ‘Leg-Thick’ – Thickness of leg cross-section; eg 1-2 mm

Column: ‘Cap-Thick’ – Thickness of cap cross-section; eg 1-2 mm

Column: ‘Bridges’ – This is the number of bridges to produce. Bridges are narrow strips across the set of parts, to hold them at correct channel distances while being fastened down. Bridges are evenly spaced.

Column: ‘Brg Offset’ – Bridge Offset: distance from end-of-unit tocenterline of first Bridge or last Bridge

Column: ‘Brg Width’ – Bridge Width: width of bridge; eg 3-6 mm

Column: ‘Output’ – Letters E, L, P, R (in uppercase) control production of cap Endcurves, Legs, Posts, Rampfills: If E is present in this field, cap portions of the assembly will have a half-round at each end; if it’s missing, squared ends. If L is present, the ‘racetrack’ shape of each unit’s legs will produce, otherwise not, making units legless. If P is present, posts will produce, otherwise not, making units postless. If R is present, rampfills will produce, otherwise not. ‘Rampfill’ refers to rectangular prisms with ramped ends, which are constructed next to legs when the tallest part height is larger than the current channel’s part height. Summary: In this field, letters E, L, P, R (in uppercase) control whether Endcurves, Legs, Posts, and Rampfills appear in produced parts. Note: ELPR is typical for this field. P (by itself) can be used to make plates with just posts, for use as bottom plates for guide assemblies. For example:

Left: Two ‘test’ channels, CapLen=90, no bridges, post ID=3.6 mm, output=ELPR. Right: A base plate, made as two ‘test’ channels, CapLen=90, one bridge of width 90, offset 45, post OD=3.5 mm, output=P. Flipping the left part over, it will snap onto the base plate to make a complete guide unit. Note, in general the ‘flip’ needs to be end-over-end, not side-over-side: post spacing is symmetric, unit spacing need not be.
Create your website with WordPress.com
Get started
%d bloggers like this: