Small signal diode part?


#1

I’ve just loaded version Version 0.9.3 so I’ve been a fritzing user for about 6 hours so far. I’m in need of a small signal diode which will fit in 4 holes instead of 5 as the 1n4001 (the only diode I could find in the parts menu) does, specifically a 1n4448. If I select a 1n4001 in the breadboard view and enter the parts editor (with the thought that it should be possible to reduce the size by .1 inch) I get this warning message:

This part has bendable legs. This version of the parts Editor does not yet support editing bendable legs, and the legs may not be displayed correctly in breadboard view. If you make changes to breadboard view or change connector metadata the legs may no longer work. You can safely make changes to Schematic or PCB view.

With or without the error message I can’t see how to reduce the size by .1 inch anyway (actually from the parts editor view it looks as if it should only use 4 holes). Is there a small signal part somewhere that I have missed?

Peter Van Epp


#2

4 holes is 0.300", there should be one in the drop down menu in the diode Inspector - bottom right -.

I made bigger ones.


#3

You can edit your bendable legs in your Breadboard View .svg… the bendable legs are labeled id=“connector0leg”, etc.

In your .fzp you will find the counterpart to your bendable legs, legId=“connector0leg”, etc.

<breadboardView>
     <p svgId="connector0pin" legId="connector0leg" layer="breadboard"/>
</breadboardView>

#4

The one from the diode inspector is what I’m using (and I see a request from back in April for a small signal diode part from someone else with no replies) but while the spacing looks to be 0.300" it appears in the breadboard view as 0.400" which is sensible for a 1n4001 as I don’t think you can easily bend it to fit into 0.300".
It sounds like from the other post that the PCB hole size is too large (again sensible for a 1n4001 as it is higher current than the small signal diodes) as well although I’m not worried about PCB at the moment.


#5

Doing a save (without any changes) of the diode part from the part editor indeed gives me a .svg file with the field "rect x=“0.011” height=“1” fill=“none” width=“1” id=“connector0pin” gorn=“0.0.0” y="2.583"
in it, but it is unclear to me how I would edit this to change the spacing from .4 to .3. I guess I need to try one of the create your own part tutorials (although I saw somewhere that with the editor changes the tutorials are out of date). Is there documentation somewhere that I haven’t found yet on the various file formats in use?


#6

It is difficult to edit some elements within the .svg unless you have some experience of working with .xml files. It is best to open it up in graphic editor like Inkscape and physically move the elements so you can see what you are doing. In order to make the diode 4 holes in length, you need to shorten or shrink the diode and shorten the leads.

Some tutorials are out of date and some are not… Although, the graphic editor itself has a little bit of a learning curve for editing parts.

Try loading this into the breadboard view of your parts editor… I shrunk it down to 4 holes.
http://imgh.us/Small-Diode.svg

Please let me know if you have any problems.


#7

Ahh, the breadboard. I never worried much about BB because it’s the PCB that goes in to production.

If you’re not worried about bendable legs I think you can just save the diode as a new part and just replace the BB svg with a static 0.300" svg in Edit.

You could also just bend the legs to 0.300" if you don’t mind it looking funny.


#8

That does the trick! Thank you. It was a bit tricky to get here, and I may have found a bug or two on the way but I have what I need to complete what I want to do now. Because I was using hard links to move the data directories for fritzing off my system disk I deleted the entire installation and the hard links and did a vanilla install. Started fritzing and copied a diode from parts in to breadboard view. Right click-> edit on the diode
to get the part editor then file->Save as new part, replace default “prefix0000” with 1n4148 and a diode symbol appears in My parts on the right. As well a bunch of files appear in the fritzing directory specifically of interest:

‘/cygdrive/c/Users/Owner/My Documents/Fritzing/parts/svg/user/breadboard’:
1n4148_11d372426af07061268d12c995b2bf2f_1_breadboard.svg

shut down fritzing (saving as it asked me to) to verify it really was using this file.

rename

c/Users/Owner/My Documents/Fritzing/parts/svg/user/breadboard/1n4148_11d372426af07061268d12c995b2bf2f_1_breadboard.svg

to

c/Users/Owner/My Documents/Fritzing/parts/svg/user/breadboard/1n4148_11d372426af07061268d12c995b2bf2f_1_breadboard_orig.svg

