my weekend meta-project: magic panel PCB generator for Eagle

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Joe., lisa, luketeaford, Kent

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Fri May 03, 2019 10:32 pm

Well that was interesting, and not as annoying a task as I'd expected. You can now install it on macOS via Homebrew
brew tap jsleeio/apps
brew install go-eagle
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
cackland
Super Deluxe Wiggler
Posts: 1867
Joined: Thu Dec 28, 2017 5:42 pm
Location: Los Angeles, California

Post by cackland » Fri May 03, 2019 10:57 pm

I installed it via home-brew, now how do I use it?

I don't understand your instructions in your GitHub. Only recently switched to Eagle so excuse my confusion on how to implement this.

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Fri May 03, 2019 11:14 pm

1. for all components that need to poke thru the panel, add an attribute PANEL_DRILL_MM with the value being the drill diameter in millimetres. To do this, right-click on them and select Attribute

2. add HEADER_TEXT and FOOTER_TEXT global attributes with whatever text you want along the top and bottom edges of the panel, respectively. To do this, go to the Edit menu and select Global attributes

3. save your project's Eagle board file (from here on I will assume it is named myproject.brd)

4. invoke the schroff app that was installed by Homebrew. You only need to tell it the path to your Eagle board file
schroff myproject.brd
Each component that had the PANEL_DRILL_MM attribute should be listed in the output.

You should now have a new board file named myproject.brd.panel.brd. Load it in Eagle and have a look
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
cackland
Super Deluxe Wiggler
Posts: 1867
Joined: Thu Dec 28, 2017 5:42 pm
Location: Los Angeles, California

Post by cackland » Fri May 03, 2019 11:25 pm

When you say, 'invoke' the schrof app, do you mean open the app?

If so, which application? I get this error when trying to open, the standard:
"There is no application set to open the document “schroff.go”."

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Fri May 03, 2019 11:28 pm

I mean open a terminal, cd to whatever directory your Eagle project is in, and then type schroff myproject.brd
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
cackland
Super Deluxe Wiggler
Posts: 1867
Joined: Thu Dec 28, 2017 5:42 pm
Location: Los Angeles, California

Post by cackland » Fri May 03, 2019 11:52 pm

Thanks I'll give that a go.

User avatar
Bamboombaps
Wiggling with Experience
Posts: 386
Joined: Wed Sep 16, 2015 7:14 am
Location: Glasgow

Post by Bamboombaps » Sat May 04, 2019 3:49 pm

kinda related but my panel holy grail atm would be a script to convert a panel .dxf etc into a gerber for fab

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Sun May 05, 2019 7:32 am

Got lots done this weekend. Mostly code cleanups and rearranging, but also

* improved the README
* added Intellijel and Pulplogic 1U panel format support
* control output layers for panel legend, header and footer with global attributes
* disable legend for components via a regular expression match against name, via a global attribute
* override legend for a component with an attribute
* adjust final panel width slightly, mostly per Doepfer recommendations, to play nicer with other, out-of-spec panels

This is getting pretty close to where I want it now, so I think I'll order some test boards this week and make sure everything lines up appropriately.
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Sun Jun 02, 2019 6:41 am

So a bit late here but I finally got my Eurorack version of Harry Bissell's lovely Morphlag circuit to a point where I was ready to order rev1 PCBs, and so needed a panel as well.

Along the way went around a few "modify board => generate panel" cycles and realised that I hadn't implemented quite enough fine control — was having to make little tweaks to the generated board each time. Annoying and error prone. So I added some more attributes and am now at a point where I don't need to make any panel tweaks at all anymore. Just edit attributes in the circuit board file and rerun schroff to generate the panel board file. Winner!

Excited about getting boards in the mail — has been a long while since I ordered anything interesting.

Here's my as-generated Morphlag 6hp panel, rendered in Eagle's manufacturing-preview:

Image
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Sun Jun 02, 2019 5:12 pm

quick note for anyone trying this: don't forget to ask where your PCB fab adds their little board IDs in the silkscreen!

I realised I forgot about this when I placed my order with Seeed Studio last night, so will probably end up with IDs on the front of the panels :-( which is pretty annoying as they have a process for avoiding this

With Seeed, they want you to add margin areas above and below the panel, in board outline, and label them MARGIN. If you do this, they'll put the board ID in that area. It does mean you get the boards back with the margins still attached, which separate with V-scores — I'm OK with, but some people certainly won't be!

My plan for sometime this week is to add a command-line option in schroff to optionally create these margin areas in the generated board file.

edit: JLCPCB make this easy, apparently. Will try them next time!
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
fitzgreyve
Wiggling with Experience
Posts: 481
Joined: Mon Jul 15, 2013 4:49 am
Location: UK

Post by fitzgreyve » Mon Jun 03, 2019 3:17 am

indigoid wrote: With Seeed, they want you to add margin areas above and below the panel, in board outline, and label them MARGIN. If you do this, they'll put the board ID in that area.
With Seeed, I just put a note in the gerber "Please put production ID on PCB bottom" (silk screen layer, outside the board outline). No margins. This has worked fine fo far!
Under developement:
- "Muse"
---------------------------------------
https://fitzgreyve2.blogspot.com/

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Mon Jun 03, 2019 4:43 am

fitzgreyve wrote:With Seeed, I just put a note in the gerber "Please put production ID on PCB bottom" (silk screen layer, outside the board outline). No margins. This has worked fine fo far!
that's not what they told me — I directly asked and they indicated that it wasn't reliable and I needed to add margin areas — which they didn't charge me for

(also I had previously tried the approach you describe)
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Fri Jun 14, 2019 7:28 pm

Got some PCBs back from Seeed. They're lovely! So far I've checked:

- Eurorack 3U dimensions/locations all seem correct
- the module PCB aligns nicely with the panel PCB
- drill holes are correct

The only problem I've found is that I specified a size slightly too small for one of the panel component drills, but that's a dumbass-human (ie. me) problem, not a software problem.

Haven't tested the Pulplogic or Intellijel tile formats yet.

This order validated my original goal when I started working on this software, which was to be able to generate a panel PCB with no manual editing/post-processing at all — so that if I change something in my design, I don't need to spend any time at all thinking about what corresponding change I need to make on the panel, I should be able to just press a button and have a new or updated panel generated to match my module PCB.

Image
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Fri Jul 12, 2019 9:27 pm

Once more into the breach. Today I spent a while bashing my head on Eagle/trawling Autodesk support, and eventually figured out how to generate Gerbers from the commandline. The script for it is here:



So with the combination of my panel generator and a little script that generates Gerbers and packages them in a ZIP file, I can now work on the module PCB and its related panel side by side — despite Eagle apparently not allowing me to open more than one board file at a time.

1. edit module PCB
2. save board file
3. generate panel board file with go-eagle
4. generate panel gerbers
5. preview with gerbv or similar

This is much less disruptive to my workflow. With a bit more effort I expect to be able to have steps 3-5 run automatically whenever I hit the Save button in Eagle, though this isn't that useful to me right now as I only have one monitor attached to my laptop
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
EATyourGUITAR
has no life
Posts: 4062
Joined: Tue Aug 31, 2010 12:24 am
Location: Providence, RI, USA

Post by EATyourGUITAR » Sat Jul 13, 2019 6:11 am

Roni wrote:
indigoid wrote:
Roni wrote:Nice. Be cool if it would do oval mount holes.
Yeah I hear you. I've never tried to do this with PCB fabrication. Would it be a 3.2mm-width routed slot instead of a drill?
I don't use Eagle so stabbing in the dark here, my first inclination would be to make a standard through hole pad (oblong) and then draw a hole in the Milling layer, say 3.2 x 5.7. Not sure what parameters are available with routed slot but if it works and is easier go with that.

.
This is dependant of who you use to manufacture your PCB. The common accepted practice is to put it in the milling layer with a matching shape removed in the copper layers. If you put drills in the slots, they will modify it when they look at it or they will reject it or they will ask you what you want. You may get different results from the same fab from the same Gerber files when you reorder simply because this is done by people not by machines. Some companies use software to detect and flag these types of problems but it is also done by eye. Some companies do it at the same time as panelization while some do it on file approval. You need to check with them on minimum slot size and min slot radius. It should be clear what side of the milling border is removed and what side is not removed. For example, you have no dimension in your milling layer. Or maybe you have your slots in dimension. Open paths or path collisions. If your Gerber's are problem free they get to production fast.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Post by indigoid » Sat Jul 13, 2019 7:57 am

EATyourGUITAR wrote:If your Gerber's are problem free they get to production fast.
yeah I'm a big fan of that kind of thinking and so I haven't messed around with plated slots.

I recently had a PCB fab experience where (I thought) I'd made holes big enough for the solder lugs of some sub-mini toggle switches, and in the process discovered a sneaky behaviour in Eagle related to annular rings — I was sure I'd made the holes in my part footprint large enough in diameter to match the switches I had, but Eagle quietly made them slightly smaller — I think due to (a) the minimum annular ring size in the design rules file, and (b) the tight spacing of the solder lugs. I didn't realise until I got my PCBs, despite having run a design rules check. Ultimately it was easier to just buy some switches with pins instead of solder lugs. Fitted my board perfectly, and a valuable lesson learned.
Zap him again! ZAP THE SONOFABITCH AGAIN!

User avatar
EATyourGUITAR
has no life
Posts: 4062
Joined: Tue Aug 31, 2010 12:24 am
Location: Providence, RI, USA

Post by EATyourGUITAR » Sat Jul 13, 2019 12:54 pm

indigoid wrote:
EATyourGUITAR wrote:If your Gerber's are problem free they get to production fast.
yeah I'm a big fan of that kind of thinking and so I haven't messed around with plated slots.

I recently had a PCB fab experience where (I thought) I'd made holes big enough for the solder lugs of some sub-mini toggle switches, and in the process discovered a sneaky behaviour in Eagle related to annular rings — I was sure I'd made the holes in my part footprint large enough in diameter to match the switches I had, but Eagle quietly made them slightly smaller — I think due to (a) the minimum annular ring size in the design rules file, and (b) the tight spacing of the solder lugs. I didn't realise until I got my PCBs, despite having run a design rules check. Ultimately it was easier to just buy some switches with pins instead of solder lugs. Fitted my board perfectly, and a valuable lesson learned.
If you want plated through hole slots that is a bit different. In that case you would not remove anything from the copper layers. You need to check with the fab if they can do it. You also need to put it in the notes when you place your order. If not you just get the Fab to choose at random. Your switch problem could simply be a change in internal diameter due the thickness of the through hole plating and or the fab choosing the next closest drill size in the drill turret so they can avoid milling a drill hole to get an exact size. Minimum anular ring would only relate in case of vias I think. Eagle can flag something in DRC but it will never change a drill size automatically. The only thing automated by design rules is pulling back the copper pours such as edge of board, trace to pour, pour to drill, pour to keep out. Vias can be changed in design rules but it is not retroactive. You should never build switch holes from vias. Just make a new part.

Edit: vias might change with design rules if you ripup all and rats nest tool.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

User avatar
djthopa
Super Deluxe Wiggler
Posts: 1752
Joined: Thu Mar 22, 2012 5:48 pm
Location: Somewhere between a nappy and a wire

Re: my weekend meta-project: magic panel PCB generator for Eagle

Post by djthopa » Sat Mar 07, 2020 5:49 pm

Hi!
I had forgotten about this project!
Thanks for keeping developing it.
I got some pcbs that need panels do im going to try this out.
Cheers

User avatar
indigoid
Super Deluxe Wiggler
Posts: 1252
Joined: Thu May 29, 2014 7:52 pm
Location: Sydney, Australia

Re: my weekend meta-project: magic panel PCB generator for Eagle

Post by indigoid » Tue Mar 24, 2020 8:57 am

have been working on this a bit more lately. I'm working on a module that has a rotary switch — actually the same Alps 8-position rotary switch as used in the Turing Machine. Things that have rotary switches usually deserve a good panel legend for each position. I'd been procrastinating on this because it means trigonometry and I've always sucked at any math more complicated than can be done on a four-function calculator. However, Wikipedia (the "polar coordinates" page is great!) and some experimentation later... now my panel generator can place tick marks around a drill hole, with start/end angles, number of ticks, tick length/width all configurable via component attributes. I'm hoping to find time tomorrow to also add text next to each tick mark.

I haven't published this update to Github yet as I want to do some more verification first, and also the ticks will generally need to rotate with the component and I haven't implemented that yet. TBA... hopefully this week.
Screen Shot 2020-03-25 at 12.43.01 am.png
You do not have the required permissions to view the files attached to this post.
Zap him again! ZAP THE SONOFABITCH AGAIN!

Post Reply

Return to “Music Tech DIY”