Part Check - CD4049 Hex Converter

Wondering if someone can take a look at this and see if everything looks okay. Not sure if there are other guitar pedal builders out there. This would be for a EHX Hot Tubes.


CD4049.fzpz (10.8 KB)

FritzingCheckPart.py only reports two important errors:

Error 69: File
‘svg.breadboard.CD4049_a495a3d98e7f2416a9c70870671e762d_3_breadboard.svg.bak’
At line 8

Found a drawing element before a layerId (or no layerId)

Error 69: File
‘svg.schematic.CD4049_a495a3d98e7f2416a9c70870671e762d_3_schematic.svg.bak’
At line 23

Found a drawing element before a layerId (or no layerId)

to fix this you need to group the svg and assign it a layerId (without the layerId the part will not export as an image!)

Here (in Inkscape) I did an Edit–>select all then Object->group and named the resulting group breadboard to set the layerId. Schematic needs the same with the layerId set to schematic. That said it would be more useful (if a lot more complex!) to start from the 74x125 part which is a variable subpart part which has the logic broken out like this

Here each element can be moved independently of all the others.

You would need to add two elements, move the inverter circles to the output and remove the enable pins. Instructions on making such a part are available here which uses the 74x125 as the example part with the part available to download!

Peter

Awesome, Thanks! I am getting there (thanks to your help). That sub part thing is exactly what I was going to ask next. That will be perfect for my Op-Amps as well. As always, thanks for all your help!

So, once you create the subparts, you export the part and change the fzpz file to a zip to edit the XML? or do you edit the file somewhere else? Sorry, I have not edited the XML for these yet. I tried what I described, adding the section below. But I cannot import the part again.
image

Yes, when you unzip the .fzpz file you will get (usually) a .fzp file (xml that you edit with a text editor) and 3 or 4 svg file which you need to edit with an svg editor such as Inkscape. In this case you will need to change both the .fzp file and the schematic svg file (using Inkscape or another svg editor!) When you are finished and have run the part through FritzingCheckPart.py to clean up the things Inscape has done, then rezip the .fzp and all the svgs and rename the resulting zip file to .fzpz and it should load in Fritzing. You will need to change the moduleId and the svg file names (it may be easiest to use parts editor to edit the 74x125 part then without making any changes do File->Save as new part which will put the new part (with a new moduleId and new svg files) in the mine parts bin. From there right click and select Export part to write the new fzpz file to the file system. I usually skip this step and just change the moduleId and svg file names in the .fzp file, but you need to know what all needs to change so parts editor may be easier to start with.

Peter

Have you seen this where the subpart2 disappears and becomes an empty box the size of the entire drawing after you drag it on to the schematic view? I can move them both around, but second part is a ghost.
test.fzpz (8.4 KB)

image

You are missing the subpart1 definition in the schematic svg file. It is defined in the fzp file:

<subpart label="" id="subpart0">
  <connectors>
    <connector id="connector0"/>
    <connector id="connector1"/>
    <connector id="connector2"/>
    <connector id="connector3"/>
    <connector id="connector7"/>
  </connectors>
</subpart>
<subpart label="" id="subpart1">
  <connectors>
    <connector id="connector4"/>
    <connector id="connector5"/>
    <connector id="connector6"/>
  </connectors>
</subpart>

but is called subpart2 in the svg file.

without that the code doesn’t know where subpart1 is. As well normally the power pins pins 4 and 8 (connector3 and connector7) would usually be in subpart0 with the first op amp in subpart1 and the second in subpart2 although the current way should also work. This has also found a bug in FritzingCheckPart as it tosses an exception when processing the subparts (possibly because of two blank label fields, they should probably be “1” for the first label and “2” for the second.) Making those corrections makes the part work:

test-fixed.fzpz (8.9 KB)

Peter

Thanks, it’s always the stupid mistakes that drive you crazy for an hour and then make you slap your forward when you find out what the problem was! This is great, it opens up a bunch of possibilities now. Next I need to look up how to use the FritzingCheckPart.py script.

I notice that if you edit the part again, that subpart thing goes away and you have to do that again, even though that subpart section is still in the XML. Is there an easy way to export the part again, delete it, fix it and then reimport it? Or do you have to stop Fritzing, delete everything from the part folder in windows, restart Fritzing and let it error out on that part and then reimport again?

How do I get past this and not end up with a bunch of garbage parts?
image

I assume you are editing in parts editor? Parts editor (AFAIK) doesn’t support subparts (parts editor wasn’t completed when development stopped in 2016) so I don’t usually use it. I just unzip the .fzpz file and edit the files directly which avoids the issue. The There is already a part issue can be fixed by deleting the part in the parts bin (you need to remove the part from the sketch to be able to delete it in the parts bin) then restarting Fritzing (the requirement to restart is a Fritzing bug) saying yes to update the parts, then loading the new part after restarting Fritzing.

Peter

I will give that a try, thanks

That worked perfect! Thanks! This is exactly what I need for the pedal that I am working on.
image

It may have been easier to use the non-inverting CD4050 as a starting point. [4050, Hex Buffer, Non-Inverting, DIP16]
I made this with the 4049 in mind and left a line that could be easily replaced by a circle.

I did convert it to a 4049, but haven’t got around to submitting the part yet. I’ve been stuck on another project since November. Hopefully back to Fritzing soon :slight_smile: