Using PCB (open source layout editor) and batchPCB

Has anyone used PCB to make a design for batchPCB? If so, how do I export the proper drill file?

When I export to gerber, I get 2 .cnc files: plated and nonplated. Here is a sample of the file:

  • M48

    INCH,TZ

    T11C0.046

    T12C0.028

    T13C0.030

    T14C0.020

    %

    T14

    X017650Y004686

    X015491Y005142

    X013744Y002953

    X012186Y004004

    X012294Y003303

    X011995Y007294

    X016591Y007514


  • Is this format supported? If so, which number format is it?

    Thanks.

    If you’re talking FreePCB then the format is 2.4 normal. It would help if you tell us how big your board is or if you can find those X,Y coordinates on you board. Heck, if you can find something that seems like (017650, 004686) (your first T14 hole coordinate), then you’d see where the decimal point is, and then you’d know the whole values and fixed-point fractional values…etc.

    My board is 2000x2000 mils. There isn’t a hole at either 1765.0,468.6 or 176.5,46.8

    I’m using PCB from http://pcb.sourceforge.net

    The .cnc files are NC drill format files. There is also a gerber file generated called _fab.gbr that is called the “fabrication drawing” or “drill drawing”. Are these what batchPCB needs?

    BTW - is there a minimum silk line width? I didn’t see one mentioned on the FAQ.

    Thanks.

    I think my drill file is ok after all. I’m getting errors out of the DRC bot, though:

  • unmatched 274X paramblock LNGROUP1 - len 8

    unmatched 274X paramblock LNGROUP1_C1 - len 11

    Beginning GCODE run

    Cannot slide non-circle AP

    Unhandled Move from (1.448800,1.458600) to (1.448800,1.448800) ap 16 light on

    GCode execution failed!


  • Here is my top layer gerber file:

  • G04 start of page 3 for group 1 idx 3

    G04 Title: (unknown), component *

    G04 Creator: pcb-bin 20060822 *

    G04 CreationDate: Mon Jan 1 02:41:07 2007 UTC *

    G04 For: hartmms *

    G04 Format: Gerber/RS-274X *

    G04 PCB-Dimensions: 200000 200000 *

    G04 PCB-Coordinate-Origin: lower left *

    %MOIN*%

    %FSLAX24Y24*%

    %LNGROUP1*%

    %ADD11C,0.0100*%

    %ADD12C,0.0750*%

    %ADD13C,0.0600*%

    .

    .

    .

    .

    .

    Y16468D02Y16232D01

    G54D17X8858Y4153D02Y4055D01*

    X8346Y4153D02Y4055D01

    G54D18*%LNGROUP1_C1*%

    %LPC*%

    G54D19G54D20G54D19G54D18G54D19G54D20G54D21G54D22G54D20G54D19G54D20G54D19G54D20G54D23M02*


  • What is a lngroup1? How is it not matched as the error log states?

    I’m trying to figure out if PCB screwing up the gerber export or if I have something configured wrong.

    Thanks for any help anyone can provide.

    BTW - I guess I should have used Eagle PCB instead. I was worried that not all my components were in its library. I’ve got some pretty unique stuff:

    2mm pitch single row header

    10 pin uSOP/uMAX

    2 SMT crystal packages

    I have used pcb (sometimes also called xpcb) with batchpcb a few times, with no problems. The two drill files it produces contain the plated-through holes and the non-plated-through holes from your design. Since batchpcb doesn’t do non-plated holes, you need to make sure that all the holes in your design are plated-through. In that case the unplated drill file will not have any holes in it, though it’ll still have the header and stuff so it won’t be 0 bytes.

    You don’t want to send the “fabrication” gerber to batchpcb; it’s a sort of overview file that would be handy if you were hand-drilling the holes or something, but it’s not needed or used by batchpcb. Batchpcb just wants the copper layers (front and back), soldermask (front and back), and silkscreen (front and back), plus a single drill file.

    I don’t know what the LNGROUP1 error is about. I haven’t used pcb in eight months or so and there’s been a fair amount of development on it. If you look at [this explanation of the Gerber / RS-274X format (PDF file), you can see that the LNGROUP1 directive is setting the layer name to “GROUP1”. Maybe batchpcb’s verifier can’t handle the layer name directive? I also have no idea what the “cannot slide non-circular AP (aperture?)” error is about. I suggest checking yor gerbers with [Gerbv. If it looks right in gerbv, then maybe it’s a bug in sparkfun’s home-grown gerber interpreter.](http://gerbv.sourceforge.net/)](http://members.optusnet.com.au/~eseychell/rs274xrevd_e.pdf)

    Ignore the LNGROUP line - thats just a note saying its ignoring it.

    The problem is noted by: “Cannot slide non-circle AP”

    It is indeed a bug in the home-grown interpreter. The issue is that the gerber file instructs the photoplotter to slide a non-circular aperature across the board - and I haven’t yet had time to add support for that [most pcb programs don’t use this feature - and its not easy to handle all cases right.

    The gerber interpreter has support for all the necessary later stages [aka, drc’ing the generated polygon] but it just doesn’t have the code to handle generating the polygon from the slide of the aperature.

    I’m hoping to get around to fixing this today, but I’m not sure if I will [quite busy here].

    Unfortunatly, there is no easy fix re: editing the gerber files :/.

    Cheers,

    –David Carne

    Just wanted to follow up - the bug in the drc bot has been fixed. I’m not sure if the solution will work for all cases - but it seems to work for all the boards tested so far.

    Cheers,

    –David Carne

    FYI PCB does that to make square SMD pads. If you run into any other weird output from pcb, drop a note on the geda-user mailing list, where I and the other pcb developers hang out.

    Eh, its not particularly weird - its just a usage I’d never seen anyone use - and I’d been too lazy to implement ;).

    Cheers,

    –David Carne