restarted fritzing and discovered it wasn’t unhappy at all (indicating it wasn’t using this file). However when I
dragged a copy of diode from My Parts in to the breadboard window I get this error message (and apparently tickle a bug!):

error reading file c/Users/Owner/My Documents/Fritzing/parts/svg/user/breadboard/1n4148_11d372426af07061268d12c995b2bf2f_1.fpz: file for Rectifier Diode
1n4148_11d372426af07061268d12c995b2bf2f_1 not found.

and the entire fritzing interface hangs. Can’t clear the error message or close any of the windows (since you shouldn’t be renaming files under it this doesn’t appear to be an important bug, but it does seem to be a bug!). Killed fritzing in task manager and having determined that it is using this file I replaced the contents with the data from Small-Diode.svg and now all is well. I believe that this also points to a more serious bug in the diode core part. As far as I can see the PCB view has its pads with .3 inch spacing which seems to make the breadboard view with .4 inch spacing incorrect. As well breadboard view in the part editor looks odd, the spacing on the connector pins seems (at least to me) oddly aligned compared to for instance the
core->input->push button breadboard view which I was trying to figure out how to change the diode settings in parts editor to be the same (without any particular success I might add, parts editor is certainly not as intuitive as the rest of the interface :-)). Again thanks for the help now I’ll continue on and see if I can complete the schematic portion of the simple board I am trying.

Peter Van Epp


#9
I'm most likely to use the breadboard and schematic views, because I'm usually doing one ofs just for me usually on perfboard and a picture of the physical board and a schematic are the most valuable documentation for me. This appears to be pretty much perfect for my needs as it is much easier to use than Geda or Kicad at least so far. I guess I'm going to have to download and learn the open source graphics editor as well. Thanks for the help!

Peter Van Epp


#10

Great! I could have done all of that for you but you would not have learned anything… See one, Do one, Teach one… :grinning:


#11

Yeah, teach as many people as possible.The more people working on FZ, the quicker it will get better.

Another trick is that you don’t have to save the part with a specific name, just go to the Inspector and change the part# to whatever you want and right-click on the part and display the name.


#12

Looks like I need some more education. I’ve loaded inkscape and gone through the tutorials and then tried
to reproduce the Small-Diode.svg file above on my own (without any success).
In inkscape loaded Small-Diode.svg, made no changes and saved as inkscape_Small-Diode.svg
saved as plain SVG verified that it works same as the original in fritzing. Now start
inkscape and load the original diode svg make no changes but save as

1n4148_4a5194aa1a963b261e27de4327a40346_1_breadboard_nochange.svg plain svg

start fritzing and it works as normal as expected. Following the instructions in

http://fritzing.org/learning/tutorials/creating-custom-parts/providing-part-graphics/

Start inkscape and load the original diode svg

select the part and modify icons appear

shrink part to 3 grid lines from .4 (with grid set to .1 per division and inches)

file -> document properties -> resize page to content

and the bounding box shrinks down to the new size

save as plain svg

1n4148_4a5194aa1a963b261e27de4327a40346_1_breadboard_mods.svg

replace the svg file in fritzing and start it and select the mine diode

which has no connectors points (unlike the original) and is offset from the grid by .05 inch

I’m obviously missing a step or steps in here but haven’t been able to find out what from
lots of online searching. Can anyone provide some guidance?

Peter Van Epp


#13

I don’t know what that is. I usually use Object/Transform, and a box appears on the side, Then I select Scale.

I’ve noticed that missaligment thing on some parts but havn’t bothered chasing it down. It might be due to boarder origin of the part, when you resize page to drawing, not being the correct distance from the contacts.

Open Inkscape EDIT/XML Editor and look at the structure of the original part.

Try to not hack the dir files, just save as new part, Export, unzip, then load the modified svg back into the new saved part with Edit.


#14

By modify icons I mean the double headed arrows on the sides and corners of the selected part (the diode in this case) that you can then select and drag and they will scale or move the part. I just tried this using object transform but the same thing happens. When saved and moved in to the file that fritzing is using the icon is the correct size, but it is aligned half way between the grid lines (as it is in inkscape with both this one and the one that works correctly) and the connector pins aren’t there any more so clicking on the end of a wire won’t make a connection, I expect there is something relatively simple that I’m not doing but I don’t know what it is.

Peter Van Epp


#15

