Author Topic: KiCAD custom board shape  (Read 2768 times)

0 Members and 1 Guest are viewing this topic.

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
KiCAD custom board shape
« on: September 12, 2018, 02:55:30 am »
Dear friends,

I have made my schematic in KiCAD v.4 but now updated to v.5 and need to start doing the PCB. I plan to use an already made plastic enclosure... and settled for now at this one: https://www.aliexpress.com/store/product/junction-box-plastic-enclosure-plastic-box-electronic-plastic-case-desktop-electric-meter-panel-120-80-40mm/1182327_1909719876.html

The heatsink will be from outside so no worries.

Anyway, how can I define the board shape to be suitable to this enclosure with all screw holes properly set in it?
 

Offline saike

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
Re: KiCAD custom board shape
« Reply #1 on: September 12, 2018, 04:13:26 am »
Kicad can import dxf files so, draw the outline with a cad program such as, Librecad, Draftsight, Freecad etc, save as dxf and import into kicad.
 

Offline donotdespisethesnake

  • Frequent Contributor
  • **
  • Posts: 745
  • Country: gb
  • Embedded stuff
Re: KiCAD custom board shape
« Reply #2 on: September 12, 2018, 04:39:25 am »
For such a simple outline it is hardly worth using DXF. It would be easy to do directly in KiCad.
Bob
"All you said is just a bunch of opinions."
 

Offline Bassman59

  • Frequent Contributor
  • **
  • Posts: 974
  • Country: us
  • Yes, I do this for a living
Re: KiCAD custom board shape
« Reply #3 on: September 13, 2018, 07:45:07 am »
Dear friends,

I have made my schematic in KiCAD v.4 but now updated to v.5 and need to start doing the PCB. I plan to use an already made plastic enclosure... and settled for now at this one: https://www.aliexpress.com/store/product/junction-box-plastic-enclosure-plastic-box-electronic-plastic-case-desktop-electric-meter-panel-120-80-40mm/1182327_1909719876.html

The heatsink will be from outside so no worries.

Anyway, how can I define the board shape to be suitable to this enclosure with all screw holes properly set in it?

Draw the shape on the Edge.Cuts layer using the available tools. The screw holes aren't part of the board outline, so you'll have to place non-plated-through holes on the board.
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #4 on: September 13, 2018, 06:12:29 pm »
Dear friends,

I have made my schematic in KiCAD v.4 but now updated to v.5 and need to start doing the PCB. I plan to use an already made plastic enclosure... and settled for now at this one: https://www.aliexpress.com/store/product/junction-box-plastic-enclosure-plastic-box-electronic-plastic-case-desktop-electric-meter-panel-120-80-40mm/1182327_1909719876.html

The heatsink will be from outside so no worries.

Anyway, how can I define the board shape to be suitable to this enclosure with all screw holes properly set in it?

Draw the shape on the Edge.Cuts layer using the available tools. The screw holes aren't part of the board outline, so you'll have to place non-plated-through holes on the board.

I still didn't try PCB in KiCAD but how can I draw in certain dimension like autoCAD for example where you input the length of the line?

I never used any of the free tools and even autocad I used it 10 years ago.

Quote
Draftsight

I read that many people say this one is better than autocad itself, I don't know if they are certain or just over-confident.


I need a simple way to achieve the simple task that I want
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 1039
  • Country: fr
Re: KiCAD custom board shape
« Reply #5 on: September 13, 2018, 11:50:30 pm »
Quote
Draftsight
I read that many people say this one is better than autocad itself, I don't know if they are certain or just over-confident.
I need a simple way to achieve the simple task that I want

I don't know if it's really better since I haven't used Autocad in ages, but I do use Draftsight and it's certainly more than adequate for designing PCB outlines, front panels, etc.
The added benefit is that you can be pretty confident about the DXF import and export in Draftsight, whereas in some other free tools that have a much smaller user base, there can be occasional bugs.
 

Offline donotdespisethesnake

  • Frequent Contributor
  • **
  • Posts: 745
  • Country: gb
  • Embedded stuff
