Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Eagle: Creating Supply Rails

Status
Not open for further replies.

ThermalRunaway

New Member
Hi everyone,

I have some banks of LEDs that I need to connect to common power supply rails. Eagle provides a neat way of connecting nets to supply rails, using a dedicated supply part. In the library you can choose from a multitude of supply rails, from 3V3 to VCC to V+ etc etc. Any nets you connect to these rails are merged together, without the need to show an actual connection on your diagram.

However, the supply rails on offer don't quite match my needs. I want to do exactly the same thing, except that I want to connect some banks of LEDs to a 'V1' supply rail and other banks of LEDs to a 'V2' supply rail. Unfortunately Eagle doesn't offer these rails as options in its parts list.

Now, I can get around it by using VCC and VDD if I want. That would work. But that's not really what the VCC and VDD rails are intended for, so I'd much rather create my own V1 and V2 supply rails.

Any ideas how this can be done? I had a bit of a look myself and tried to play around with Eagle's existing Supply Rail library, but it's not making sense to me.

Alternatively, if anyone knows of a different method to accomplish my task then please volunteer it!

Cheers all,

Brian
 
Don't worry all - I've worked it out for myself now actually. I'll post a good explanation with screen grabs showing what to do later, in case anyone else wants to do the same thing.

Brian
 
Okay, here's a quick guide on how to create Supply Rail parts in Eagle. Please note that I am by no means an expert in Eagle - I learn as I go along, just like you probably are!
The brief tutorial is applicable to version 5.60 of Eagle on a Windows machine. Other versions may be similar.
I am assuming a basic knowledge of Eagle, otherwise I could be here all day. But if you have specific questions then post to this thread and I'll do my best to answer them - like I said I'm not an expert myself.

Supply Rail parts are useful because they allow you to connect various parts of your circuit to a supply rail symbol, which then automatically merges the nets concerned. This avoids the untidy alternative of physically connecting separated parts of a circuit to the same supply rail with a physical wire. The connection is instead implied by the connection of the supply rail part. This can also be used for ground rails, or in fact anything you want!

1. Okay. To create a Supply Rail Part, first you must open a library. I've previously created my own library called 'Brian Hoskins', and I'd advise you to create your own as well. The only footprints you can trust 100% in Eagle are the ones you've spent your own time perfecting!

1_open_library.png

2. Once you've opened your library, you need to create a new symbol. To do this, click 'symbol' from the toolbar

2_select_symbol.png

3. Then type your new symbol name into the dialogue box. (e.g. V1, V2, V_pos... whatever)

3_type_symbol.png

4. Click 'OK', and then you will be presented with the following dialogue box, asking if you're sure you want to create the new symbol. Click 'Yes'

4_type_symbol_dialoguebox.png

5. Now type the command 'pin' into the command line. Choose your desired pin from the toolbar that appears (short, long, etc) and place it at the origin of your symbol diagram (marked by a cross).

5_place_pin.png

6. Select the 'Change' button from the left hand toolbar (depicted by a spanner) then right-click your pin and select 'Properties' from the menu that appears. You will be presented with the properties dialogue box for your symbol. Change the standard pin name to something more descriptive (in this case best to make it your supply rail name) and change the type of the pin to Sup (short for supply). Then click OK. See below for details:

6_pin_properties.png

7. Now you need to draw your symbol. It's up to you what you want it to look like, but I always tend to stick to a "keep it simple, stupid" approach. Hence this is my symbol:

7_draw_symbol.png

8. Now your Symbol is done. Select 'Device' from the top toolbar:

8_select_device.png

9. Type in your new Device name, like you did for the Symbol. Again - keep it simple, stupid. Use your supply rail name!

9_type_device.png

10. Just as with the new symbol creation, you will now be presented with a dialogue box asking if you're sure you want to create the new device. And we are sure, so click 'Yes'.

10_type_device_dialoguebox.png

11. In the Device window that appears, you will see a button labeled 'Prefix'. Click it, and enter your Supply Rail name. Then, in the bottom left sub-window, click the 'Description' link and enter something descriptive for the device like I've done below. Note that you can use tags like <b> </b> etc:

11_type_description.png

