Schematic Upload or Techn. Pages (Png!)

For PCB design I use the open-source schematic and PCB design software KiCAD. Its a great programme and has gotten a lot better recently. Information technology is unlimited in size, components and number of layers and has lots of the features of very expensive professional PCB layout software.

But… there are times when its not then obvious how to do what seems like uncomplicated tasks. 1 task I needed to exercise recently was to add a logo onto the silkscreen and the back copper layer of a PCB. This is a quick mail service collecting my experiences and the a procedure to practice this.

Edit 27/6/2020: I realised this was a very heavily visited page on this website! I would at present use the awesome svg2shenzhen add-on to Inkscape to create any layer KiCAD module from any SVG file. This is covered in detail in an commodity in this issue of Hackspace Magazine (free to download!)

Edit one/12/2020: Link to module scaler site has been removed as it was taken over past a scam site. Delight use to a higher place svg2shenzhen link to a higher place.

The steps involved are:

  1. Sort out your logo
  2. Add a white boundary effectually the logo
  3. Export as a .png or .bmp
  4. Use the bitmap2Component section of KiCAD to convert into a .modern file
  5. Resize the epitome, using an on-line conversion tool
  6. Remove the 'issues' section from the .mod code
  7. Employ the library in your PCB design and import the module

I'll go through them in more detail:

The first matter to do is sort out your logo. I use Inkscape or CorelDraw to create .svg images. You tin can also utilise any image file.

Add a white background to your image. There MUST be a white border all effectually your paradigm. (This is required to sort out a bug later in the process….)

Consign this as a .png or .bmp.

Open the 'Bitmap2Component' part of the KiCAD suite of utilities. This volition open the Bitmap to Component converter.

alt

This is the Bitmap2Component utility.

Load your logo bitmap/image file. In this instance I have the open source hardware epitome. Its really big, hence yous tin only come across a bit of it. It is all-time to use a big image and then scale it down, rather than utilise a pocket-sized image where you will loose some of the detail.

alt

alt

Ensure this is ready to 'Negative' and that the threshold level is correct (this is the level it converts to black or white). A negative image is required – the output will exist anything WHITE in the image.

alt

alt

Save as a .modern module library. Save it somewhere where you will find information technology again.

Then we need to scale the image to the size required on your PCB. You volition need to measure the size required, as you lot cannot scale this inside KiCAD PCB. Luckily some clever folk have done an on-line KiCAD module scaler, which can be institute hither (Link at present cleaved – Not at present available). In this example I am making the image to be 0.4 inches (around 10mm). Here you can likewise choose which layer yous would like the component to be on. I used both back copper (layer 0) and front silkscreen (layer 21).

Annotation 1/12/2020: These instructions are now redudant and the component scaler is no longer bachelor through the link I had. Delight use information at the top of this folio.

alt

alt

Gyre to the bottom of the folio, browse for your module library. You will too need the new width (in inches) and  a proper noun for your new module library (I tend to employ the aforementioned name but with "_small" added).

Save as another module (.mod) library file.

Now lets take a look at information technology. You lot need to add this library to your PCB (go to preferences -> libraries so employ the 'Add together' role). As you lot can see in this screen shot, there are two lines on the left and top edges. This is a problem with the 'Bitmap2Component' conversion software.

alt

Click on the 'Add module' icon, equally we want to add the new logo module.

alt

Find information technology within the module list.

alt

Urgh! What are those nasty lines doing?…..

Its been reported as a bug, but not even so fixed (13/12/12). So now what do you practice?

The answer to this took me a bit of searching but, equally usual, someone on the interweb (specifically this post) had washed it before me. Basically the algorithm is 'seeing' the border and creating a polygon. Using a white edge around the logo ways that this polygon is separate from the other polygon and and so we can delete it.

All modules are text files with lists of the shapes and the co-ordinates between the points. So get to where your .modernistic file is saved and open the file with some kind of text editor:

alt

Open the .mod file as with a text editor.

alt

The offset polygon is the offending bit of code (highlighted in red). Delete the whole polygon department (from the DP line, including all the Dl lines, to just in a higher place the next DP line) and save it (I use the same name).

You can encounter (honest!) that each polygon starts with the line DP x 10 ten x x x. There are then a load of Dl x x commands. Basically DP ways Draw Polygon and the Dl are all the points within the polygon. The first polygon (DP) is the error department. Nosotros have to delete it and then salvage the file.

Now go dorsum to your PCB and re-open the module:

The top logo is the one with the error, the bottom is the nice clean one without the lines. Yey!

You can see that the 'bug' lines accept gone and you now have a nice logo to add to your board. Hope that helps y'all – I certainly had a couple of hours of caput scratching.

I establish a good youtube video explaining most of this subsequently I had finished doing it and I was writing this post.

Update 3/7/14: In that location is some other program to create KiCad modules from logos here: http://img2mod.wayneandlayne.com/

harringtoninving84.blogspot.com

Source: https://www.re-innovation.co.uk/docs/adding-logo-to-kicad/

0 Response to "Schematic Upload or Techn. Pages (Png!)"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel