SBC Case Builder

hominoid
Posts: 955
Joined: Tue Feb 28, 2017 3:55 am
languages_spoken: english
ODROIDs: C2, C4, XU4, MC1, N1, N2, N2L, N2+, HC4, M1, H2, H3+
Location: Lake Superior Basin, USA
Has thanked: 144 times
Been thanked: 464 times
Contact:

Re: SBC Case Builder

Post by hominoid »

SBC Case Builder Version 3.0
A new version of SBC Case Builder is now available which contains many improvements and is easier to use due to it’s expanded graphical user interface. Many features which were only available by manually editing the accessory configuration text file have been directly incorporated in the GUI. New case design for this release focuses on the reuse of existing and new standard PC cases
    SBC_Case_Builder-v3.png
    SBC_Case_Builder-v3.png (281.12 KiB) Viewed 684 times
      SBC Case Builder v3 Improvements
      • Accessory Model Automatic Generated Mask Openings
      • Shared Accessory Model Component Library with SBC Model Framework
      • Graphical User Interface Improvements and Functional Expansion
        - Named Standoff Fastener Sizes - M2-Tap, M2, M2+, M2.5-Tap, M2.5, M2.5+, M3-Tap, M3, M3+, M4-Tap, M4, M4+, Custom
        - Global and Individual Standoff Parameter Control
        • - Enable or Disable Individual Standoffs
        • - Side Wall Support and Projected Direction
        • - Height Adjustment
        • - Standoff Deep Recessed Screw Support (For tall cases)
        - Dynamic Heatsink Fan Size and Vent Mask Opening Selection
        - Top and Bottom Case Cover Patterns - Hex5mm, Hex8mm, Linear Vertical, Linear Horizontal, Asteroid
        - Bottom Access Panel Parametric User Interface Control
        - SBC Meta Data Access
      • SBC Adapter and I/O Shield Support for Standard Motherboard Form Factors
        SSI-EEB, SSI-CEB, ATX, Micro-ATX, DTX, Flex-ATX, Mini-DTX, Mini-Itx, Mini-ITX Thin, Mini-STX, Mini-STX Thin
      • Standard Motherboard Form Factor Case Support
        SSI-EEB, SSI-CEB, ATX, Micro-ATX, DTX, Flex-ATX, Mini-DTX, Mini-ITX, Mini-ITX Thin, Mini-STX, Mini-STX Thin, Nano-ITX, NUC, Pico-ITX
      • Accessory Model Library Expansion and Reorganization
      • Expanded Library Documentation
      The SBC Adapter support also allows customization thru the use of Accessories which in turn enables the creation of complex assemblies of multiple PCBs, as shown in the standard Mini-STX case example using an M1S, it’s UPS and the custom generated I/O Shield.
        Odroid-M1S_UPS in a Mini-STX Case.jpg
        Odroid-M1S_UPS in a Mini-STX Case.jpg (243.89 KiB) Viewed 684 times
          This can be used for any of the supported SBC adapters, for any standard case size. Another example might be to use a large case for a cluster instead of the typical rack mounted approach. Many SBC could be mount to a larger ATX or SSI-EEB adapter for use in a server case, which would allow for use of a standard ATX power supply while also having access to multiple drive bays in the case. These are just a couple of possible configurations that are now possible for SBC using these features.
            C4 Mini-ITX adapter in a Micro-ATX case.jpg
            C4 Mini-ITX adapter in a Micro-ATX case.jpg (305.62 KiB) Viewed 684 times
              Likewise, Standard Motherboard cases are now supported and can be used to make cases for all popular motherboard form factors while incorporating the OEM provided I/O Shield. Since low profile SBC have become increasingly popular, the Mini-ITX Thin form factor is also supported. With a I/O Shield height of 25mm it provides a significantly reduced height case to accommodate these deployments. This also allows the use of new or repurposed standard OEM manufactured cases which further allows for an even great selection of potential SBC cases.
                OEM_MB and Mini-STX-Thin Case.jpg
                OEM_MB and Mini-STX-Thin Case.jpg (91 KiB) Viewed 684 times
                  To further this concept I have deviated from case standards for one new form factor and made available a Mini-STX Thin form factor. The standard dimensions of the Mini-STX form factor is 140mm x 147mm with a 40mm height for the I/O shield. By reducing the I/O Shield to the same height of 25mm as the Mini-ITX Thin standard form factor, a very small and low profile Mini-STX case can be created.


                  Device Support includes:

                  Code: Select all

                                    SBC: 70
                         Carrier Boards:  3
                        Compute Modules:  8
                      Micro Controllers:  4
                  Standard Motherboards: 14
                          Total Devices: 99
                  
                  Accessory Reference Manual
                  Git Repository

                  SBC Case Builder v3.0 Documentation and source code updated in OP.
                  These users thanked the author hominoid for the post (total 4):
                  odroid (Mon Apr 29, 2024 11:20 am) • mctom (Mon Apr 29, 2024 12:52 pm) • domih (Tue Apr 30, 2024 8:59 pm) • BetaMadMax (Wed May 01, 2024 5:26 am)

                  hominoid
                  Posts: 955
                  Joined: Tue Feb 28, 2017 3:55 am
                  languages_spoken: english
                  ODROIDs: C2, C4, XU4, MC1, N1, N2, N2L, N2+, HC4, M1, H2, H3+
                  Location: Lake Superior Basin, USA
                  Has thanked: 144 times
                  Been thanked: 464 times
                  Contact:

                  Re: SBC Case Builder

                  Post by hominoid »

                  The H4 series has been added to SBC Case Builder with caveats as noted in the SBC Model Framework post. While working I found that the mounting hole size for the adapters was wrong so it was corrected to the standard of 4mm.

                  I also wanted to take a moment and mention how to use the standard form factor cases. Since the thickness of a user provided motherboard PCB cannot be predicted, a 2mm PCB is assumed and an adjusted can be made if it is different, under the tab Standard Motherboard Cases Settings. This is also were the I/O shield opening can be enabled as well. A couple of saved example cases are included as reference. If the Standard Form Factor Case being created is going to be used with an SBC adapter, the adapters are also 2mm thick so they can be used directly without having to change the motherboard PCB thickness for the standard form factor case.
                  SBCCB updated to version 3.0.1 in OP.
                    pcb_thickness_adjustment.png
                    pcb_thickness_adjustment.png (193.01 KiB) Viewed 644 times
                      These users thanked the author hominoid for the post (total 3):
                      odroid (Tue Apr 30, 2024 10:41 am) • domih (Tue Apr 30, 2024 9:01 pm) • BetaMadMax (Wed May 01, 2024 5:26 am)

                      hominoid
                      Posts: 955
                      Joined: Tue Feb 28, 2017 3:55 am
                      languages_spoken: english
                      ODROIDs: C2, C4, XU4, MC1, N1, N2, N2L, N2+, HC4, M1, H2, H3+
                      Location: Lake Superior Basin, USA
                      Has thanked: 144 times
                      Been thanked: 464 times
                      Contact:

                      Re: SBC Case Builder

                      Post by hominoid »

                      Since completing version 3 of SBCCB I’m starting to use it in some of my own projects and wanted to highlight some of the features that I haven’t had a chance to talk much about. The earlier versions of SBCCB had short comings that limited the practical deployment of complex case assemblies. It could make standard SBC cases well, but fell short for the use of micro-controllers and add on PCBs.
                        env_sensor_case.jpg
                        env_sensor_case.jpg (76.99 KiB) Viewed 349 times
                          Changing this was one of the goals of version 3 so the standoff code was reworked to accommodate named 2mm, 2.5mm, and 4mm standard predefined sizes in addition to 3mm. The difference between 2mm_tap, 2mm, and 2mm+ has to do with the hole size for the standoff. 2mm_tap uses the standard tap hole size, 2mm uses the named hole size and 2mm+ adds approximately 15% to provide extra clearance. If a different standoff or hole size is needed other then one of the predefined ones, then the custom selection can be used where all variables are user defined.

                          All SBC standoffs can now be turned on and off, on an individual basis, as well as the Extended Case standoffs. This provides the ability to mix and match SBC standoffs and Extended Case standoffs to suit a wider range of case deployments. For my air quality monitoring project case, two of the top SBC standoffs are used to secure the top and two are turned off, while the related bottom standoffs are used to hold the SBC in place when the top is off. Two Top Extended Case Standoffs are use to secure the top on the other side of the case.

                          Another import addition to version 3 are deep recessed standoffs. This added a practical way to fasten tall cases by using shorter fasteners. In the example, the case top is 33mm tall which could pose a problem for fastener selection in this configuration. Standoff support height is the geometry that allows countersunk and other fasteners to be flush or recessed below the case surface while still being able to use a thin floor or ceiling thickness. The standoff recess support was changed to create a recess for the full length of the Standoff Support Height, less 2mm for the recessed floor. With the added ability to select the Side Wall Support direction, these features strengthen case standoffs and make them considerably less prone to breakage. This becomes more important as smaller standoffs are used. As an additional note, the length of the Side Wall Support is now tied to the Standoff Support Diameter. If the Side Wall Support is too short to reach the wall, the Standoff Support Diameter can be increased which in turn increases the size of the Side Wall Support.

                          Since most OEM are now providing 3D models of their products, a new accessory Type in the Model class was also added to support using 3D STL models.

                          Code: Select all

                             CLASSES: model
                          DESCRIPTION: adds stl models.
                                 MASK: no
                                USAGE: "model", "stl_model", loc_x, loc_y, loc_z, face, rotation[], parametric[], size[], data[], mask[]
                          
                                        class = "model"
                                         type = "stl_model"
                                        loc_x = x location placement
                                        loc_y = y location placement
                                        loc_z = z location placement
                                         face = "top", "bottom", "right", "left", "front", "rear"
                                   rotation[] = object rotation
                                 parametric[] = "case", "sbc", "sbc-case_z"
                                       size[] = not used
                                      data[0] = scale
                                      data[1] = "file name"
                                      mask[0] = false, not used
                                      mask[1] = length
                                      mask[2] = set back
                                      mask[3] = mstyle "default"
                          
                          This allows one to bring in OEM models for easy and quick placement while allowing the accurate visual placement of subtractive geometry for any model openings that need to be created. This significantly reduced the time needed to create complex cases. The FOSS project FreeCAD can convert STEP and other model files to STL for use in SBCCB.

                          The use of the accessory Type pcb_holder, which mounts PCB vertically, allows for multi-PCB cases which can be created easily for a wide range of uses.

                          Code: Select all

                              CLASSES: add1, add2
                          DESCRIPTION: creates pcb holder for vertical mounting.
                                 MASK: no
                                USAGE: "class", "pcb_holder", loc_x, loc_y, loc_z, face, rotation[], parametric[], size[], data[], mask[]
                          
                                        class = "add1", "add2"
                                         type = "pcb_holder"
                                        loc_x = x location placement
                                        loc_y = y location placement
                                        loc_z = z location placement
                                         face = "top", "bottom", "right", "left", "front", "rear"
                                   rotation[] = object rotation
                                 parametric[] = "case", "sbc", "sbc-case_z"
                                      size[0] = pcb x size in mm
                                      size[1] = pcb y size in mm
                                      size[2] = pcb z size in mm
                                      data[0] = holder wall thickness
                                      mask[0] = false
                                      mask[1] = length
                                      mask[2] = set back
                                      mask[3] = mstyle "default"
                          By adding the entries in the file sbc_case_builder_accessories.cfg and adding the accessory group name to the variable accessory_name (line 200) in sbc_case_builder.scad, the accessory group is available in the accessory group pick box in the GUI after restarting SBCCB.

                          Code: Select all

                               // sensor group
                               ["sensors",
                               // divider walls
                               "add1","rectangle",-1,57,0,"bottom",[0,0,0],["case",false,false,false],[71,2,10.25],[[.1,.1,.1,.1]],[false,10,2,"default"],
                               "add2","rectangle",-1,57,10.2,"top",[0,0,0],["case",false,false,false],[71,2,33],[[.1,.1,.1,.1]],[false,10,2,"default"],
                               "suball","round",35,61,9,"bottom",[90,0,0],["case",false,false,false],[4,0,6],[[.1,.1,.1,.1]],[false,10,2,"default"],
                               // wall  opening
                               "suball","rectangle",69,70,4.5,"bottom",[0,0,0],["case",false,false,false],[6,45,34],[[.1,.1,.1,.1]],[false,10,2,"default"],
                               // i2c radial hub holder
                               "model","stl_model",31,60.75,4,"bottom",[90,0,180],["sbc",false,false,false],[0,0,0],[1,"./adafruit/5625 Stemma 5 Port Hub.stl"],[false,10,2,"default"],
                               "add2","pcb_holder",5,60.75,1,"bottom",[0,0,0],["case",false,false,false],[26.5,35,1.65],[2],[false,10,2,"default"],
                               // BMP388 and holder
                               "model","stl_model",38,121,22,"bottom",[90,180,90],["sbc",false,false,false],[0,0,0],[1,"./adafruit/3966 BMP388 QT.stl",0,0],[false,10,2,"default"],
                               "add2","pcb_holder",39.5,95,1,"bottom",[0,0,90],["case",false,false,false],[26.5,35,1.65],[2],[false,10,2,"default"],
                               // SCD30 and holder
                               "model","stl_model",55,69,27,"bottom",[270,0,90],["sbc",false,false,false],[0,0,0],[1,"./adafruit/4867 Adafruit SCD30.stl"],[false,10,2,"default"],
                               "add2","pcb_holder",55,68,1,"bottom",[0,0,90],["case",false,false,false],[53,35,1.65],[2],[false,10,2,"default"],
                               // 2inch IPS TFT Display and holder
                               "model","stl_model",67,61,4,"bottom",[90,270,270],["sbc",false,false,false],[0,0,0],[1,"./adafruit/4311 2in TFT IPS Display.stl"],[false,10,2,"default"],
                               "add2","pcb_holder",65.4,121,1,"bottom",[0,0,270],["case",false,false,false],[61,35,1.65],[2],[false,10,2,"default"],
                               // PMSA003I Partical Air Quality 
                               "model","stl_model",0,70,4,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[1,"./adafruit/4632 PMSA003I.stl"],[false,10,2,"default"],
                               "add2","standoff",2.75,72.5,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[["m2",5.75,4,3.6,7,3,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
                               "add2","standoff",2.75,117.5,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[["m2",5.75,4,3.6,7,3,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
                               "add2","standoff",32.75,72.5,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[["m2",5.75,4,3.6,7,3,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
                               "add2","standoff",32.75,117.5,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[["m2",5.75,4,3.6,8,3,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
                               "sub","vent",-3,100,11,"top",[0,0,90],["case",false,false,false],[2,7,4],[1,5,"vertical",1],[false,10,2,"default"],
                               // SGP30 VOC and eCO2 holder
                               "add2","pcb_holder",39.5,61,1,"bottom",[0,0,90],["case",false,false,false],[26.5,35,1.65],[2],[false,10,2,"default"]],
                          
                          This example uses an Odroid-N2L and the following sensors and supporting devices, in a relatively small case with efficient case fill, while still having room for 2-3 additional sensors.

                          - SGP30 Multi-Pixel Gas Sensor, VOC and eCO2
                          - SCD-30 True CO2, 400 ppm – 10,000 ppm with Temperature and Humidity Sensor
                          - PMSA003I PM2.5 Air Particle Sensor
                          - BMP388 Precision Barometric Pressure and Altimeter
                          - Passive Radial 5 port I2C Hub,
                          - IPS TFT 2” Color Display

                          If all the sensor were orientated horizontally a much larger case would be needed. This vertical modular approach also provides the possibility for upgrading sensors without having to redesign or re-manufacture the case. These features taken together open up endless case possibilities for multi-PCB projects.
                            Odroid-N2L_Environmental_Sensors.jpg
                            Odroid-N2L_Environmental_Sensors.jpg (217.63 KiB) Viewed 349 times
                              As a side note, this Odroid-N2L will do double duty, both as an air quality monitor and as a node in a distcc cluster, which makes the mid-case wall that isolates the SBC from the sensor group important. Moving forward I'll be working on sensor and display software development to finish this project.
                              These users thanked the author hominoid for the post (total 3):
                              odroid (Mon May 06, 2024 1:26 pm) • mctom (Mon May 06, 2024 3:32 pm) • BetaMadMax (Wed May 22, 2024 2:09 am)

                              User avatar
                              mctom
                              Posts: 4135
                              Joined: Wed Nov 11, 2020 4:44 am
                              languages_spoken: english, polski
                              ODROIDs: XU4, M1, H3+, SP3, N2L, M1S, N2
                              Location: Gdańsk, Poland
                              Has thanked: 609 times
                              Been thanked: 828 times
                              Contact:

                              Re: SBC Case Builder

                              Post by mctom »

                              That's a very exciting new feature, I love it! And your air quality monitoring project looks amazing, like a high quality product from the 80s, and I mean it as a compliment.
                              Punk ain't no religious cult, punk means thinking for yourself!
                              OpenUPS
                              PiStackMon

                              hominoid
                              Posts: 955
                              Joined: Tue Feb 28, 2017 3:55 am
                              languages_spoken: english
                              ODROIDs: C2, C4, XU4, MC1, N1, N2, N2L, N2+, HC4, M1, H2, H3+
                              Location: Lake Superior Basin, USA
                              Has thanked: 144 times
                              Been thanked: 464 times
                              Contact:

                              Re: SBC Case Builder

                              Post by hominoid »

                              Since adding more adjustments to SBC Case Builder v3 there is a greater possibility of user induced non-manifold errors and since I have already fielded some questions about this, I wanted to address the subject. Non-manifold errors are not an issue if one understands the problem, what can cause them and how to avoid them.

                              A little background will bring everyone up to speed on what might seem to be esoteric for a typical SBCCB user. Simply put, a non-manifold error is when a volume is not enclosed or properly merged with a second volume. These errors can be caused in a number of ways. The most common one is based on a misconception that if two volumes touch that they are manifold, consider this example:

                              Code: Select all

                              color("blue") cube([5,5,5]);
                              color("green") translate([5,0,0]) cube([5,5,5]);
                                blue-green_cubes.png
                                blue-green_cubes.png (16.45 KiB) Viewed 227 times
                                  This may or may not be manifold depending on the application and it’s algorithms, and even if an Union is performed it does not guarantee that the resulting volume is manifold.

                                  Code: Select all

                                  union() {
                                      color("blue") cube([5,5,5]);
                                      color("green") translate([5,0,0]) cube([5,5,5]);
                                  }
                                  
                                  This becomes visually obvious when the same concept is demonstrated in a difference of volumes.

                                  Code: Select all

                                  adj = .01;
                                  difference() {
                                      union() {
                                          color("blue") cube([5,5,5]);
                                          color("green") translate([5,0,0]) cube([5,5,5]);
                                      }
                                  translate([2,0,0]) cube([2,5,5]);
                                  }
                                  
                                    cube_diff.gif
                                    cube_diff.gif (103.37 KiB) Viewed 227 times
                                      The proper way to join volumes is by pulling the green cube back into the blue cube to guarantee the two cubes are joined.

                                      Code: Select all

                                      adj = .01;
                                      color("blue") cube([5,5,5]);
                                      color("green") translate([5-adj,0,0]) cube([5,5,5]);
                                      
                                      If this is extended to the difference example we can clearly see the difference.

                                      Code: Select all

                                      adj = .01;
                                      difference() {
                                          union() {
                                              color("blue") cube([5,5,5]);
                                              color("green") translate([5-adj,0,0]) cube([5,5,5]);
                                          }
                                      translate([2,-adj,-adj]) cube([2,5+2*adj,5+2*adj]);
                                      }
                                        cube_diff_correct.gif
                                        cube_diff_correct.gif (102.48 KiB) Viewed 227 times
                                          This also extends to other 3D and 2D applications whether it is Blender, LibreCAD, Inkscape or any other application that used 2D or 3D geometry. For 2D applications, line ends must be properly joined using the applications modifiers, like snap to end. If not, unexpected results will happen because lines will not actually be connected or enclose an area, even though it may look like they do.

                                          So coming back to SBC Case Builder, this application was designed to be simple to use so the end user does not have to know much about OpenSCAD or 3D modeling, but as more flexibility and control is incorporated in the GUI, the responsibility of design choices are transferred to the user. With the ability to change standoff support diameter and sidewall support length, the user must now make sure that the geometry is joined or positive or false-positive non-manifold errors can occur.

                                          In the example below the case gap was increased so the standoff sidewall support no longer reaches the side wall. By increasing the standoff support diameter, and hence the sidewall support, the model renders correctly until it reaches 13mm, which then fails with a non-manifold error. By increasing it further to 14mm the model once again renders without error.
                                            non-manifold_sidewall_adjustment.gif
                                            non-manifold_sidewall_adjustment.gif (1.73 MiB) Viewed 227 times
                                              If this happens, the standoff support is the most likely culprit and you can start troubleshooting by turning off the top and bottom standoffs and render the model to see if the errors go away. This will help determine where the problem is so the model can be adjusted accordingly. If your still having problems open an issue at the SBCCB git repository, after all, bugs are the most numerous species on the planet.
                                              These users thanked the author hominoid for the post (total 3):
                                              mctom (Sun May 12, 2024 2:07 am) • odroid (Mon May 13, 2024 9:16 am) • BetaMadMax (Wed May 22, 2024 2:09 am)

                                              User avatar
                                              rooted
                                              Posts: 10627
                                              Joined: Fri Dec 19, 2014 9:12 am
                                              languages_spoken: english
                                              Location: Gulf of Mexico, US
                                              Has thanked: 822 times
                                              Been thanked: 736 times
                                              Contact:

                                              Re: SBC Case Builder

                                              Post by rooted »

                                              Manifold is also called water tight in simple terms, and of course, non-manifold means not watertight.

                                              Post Reply

                                              Return to “General”

                                              Who is online

                                              Users browsing this forum: No registered users and 3 guests