Re: KiCAD custom board shape
« Reply #6 on: September 14, 2018, 05:07:32 am »
I need a simple way to achieve the simple task that I want

You haven't said exactly what you want, but I'll assume it's a rectangular board with 8 holes. There are a few tips to make things easier:
- pick a grid appropriate to the dimensions
- use the relative coordinate display (bottom right on status bar). Press spacebar to reset the position to zero at the current mouse cursor
- right click on a line and you can set the position, size and width exactly

To place the holes, I calculate the center point of the board, and reset the coordinate at that position.

If you use the outline a lot, consider making it a footprint.
Bob
"All you said is just a bunch of opinions."
 

Offline Bassman59

  • Frequent Contributor
  • **
  • Posts: 974
  • Country: us
  • Yes, I do this for a living
Re: KiCAD custom board shape
« Reply #7 on: September 14, 2018, 05:53:54 am »
I need a simple way to achieve the simple task that I want

You haven't said exactly what you want, but I'll assume it's a rectangular board with 8 holes. There are a few tips to make things easier:
- pick a grid appropriate to the dimensions
- use the relative coordinate display (bottom right on status bar). Press spacebar to reset the position to zero at the current mouse cursor
- right click on a line and you can set the position, size and width exactly

To place the holes, I calculate the center point of the board, and reset the coordinate at that position.

Also, you can draw lines and then use the Edit feature (select the line and hit the E key) and you can enter the endpoints of the line directly.

For the holes, do the same thing.
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #8 on: September 15, 2018, 05:03:08 am »
I have made a screen shot after adding all components. Now I highlighted the margin layer because I thought it is the one which defines board shape. Please correct me.

Also, kindly tell me how to visually verify the total board shape? like 3D view for example. I am still a noob in PCB design.
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #9 on: September 15, 2018, 11:11:20 am »
As an update, I switched to this one: https://www.aliexpress.com/item/Black-Extruded-Aluminum-Enclosures-PCB-Instrument-Electronic-Project-Box-Case-100x76x35mm/32813597400.html

It is 100x76x35mm so my board is going to be 90x70mm. Kindly check the enclosure, it is difficult to know if 90x70 is gonna fit inside the slot and I don't know how to make sure.

I ended up with a rectangle board in KiCAD which is what I wanted. Thanks for the explanation, it is really simple in KiCAD without any draft software.

 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #10 on: September 15, 2018, 12:37:39 pm »
 

Offline donotdespisethesnake

  • Frequent Contributor
  • **
  • Posts: 745
  • Country: gb
  • Embedded stuff
Re: KiCAD custom board shape
« Reply #11 on: September 15, 2018, 08:19:13 pm »
I have made a screen shot after adding all components. Now I highlighted the margin layer because I thought it is the one which defines board shape. Please correct me.

Also, kindly tell me how to visually verify the total board shape? like 3D view for example. I am still a noob in PCB design.

Use the Edge Cuts layer for the board outline.

A 3d view is available via View->3d Viewer.
Bob
"All you said is just a bunch of opinions."
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #12 on: September 15, 2018, 10:16:01 pm »
I have made a screen shot after adding all components. Now I highlighted the margin layer because I thought it is the one which defines board shape. Please correct me.

Also, kindly tell me how to visually verify the total board shape? like 3D view for example. I am still a noob in PCB design.

Use the Edge Cuts layer for the board outline.

A 3d view is available via View->3d Viewer.

I did as you can see in my recent posts.

However, I asked other questions.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 3425
  • Country: au
  • Question Everything... Except This Statement
Re: KiCAD custom board shape
« Reply #13 on: September 15, 2018, 10:41:31 pm »
As I cannot tell exactly what question your referring to in your latest post.

how can I define the board shape to be suitable to this enclosure with all screw holes properly set in it?

You either draw it in a dxf file if its a hard shape, or manually with the graphical lines / arcs on the edge cuts layer. This gives you the outside edge of the board,
Next for your mounting holes, as a beginner to the software I would recommend just placing graphical circles on the edge cuts layer in the correct locations,

For Kicad V5, you can use tricks to get everything in the right place, e.g. you know 1 mounting hole needs to be 45mm away from your first one, you can type + or -XXX into the positions for both components or graphical items, for example you might place 1 mounting hole, then duplicate it in the same location and in the Y position type +45mm at the end, and it will do the offset for you.

For the edge cuts layer, the main one is that it should be seamless or the 3D veiwer gets unhappy.


how can I draw in certain dimension like autoCAD for example where you input the length of the line?

At present you cannot type the length and angle of the line in Kicad, but as you draw a graphical line, on the bottom left of the window it will display the angle and the length of the line.


And finally, if it will fit in the enclosure,

As it doesnt give any solid dimensions, your best bet would be to ask the manufacturer for a dimensioned datasheet for the enclosure, as even the spacing between mounting holes appears to be a guessing game at this point.
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #14 on: September 16, 2018, 12:41:17 am »
This is the correct link: https://www.aliexpress.com/store/product/Split-Body-Black-Extruded-Aluminum-Enclosure-Instrument-Box-Mayitr-DIY-Amplifiers-Electronic-Project-Case-Shell-120/3094039_32821097426.html

as you can see, there is no mounting holes. The PCB should slip in the slot then maybe you glue it in? I don't know. Getting the dimensions is a hard task without manufacturer so I will ask him.
 

Offline sokoloff

  • Frequent Contributor
  • **
  • Posts: 818
  • Country: us
