Add library from Github

New user, but with Eagle going away I want to get ahead of the rush.
I found a component I want to use in my schematic on GitHub, but when I put the URL to the lplib repository into the “URL to ZIP file” and click on Download, I get this error:
“Error while extracting the ZIP file…”

When I look in the directory: D:\River Documents\LibrePCB\Workspace\data\libraries\local
there is no Arduino.lplib file there.

So, what am I doing wrong?

Hi @SteveRMann,

Good choice! :smiley:

The URL must point to a ZIP file, but your entered GitHub URL points to a website. On GitHub you can click on “Download ZIP” to get the download URL. In your case it would be:

https://github.com/LibrePCB-Libraries/Arduino.lplib/archive/refs/heads/master.zip

However, you don’t need to install this library manually because you already have installed it. All libraries from github.com/LibrePCB-Libraries are offered in the library manager (called “remote libraries” so you never need to install those manually.

Thank you for the reply.
This brings up another question.
The part I want to use is the Wemos D1 Mini module, and a Google search tells me that it is in the Arduino Library. But I can’t find it as a component.

Then your Google is wrong :wink: We don’t have any Wemos modules yet.

Never heard of this module yet but it looks like it it quite popular. Maybe I could add it to our libraries, would you be interested (might take 1-2 days)?

I can see wht Google would be confused since half of the projects people are making in the Arduino forums are on ESP devices, many on the Wemos D1 Mini, probably as many as on the NodeMCU, and increasingly more on the ESP32 modules.

I must live in a bubble. My projects are around IOT and in the Home Assistant universe where the ESP line of modules is endemic. Almost all of my projects are using the Wemos D1 Mini, so you can appreciate that I am a bit surprised that someone is unfamiliar with it.

There are other modules that I use that are less popular like the RFC-522 RFID module or the DfPlayer Mini MP3 player module. I looked at making my own component but still confused. I’ll try again. I couldn’t figure out how to make a package with exact dimensions, or less important, a notch in the outline.

I read the thread of the Public Library concept with interest. I would be very surprised if I were the only one using the Wemos modules. There really needs to be a way for users to share their components.

We do have several ESP32 modules in our libraries. But yes, IoT/HA projects are just a “bubble” in the huge world of electronics. A large part of the electronics universe is never used by hobbyists, just by professionals (e.g. STM32 is a huge, veeeeery widely used microcontroller family but for most hobbyists it’s too complicated).

Anyway, we are happy to get inputs about popular parts in the hobbyist scene. As said, I’d offer you to create the Wemos D1 Mini if you like.

Most things can be done by drawing the footprint roughly, and then double-click the objects to modify their properties. There you can always enter exact coordinates.

Thanks. I am learning, but it is “painful”. Could you review what I did for a DfRobot DfPlayer Mini?
In particular, why am I not seeing the pin names on the schematic that are visible on the symbol? (I.E., what did I do wrong?)

(And yes, I would appreciate it if you could do a library for the Lolin Wemos D1 Mini., at your convenience).

My Library:

Symbol:

Devices:

And, on a schematic:

Open the component in the library editor. Then double-click the symbol variant (typically called “default”). In the dialog you should see that the pins are not connected yet.

And btw, all your symbol pins are rotated wrong by 180 degrees. The green circle is where the wires get attached.

Thanks- that fixed the component.
(The next trial will be remembering how I got here.)

Is there a list of components anywhere? Something I can scan without knowing the search terms?

You could just open a schematic and open the “Add Component” editor (shortcut “A”). There you can browse the library by categories.

I just created the Wemos D1 Mini:

It’s not merged yet. Could you maybe try it out by installing the library via URL?

https://github.com/LibrePCB-Libraries/Lolin.lplib/archive/refs/heads/wemos-d1-mini.zip

Soon I’ll then merge and publish the library via library manager.

@SteveRMann did you try the Wemos D1 Mini? Everything ok?

Thank you for the Wemos D1 part. Your feedback is much appreciated.
I know that finding the pin names of the Wemos modules can be aggravating. I have renamed the pins and schematic arrangement to the most common usage.

  1. How do I renumber components? Is there an auto-renumber tool or do I have to do it one component at a time?
  2. How do I notch the PCB? I need to cut a notch in the PCB under the USB connector on the Wemos D1 Mini module.

  1. How do I move a part on the PCB when the grab handle is under a solder pad? For example, the move handle is under the center solder pad of J1. Can I move the grab handles?

Thanks…

Oh I just saw in their schematics they call it “IO0”, “IO5” etc. so I renamed the symbol/component accordingly. Just numbers are not expressive at all (sound like pin numbers, which they are not).

And btw, I made an improvement in LibrePCB that from the next release on you’ll see these pin names on the pads in the board editor, which makes packages like this better understandable:

Hmm generally you’re free to do that, but to be honest I’d not recommend it. A symbol is the logical representation of a device and should be drawn in a way to make schematics as logical, clean and easy to read as possible. It has nothing to do with the physical layout of the part (the package).

If you didn’t check out our library conventions yet, I’d recommend to do so. Following these guidelines lead to cleaner schematics which are easier to read. Also your “MP3 Player” symbol & package violate several important guidelines.

https://librepcb.org/docs/quickstart/create-project/board/#draw-outlines

To draw polygons with arcs, open Properties from the polygon’s context menu (right-click) and specify the vertex coordinates and angles manually.

Press Shift.

I have. I come from a circuit design background with limited CAD experience, I sometimes learn something, but mostly remain confused. What did I do wrong with the MP3 player module? It seems to work. I am able to wire the part on the schematic and place it on the PCB.

I did go back to the guidelines and found a couple of things that I did wrong.

Your other tips are much appreciated.
Do I understand that the renumber is on the list of things to do?

Update- I was “this close” to sending an order for a prototype board but the footprint of the audio jack didn’t look right. I did finally find an Eagle library for this jack and imported it into my library.

Correct.

Just from the screenshots:

  • Naming of both symbol & package is very strange, basically totally meaningless (I have no idea what device you mean)
  • Symbol pins are offset (normally they end at the symbol edge, not inside the symbol)
  • Arrangement of symbol pins is identical to physical arrangement, but it should be a logical representation of the circuit (e.g. GND and VCC close together)
  • If GND_1 and GND_2 are connected on the module, there should be only one GND pin
  • Different font sizes for pin names (not a big deal, but looks strange / inconsistent)
  • Origin of symbol not centered
  • Name & value labels in symbol not left-aligned
  • Footprint origin not centered
  • Package outline & courtyard polygons too small (must be around the whole package body)
  • No package drawing polygon on “top_documentation” layer
  • Name & value label in footprint far away from footprint and not x-centered
  • Normally we don’t place pin names on silkscreen. It may make sense in very specific cases but even there I’d not add the text labels to the footprint, but only to the board. Usually it’s not desired to have too much information on silkscreen as often it gets too crowded (often not a problem for pure hobby projects where PCB size is irrelevant)

Of course for personal use you are free to violate rules like these as none of them are really critical. However, once you learned the guidelines usually following them doesn’t cost much time but lead to much cleaner & more consistent libraries. And to share libraries with other people, it’s important to have a consistent look&feel.