Due to the complexion of the design, I think it would be more viable to sink the sensors in the PCB. So can anyone guide my on how I would be able able to do that in Kicad?
As Eelik told you before, KiCAD doen’t provide any ready tool for such a design, take a look at the design guide from Würth:
https://www.we-online.de/web/en/leiterplatten/produkte_/ect/ect_uebersicht.php
They explaine you which options do you have (all of them look pretty expensive) but at design time, you’ll need to contact them (or your manufacturer of choice) to ask, which information do they need exactly. Maybe you will need to deliver a Gerber file with the cutouts, maybe a DXF mechanical drawing or something else.
In KiCAD you will need to use keepout areas for the layers that are going to be milled away.
Have you considered to some CNC milling yourself?
Cheap chinese routers which look like they are usable start at around EUR1000. For a bit more you can have a decent German version such as the Sorotec. There are also other manufactureres around the world of comparable stuff.
Prototypes for custom stuff like this are probably relative expensive, and your exact wishes hard to convey to manufacturers.
With a small CNC machine you can build a lot of custom groove prototypes (from the same standard 4-layer board) yourself.
For DIY CNC, hackaday.com has a collection of home built machines.
I’ve built a decent CNC machine myself, and in parts it also probably cost around EUR800. I built it as a hobby, and it’s of much better quality then complete machines of twice that price, but if you count the hours, it’s not worth it. But it’s a hobby for me.
You might need a more powerful tool than KiCad for such a task. KiCad can not place pads on an inside layer which would be required for this. (I fear you will really need to use one of the high end tools like altium)
This is possible using a trick… create a footprint with pads on to or bottom layer and save it; then edit it with a text editor and change the layer to an internal layer.
Here a sample board with a RF coupler designed in In2 internal layer.
https://github.com/PeraZver/Microwave-Transmitter Transmitter.kicad_pcb
Transmitter.kicad_pcb (511.7 KB)
As a side note the footprint is DRC compliant… I wonder why the footprint editor doesn’t allow to design in internal layers…
As far as i remember there is the question “How should KiCad handle such a footprint on a board without said layer?”
And i doubt the correct way is to have the layer specified in the footprint. I would expect this to be solved by having more placement options than front and back.
Humm Even if the option to move a footprint in internal layers would be a nice feature, in this footprint there are top and inner pads connected and inner geometry pads … so moving the footprint internally is not the right solution for this case.
The footprint uses two layers next to each other. I doubt you want to need to have such a footprint made for every possible layer combination.
I imagine the best option would be to have pads (or copper features generally) on relative layers and then the option to move the whole footprint to the layer pairing that you want during PCB design.
I mean i don’t expect this to happen soon but this solution would i think be the most flexible solution filling the most usecases (would solve ridgit flex construction, 2.5d systems, inlaid parts, and your RF features)
But in which way you connect an internal pad with an i.e. top layer?
For me the easiest solution is like the footprint created for the above board
and this solution is already available, using a simple trick with a text editor
Blind/buried or normal vias that give you the freedom during layout. If you do it in the footprint then you will need to change the footprint if you decide you want other layers which is unnecessary extra work.
Unless i completely misunderstood your showcase
that is a possible solution but building the footprint exactly as needed for your design is for sure less flexible, but will solve the problem with a very little effort to be reached/implemented. ATM it can already be done tricking pcbnew, but it could be easy added allowing footprint editor to work on internal layers…
Moreover you could add a semi-manual pad stack editor creating i.e. pads with different sizes on different layers… adding new features with a little cost.
The thing is if such a hack is added then it needs to be supported in future and might get in the way for the more powerful solution (see the use of hidden power input pins as an example how this can go very wrong).
I am not in a position to make this decision but i would not be surprised if the core team will want to keep their options open until they have a design idea for the fully featured final implementation.
why do you call the ability to create footprints with pad on inner layers a hack?
It reminds me the issue raised with the option to have EdgeCuts on footprints, that luckily now are allowed on kicad v6.
Hack might have been a poor choice of a word on my end.
What i intended to convey is that we should keep in mind that some fast solutions might negatively impact a more generic solution that we might want to have in KiCad sometime in the future.
So if we write a proposal then it might make sense to also include the ideal fully generic option such that the devs can take it into account for their planning.
Thank you for your suggestion.
When editing the footprint file in the text editor, which line I should edit? For example, just the one I highlighted like in the image below?
@ compuser:
When you want to edit KiCad files with a text editor, use the documentation of file formats to learn how they work:
https://www.kicad.org/help/file-formats/
Fully agree. Having good descriptions of wanted behavior is a very important part of software development.
Just recently there was a way to simply copy one layer to another or swap them, and it included all layers, though you could not copy a graphics layer to a copper layer. Now this dialog seems to be severely simplified, and only copper layers can be swapped.
Searching some more cause I thought I may have missed something. and I stumbled into (and experimented a bit with) **Pcbnew / Edit / Edit track & Graphics properties". As an experiment I set “scope” to “Footprint graphic items” and for “action” choose to set the “Layer” to “Edge.Cuts”. And KiCad V5.1.5 does it.
You can also apply filters.
My next test was to take 2 footprints of DIP packages, and place them into Pcbnew. Then hover over them and press [Ctrl + e] to edit them in the Footprint editor. On both I drew a little rectangle on the “Dwgs.User” layer. It looks like:
Then again back to **Edit Text and Graphic Properties" in an attempt to move the rectangle from U101 from Dwgs.User to Edge.Cuts, with these settings:
And it works as expected. The rectangle in U101 turns yellow, while the rectangle in U102 stays white. Tuning layers on/off in the Layers Manager confirms the rectangle is now on the Edge.Cuts layer.
For Compuser101 it seems a step in the right direction, Stuff on Edge.Cuts goes all through the PCB. For milling features to a certain depth, you want to use an exclusive layer for that. Any of the “User” layers can be used I think. Just make sure that this custom milling is all that is on that layer when you make Gerbers.
@Compuser101 Also, if this works for your board manufacturer, don’t forget that milling holes in the boards (well… milling into any material) can’t have 90° corners. So when contacting your vendor to find out how to document this process to them, find out the minimum and nominal drill diameters that they would use, and include the radiuses in your drawing. (Try to keep to their nominal diameter/radius as much as you can instead of going for the minimum diameter/radius everywhere.)
I should clarify the board house normally builds a PCB with cores and prepeg layers that they adhere together, with these style boards before gluing certain parts together they can run them through extra milling / drilling / plating processes to customize 1 layer from the rest, at a cost
So for your design you could have it so layers 1-3 have a slot, and 4 is solid with plated pads. it costs extra for the extra steps, but it should be cheaper than trying to pull of controlled depth milling, while also allowing you to have the pads for the components in the slot if you wish.
For them its the same as making blind and buried vias.
you need to edit pad’s layer(s), not the layer of the footprint…
here a kicad file format
4.6.12 - Description of a module (footprint)
Here is an example:
(module R3 (layer top_side.Cu) (tedit 4E4C0E65) (tstamp 5127A136)
(at 66.04 33.3502)
(descr “Resitance 3 pas”)
(tags R)
(path /5127A011)
(autoplace_cost180 10)
(fp_text reference R1 (at 0 0.127) (layer F.SilkS) hide
(effects (font (size 1.397 1.27) (thickness 0.2032)))
)
(fp_text value 330K (at 0 0.127) (layer F.SilkS)
(effects (font (size 1.397 1.27) (thickness 0.2032)))
)
(fp_line (start -3.81 0) (end -3.302 0) (layer F.SilkS) (width 0.2032))
(fp_line (start 3.81 0) (end 3.302 0) (layer F.SilkS) (width 0.2032))
(fp_line (start 3.302 0) (end 3.302 -1.016) (layer F.SilkS) (width 0.2032))
(fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer F.SilkS) (width 0.2032))
(fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer F.SilkS) (width 0.2032))
(fp_line (start -3.302 1.016) (end 3.302 1.016) (layer F.SilkS) (width 0.2032))
(fp_line (start 3.302 1.016) (end 3.302 0) (layer F.SilkS) (width 0.2032))
(fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.2032))
(pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799)
(layers *.Cu *.Mask F.SilkS)
(net 1 /SIGNAL)
)
(pad 2 thru_hole circle (at 3.81 0) (size 1.397 1.397) (drill 0.812799)
(layers *.Cu *.Mask F.SilkS)
(net 2 GND)
)
(model discret/resistor.wrl
(at (xyz 0 0 0))
(scale (xyz 0.3 0.3 0.3))
(rotate (xyz 0 0 0))
)
)
A module has:
• a reference
• a layer (Front or Back layer)
• a last edition time stamp (for user info)
• a time stamp from the schematic
• a position.
Its description includes:
• Text (at least reference and value)
• Graphic outlines
• Pads (with pad type, pad layers, pad size and position, net)
• A link to a 3D model, if exists, for the 3D viewer.
It took me a few days to get around to reading the datasheet. Rather than discuss the features of KiCad, I’d like to talk about the application.
The sensor, with a trace under the device, will detect the magnetic field caused by current through the trace. Depending on the current direction, you will get a voltage out. Is this your intent? Do you plan to detect an external magnetic field?
Note that this is not a linear device. There are only 2 states so if there is no current, it may just give you noise (rapid switching) on the output. You may want to bleed a small current through the sense trace to bias the device to a quiescent state.
I would recommend a large Gnd plane around and on the layer under the sensor to keep other circulating currents from being sensed. If the device is on L4, have L3 under the device be Gnd. Similarly, consider a steel shield over the circuit if this is near a motor.
It is still unclear why you need the trench under the device. The FR4 material isn’t magnetic!
Have I missed something in the datasheet?