Ah, the graphical handles.

Do everything you did the graphical way, but when you move the box handles only shorten the length and not the height. I just tried it and it didn’t miss-align.

The origin of an object in Inkscape is the bottom left, and it seams that if it’s not the correct distance from the centreline it will miss-align in FZ. FZ must use the origin as the snap.


#16
Nope, didn't work for me. I only shortened the diode in the horizontal direction (leaving it fat looking!) and

did file -> document properties -> resize page to content then saved it as plain svg but it is still off the snap grid by .05 and has lost the connector pins in Fritz. Do I need to do something like ungrouping (which I’ve seen mentioned)? Or edit the test file to restore some header (which I’ve also seen mentioned, but usually in relation to the PCB files)?

Peter Van Epp


#17

Does this one do it.

I shortened this one in BB view. Are we still on the BB view

Rectifier Diode.fzpz (5.2 KB)


#18

Thanks! Which brings up another unrelated question, how do I upload the file to the forum as you did here (for future reference)? I went looking for a way to do that but didn’t find it.
Back on the original issue, yes I’m only modifying the BB view file (without success). Did you create this part with inkscape? From the file in

/cygdrive/f/Fritzing/My Documents/Fritzing/parts/svg/user/breadboard

on my system when I load this (which indeed works correctly for me as, does the original file from steelgoose), would you please confirm that this was created with incscape as I understood it to be?
I ask because the start of your working file looks like this:

vi prefix0000_7d78fc8d488fdfd6d0657240f1b67daf_2_breadboard.svg

<?xml version='1.0' encoding='UTF-8' standalone='no'?>

<- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<- svg xmlns=“http://www.w3.org/2000/svg” viewBox=“0 0 23.476662 7.3039667” id=“Layer_1” width=“0.32606468in” gorn=“0” version=“1.1” x=“0px” y=“0px” height=“0.10144398in”>

(note: I had to make some minor changes in the above via edit to get it to display in here, apparently the forum interprets the xml sometimes!).

Which matches the unmodified file, where as mine modified by inkscape looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

which (assuming you are as I think using inkscape) probably explains my problem. I suspect the devil is in these details from

http://fritzing.org/learning/tutorials/creating-custom-parts/providing-part-graphics/

  1. Delete all graphical artefacts like masks, meshes and styles.

As far as I can see, I don’t think I have anything like that enabled but I could well be wrong. Assuming
you are using inkscape could you tell me what you disabled in the stock inkscape as that may be my problem?

Peter Van Epp


#19

When you reply there is a toolbar at the top, and it’s the 7th one along.

Don’t grab files out of the dir, do it all in FZ.
There is actually no need to learn/hack the XML - I’m no expert in XML -, as you can do everything graphically in Inkscape

This is how I did it.
Right-click diode in Core.
Edit Part.
File/Save as new Part - give it the name you want.
Go to My Parts and right-click the new part.
Export Part.
Go to that file in the dir and change extension from .fzpz to .zip.
Extract .zip.
Open BB svg in Inkscape.
Edit/Select All.
Object/Transform.
In the side box select ‘width 75%’ and click apply.
File/Document Properties.
Resize Page to drawing/Resize Page to drawing.
Save As/select Plain svg/save - name not important -.
Go back to FZ and right-click EDIT the new part you made.
Select BB.
File/load Image for view.
Select the svg file you just made, and press enter.
File/Save.


#20

That worked, thank you! I believe the “Edit/Select All” is the magic, I think I was only selecting one layer not all layers when I clicked on the part and did the transform manually was the problem (although I’ll have to test that). I also don’t think (but again will have to test) that you don’t need to do the unzip part (although I did this time) as frtizing breaks out the files in to the directories in C:\Users\Owner\Documents\Fritzing\parts\svg\user\breadboard (etc.) for you already in the latest fritzing version exactly to make this easier. In any case I now have successfully recreated the original file and can now experiment to see if I can identify what works and what doesn’t (such as shrinking the diode vertically and possibly moving the origin to 0,0 on the bottom left of the image or if that is indeed required, or if the select all will fix that too!) I’ll also think about a post documenting the complete creation of a part assuming I manage to figure out how as there is very little useful information on the net about this subject. All the stuff I’ve found didn’t help me figure out what I was doing wrong up until now. Again thanks!

Peter Van Epp