hominoids / SBC_Model_Framework

A framework for the generation of SBC and micro-controller models
GNU General Public License v3.0
101 stars 20 forks source link

StarFive VisionFive2 board M.2 header too short #12

Closed davidjericho closed 1 year ago

davidjericho commented 1 year ago

The generated m.2_header is too small for what is present on the VisionFive2 board.

By my measurement, the m.2 header is under 7mm tall, resulting in the underside of the board for the the case being too short to accommodate the m.2 header which I believe is modeled at 5.2mm.

A measurement by hand suggests that if the standoffs were 2mm taller with the walls accordingly so, that'd be correct. Maybe 3 to 4mm would be better suited given many M.2 NVMe 2280 modules sit a few mm higher than the socket itself again.

hominoids commented 1 year ago

Thanks for opening the issue. I'm wondering what version of PCB you have? I have 1.3b and it seems to be OK.

vf2_bottom

If you have version 1.2 StarFive could have used a different M.2 component which might be the issue. If you let me know I'll create a another separate model for version 1.2 if necessary. I just came across the same problem with the ROCK5B having multiple developer versions that are significantly different. It won't take me long once I know but FYI, the bottom maximum component height is were this can be adjusted in sbc_models.cfg, line #1903, ["visionfive2",100,74,1.6,3,17,7, // sbc model, pcb size and component height The last two entries are the top and bottom maximum component height. The standoff and wall height is automatically generated using these values amongst others. Once the problem is identified it won't take me long to fix it.

davidjericho commented 1 year ago

Thank you @hominoids , I suspected I could modify that particular field on that row, and it would fix the issue for me but I wasn't totally sure as to the preferred way to deal with this.

I do have the 1.3b, and using some better measurement tools the problem isn't the m.2 header, but rather than base of the stand off right next to it. The edge of the standoff base in the bottom part is colliding with the top of the m.2 header. By increasing the depth of the bottom shell by 3mm it's giving enough vertical space between the standoff base and the m.2 header.

image

Reprinting the bottom part with a modification at line 1903 of sbc_models.cfg ["visionfive2",100,74,1.6,3,17,10, resolved the issue and the case now closes fully. 10mm might be a mm too far, but a little more space under a NVMe drive won't be a bad thing.

hominoids commented 1 year ago

Thanks for the additional explanation and model image. It looks like you started designing a case from scratch and there is nothing wrong with that approach. Understanding the issue better, I would recommend making the change in SBC Case Builder and not in SBC Model Framework because the problem is with the case and not the SBC model. The maximum component height set correctly does not necessarily guarantee an unfettered case fit in SBC Case Builder. With SBC component density increasing, it’s common for designers sometimes to encroach in areas, especially around mounting holes. For a lot of SBC and cases that have top standoffs, you cannot put an IDC connector on the GPIO with the top on because the mounting holes are too close to the header.

This is why a default case design is setup for each SBC model in SBC Case Builder, to address SBC specific issues for a given case. There are over 400 predefined cases selectable from the pick box labeled ‘design default values’ at the top of the GUI. These are the minimal case metrics and changes for a given SBC case combination to be usable and is meant to be a starting point for a design.

Looking at the entry for visionfive2_shell in SBC Case Builder, The bottom height has been increased using case_offset_bz under the ‘adjustments’ tab, which has the same effect as changing the maximum component bottom height in SBC Model Framework, it adds 3mm to the bottom.

Other then the builtin metrics adjustable through the GUI, the accessory framework can also be used to make modifications using sbc_case_builder_accessories.cfg. Which entry in the file to use is located in the GUI under the ‘Features and Accessories’ tab. Looking at the entry for visionfive2_shell,

["visonfive2_shell",
"sub","rectangle",89,9.25,11,"top",[0,0,0],["case",true,true,false],10,10,15,0,0,"vertical",[1,1,1,1],
"add1","round",11.25,-.5,10,"top",[0,0,0],["case",true,true,true],2,0,17,0,0,"",0,
"add1","round",29.75,-.5,10,"top",[0,0,0],["case",true,true,true],3,0,17,0,0,"",0,
"add1","round",50,-.5,10,"top",[0,0,0],["case",true,true,true],3,0,17,0,0,"",0,
"add1","round",60.875,-.5,10,"top",[0,0,0],["case",true,true,true],3,0,17,0,0,"",0,
"add1","round",81.125,-.5,10,"top",[0,0,0],["case",true,true,true],3,0,17,0,0,"",0,
"add1","access_port",10,0,-0.01,"bottom",[0,0,0],["sbc",true,true,false],80,75,2,0,0,"portrait",0,
"model","access_cover",10,0,-0.01,"bottom",[0,0,0],["sbc",true,true,false],80,75,2,0,0,"portrait",0,
"platter","access_cover",-110,30,0,"bottom",[0,0,0],["case",false,false,false],80,75,2,0,0,"portrait",0],

The first entry subtracts a rectangle in order to trim a standoff I thought might cause interference. Several wall supports are added and the access port. These accessories can be commented out if unwanted or a different set created under a new name and associated with one or more cases.

sbc_case_builder_vf2_shell

It’s also used to display related models in model view and place additional items on the platter. The accessory framework is documented in the README.md file and at the HardKernel forum thread were I sometime post about this application. The model above has ‘accessory highlight’ enabled under the ‘View’ tab which is why the subtraction is visible.

By changing the case bottom height using case_offset_bz, using a subtraction accessory to trim the standoff support or by changing the standoff support size using the ‘Standoff’ tab are all acceptable ways to address the problem using SBC Case Builder. Excuse the long winded response but as you can see there are several things that are related and more then one way to change things. I would recommend starting with one of the predefined base designs in the future to avoid these problems. Just press the + button and save it as a new case with it’s own unique name for your personal use. Just remember to back it up before updating SBC Case Builder.

davidjericho commented 1 year ago

Thanks @hominoids , the explanation was very enlightening, and I'll keep in in mind as I do use your builder often enough that I should understand this. I'll look at it a bit closer in the next few days and add a subtraction as you suggest above. If I remember, I'll put a PR against the visionfive2 board in the new few days over in the other repository.