Confused about New Part Fab

Peter,
I will upload the 5 jpg images of screen, and add part/SVG files in separate posting.
I have tried to create a proper usable TB6600 for 2 days now. I attempted to read everything I could about parts fab here and several other instructionals.
The Stepper Driver 02 is about the fifteenth attempt at fabricating a proper SVG. Others even more. The scaling, units have been checked (inches) and all connectors have been LOCKED after verifying. DON’T go to SCHEMATIC before looking at BREADBOARD, The image will disappear when you return to Breadboard. Note on the attempted part that the filename keeps going back to your DM860A, the SCHEMATIC image IS this, and I cannot re-name, It was edited to have all the same info as Breadboard… but the TB6600 is in Breadboard. BOTH have the same Connector List. If I select Schematic to check, and return to Breadboard My Image disappears in Breadboard, even after editing all the attributes before leaving BB. When an attempt is made (TEMP) to load the compiled part to parts list, The IMAGE disappears, but the attributes of connection come in and work fine. ( just a terminal strip ) Everything in the 15th edition of the original SVG appear fine. ( so long as you stay in BB mode ) I hope someone comes up with a small routine to go through SVG files and correct prior to import to Fritzing. Please evaluate my problems.
Bill





The SVGs
TB6600-StepperDriver02_7d3c3c03c6d783ddcfd05f22e310cae6_35_breadboard
Updated-Stepper-Driver02-TB6600

TB6600-StepperDriver02_7d3c3c03c6d783ddcfd05f22e310cae6_35_breadboard
Updated-Stepper-Driver02-TB6600

I guess not. They will not transmit

My other problem with all this is warnings…earlier I screwed up and deleted files I had to recover…
Other Problem

The svgs uploaded just fine. If you right click on the image and select “save file as” it will download as a svg.

That said the svg is consistent with the images above, a grey square (the white square which is the view box in the svg) with the connectors because that is all that is in the svg. The original part breadboard svg looks like this:

svg.breadboard.prefix0000_911c140c21fa07989d9ddccd6943645a_1_breadboard

and like this in Inkscape

your svg only has the connectors not the rest of the image. It looks to me like you imported an image of the actual part (which isn’t that desirable as it isn’t a vector image and won’t scale) it is preferred to make the image out of drawing elements (although it is a lot more work!) as in the original svg. You also need a group which contains the entire svg with the label breadboard to make sure you part will export as an image. I often start from an imported image like this and over lay the image with svg elements then delete the image. I would probably start with this breadboard svg, rotate it 90 degrees to match the orientation of yours and replace the generic screw connectors I used with an outline that matches the one in your image (moving the connectors over the screws in the terminal block) as being the easiest. First select the breadboard group and rotate it 90 degrees:

Then ungroup it for easier manipulation and import the jpg image of your screen above and rescale it to be the same size as the current part (you actually want it to be the same size as the real part!)

Here I moved the image over the part then selected the black rectangle and moved it above the image so the text is overlaying the image making it easier to move around.

then move and change the text as needed to make it match the image. Here I changed the text from all upper to upper and lower then adjusted the font size til the text matches.

now you need to do the same or all the rest. Then you need to create a part for the terminal blocks (because I don’t have one to copy!) like this from rectangles and circles for the connectors. Start with a rectangle

then move it over where it should be and duplicate it for the next section make it darker green and place it.

Now move both the rectangles back so they are out of the way like this then duplicate the right rectangle (so it is the same color) and resize it to be one of the bars like this

duplicate and resize a bar and make it darker then duplicate them down the row

Then make a circle for the pin (although this isn’t the connector as it has a stroke and fill set!)

Now move back to the bottom circle, duplicate it (to make the connector) set fill and stroke to none and set the id to connector0pin like this

rinse and repeat for the rest of the connectors in order.
Then delete the image and move the rectangles until they don’t over lap to get the final product with the connectors set.

Finally do an Edit->select all, Edit-> resize page to selection, Object->group and name the resulting group breadboard to create the final svg (this one isn’t complete though!) then File->save as and select type plain svg and save the svg. Here is a copy of the svg above so you can see what I did.

svg.breadboard.breadboard_1_breadboard

Hope this helps, if not feel free to ask!

Peter

This indicates you have two parts with moduleId TB6560_V2-DF_1. To fix it you need to change the moduleId on one part or the other. Editing C:/Users/Bill/Documents/Fritzing/parts/user/TB6560_V2-DF_1.fzp and changing this line

module moduleId=“fc-51” referenceFile=“fc-51.fzp” fritzingVersion=“0.9.10”

from “TB6560_V2-DF_1” to “TB6560_V2-DF_2” (assuming the moduleId is TB6560_V2-DF_1!) should fix that. You may also need to change the svg files if they are identical to the other part i.e. you may need to change the file name fc-51_breadboard.svg below to something unique such as fc-51_2_breadboard.svg (where there isn’t an svg file named that in Fritzing.) You then also need to change the svg file names to match those set in the fzp file. The svg files will be in /Bill/Documents/Fritzing/parts/svg/user/breadboard (and icon, schematic and pcb)
Presumably you have two fzpz files that have TB6560_V2-DF_1 with the same or different svg files. The modulerId and (usually) svg files need to be unique.

<iconView>
  <layers image="breadboard/fc-51_breadboard.svg">
    <layer layerId="icon"/>
  </layers>
</iconView>
<breadboardView>
  <layers image="breadboard/fc-51_breadboard.svg">
    <layer layerId="breadboard"/>
  </layers>
</breadboardView>
<schematicView>
  <layers image="schematic/fc-51_schematic.svg">
    <layer layerId="schematic"/>
  </layers>
</schematicView>
<pcbView>
  <layers image="pcb/fc-51_pcb.svg">
    <layer layerId="silkscreen"/>
    <layer layerId="copper0"/>
    <layer layerId="copper1"/>
  </layers>
</pcbView>

Peter

Peter,
Thanks for the help. I haven’t addressed the last problem yet, but upon receiving your reply last night, I realized that IMAGES don’t work. I have several lasers that are run with LIGHTBURN, and I commonly TRACE images with it so I TRACED my downloaded image and re-fabricated the SVG in LIGHTBURN with THEIR CAD capabilities, and simply exported the svg. Simple, extremely quiick, and accurate. You can use a 30 day version for free … other Fritzing users might want to give it a try. I converted all text to PATH before export from LIGHTBURN to prevent font discrepancies. I need to find out how to scale the part about twice the displayed size… the SVG was scaled to component size, then increased in Inkscape, but has remained the same size.
Additionally my FILE OPEN window went to FULLSCREEN and I cannot reduce it’s size.
I believe this part is pretty much ready for public release…It seems to do everything I wanted, and I know there were several other requests for it.
Thanks a lot, Bill
BreadboardWithTB6600-NEMA17-23STEPPER-MOTOR-DRIVER.fzz (122.2 KB)
BreadboardWithTB6600VER4.fzz (107.3 KB)
SCHEMATIC-TB6600
TB6600-LBRN-FAB
Updated-Stepper-Driver03-TB6600

By the way, I am using the exports from PC Board fabrications from Fritzing to "Burn" small Printed circuit boards using POSITIVE ACTING Pre sensitized PC board, then through LIGHTBURN to my lasers. The trick is SPEED and extremely low power. Outline, Trace, and Solid can all be done with a lot of trial and error this way.

Bill
Isolated-NPN-PNP-Pair-2.fzz (19.1 KB)

A few problems in your part. Here is the output (only the errors not the warnings :slight_smile: ) from your part:

Error 69: File
‘svg.breadboard.TB6600-UPDATED-STEPPER-DRIVER-04_461729d0ec852d1a76305f3c4a7c45aa_9_breadboard.svg.bak’
At line 25

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

Error 69: File
‘svg.schematic.TB6600-UPDATED-STEPPER-DRIVER-04_461729d0ec852d1a76305f3c4a7c45aa_9_schematic.svg.bak’
At line 13

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

both breadboard and schematic lack layerIds which will cause the part to not export as an image.

Error 18: File
‘part.TB6600-UPDATED-STEPPER-DRIVER-04_cfc8dd5449c9306d0950c3358bf53b84_3.fzp.bak’

Connector connector1terminal is in the fzp file but not the svg file. (typo?)

svg svg.schematic.TB6600-UPDATED-STEPPER-DRIVER-04_461729d0ec852d1a76305f3c4a7c45aa_9_schematic.svg.bak

indicates the schematic has not terminalIds (normally a problem, but not in this case due to an odd schematic layout.)

Connector connector2pin is in the fzp file but not the svg file. (typo?)

svg svg.pcb.TB6600-UPDATED-STEPPER-DRIVER-04_461729d0ec852d1a76305f3c4a7c45aa_9_pcb.svg.bak

which causes this in pcb view (as there are undefined connectors)

So lets start with breadboard.

the group circled in red needs to be changed to breadboard so breadboard would have a layerId. The x and y should start at 0 (not doing so can cause offsets from the grids) and as you note the size of the part is about 1/2 to small (49mm against 96mm)

so first I ungrouped the entire svg which is a requirement for successful scaling in Inkscape by selecting the top group and hitting cntrl-shift-g multiple times til there are no groups left.

then clicked Edit->select all then Edit->resize page to selection to reset the view box to 0 0

then I corrected the scale of the svg. In Fritzing it is desirable that the viewbox set drawing units at 1/1000 of an inch (which is a scale of 0.001 in the red circle here.) To correct this

lock the width to height, change the dimensions to px (for maximum resolution) and copy the larger of height or width (height in this case) to the clip board (or record it somewhere) then change the scale from 0.013889 to 0.001 which will make the image much smaller. Then set the height back to the same value it had before the rescale like this

now we can change back to mm and change the height from 43.960 t0 96 to be around the correct scale (it isn’t clear to me where that 96mm ends, at the end of the terminal strip as I assumed or at the edge of the case, so it may be wrong!)

now we are again outside the view box,

so Edit->select all and Edit–>resize page to selection to correct that.

now to renumber the pins. Convention in Fritzing is that connectors should start at 0 and increase linearly with connector0 being at pin1 of an IC (so on the lower left) here that translates to the right bottom

I prefer to move all the connectors to the bottom of the svg because I have a script that will renumber them automatically (although it broke in this case because of the title elements on the pins!) So now move and renumber the connectors like this (connector0 here started out as pin6)

ending up looking like this

then Edit->select all, Edit->resize page to selection, and Object group and rename the created group breadboard to create the correct layerId. From there on to schematic which currently looks like this

While this will work, it doesn’t match the standard Fritzing schematic so I choose to replace it with one generated by Randy’s Inkscape extension like this. First I selected the starting group and deleted it to leave a blank svg.

then started the extension and set the parameters

set the name in the label box set 0.6in as the width (turned out too small!) and 1.4in (12 connectors plus 1 space between them) for the height.

then set 12 connectors on the right (0 everywhere else) and hit apply

now enter the names of the pins, pin 1 is the bottom of the pins in breadboard here

then click finished and it creates the svg

note it is to narrow so ungroup it to make changes

then move the bottom 6 connectors down 0.1in (to leave a space between the 2 pairs of 6 connectors) and increase the width to 0.8in and add some text. Now Edit->select all Edit->resize page to selection then Object-> group and set the layerId back to schematic and schematic is finished.

save it as plain svg and move on to pcb. There are two choices with pcb, we could suppress it entirely as they are all screw terminals (which don’t easily connect to the pcb.) Instead because the user may want to put an arduino on the pcb and interface it to the motor driver I chose to make pcb be header connectors that can then connect to the motor driver like this

that finishes off the svg files. Now on to the fzp file. There I chose to modify the file names to something more reasonable (and in the process changed the moduleId so this new part will load beside your original for comparison) I needed to change the connectors to start at connector0 and have labels that reflected the new pin positions. I added a url field to one source of the motor driver so people know where they can buy one. Finally I ran the resulting part through FritzingCheckPart.py to make sure it was correct (and to fix a variety of things that Inkscape does that Fritzing objects to!) which results in this new part

TB6600 NEMA-17-23 STEPPER MOTOR DRIVER-improved.fzpz (57.4 KB)

which looks like this in Fritzing

Peter

I will go through all that in depth tonight. ( A LOT to grasp ) Since I am not making a PCB with the
Arduino or Driver on the PCB, mine worked quite well in Schematic. It appears you completed my endeavor.
Thanks a heap.
I found that the 7805 Voltage Regulator in CORE Parts has a pin reversal between the Breadboard view and the schematic view. 7805 Pin Order should be (+in) (Gnd) (+Reg out) , left to right. ( the LEFT two pins ) disagree between views.
That error caused my Diode to short out in the schematic by connecting (Gnd) directly to (+in)
when the schematic auto-routed.
That’s why you commented about the diode earlier. I repaired the one I have, you need to note
that CORE needs that update…it is a very used part as an on-board regulator World Wide.
Thanks again for your assistance.
Bill

I’m not sure this is a bug (it is certainly odd, but not necessarily a bug!) This is a Sparkfun part with an odd package type (to-220-alt) which may (or may not!) have this pin out. The standard 7805 part is in the correct order. As is this Sparkfun part

but this Sparkfun part (the one you used) is wrong at least in the pin order in the description (there may or may not be a variant of the 7805 with this pin order though)

I’ll have a poke at it and see what I can find out and perhaps report it as a bug. A google search for “7805 ground in out pin order” doesn’t turn up any chip with that pin order so I’m inclined to think this is a bug.

Peter

I think you are right, regardless if you open up that part, the pins are misidentified between
Breadboard and schematic, I only noticed when you said I had a short.
I started using 7805 chips in 1978 I believe, and all that I have used have the pin order I listed. I was a “Controls Engineer” back then and designed in relay logic and early TTL logic to fabricate
some of the earliest PLCs. (50 years ago)
I started designing logic circuits in 1970, and adapted to CMOS (4xxx series), and even used
CPLDs from ATMEL with their logic design programs.
BTW I downloaded Fritzing several years ago in it’s infancy, It has come a LONG WAY since then,
a good bit friendlier, but I have a hard time following the SVG edits in Inkscape, I’ve made SVG
with LightBurn (for my laser engravers mostly) since they came on the market. Much easier
and friendlier, and they have a tracing program that is simple for SVG. (but costly-30 days free)
thanks again, it’s normally tough to get help with programs,
Bill

Winder-Retrofit-WithTB6600-NEMA17-23STEPPER-MOTOR-DRIVER.fzz (107.6 KB)
I dropped the part you corrected in the Winder file, and Fritzing transferred perfectly.
( the 7805 I corrected is in here too) The Auto-route appeared to still work too, but I have not
cleaned it up or re-organized it yet.
Do you by chance have an external routine for converting the PC Board drill file to GCODE ?
I may just write one if not. I have MULTIPLE CNCs, 3D printers, and Laser engraver/cutters.
( mostly Home Built, some 25 years old )
I still get the error i had loading, so I still have to go through the earlier proceedure you
outlined for me.
Bill

No. but if you search the forum for cnc there are a variety of past posts I believe some with a reference to a gcode generator. When I route schematic on your .fzz file I see a number of problems.

One of the optocouplers looks to be missing a connection as the collector has no connection. The 5V from the arduino doesn’t seem to go anywhere as the switch is NO and there appears to be a short from NC to common which will cause the switch to not open. The two I/O pins connected together (circled in orange) aren’t necessarily a problem (as long as at least one is an input) but there doesn’t seem to be any reason for it and thus it may be an error. This is why I like to route schematic because it will turn up errors in breadboard that are not at all obvious. Here is a copy of your sketch with schematic routed

Winder-Retrofit-WithTB6600-NEMA17-23STEPPER-MOTOR-DRIVER-schematic-routed.fzz (120.2 KB)

Your sketch loads without issues for me, so if you are seeing complaints there must be still something wrong on your setup I expect. I would be tempted to export all the files in your mine parts bin as fzpz files (a good idea for backup anyway!) and then clear user files and reload them one by one and see which one (if any) complains. The reason I say if any is that clearing the user files may clear out something that was left over and is causing your problem. I’ve seen cases where a file hasn’t been deleted for some reason and later causes trouble as Fritzing trys to load the same part again.

Peter

I saw a couple of the problems also as I checked the schematic. Corrected I believe. I found I did
not need the Regulated 5vdc, so removed it. I had a problem with the fuse on that circuit anyway,
It would not connect to the output side. ( bendable legs) I then added a fuse back in the 5vdc circuit from Arduino as a safety. Only the opto isolators use 5vdc, most of the operations are to
common ground, so the complete circuit has changed. That said, it also seems to load with no
issues. I finally removed the parts causing loading error. It’s not ready to upload for your opinion
yet. It still has a lot of rearrangement and prototyping on an actual breadboard for verification.
The REAL breadboard is running perfectly right beside this computer, I am attempting to get the
Fritzing part to look like IT. There is a LATCHING operation to let Arduino know the desired
rotation direction for full travel until the supervised limit switch end of travel (reverse) is reached,
and the PULSE train follows the path of direction to actually operate the Stepper Driver in the
proper direction. The Enable is toggled to allow “No HOLDING” so the motor can be effortlessly
moved for corrections by the operator. This also keeps the stepper from overheating.
“Stepper Hold” is not mechanically necessary or desired. This non-requirement stemmed from
the original actual operating circuit using an L298 that had no provision for relaxing the stepper
motor causing MASSIVE overheating when the machine ran slow. It was handled in programming.
This circuit keeps the motor much cooler with a LOT of reduced code, since the TB6600
addresses the issue far easier. Only a Tiny tweak in the programming code will allow me to use
THIS circuit on my SURFACE GRINDER that is currently Electra-Mechanically controlled. (relays)
Steppers HATE relays even WITH back EMF protection. I mainly want to use Fritzing
as a PC board lay out aid using my laser engravers to expose film. I have used negatives and
positives for many years, fabrication layout MANUALLY. Fritzing outputs are easily modified
to run in LightBurn I discovered by using their TRACING function. ( I have no GERBER )
Wish me luck
Bill

As long as you check schematic for errors, you should be fine. As noted it catches errors that are very hard to see in breadboard.

Peter

YES it DID ! I did a quickie with an isolated PNP NPN and it caught a wiring error to correct earlier.
Fritzing is starting to work well … just need to verify PARTY DESIGNs !!
thanks a lot for your help. YOUR routing looked really good.
Bill

I just opened issue #367 on github for the two 7805 part with the wrong pinout (it appears they used the 7905 pinout rather than the 7805) and will submit a pull request to obsolete and fix the two parts.

Peter

Boy I really know how to find faulty parts. I found the Diode I used has directional problems as
marked and AutoTraces straight through … it also wants to invert on autoTrace much like the
7805, so one window is flipped. The limit switches I tried to use failed much the same… they simply
would not trace as configured. ( No matter , they are external functions and do not affect the
Printed circuit ) They as well need to be scrutinized in detail. So I picked 3 faulty parts from CORE;
what are the ODDS ?
I include the present level of the “fzpz” file, An image of PC Bd screen, and an output screen
from LightBurn as the laser will print on Positive acting media for assembly. The circuit has changed considerably, added 2 opto isolators making a total of 4, giving me total isolation
from the real World. In this version I reversed the diode in Fritzing ( not in real World) to
keep it from messing up my schematicand circuit board tracing. I substituted the
LEDs with “PAD” like I used for interface to the real World ( forget what their “type” is ) and most
problems disappeared. I left the Auto-Trace to the Arduino to assist me in naming the associated pads. I used the schematic you created for the TB6600 on the PC board for “parallel wiring” of the real unit…just “Wire to Wire” (except for 4 motor wires, with drill holes removed). . . the jumpers for it are already on the printed circuit board so a flat cable will hook it up without any detailed wiring directly on it.
There are several ways I can convert the output to laser, even direct image import. I include a copy of that as well. Check the DIODE, LED, Limit Switches, and 7805 since they ALL need updating.
Bill



Winder-Retrofit-Isolation-WithTB6600-NEMA17-23STEPPER-MOTOR-DRIVER.fzz (148.0 KB)