Part (multimeter) question and feedback

Hi,
I am making a multimeter for Fritzing. There are 5 parts: voltmeter(ac/dc), ammeter(ac/dc) and ohmmeter. This is the first one, the voltmeter for dc: multimeter.fzpz (11.1 KB)

I tried to show the same image as in the breadboard view in the pcb view. So, I put the image in the silkscreen layer, but it is just a black rectangle in the pcb view. Any ideas about how to achieve this?

In the schematic view, the part name is not centered on purpose (there is some space below to show the current voltage of the circuit).

I would really appreciate some feedback as I am trying to include them in the fritzing-part repository.

The silk screen is not an “image” in the conventional sense. Silkscreen is a single color, so all svg content (except white I think) is turned into black, and the result used as the svg fill/flood area. What you want is a single color shape (or set of shapes) plus text of what you want the silkscreen to look like. The BB image probably has a whole bunch of overlapping (and filled) shapes, to the result is just a filled rectangle.

The best bet would be to suppress the pcb layer in this case (as it isn’t useful.) Instructions on doing so are available here:

Peter

Not much wrong. The breadboard svg is missing its layerId which will cause the part to not export as one of the image formats. Easy to correct, at the end of the svg edit, select all in all layers, group it and set the group name to the layerId (breadboard in this case.) The scale isn’t correct, so as this wants to be a core part I corrected it, (instructions here:

I initially added a 7 segment display set to 0.00 then realized you are likely going to use the text function to be able to set a value in a sketch for documenation purposes, and removed my addition as unneeded. The same thing done in schematic below will also work in breadboard. Moved the connectors to be exactly on .1in boundaries to line up with the .1in grid in breadboard (minor position change), in practice unnoticable.

schematic

start from schematic template which has the correct scale connector layout and line widths and colors. Available here:

Added 1 pin to bottom row for the A pin so that schematic matches breadboard, but left it inhibited so it isn’t active in schematic. If you prefer to eliminate the A pin in schematic, just delete it again, either way is acceptable. This image indicates what I meant about adding a voltage value in a sketch (if as seems likely this part is being used to create documentation.) Here from the sketch I added a text field and set the “voltage” to 5.00. As you may know you can change the size with the width and height parameters in Inspector and change the text in the same place as shown here. This also works in breadboard (which is I assume why the display field was left blank.) In general it is desirable for parts in schematic to be as small as possible as room in schematic is limited

Rename the breadboard and schematic svg files to append an _1 i.e. svg.breadboard.multimeter_v_dc_breadboard_1.svg to make a new unique (and more standard) file name. Do the same to the fzp file part.multimeter_v_dc_1.fzp. This will allow this to be a new part that will load along side your current part. Delete icon and pcb svgs, breadboard will be reused as icon and pcb svgs.

fzp file

change the moduleId to multimeter_v_dc_1 (as it must be unique) correct the fritzing version to 0.9.4

change the label to VM (as the first 4 letters of this will become the label VM1, VM2 in this case (although I see it did not in fact truncate your labels, I thought it only did 4 characters …)

change property type to variant (I expect either will work, but variant is more standard)

delete the taxonomy as uneeded (and incorrect in this case!)

insert a trailing _1 (as a version number) before the last breadboard image name:

      <layers image="breadboard/multimeter_v_dc_1_breadboard.svg">

replace the iconview and pcbview layer names with the above line. That will use breadboard for the icon and as the pcb view (which is effectively no pcb view as the layerIds won’t match)

remove the terminalId from breadboard, as they are not defined in the svg and thus aren’t needed (although while they won’t hurt anything if present, removal is more correct)

          <p svgId="connector0pin" terminalId="connector0terminal" layer="breadboard"/>

to

<p svgId="connector0pin" layer="breadboard"/>

remove pcbview entirely as uneeded. Now either run the part file through FritzingCheckPart.py (which is what I did) which will check for a variety of errors and make some xml adjustments. If you don’t want to run FritzingCheckPart, you need to edit each svg file with a text editor and remove the trailing px from the font-size commands, i.e.

style="font-size:49px;font-family:'Droid Sans';text-anchor:middle;fill:#555555"

needs to become

style="font-size:49;font-family:'Droid Sans';text-anchor:middle;fill:#555555"

because in some circumstances Fritzing will change a font-size ending in px to 0 essentially deleting the text. The CSS standard requires the px in font-size and the svg editors obey CSS. Here is a new version of your part with these changes. If you unzip the fzpz file, you will get the fzp and 2 svgs which you can compare to your original files to see the changes.

multimeter-improved.fzpz (6.3 KB)

Peter

Thank you Peter for all your modifications. I will make the other parts and create a pull request to the part repository.
My intention trying to put the image of the bb view in the pcb view was for documenting proposes. Imagine that you need to check something in a pcb with a multimeter, then you could create an image to indicate where to place the probes. In any case, it seems that is not possible with the current code. So, I agree that the best is to remove the pcb image.
Regarding the text on the display of the multimeter, yes there is no text on purpose. You are right, one use case is the one that you describe (I did not think on using the text tools to set the voltage, but it is a realy nice suggestion). My aim is to make a very basic simulator (only dc and no transients) for my students. Still work in progress but getting close. I hope that it could be integrated in the future in the code. A small preview, the link expires in one week.

I’ll poke at this a bit. It may be possible to do something like this (although it may need a code change) similar to adding a ruler (which works in pcb.) It won’t appear in the gerber output but a screen shot of the Fritzing screen would be usable for documentation.

Peter

With 2 new parts (for the probes) and a previously undocumented layerId partimage, I have made this work (mostly anyway) in all three views. I suspect partimage is what the rulers use to render in pcb view, but there isn’t any way to attach a wire from the meter to the probes as there is in breadboard or schematic. I expect you could export the pcb image as an svg and use Inkscape to add the necessary wire, but I don’t think Fritzing can do it.

breadboard:

but there are some issues. The probes connect to the breadboard, but won’t connect (without a wire between them) to a free standing part:

Here the red probe on the standalone IC is not connected, but the black probe (connected via a wire) is.

schematic

Much the same in schematic. You can replace the meter here with the one from breadboard if you think that makes things clearer as well.

pcb

Here as noted the wires from the end of the probe to the meter are not present. As noted you should be able to export this as an svg and use Inkscape to add the necessary wires.

the new pcb layer and connector configuration looks like this:

<pcbView>
  <layers image="pcb/multimeter_v_dc_1_pcb.svg">
    <layer layerId="partimage"/>
  </layers>
</pcbView>

and for each connector

    <pcbView>
      <p svgId="connector1pin" layer="partimage"/>
    </pcbView>

The new parts will be in the temp parts bin of this fzz file (which is what the screen shots were created from):

multimeter-test.fzz (23.5 KB)

Peter

Great! Looks very promising.

Regarding the probes, could we change the connector type to wire to fix the issue with male connectors?

I would say that the probes should not have an schematic view. BB and PCB views are physical views where you want to see the real parts. This is not the case in the schematic view and I do not think they are useful. In my opinion, wires to the appropriate nets are enough and provide a cleaner schematic.

I think the probes can be useful for documenting proposes. Of course, it will be to the users to use them or no. For the simulator they are not needed but they will no affect it. Do you mind if I include them in the commit to be included in the core parts?

Regarding the lack of connectors for the multimeter in the PCB view, I wonder if it would be possible to add really small copper pads for the connectors. Thus, the connectors would exist and it would be possible to use jumper wires to connect them to other parts. PCB manufactures will probably ignore anything that is outside the border of the PCB. In case the multimeter is inside the PCB, it will still be safe if the connector is, for example, 0.0001mm in diameter as it cannot be manufactured. The only risk is if the user connects them with normal traces instead of jumper wires.