SBC Model Framework

User avatar
odroid
Site Admin
Posts: 41864
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3433 times
Been thanked: 1920 times
Contact:

Re: SBC Model Framework

Post by odroid »

Congratulations on growing into a huge and awesome project over the past several years.
Thanks for your continuous update and support.

hominoid
Posts: 887
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: 128 times
Been thanked: 410 times
Contact:

Re: SBC Model Framework

Post by hominoid »

Thanks odroid, my hope is that the community finds value in my work. It is true what they say, time flies when your having fun!

hominoid
Posts: 887
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: 128 times
Been thanked: 410 times
Contact:

Re: SBC Model Framework

Post by hominoid »

Making good progress on v2 update and thought I’d share some early progress. The PCB work has been completed for the most part. Multiple PCB can be created as a single assembly(SBC) using different shapes(rectangle, polygon, round, dxf extrusion), each with it’s own unlimited holes, SOC, and components; placed anywhere in space. In addition, the same shapes can be used to add or subtract geometry to or from any of the PCB in the SBC.
    test_sbc.png
    test_sbc.png (21.74 KiB) Viewed 2669 times
      There are four PCB of different color in this test SBC example. Each uses a different shape with the Black PCB also deploying the PCB additive and subtraction commands, a practical design as you can see.

      Now you might be thinking hey, SBC stand’s for SINGLE board computer, but there are SBC like the AtomicPi that use multiple PCB. This approach also supports another use that this project is dedicated to, micro-controllers. There are many standards that stack ‘feather’,‘pico’,’tiny’ style boards on top of one another. Likewise, I was contacted by someone who was interested in using this project for a modular IOT system. These are all target uses that make sense for this project and will make for an even wider utilization of SBC Case Builder once implemented. And speaking of things being completed, the following items marked with a hyphen are complete.

      Version 2 Update Status
      Completed Features

      Code: Select all

      -SBC Multi-PCB
      -Unlimited PCB holes
         hole position identity
      -Unlimited SOC per PCB
      -Complex PCB Shape
        -rectangle
        -polygon
        -round
        -dxf
       -pcbadd additive PCB geometry
        -rectangle
        -polygon
        -round
        -dxf
       -pcbsub subtraction PCB geometry
        -rectangle
        -polygon
        -round
        -dxf
      -Color PCB
      Uncompleted

      Code: Select all

      Component Library
         Component Variable Height Adjustment
         Auto SBC Mask Generation
         Component Variable Mask Depth
         Standardization, Additions and Cleanup
      Compute Modules and Carrier Boards
      Even though I made good progress with the first number of items, the uncompleted areas are all related and are going to take some time to get through because there is a lot of work to be done. I need to spend time standardizing the library and creating a bunch of new parametric and dynamic components. One of the many problems I was not been able to solve with version 1 is the variation in component height, the IR sensor is a great example. They vary from SBC to SBC even within any given manufacturer’s product line.

      When I started planning for autonomous I/O openings I wanted to put the masks in the component library but could not. I had to create a temporary method in SBC Case Builder until SBC Model Framework could be updated. The goal now is to have every component in the library also contain it’s own mask for it’s opening profile. Moving the masks to SBC Model Framework will also solve a host of issues like synchronizing and registering the component model with the component mask and simplify the creation of new components. It will significantly simplify and reduce the amount of code in SBC Case Builder because it will no longer have to mange or create SBC component mask sets.

      There is another advantage as well for anyone using this SBC library. It will not only contain SBC models but also the mask sets for every SBC in the library. This will allow anyone to easily create registered openings in their own designs by simply performing a ‘difference’ between their geometry and the called SBC mask set...Wala, perfectly registered openings for your design.

      It is my goal not only to have every component in the SBC Model Framework Library be self-informed, but also every accessory model in SBC Case Builder, for a simple and cohesive autonomous design. This will be accomplish by embedding critical data and resources within each application layer of the model...more on this later.
      These users thanked the author hominoid for the post (total 3):
      odroid (Tue Oct 25, 2022 11:12 am) • mctom (Tue Oct 25, 2022 11:46 pm) • domih (Wed Oct 26, 2022 7:57 am)

      hominoid
      Posts: 887
      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: 128 times
      Been thanked: 410 times
      Contact:

      Re: SBC Model Framework

      Post by hominoid »

      Since the Odroid-H3 has a different heatsink, which is slightly larger in the x and y axis then the H2’s, a separate H3 model has been added in release 1.0.9.
        odroid-h3.png
        odroid-h3.png (15.32 KiB) Viewed 2604 times
          The library and stl’s have been updated to version 1.0.9 in OP.
          These users thanked the author hominoid for the post (total 2):
          odroid (Wed Nov 02, 2022 9:33 am) • mctom (Wed Nov 02, 2022 5:02 pm)

          hominoid
          Posts: 887
          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: 128 times
          Been thanked: 410 times
          Contact:

          Re: SBC Model Framework

          Post by hominoid »

          Making more progress, the mask migration to the component level has been completed for existing use class components. Each component now has a 3D model and one or more mask openings that can be called. The choice of different masks will be helpful in many situations e.g. access to micro sdcards were one could have a slot or a block opening in the case for easier access.
            c4_masks.png
            c4_masks.png (62.81 KiB) Viewed 2534 times
              The length of the mask and set back from the face of the component is variable and can be changed for each instance of a given component for a SBC. Variable length masks give the maximum case opening flexibility and with an adjustable setback, accommodates larger component overhangs that might project into or thru the case sidewall. It was previously fixed at 2mm which worked well until I recently came across a SBC that had twin vertical HDMI ports with a 3.75mm cantilever. This approach removes any future potential problem and gives maximum control to handle outliers.

              More component work is still needed with several new component types yet to be created. Much of the original code base has changed and a significant amount of time was been spent improving the library organization and it’s code. The library was getting too large to effectively manage as a single file so I have broken it into separate files by component use class. It’s much easier to work with and will be easier to add future components, as well as maintain.
                sbc_test.png
                sbc_test.png (59.9 KiB) Viewed 2534 times
                  I’m at a point were the conversion of the current SBC in the library to version 2 is simultaneously underway with approximately 45 more to go. I have a few new SBC I will add too, one that wasn’t possible in the past, as well as some microcontrollers and compute modules. The hardest part so far has been trying to find the right PCB color for each Odroid model...I’m still working on it. :)
                  These users thanked the author hominoid for the post (total 2):
                  mctom (Tue Nov 22, 2022 5:31 pm) • odroid (Tue Nov 22, 2022 6:40 pm)

                  User avatar
                  mad_ady
                  Posts: 11755
                  Joined: Wed Jul 15, 2015 5:00 pm
                  languages_spoken: english
                  ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
                  Location: Bucharest, Romania
                  Has thanked: 656 times
                  Been thanked: 1197 times
                  Contact:

                  Re: SBC Model Framework

                  Post by mad_ady »

                  Enjoying reading about your updates! Great job!
                  These users thanked the author mad_ady for the post:
                  hominoid (Tue Nov 22, 2022 11:45 pm)

                  hominoid
                  Posts: 887
                  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: 128 times
                  Been thanked: 410 times
                  Contact:

                  Re: SBC Model Framework

                  Post by hominoid »

                  The Odroid-N2L and Odroid-N2LQ have been added to SBC Model Framework.
                    n2l-n2lq.png
                    n2l-n2lq.png (32.65 KiB) Viewed 2406 times
                      The library and stl’s have been updated to version 1.0.10 in OP.
                      These users thanked the author hominoid for the post:
                      LudiaRemi (Mon Jun 19, 2023 1:09 pm)

                      saulart
                      Posts: 5
                      Joined: Fri Jan 27, 2017 7:15 pm
                      languages_spoken: portuguese
                      ODROIDs: ODROID-C2
                      Has thanked: 0
                      Been thanked: 5 times
                      Contact:

                      Re: SBC Model Framework

                      Post by saulart »

                      Do you think about adding the new orange pi 5 board?

                      hominoid
                      Posts: 887
                      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: 128 times
                      Been thanked: 410 times
                      Contact:

                      Re: SBC Model Framework

                      Post by hominoid »

                      saulart wrote:
                      Sun Dec 11, 2022 8:37 am
                      Do you think about adding the new orange pi 5 board?
                      This is not the forum for that question. Please open an issue at my git if you would like to make a request.

                      https://github.com/hominoids/SBC_Model_Framework

                      lele
                      Posts: 44
                      Joined: Wed Dec 23, 2015 2:46 am
                      languages_spoken: english
                      ODROIDs: XU4
                      Has thanked: 8 times
                      Been thanked: 0
                      Contact:

                      Re: SBC Model Framework

                      Post by lele »

                      Hi great job, really impressive!

                      I'm struggling in exporting the Odroid M1 to STP though and I'm really not familiar with scad. I had "some" success in exporting an STL but I cannot really use it within my cad unfortunately, it needs to be a proper body.

                      Any chance you can post a STP file of M1 WITHOUT the heatsink? If you know of any alternative 3D models for M1 please let me know, I didn't find any

                      Thanks a lot!

                      hominoid
                      Posts: 887
                      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: 128 times
                      Been thanked: 410 times
                      Contact:

                      Re: SBC Model Framework

                      Post by hominoid »

                      lele wrote:
                      Wed Mar 01, 2023 12:13 am
                      Hi great job, really impressive!

                      I'm struggling in exporting the Odroid M1 to STP though and I'm really not familiar with scad. I had "some" success in exporting an STL but I cannot really use it within my cad unfortunately, it needs to be a proper body.

                      Any chance you can post a STP file of M1 WITHOUT the heatsink? If you know of any alternative 3D models for M1 please let me know, I didn't find any

                      Thanks a lot!
                      OpenSCAD cannot export to STEP directly but another user was using FreeCAD to convert to STEP. I also have no way of verifying a STEP model either.

                      lele
                      Posts: 44
                      Joined: Wed Dec 23, 2015 2:46 am
                      languages_spoken: english
                      ODROIDs: XU4
                      Has thanked: 8 times
                      Been thanked: 0
                      Contact:

                      Re: SBC Model Framework

                      Post by lele »

                      unfortunately that doesn't seem to work anymore with the latest versions, at least not on Mac. Loads of errors when I try to open the scad in Freecad..

                      Hopefully that user is still monitoring this thread because otherwise I'm stuck..

                      Update: managed to remove the heatsink now and at least I got the STL model of the board alone. I'll see if I can convert it to stop some other way

                      hominoid
                      Posts: 887
                      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: 128 times
                      Been thanked: 410 times
                      Contact:

                      Re: SBC Model Framework

                      Post by hominoid »

                      lele wrote:
                      Wed Mar 01, 2023 12:41 am
                      Update: managed to remove the heatsink now and at least I got the STL model of the board alone. I'll see if I can convert it to stop some other way
                      I'm sorry, I thought you knew there was a "m1_noheatsink" in SBC Model Framework and were just specifying which one you needed converted. The m1 without a heatsink (and n2+_noheatsink) has been on the main branch for a little while but I'm not sure if it is in the release attached in this thread. FYI, When I tried in the past I never had any success using FreeCAD to convert to STEP either, so it must have stopped working awhile ago. I even considered writing a STEP converter at one time but one has to be an association member to get the specification and I never found a copy anywhere else on the internet. If you figure out a way to convert these to STEP please let me know.

                      hominoid
                      Posts: 887
                      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: 128 times
                      Been thanked: 410 times
                      Contact:

                      Re: SBC Model Framework

                      Post by hominoid »

                      After spending time on some other projects I’m back working on version 2 of this SBC library. Historically new releases have been posted here when a new HK board is released but since there have been some fixes and many other sbc added, it makes sense to post a version 1 update now. The library and stl’s have been updated to version 1.0.11 in the OP.

                      Development wise for v2, I finally trudged thru the conversion of the existing SBC to the upgraded format. SBC that couldn’t be properly supported in version 1 have been corrected and new complex and multi-PCB SBCs can now be added. Several new components have been introduced to the library along with an ongoing optimization effort.
                        sbc.png
                        sbc.png (257.75 KiB) Viewed 836 times
                          The library has been redesigned and divided up into two categories, use and object, which is determined by whether an I/O mask opening is used by a component. Version 2 contains all I/O mask openings as part of the component definition and can be used by other applications and software. Likewise, all components in the library are being restructured as parametric components when possible. This is taking more time then originally thought but it’s worth it in order to reduce code size, speed rendering and ultimately make it easier to use.

                          More time is also being spent to make the SBC more aesthetically accurate too. For example, pins are being added to discrete components as well as copper around PCB openings, just to name a couple of the aesthetic improvements. I believe the current new SBC I’m working on, a 2 PCB assembly, is number 62. I also have others I’m considering adding, including several micro-controllers and compute modules, before verson 2 is released.
                          These users thanked the author hominoid for the post (total 3):
                          mctom (Fri Nov 10, 2023 7:42 am) • odroid (Fri Nov 10, 2023 9:20 am) • tobetter (Fri Nov 10, 2023 12:13 pm)

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

                          Re: SBC Model Framework

                          Post by rooted »

                          This library is so nice, thank you for the continued improvements.

                          User avatar
                          tobetter
                          Posts: 12610
                          Joined: Mon Feb 25, 2013 10:55 am
                          languages_spoken: Korean, English
                          ODROIDs: Many
                          Location: Paju, South Korea
                          Has thanked: 938 times
                          Been thanked: 2162 times
                          Contact:

                          Re: SBC Model Framework

                          Post by tobetter »

                          rooted wrote:
                          Fri Nov 10, 2023 12:12 pm
                          This library is so nice, thank you for the continued improvements.
                          Indeed, looks like a museum showing ODROID history. :D

                          hominoid
                          Posts: 887
                          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: 128 times
                          Been thanked: 410 times
                          Contact:

                          Re: SBC Model Framework

                          Post by hominoid »

                          rooted wrote:
                          Fri Nov 10, 2023 12:12 pm
                          This library is so nice, thank you for the continued improvements.
                          Thanks for the kind words @rooted.
                          tobetter wrote:
                          Fri Nov 10, 2023 12:16 pm
                          Indeed, looks like a museum showing ODROID history. :D
                          At the beginning of this project I tried to find data to recreate the whole historical HK line going back to the Odroid-X, XU, W and earlier but couldn't pull enough data together to reproduce them. Maybe I'll come across one or more of them in the future.

                          Thanks everyone for the continuing support!

                          hominoid
                          Posts: 887
                          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: 128 times
                          Been thanked: 410 times
                          Contact:

                          Re: SBC Model Framework

                          Post by hominoid »

                          The SBC I’m working with uses three different header pitches(1mm, 2mm, 2.54mm) . In the past, using static parts would require a separate module for each one by pitch and pin count. With the version 2 library format, parametric symmetrical pin headers can be generated for any pitch and pin count in thruhole or smt.
                            test_header.png
                            test_header.png (23.86 KiB) Viewed 741 times
                              Provisions were made to accommodate for row or column precedence e.g. 1x6 or 6x1, which particularly effects smt lead orientation and placement. This helps avoid rotations for 90 degree header placements. The datasheets examined for 2.54 pitch headers listed the smt body width at 2.5mm instead of 2.54mm which accounts for the code discrimination. Box and angled headers aren’t needed right now so those will be completed later.

                              Code: Select all

                              /*
                                  DESCRIPTION: creates pin headers in any size or pitch.
                                         TODO: "box", "angled" headers
                                           
                                        USAGE: header(type, loc_x, loc_y, loc_z, side, rotation[], size[], data[], pcbsize_z, enablemask, mask[])
                                                      type = "open", "box"
                                                      size[0] = #row
                                                      size[1] = #columns
                                                      size[2] = pin height
                                                      data[0] = "straight", "angled"
                                                      data[1] = header color
                                                      data[2] = "male", "female"
                                                      data[3] = pitch
                                                      data[4] = pin color
                              
                              */
                              
                              // header class
                              module header(type, loc_x, loc_y, loc_z, side, rotation, size, data, pcbsize_z, enablemask, mask) {
                              
                                  row = size[0];
                                  column = size[1];
                                  height = size[2];
                                  style = data[0];
                                  hcolor = data[1];
                                  gender = data[2];
                                  pitch = data[3];
                                  pcolor = data[4];
                              
                                  size_y = pitch == 2.54 && style == "smt" ? (2.5 * column) : (pitch * column);
                                  size_x = pitch == 2.54 && style == "smt" ? (2.5 * row) : (pitch * row);
                                  bheight = pitch == 2.54 ? 2.5 : 1;
                                  pheight = pitch == 2.54 ? 3.2 : 2;
                                  pinsize = pitch == 2.54 ? .64 : .3;
                                  theight = bheight + pheight + height;
                                  smtlead = [pinsize,.925,.32];
                                  
                                  adj = .01;
                                  $fn = 90;
                                  
                                  // thruhole headers
                                  if(type=="open" && style == "thruhole" && enablemask == false) {
                                     
                                      if(gender == "male") {
                              //            place(loc_x, loc_y, loc_z, size_x, size_y, rotation, side, pcbsize_z)        
                                          union() {
                                              color(hcolor) cube([size_x, size_y, bheight]);
                                              for(c=[pitch/2:pitch:size_x]) {
                                                  for(r=[pitch/2:pitch:size_y]) {
                                                      color(pcolor) translate ([c-(pinsize/2),r-(pinsize/2),-pheight]) cube([pinsize,pinsize,theight+adj]);
                                                  } 
                                              }
                                          }
                                      }
                                      if(gender == "female") {
                              //            place(loc_x, loc_y, loc_z, size_x, size_y, rotation, side, pcbsize_z)        
                                          union() {
                                              difference() {
                                                  color(hcolor) cube([size_x, size_y, height]);
                                                  for(c=[pitch/2:pitch:size_x]) {
                                                      for(r=[pitch/2:pitch:size_y]) {
                                                          color("dimgray") translate ([c-(pinsize/2),r-(pinsize/2),height-5+adj]) cube([pinsize,pinsize,height-1]);
                                                          color(pcolor) translate ([c-(pinsize/2),r-(pinsize/2),-pheight]) cube([pinsize,pinsize,pheight+adj]);
                                                      }
                                                  }
                                              }
                                              for(c=[pitch/2:pitch:size_x]) {
                                                  for(r=[pitch/2:pitch:size_y]) {
                                                      color(pcolor) translate ([c-(pinsize/2),r-(pinsize/2),-pheight]) cube([pinsize,pinsize,pheight+adj]);
                                                  }
                                              }
                                          }
                                      }
                                  }
                                  // smt headers
                                  if(type=="open" && style == "smt" && enablemask == false) {
                              //        place(loc_x, loc_y, loc_z, size_x, size_y, rotation, side, pcbsize_z)        
                                      union() {
                                          if(gender == "male") {
                                              union() {
                                                  color(hcolor) cube([size_x, size_y, bheight]);
                                                  for(c=[pitch/2:pitch:size_x]) {
                                                      for(r=[pitch/2:pitch:size_y]) {
                                                          color(pcolor) translate ([c-(pinsize/2),r-(pinsize/2),bheight-adj]) cube([pinsize,pinsize,height+adj]);
                                                      } 
                                                  }
                                              }
                                          }
                                          if(gender == "female") {
                                              union() {
                                                  difference() {
                                                      color(hcolor) cube([size_x, size_y, height]);
                                                      for(c=[pitch/2:pitch:size_x]) {
                                                          for(r=[pitch/2:pitch:size_y]) {
                                                              color("dimgray") translate ([c-(pinsize/2),r-(pinsize/2),adj]) cube([pinsize,pinsize,height]);
                                                          }
                                                      }
                                                  }
                                              }
                                          }
                                          if(size_x >= size_y) {
                                              for(r=[pitch/2:pitch:size_x]) {
                                                  for(c=[pitch/2:pitch:size_y]) {
                                                      color(pcolor) translate ([r-(pinsize/2),-smtlead[1],0]) cube(smtlead);
                                                      color(pcolor) translate ([r-(pinsize/2),size_y-adj,0]) cube(smtlead);
                                                  }
                                              }
                                          }
                                          else {
                                              for(r=[pitch/2:pitch:size_x]) {
                                                  for(c=[pitch/2:pitch:size_y]) {
                                                      color(pcolor) translate ([-smtlead[1]+adj,c-(pinsize/2),0]) cube([smtlead[1],smtlead[0],smtlead[2]]);
                                                      color(pcolor) translate ([size_x-adj,c-(pinsize/2),0]) cube([smtlead[1],smtlead[0],smtlead[2]]);
                                                  }
                                              }
                                          }                    
                                      }
                                  }
                              }
                              
                              enablemask = false;
                              mask=0;
                              
                              header("open",142,70,0,"top",[0,0,0],[2,3,6],["smt","black","male",2.54,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([10,0,0]) header("open",142,70,0,"top",[0,0,0],[3,2,6],["thruhole","black","male",2.54,"silver",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([22,0,0]) header("open",142,70,0,"top",[0,0,0],[3,2,6],["smt","black","female",2.54,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([32,0,0]) header("open",142,70,0,"top",[0,0,0],[1,6,6],["thruhole","black","female",2.54,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              
                              translate([-8,0,0])header("open",142,70,0,"top",[0,0,0],[2,8,4],["smt","black","male",2,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([-15,0,0]) header("open",142,70,0,"top",[0,0,0],[2,3,4],["thruhole","black","male",2,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([-23,0,0]) header("open",142,70,0,"top",[0,0,0],[2,8,4],["smt","black","female",2,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([-32,0,0]) header("open",142,70,0,"top",[0,0,0],[2,6,6],["thruhole","black","female",2,"silver",0,0,0],0,enablemask,[10,2,"default"]);
                              
                              translate([8,-20,0])header("open",142,70,0,"top",[0,0,0],[2,8,3],["smt","black","male",1,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([15,-20,0]) header("open",142,70,0,"top",[0,0,0],[2,3,3],["thruhole","black","male",1,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([22,-20,0]) header("open",142,70,0,"top",[0,0,0],[2,8,4],["smt","black","female",1,"silver",0,0,0],0,enablemask,[10,2,"default"]);
                              translate([32,-20,0]) header("open",142,70,0,"top",[0,0,0],[2,6,7],["thruhole","black","female",1,"#fee5a6",0,0,0],0,enablemask,[10,2,"default"]);
                              
                              The code above is the test file that I used to develop the header module. It allows for easy testing of all the possible component configurations. This is especially useful when developing parametric parts that will have many incarnations. For anyone interested, one can copy the above code into Openscad and it should render into the same components as shown above.

                              Now none of this is particularly complicated, but with the growing interest in OpenSCAD, sharing and examining code is one of the ways I’ve learned in the past and maybe others will be interested too. JST connectors are next to be worked on and currently there are individual modules for XH, PH, ZH, SH that will need to be combined into a parametric algorithm. A new connector type needs to be added as well, JST-PA. All of this will be more challenging and require a different approach then the header module.
                              These users thanked the author hominoid for the post (total 2):
                              tobetter (Tue Nov 14, 2023 12:51 pm) • mctom (Tue Nov 14, 2023 4:51 pm)

                              hominoid
                              Posts: 887
                              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: 128 times
                              Been thanked: 410 times
                              Contact:

                              Re: SBC Model Framework

                              Post by hominoid »

                              The Odroid-M1S has been added to the library. The mechanical drawings and STEP model posted at the Wiki were used to create the model. The HK STEP model was converted to a stl and used as an overly to verify component registration. It should be good to go but I’ll check it against the real thing once one is in hand.
                                Odroid-M1S_1.gif
                                Odroid-M1S_1.gif (51.67 KiB) Viewed 671 times
                                  The library and stl’s have been updated to version 1.0.12 in the OP.
                                  These users thanked the author hominoid for the post (total 3):
                                  tobetter (Thu Nov 16, 2023 12:01 pm) • Luke.go (Thu Nov 16, 2023 3:57 pm) • mctom (Thu Nov 16, 2023 4:09 pm)

                                  hominoid
                                  Posts: 887
                                  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: 128 times
                                  Been thanked: 410 times
                                  Contact:

                                  Re: SBC Model Framework

                                  Post by hominoid »

                                  The JST module is complete and it had a few moving parts but wasn’t to bad. There are 4 inputs needed for calling the module: JST type(XH,PH,ZH,SH,PA), #pins, mount(thruhole or smt), and entry(top or side).
                                    test_jst.png
                                    test_jst.png (31.04 KiB) Viewed 574 times
                                      After a study of the relevant data sheets for each JST type it was clear that a method was needed to lookup different data sets, so an array was created for that purpose. I’ll be using this method or a variation of it for other components as well. It makes it easy to accommodate their differences and add new components to the module as needed.

                                      Code: Select all

                                      /*
                                          DESCRIPTION: creates jst connectors for xh, ph, zh, sh, pa.
                                                 TODO: flange for sh
                                                 
                                                USAGE: jst(type, loc_x, loc_y, loc_z, side, rotation[], size[], data[], pcbsize_z, enablemask, mask[])
                                                           type = "xh","ph","zh","sh","pa"
                                                           size[0] = #pins
                                                           data[0] = "thruhole", "smt"
                                                           data[1] = "top", "side"
                                      
                                      */
                                      
                                      // jst connector class
                                      module jst(type, loc_x, loc_y, loc_z, side, rotation, size, data, pcbsize_z, enablemask, mask) {    
                                          
                                          row = size[0];
                                          style = data[0];
                                          entry = data[1];
                                          bcolor = "white";
                                          pcolor = "silver";
                                          
                                      /*
                                                                                                     p    p
                                                                                                     i    i
                                                                                                     n    n
                                                                                                      
                                                                                                     b    t
                                                                                     w               o    o
                                                                   b                 a   p     p     t    p    p
                                                                   o                 l   i     i               i    
                                                                   d      s   s      l   n     n     h    h    n
                                                              p    y      i   i                      e    e    
                                                         t    i           z   z      s   x     y     i    i    s
                                                         y    t    a      e   e      i   a     a     g    g    i
                                                         p    c    d                 z   d     d     h    h    z
                                                         e    h    j      y   z      e   j     j     t    t    e
                                      */
                                          jst_data = [
                                                      ["xh", 2.5, 2.45, 5.75, 7,    .5,  2.35, 2.4,  3.4, 7,   .64],
                                                      ["ph", 2,   1.95, 4.5,  6,    .5,  1.95, 1.7,  3.4, 5,   .5],
                                                      ["zh", 1.5, 1.5,  3.5,  4.5,  .35, 1.5,  1.3,  3.4, 3.5, .5],
                                                      ["sh", 1,   1,    2.9,  4.25, .35, 1,    1.25, 3.4, 4,   .25],
                                                      ["pa", 2,   2,    4,    8,    .35, 2,    2,    3.4, 4.5, .5]
                                                     ];
                                          
                                          adj = .01;
                                          $fn = 90;
                                      
                                          s = search([type],jst_data);
                                      
                                          pitch = jst_data[s[0]][1];
                                          body_adj = jst_data[s[0]][2];
                                          size_x = body_adj+(row*pitch);
                                          size_y = jst_data[s[0]][3];
                                          size_z = jst_data[s[0]][4];
                                          wall_size = jst_data[s[0]][5];
                                          pin_xadj = jst_data[s[0]][6];
                                          pin_yadj = jst_data[s[0]][7];
                                          pbheight = jst_data[s[0]][8];
                                          ptheight = jst_data[s[0]][9];
                                          pinsize = jst_data[s[0]][10];
                                          smtlead = [pinsize,.925,.32];
                                      
                                      //        place(loc_x, loc_y, loc_z, size_x, size_y, rotation, side, pcbsize_z)
                                          if(entry == "top") {
                                              union() {
                                                  difference() {
                                                      union() {
                                                      color(bcolor) cube([size_x, size_y, size_z]);
                                                          if(type == "pa") {
                                                              color(bcolor) translate([0, -.75+adj,1.5]) cube([1.5, .75, size_z-3.01]);
                                                              color(bcolor) translate([size_x-1.5, -.75+adj,1.5]) cube([1.5, .75, size_z-3.01]);
                                                              if(row >= 6) {
                                                                  color(bcolor) translate([2.5, -.75+adj,1.5]) cube([1.5, .75, size_z-3.01]);
                                                                  color(bcolor) translate([size_x-4, -.75+adj,1.5]) cube([1.5, .75, size_z-3.01]);
                                                              }
                                                          }
                                                      }
                                                      color(bcolor) translate([wall_size, wall_size, wall_size]) 
                                                          cube([size_x-(2*wall_size), size_y-(2*wall_size), size_z]);
                                                      if(type == "xh") {
                                                          color(bcolor) translate([2, -.1,size_z/2]) cube([1.5, size_y-2, 4]);
                                                          color(bcolor) translate([size_x-3.5, -.1,size_z/2]) cube([1.5, size_y-2, 4]);
                                                          color(bcolor) translate([-1,.75,5]) cube([2,.75,3]);
                                                          color(bcolor) translate([size_x-2,.75,5]) cube([size_y-2,.25*size[0],3]);
                                                      }
                                                      if(type == "ph") {
                                                          color(bcolor) translate([2, -.1,2]) cube([size_x-(2*pitch), size_y-2, 5]);
                                                          color(bcolor) translate([-1,1.25,4]) cube([size_y-2,.25*size[0],size_z]);
                                                          color(bcolor) translate([size_x-2,1.25,4]) cube([size_y-2,.25*size[0],size_z]);
                                                      }
                                                      if(type == "zh") {
                                                          color(bcolor) translate([-1,1.25,size_z/2]) cube([size_y-2,.25*size[0],size_z]);
                                                          color(bcolor) translate([size_x-1,1.25,size_z/2]) cube([size_y-2,0.25*size[0],size_z]);
                                                      }
                                                      if(type == "sh") {
                                                          color(bcolor) translate([.25,.75,size_z/2]) cube([.25,.25,size_z]);
                                                          color(bcolor) translate([size_x-.5,.75,size_z/2]) cube([.25,.25,size_z]);
                                                      }
                                                      if(type == "pa") {
                                                          color(bcolor) translate([-1.,-2.5,6]) cube([size_x+2,5,4]);
                                                          color(bcolor) translate([1.5,2,size_z-1]) cube([size_x-3,4,4]);
                                                          color(bcolor) translate([wall_size, -.75+adj+wall_size,1.5]) 
                                                              cube([1.5-(2*wall_size), 1, size_z-3.01]);
                                                          color(bcolor) translate([size_x-1.5+wall_size, -.75+adj+wall_size,1.5]) 
                                                              cube([1.5-(2*wall_size), 1, size_z-3.01]);                            
                                                          if(row >= 6) {
                                                              color(bcolor) translate([2.875, -.5+adj,1.75]) cube([1.5-(2*wall_size), 1, size_z-3.01]);
                                                              color(bcolor) translate([size_x-3.675, -.5+adj,1.75]) cube([1.5-(2*wall_size), 1, size_z-3.01]);
                                                          }
                                                      }
                                                  }
                                                  if(type == "sh") {
                                                      color(bcolor) translate([.25,size_y-.75,0]) cube([.5,.5,size_z]);
                                                      color(bcolor) translate([size_x-.75,size_y-.75,0]) cube([.5,.5,size_z]);
                                                  }
                                                  if(style == "thruhole") {
                                                      for(r=[pin_xadj-(pinsize/2):pitch:size_x-pitch]) {
                                                          color("silver") translate([r, pin_yadj-(pinsize/2), -pbheight+adj]) 
                                                              cube([pinsize, pinsize, pbheight+ptheight]);
                                                      }
                                                  }
                                                  if(style == "smt") {
                                                      for(r=[pin_xadj-(pinsize/2):pitch:size_x-pitch]) {
                                                          color("silver") translate([r, pin_yadj-(pinsize/2), adj]) 
                                                              cube([pinsize, pinsize, ptheight]);
                                                          color("silver") translate([r, size_y-adj, 0]) 
                                                              cube(smtlead);
                                                      }
                                                  }
                                              }
                                          }
                                          if(entry == "side") {
                                                  union() {
                                                  difference() {
                                                      color(bcolor) cube([size_x, size_z, size_y]);
                                                      color(bcolor) translate([wall_size, -wall_size, wall_size]) 
                                                          cube([size_x-(2*wall_size), size_z, size_y-(2*wall_size)]);
                                                      if(type == "xh") {
                                                          color(bcolor) translate([2, -.1,size_z/2]) cube([1.5, 4, size_y-2]);
                                                          color(bcolor) translate([size_x-3.5, -.1,size_z/2]) cube([1.5, 4, size_y-2]);
                                                          color(bcolor) translate([-1,-.75,4]) cube([2,3,.75]);
                                                          color(bcolor) translate([size_x-1,-.75,4]) cube([2,3,.25*size[0]]);
                                                      }
                                                      if(type == "ph") {
                                                          color(bcolor) translate([2, -.1,3]) cube([size_x-(2*pitch), 5, 2]);
                                                          color(bcolor) translate([-1,-4,size_y-2]) cube([size_y-2,size_z,1]);
                                                          color(bcolor) translate([size_x-2,-4,size_y-2]) cube([size_y-2,size_z,1]);
                                                      }
                                                      if(type == "zh") {
                                                          color(bcolor) translate([-1,-size_z+1.25,size_y-1.25]) cube([size_y-2,size_z,.25*size[0]]);
                                                          color(bcolor) translate([size_x-1,-size_z+1.25,size_y-1.25]) cube([size_y-2,size_z,0.25*size[0]]);
                                                      }
                                                      if(type == "sh") {
                                                          color(bcolor) translate([.25,0,size_z/2]) cube([.25,size_z,.25]);
                                                          color(bcolor) translate([size_x-.5,0,size_z/2]) cube([.25,size_z,.25]);
                                                      }
                                                  }
                                                  if(type == "xh") {
                                                      difference() {
                                                          union() {
                                                              color(bcolor) translate([0,size_z,0]) cube([1,3.5,4.5]);
                                                              color(bcolor) translate([size_x-1,size_z,0]) cube([1,3.5,4.5]);
                                                          }
                                                          color(bcolor) translate([-1,size_z,4.5]) rotate([-30,0,0]) cube([size_x+2,5.5,4]);
                                                      }
                                                  }
                                                  if(type == "ph") {
                                                      difference() {
                                                          union() {
                                                              color(bcolor) translate([0,size_z,0]) cube([.75,1.6,3]);
                                                              color(bcolor) translate([size_x-.75,size_z,0]) cube([.75,1.6,3]);
                                                          }
                                                          color(bcolor) translate([-1,size_z,3]) rotate([-30,0,0]) cube([size_x+2,5.5,4]);
                                                      }
                                                  }
                                                  if(type == "zh") {
                                                      difference() {
                                                          union() {
                                                              color(bcolor) translate([0,size_z,0]) cube([.5,1.5,2.5]);
                                                              color(bcolor) translate([size_x-.5,size_z,0]) cube([.5,1.5,2.5]);
                                                          }
                                                          color(bcolor) translate([-1,size_z,2.5]) rotate([-30,0,0]) cube([size_x+2,5.5,4]);
                                                      }
                                                  }
                                                  if(type == "sh") {
                                                      color(bcolor) translate([wall_size,0,wall_size]) cube([.5,size_z,.5]);
                                                      color(bcolor) translate([size_x-.75,0,wall_size]) cube([.5,size_z,.5]);
                                                  }
                                                  if(style == "thruhole") {
                                                      for(r=[pin_xadj-(pinsize/2):pitch:size_x-pitch]) {
                                                          color("silver") translate([r, -adj, size_y-(pin_yadj+(pinsize/2))]) 
                                                              cube([pinsize, ptheight, pinsize]);
                                                          color("silver") translate([r, size_z-pinsize, -pbheight+adj]) cube([pinsize, pinsize, pbheight]);
                                                      }
                                                  }
                                                  if(style == "smt") {
                                                      for(r=[pin_xadj-(pinsize/2):pitch:size_x-pitch]) {
                                                          color("silver") translate([r, -adj, size_y-(pin_yadj+(pinsize/2))]) 
                                                              cube([pinsize, ptheight, pinsize]);
                                                          color("silver") translate([r, size_z-adj, 0]) 
                                                              cube(smtlead);
                                                      }
                                                  }
                                              }
                                          }
                                      }
                                      
                                      
                                      enablemask = false;
                                      mask=0;
                                      
                                      // thruhole side entry
                                      translate([-15,0,0]) jst("xh",0,0,0,"top",[0,0,0],[3,0,0],["thruhole","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([-30,0,0]) jst("ph",0,0,0,"top",[0,0,0],[4,0,0],["thruhole","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([-40,0,0]) jst("zh",0,0,0,"top",[0,0,0],[3,0,0],["thruhole","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([-50,0,0]) jst("sh",0,0,0,"top",[0,0,0],[3,0,0],["thruhole","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      
                                      // thruhole top entry
                                      translate([-15,20,0]) jst("xh",0,0,0,"top",[0,0,0],[3,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([-30,20,0]) jst("ph",0,0,0,"top",[0,0,0],[4,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([-40,20,0]) jst("zh",0,0,0,"top",[0,0,0],[3,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([-50,20,0]) jst("sh",0,0,0,"top",[0,0,0],[3,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      
                                      translate([0,-30,0]) jst("pa",0,0,0,"top",[0,0,0],[7,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([0,-40,0]) jst("pa",0,0,0,"top",[0,0,0],[6,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([0,-50,0]) jst("pa",0,0,0,"top",[0,0,0],[5,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([0,-60,0]) jst("pa",0,0,0,"top",[0,0,0],[4,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([0,-70,0]) jst("pa",0,0,0,"top",[0,0,0],[3,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([0,-80,0]) jst("pa",0,0,0,"top",[0,0,0],[2,0,0],["thruhole","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      
                                      
                                      // smt side entry
                                      translate([0,0,0]) jst("xh",0,0,0,"top",[0,0,0],[3,0,0],["smt","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([15,0,0]) jst("ph",0,0,0,"top",[0,0,0],[4,0,0],["smt","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([30,0,0]) jst("zh",0,0,0,"top",[0,0,0],[3,0,0],["smt","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([40,0,0]) jst("sh",0,0,0,"top",[0,0,0],[3,0,0],["smt","side",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      
                                      // smt top entry
                                      translate([0,20,0]) jst("xh",0,0,0,"top",[0,0,0],[3,0,0],["smt","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([15,20,0]) jst("ph",0,0,0,"top",[0,0,0],[4,0,0],["smt","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([30,20,0]) jst("zh",0,0,0,"top",[0,0,0],[3,0,0],["smt","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      translate([40,20,0]) jst("sh",0,0,0,"top",[0,0,0],[3,0,0],["smt","top",0,0,0,0,0,0],0,enablemask,[10,2,"default"]);
                                      
                                      
                                      Things moved along this weekend so I also spent some time on other components like b2b and fpc connectors and got a good start on compute modules. The b2b module produces .4 pitch receptacles and plugs for any pin count and stacking height. All three of the standard CM forms are now present and a supporting carrier IO board is nearing completion.
                                      These users thanked the author hominoid for the post:
                                      mctom (Mon Nov 20, 2023 5:21 pm)

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

                                      Re: SBC Model Framework

                                      Post by mctom »

                                      That's what I was worried about, that JST may not follow clear patterns across their different sizes. LUT complicated things but it looks reasonably easy to expand in the future.
                                      Punk ain't no religious cult, punk means thinking for yourself!
                                      OpenUPS
                                      PiStackMon

                                      Post Reply

                                      Return to “General”

                                      Who is online

                                      Users browsing this forum: No registered users and 1 guest