12. Now type add in the command line, or select the add button from the left hand toolbar. This is where you add the symbol you created previously, to your new device. Select the correct symbol (hopefully you've called it something meaningful or this could be tricky!):

12_add_symbol.png

13. Now place your symbol in the top left sub-window. You may need to zoom in (tip:hold CTRL and use your scroll button on the mouse). It's best to place it on the origin I think, as it uses this to determine where to hold the symbol when you're placing it on your schematic.

13_place_symbol.png

15. That's it! You're done. You don't need a package (footprint) because this is just a supply rail connection on your schematic, not a physical part. If you save your work, you should now be able to add the supply rail you've created to your schematic. If you add multiple copies of your supply rail to your schematic and connect various parts of your circuit to them, then those parts of the circuit will automatically be connected without needing to draw physical connections between them. Much neater if you ask me.

Hope this helps!

Brian
 
Last edited:
Yeah I did try and copy the parts from the existing library and rename them but I had absolutely no luck at all with it? How do you do that, then?
 
Eagle can sometimes be pretty unintuitive. Open the library you want the part in. Go back to the main control panel screen and find the library you want to take the part from in that scroll list. Find the part and right click -> copy to library. This will copy the part to your currently open library where you can then edit it.

Otherwise you have to open the old library, do the group copy, open the new one, and start the new part, then past it in.

The 'supply2' library does have multiple 5V supply lines. 5V/1 thru 5V/4.

Are you sure you actually want multiple supplies? It's pretty odd to have multiple supplies with the same voltage.
 
Last edited:
Ahhh okay. Well in that case copying parts over and modifying them is by far the easiest method. Still, it's not long before you find yourself having to create new parts in Eagle so the skills above are relevant to that.

Regarding the multiple supplies, yes I am sure. Basically I'm using a basic multivibrator circuit (in conjunction with an output FET) to switch two banks of LEDs alternately. I drew my banks of LEDs on the schematic, but there were rather a lot of them so I had to split them up into rows going down the page. I didn't want to have to link all these together with wires and then also have to connect the output FETs to them with wires, I just wanted to use a supply rail reference so that the connection could be implied with the supply rail part rather than having to draw messy wires.
 
Last edited:
Are you sure you actually want multiple supplies? It's pretty odd to have multiple supplies with the same voltage.

Hi Mark,

multiple supply rails are very useful if you use externally connected sub-boards. Connecting on the same rail and designing the PCB layout you'll have air wires going beyond the main board to all sub-boards, e.g. one controller board connected to several sensor boards.

(I use to design complex circuits in one schematic containing several sheets. If all info about the circuit is within one schematic I don't have to close and open another one to track what I'm doing.)

All sensors have the same ground and the same supply voltage. Using two power rails (e.g. VCC and GND) the finished board will look ugly if you don't hide layer19 (unrouted). It will also be annoying and confusing. (is the trace valid or not? :confused:)

Using different supply designators the parts belonging to one sub-circuit being connected to their specific rails can be pulled aside for a sub-board easily.

The latest project I did contained three temperature sensor cicuits and four limit sensors (Hall). If I had done it using just two power rails the air wires across the entire "picture" would haven driven me crazy. :)

So I guess using multiple rails makes a lot of sense. The more you create the better and easier you can work.

Regards

Boncuk
 
multiple supply rails are very useful if you use externally connected sub-boards. Connecting on the same rail and designing the PCB layout you'll have air wires going beyond the main board to all sub-boards, e.g. one controller board connected to several sensor boards.

I didn't say it was unreasonable, I just said it was odd. It's generally a good idea to assume most people here, especially if they are not familiar with Eagle are only using the freeware version (one sheet) and/or do not have the requirements to do the crazy stuff Boncuk does with Eagle.

Thanks for your explanation, though.
 
Last edited:
It's generally a good idea to assume most people here, especially if they are not familiar with Eagle are only using the freeware version (one sheet) and/or do not have the requirements to do the crazy stuff Boncuk does with Eagle.

Thanks for your explanation, though.

Just remember: It's only one small step from ingeniousity to insanity. :D (or in German: Es ist nur ein kleiner Schritt vom Genie zum Wahnsinnigen)

BTW, you might enlarge the schematic working area to the maximum paper size your DIN-A0 printer/plotter can handle. :)

That way you can compensate for the 1 page limit of the free version. ;)
 
Last edited:
If your schematic is too large, the printer prints sections on multiple pages. I've created a 'frames' outline that shows me where those page borders are, and when I print this it cheerfully prints each sub-frame of my large schematic on separate sheets of paper.
 
Hi Brian.
Thank you VERY much. This was excellent.
I had been struggling with problems related to needing different powers and grounds for the MCU I'm working with.
Was getting ERC problems with "Supply pin x overwritten with more than one signal".
Looked for 2 days for posts/blogs and finally found your solution.
 
Hi Brian.
Thank you VERY much. This was excellent.
I had been struggling with problems related to needing different powers and grounds for the MCU I'm working with.
Was getting ERC problems with "Supply pin x overwritten with more than one signal".
Looked for 2 days for posts/blogs and finally found your solution.

Welcome to ETO.

Who is Brian?

If you would really like an answer to a routing, drawing schematics, or other Eagle questions, please start a new thread on the subject.

It will be immensely helpful when you do that, if you attach the .sch file. Without that , it is just a guess, but the problem you describe is often caused by using the "wire" tool instead of the "net" tool or using components that are improperly drawn. Changing grid sizes can also lead to it.

John
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top