Re: KiCAD custom board shape
« Reply #15 on: September 16, 2018, 01:01:36 am »
Unless you have a sample on hand, I’d probably leave the first prototypes a little large (with generous “keep outs” along the side and plan to belt sand the edge down to finished size and use that information for the production run.
 

Offline Bassman59

  • Frequent Contributor
  • **
  • Posts: 974
  • Country: us
  • Yes, I do this for a living
Re: KiCAD custom board shape
« Reply #16 on: September 16, 2018, 07:34:54 am »
I have made a screen shot after adding all components. Now I highlighted the margin layer because I thought it is the one which defines board shape. Please correct me.

Draw the board outline on the Edge.Cuts layer, not the margin layer. The margin layer is informational — you put keepouts and the like on it. For example, if your board fits into one of those nifty Hammond extrusions, you can draw boxes on the margin layer to show where the enclosure’s slots cover the board.

Quote
Also, kindly tell me how to visually verify the total board shape? like 3D view for example. I am still a noob in PCB design.

If you draw the outline on the Edge.Cuts layer, it will automagically show up in the 3D view.

You should probably read the fine Kicad manual.
 

Offline bson

  • Supporter
  • ****
  • Posts: 1297
  • Country: us
Re: KiCAD custom board shape
« Reply #17 on: September 16, 2018, 12:35:46 pm »
You need the actual inside, board dimensions.  Approximate external dimensions are useless.  So either make the PCB oversize and then trim it, as suggested, or wait for the enclosure to arrive and actually measure it.  You also need to know the thickness of the board slot so your board will fit properly.
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #18 on: September 16, 2018, 03:25:23 pm »
Making more research I found this one (with others): https://www.aliexpress.com/item/145-68-300mm-Aluminium-Extruded-Electronic-Enclosure-Solar-Junction-Box-metal-box-enclosure-black-color/32763604744.html

It shows the dimension up to the start of the slot as 135.7mm but to the inside wall of the slot as 140mm, so should I use 140mm as board width? while board length is of many options like 200mm or so. Not important, but I will choose a smaller one.

what do you think?


EDIT: this one seems enough: https://www.aliexpress.com/item/YGS-005-88-38-120mm-WxH-L-anodized-aluminum-small-aluminium-extruded-project-electronic-enclosure-pcb/32826456213.html
« Last Edit: September 16, 2018, 03:31:49 pm by VEGETA »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 3425
  • Country: au
  • Question Everything... Except This Statement
Re: KiCAD custom board shape
« Reply #19 on: September 16, 2018, 04:35:49 pm »
140mm is the width of the board is can accomodate, however I would recommend you knock that down to 139.5 as it can be very hard to get boards in and out if your too tight. also as the slot is 2mm high I would recommend a 1.6mm PCB for the same reason (past experiences, its not nice having to file down the edges of your board to fit the slot due to cheap extrusion tolerances and warpage. (the really dirt cheap extrusions will generally have a weak curve to them as they will be from the start or end of extrusion where the flow rate wasn't quite right.)

The only other recommendation is chamfer off your corners to make it easier to insert the board,

As to retaining the board, if your device is not the full length of the enclosure, then you will generally use mounting screws to hold it to one end, either built in to your connectors or using through hole solder on mounting studs,
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #20 on: September 16, 2018, 09:26:02 pm »
140mm is the width of the board is can accomodate, however I would recommend you knock that down to 139.5 as it can be very hard to get boards in and out if your too tight. also as the slot is 2mm high I would recommend a 1.6mm PCB for the same reason (past experiences, its not nice having to file down the edges of your board to fit the slot due to cheap extrusion tolerances and warpage. (the really dirt cheap extrusions will generally have a weak curve to them as they will be from the start or end of extrusion where the flow rate wasn't quite right.)

The only other recommendation is chamfer off your corners to make it easier to insert the board,

As to retaining the board, if your device is not the full length of the enclosure, then you will generally use mounting screws to hold it to one end, either built in to your connectors or using through hole solder on mounting studs,


Then I will probably make it 1mm off (139mm instead of 140mm) due to bad tolerances acknowledged by the manufacturer himself.

I will use 1.6mm as it is the default. I don't know why you mention it.

by chamfering off you mean make a round edge of the board instead of a 90 degree one?

I will make around 5-10 cm off from the front but it will be nearly close to the end. I cannot visually imagine how the mounting screws will be attached in this case, so you are welcome to visually explain it.  :-//

There are no mounting holes of any kind so I don't know how to do it properly.
 

Offline sokoloff

  • Frequent Contributor
  • **
  • Posts: 818
  • Country: us
Re: KiCAD custom board shape
« Reply #21 on: September 16, 2018, 10:17:17 pm »
This drawing will probably make it clear. The end plates screw into part of the horizontal extrusion.
Your PCB then (obviously) doesn’t need any holes for the mounting screws.

 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1084
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: KiCAD custom board shape
« Reply #22 on: September 16, 2018, 10:54:56 pm »
I know that the front and end plates will be screwed (or the pcb front\back panels) but then if we put the main pcb in the slot, it can still move freely if there is some space like I pointed. you mentioned mounting screws but I found none other than the original ones for back and front panels which won't do us any good here.

 

Offline sokoloff

  • Frequent Contributor
  • **
  • Posts: 818
  • Country: us
Re: KiCAD custom board shape
« Reply #23 on: September 16, 2018, 11:49:14 pm »
Ah. Make it the full depth of the box and there's nowhere for it to move once the end plates are screwed on.

Your original post made me think you thought you had to put screw holes in the PCB.
 

Offline 3roomlab

  • Frequent Contributor
  • **
  • Posts: 780
  • Country: 00
  • A long long time ago, in a land far far away ...
Re: KiCAD custom board shape
« Reply #24 on: September 17, 2018, 06:21:28 am »
i would suggest searching for a vendor that give some kind of "shop dimensions", which you can "borrow the pictures"
ie :

ie :

or copy the "picture" to scale, but i did not try in kicad
http://www.eevblog.com/forum/eagle/creating-pcbbox-templates/

so i turn it into a "component" i can click and flip. likely doable in KICAD i think.
1) Hayao Miyazaki - "there is no nuclear power here (at studio ghibli)"
2) Feynman - "What Do You Care What Other People Think?"
3) is it possible that the speed of light (a million years ago) is faster than it is now? or slower?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf