Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have started doing PCB design from last month and very new to this. I have done tiny bits on eagle cad and Altium cad but still learning things everyday. Now I got a challenging board to do. Though board is not complex but the measurements and angles has to be exact and not sure how to approach it.

Please see the pic which got spiral pads. All are circular and has to be with correct measurements as mentioned on it. Also let me know which tool is best for doing these type of custom stuff.

Hope some of you guys have experience here and might help me with good advice

share|improve this question
    
Altium is more powerful than Eagle CAD. It will let you rotate any pad to any angle. Are your pads all rectangular or are they curved? Curved would be more difficult. Do you want this to be all one component? Pads always belong to a component. What are you making? – David G Jan 8 at 12:56
    
@DavidG You see the first image from right. Thats what I need to do. I'm doing a small PCB board with pads printed as shown in image. I need to have pads with 9 circular rings and then make those bits as shown in other 2 pics by intersecting them. The depth and angles to intersect the rings are also shown above. – i0s Jan 8 at 13:20
    
@DavidG -- Eagle is VERY powerful if you use their scripting language. If you write code in some language that outputs a file in scripting language, like Olin is talking about, you've got some real power. – Scott Seidman Jan 8 at 13:34
    
The "PCB" tool from the Geda project allows arbitrary rotation of components and their pads. It's not particularly easy to use but it doesn't require scripting to get there. en.wikipedia.org/wiki/PCB_%28software%29 – Brian Drummond Jan 8 at 14:15
2  
Altium allows you to create a polar grid, with it you can easily place components in circles – Mike Jan 8 at 18:15
up vote 10 down vote accepted

I use Eagle. When I need to do things like this I write a program that generates a script. The program does the sines, cosines, and other math to determine the coordinates, then writes those into the script.

This comes up often enough that I've created a generic host program module that has subroutines for writing coordinates in Eagle format, for writing whole WIRE commands, it's own 2D transforms, etc. This kind of thing is really not hard to do.

Keep in mind that efficiency of the program is no issue. No matter what, it will complete instantaneously in human time. Write it for clarity and the ability to make changes to it.

Often what you think you want at first will be a little different from what you actually want after looking at results, running DRC checks, and the like. Having a program that writes a script allows you to easily delete the whole mess on the board, re-run the program, and re-run the script to try something a little different. It will also be useful for the next rev of the board. If you did it all manually and things need to be a little different next rev, you have a lot of work to do it over.

share|improve this answer
    
Thank you for detailed info. But to be honest I'm no where near to what you have said scripting. I have to learn things before to understand and write scripts. However I'm still happy to learn If you can provide me good guide. – i0s Jan 8 at 13:24
    
Can't upvote this enough! This is how to tap in to the true power of Eagle. – Scott Seidman Jan 8 at 13:35
    
@ScottSeidman Thank you. I have just read little bit introduction about eagle scripting and now I can imagine the power and how it makes tough jobs easy. Can anyone help me with the scripting for this little board? I have used couple of ULP scripts before but for this I have to learn a lot to do it one for myself. But now I don't have time. – i0s Jan 8 at 14:01
1  
@i0s -- I doubt you'll find someone to do what you're asking for. You've happened upon an engineering challenge that involves a time commitment from you that will set you back about 5-12 hours of learning from a zero start-- assuming that you know enough programming to generate your scripting file. My advice would be to pick out a pad, parametrize it in space, and come up with equations for the vertices on paper. After that, program it and loop through all your pads. – Scott Seidman Jan 8 at 14:06
    
@ScottSeidman Thank you scott. Thats what I'm thinking. Already started reading and will see how long will it take. Hopefully I can get help from here on scripting If I'm stuck. – i0s Jan 8 at 14:09

EAGLE offers two ways to write code:

Script files contain simple commands which you can also enter into the text field just above the drawing area.

ULPs (UserLanguagePrograms) allow sophisticated stuff like looping over all pins of an IC and change the name of the net connected to it.

I'm pretty sure your task can be done with ULPs, however, they are a bit more complex.

I like to write some code which writes a script. Here is what I would do in your case in PYTHON:

from math import *

f=open("MyFirstScript.scr", "w")

f.write("LAYER 1;\n")          # want to draw in layer 1

R1=1.0

angle=0.0

while( (angle +9) <=360):
    x1=R1*sin(radians(angle))
    y1=R1*cos(radians(angle))

    x2=R1*sin(radians(angle+180))
    y2=R1*cos(radians(angle+180))

    x3=R1*sin(radians(angle+9-1.63))
    y3=R1*cos(radians(angle+9-1.63))

    name="sig_%.3f"%(angle)  # signal name like sig_9.163

    f.write( "ARC  '%s' CW FLAT 0.2 (%f %f) (%f %f) (%f %f) ;\n"%(name, x1, y1, x2, y2, x3, y3) )

    angle=angle +9

f.close()

It creates a script with filename MyFirstScript.scr, which can then be opened in the EAGLE Layout editor:

LAYER 1;

ARC  'sig_0.000' CW FLAT 0.2 (0.000000 1.000000) (0.000000 -1.000000) (0.128276 0.991738) ;
ARC  'sig_9.000' CW FLAT 0.2 (0.156434 0.987688) (-0.156434 -0.987688) (0.281839 0.959462) ;
...

It switches to layer 1 and then creates lots of arcs. An arc takes three coordinate pairs: Starting point of the arc, a point 180° ahead, and the end point. The line width is 0.2, the end of the drawn lines are flat (instead of rounded), and the arc is drawn clockwise.

Run it on a board, and it gives this:

enter image description here

I have used arcs, but you may also have a look at polygons.

share|improve this answer
    
Thank you very much sweber. This is exactly what I'm looking for. I'm trying now and will let you know If I'm stuck at any point. – i0s Jan 10 at 16:53
    
sorry to bother you again. Arcs are fine for me. Please look into the pic. This is what I'm trying to create. But little bit confused on what you explained in earlier post. Should I use python code or script?. Also If you don't mind helping me can you please write a ULP for the pic. – i0s Jan 10 at 19:59
    
Also staring from 0 the total segments must be 40. – i0s Jan 10 at 20:24
    
I myself aren't so familiar with ULP, so sorry, I can't help with this. I used a PYTHON-Script (first listing) to generate the EAGLE-Script. That script creates exactly 40 segments. However, PYTHON has nothing to do with EAGLE, it's just used here to write a (special) text file. – sweber Jan 10 at 22:02
    
Sweber, it's ok no problem. Some how I'll try my best and see. Thanks again for you prompt reply much appreciated. – i0s Jan 11 at 4:33

You can use scripts in Altium to generate the shapes you want, or you can generate them in another format such as .DXF and import them. I took the latter route for some special spiral inductors, writing code to spit out a .DXF file as an intermediate format (where it could also be used in mechanical CAD packages and for other analysis), then importing it into the PCB program.

Here is an Altium script by Darren Moore that directly generates spirals, but you are probably going to have to write your own to meet your exact requirements.

enter image description here

share|improve this answer
    
Thanks for your reply. If I create a .DXF in AutoCAD and import to Altium, will the file get imported without disturbing the measurements. – i0s Jan 8 at 17:19
    
Think I'll first try creating the PCB board on AutoCAD and see what options I got to make it manufacturer file. – i0s Jan 8 at 17:35
    
Yes, if you have AutoCAD available that's certainly an option. Umm...there may be some subtleties with regard to DXF.. I think we used polylines. – Spehro Pefhany Jan 8 at 18:24
    
Oh i see. I never tried polylines, will try now. Thanks again. – i0s Jan 8 at 18:26
    
Hi Spehro, I was able to get the design on AutoCAD like as shown in the pic. After Importing into Altium I got this ouline on my board file. Could you please guide me how to make this outline to actual PCB as shown in pic, so that I can get the gerber file out. – i0s Jan 13 at 13:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.