37: Create motor encoder Fritzing component: add SVG files and README.

This commit is contained in:
Christian Jacolot 2024-04-23 21:46:23 +02:00 committed by Benjamin BERNARD
parent 8a1dca2190
commit 408a74e199
4 changed files with 682 additions and 0 deletions

66
doc/fritzing/README.md Normal file
View File

@ -0,0 +1,66 @@
# Create Component part for Fritzing
## Installation
Install:
* Fritzing
* Inkscape
Fritzing installation (Debian 12):
`
$ sudo apt install fritzing
`
Inkscape installation (Debian 12):
`
$ sudo apt install inkscape`
## Fonts installation
Install fonts for Fritzing components definition:
* download file from [](https://fritzing.org/learning/tutorials/creating-custom-parts/download-fonts-and-templates)
`
$ wget https://fritzing.org/media/uploads/learning/graphic_standards/fontsandtemplates.zip
`
Install fonts from the zip file:
* DroidSans
* OCR A
## Inkscape
Use Inkscape to define:
* the Fritzing breadboard svg file
* the Fritzing schematic svg file and
* the Fritzing PCB svg file
You can start using the templates provided in the fontsandtemplates.zip file.
## Frizting
Steps to create a new component:
* new project
* drag and drop in the breadboard and existing component
* click Component menu / Edit (new componnent)
* load svg file for each tabs (breadboard, schematic, PCB)
* change the metadata in Metadata tab
* change the number and definition of pins in Connectors tab
* for each view, select pin and link it to a graphical part of the svg drawings
Finally, save the Fritzing new component in **My Parts** tab.
## This directory content
This directory contains svg files for:
* breadboard and icon: lph_gear_motor_encoder_icon.svg
* schematic: lph_gear_motor_encoder_schematic.svg
* PCB: lph_gear_motor_encoder_pcb.svg
# References
* https://wiki.dfrobot.com/Micro_DC_Motor_with_Encoder-SJ01_SKU__FIT0450
* https://github.com/Arduinolibrary/DFRobot_Micro_DC_Geared_Motor_with_Encoder/

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="137.28903mm"
height="81.274246mm"
viewBox="0 0 137.28903 81.274246"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="lph_gear_motor_encoder_icon.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.49260384"
inkscape:cx="267.96381"
inkscape:cy="253.75361"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs2" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-35.860251,-120.47266)"><path
style="fill:#ffff00;stroke-width:0.264583"
d="m 75.79366,152.4567 21.091625,-0.0619 0.04599,-1.41867 67.365095,0.0223 -0.0441,14.56612 8.7275,-0.0527 0.1695,5.52261 -8.83581,-0.11646 -0.10607,14.37511 -16.17877,-0.33789 -0.0191,16.79169 -9.1136,-0.0483 -0.10595,-16.58332 -12.15792,-0.0839 -0.26751,3.70995 -7.18597,0.0845 0.0367,-3.72988 -22.225623,0.0446 -0.06819,-1.2877 -21.484997,0.0902 z"
id="path235" /><path
style="fill:#b3b3b3;stroke-width:0.264583"
d="m 138.78997,185.11529 9.23865,-0.16007 -0.0191,16.79169 -9.1136,-0.0483 z"
id="path291" /><path
style="fill:#b3b3b3;stroke-width:0.264583"
d="m 75.771125,154.44304 -29.120028,-0.0174 -0.08235,27.21804 28.867713,0.1028 z"
id="path401" /><path
style="fill:#b3b3b3;stroke-width:0.264583"
d="m 46.568746,159.37461 -3.49127,-0.0768 0.128701,16.34122 3.362569,-0.17618 z"
id="path403" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 35.966699,152.65216 5.242586,-0.0679 0.06268,30.95704 -5.411714,-0.0894 z"
id="path405" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 43.077476,166.35576 c -0.220943,-0.0134 -0.490069,0.0704 -0.708779,0.0158 -0.09773,-0.0244 -0.187116,-0.0705 -0.284845,-0.095 -0.165275,-0.0413 -0.396065,0 -0.567283,0 -0.115802,0 -0.342508,-0.0602 -0.244604,0.11016"
id="path524" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 41.248038,169.7231 1.829438,0.001"
id="path526" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 43.077476,166.35576 -1.805511,0.031"
id="path528" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 41.248038,169.7231 1.829438,0.001"
id="path530" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 43.077476,169.7241 v -3.36834 z"
id="path532" /><path
style="fill:#cccccc;stroke-width:0.264583"
d="m 41.248038,169.7231 0.02392,-3.33634 1.805511,-0.031 v 3.36834 z"
id="path534" /><path
style="fill:#e6e6e6;stroke-width:0.264583"
d="m 164.25227,165.56455 0.0612,5.35345 8.83581,0.11646 -0.1695,-5.52261 z"
id="path590" /><path
style="fill:#333333;stroke-width:0.264583"
d="m 53.893113,154.42564 0.0093,-33.95298 3.059134,0.0115 -0.15281,33.94148 z"
id="path646" /><path
style="fill:#b3b3b3;stroke-width:0.264583"
d="M 53.902414,120.47266 H 43.077476 v 11.30299 l 3.49127,-0.0968 1.737963,3.44449 5.586404,0.22995 z"
id="path702" /><path
style="fill:#cccccc;stroke-width:0.264583"
d="m 56.961547,120.48416 11.030731,-0.0115 -0.04599,11.03298 -3.856926,0.095 -1.742829,3.7527 H 56.96155 Z"
id="path704" /><path
style="fill:#ffff00;stroke-width:0.264583"
d="M 86.339473,152.42575 86.230985,148.5 h 2.676372 l -0.117573,-1.88488 -5.080135,0.0849 0.121653,5.88421 z"
id="path706" /><path
style="fill:#e6e6e6;stroke-width:0.264583"
d="m 83.709649,184.17258 v 3.4189 l 5.197708,0.0345 v -3.32692 z"
id="path708" /><path
style="fill:#00ffff;stroke-width:0.264583"
d="M 89.778588,150.97613 88.907357,148.5 l -31.94581,0.50998 v 1.96615 z"
id="path710" /><path
style="fill:#00ffff;stroke-width:0.264583"
d="m 88.907357,185.96252 v -1.66346 l -40.417414,-0.12648 v 1.7267 z"
id="path766" /><path
style="fill:#00ffff;stroke-width:0.264583"
d="M 48.489943,185.89928 45.865115,185.06755 44.82311,182.452 v -28.80993 l 1.745636,-3.30503 2.809848,-1.30889 4.514519,0.026 -0.546324,1.92201 h -4.856846 l -1.838846,3.44951 -0.08235,27.21804 1.921197,2.5289 z"
id="path768" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 43.077476,123.16127 10.824938,0.0523 v 2.00505 l -10.824938,0.90554 z"
id="path811" /><path
style="fill:#000000;stroke-width:0.264583"
d="m 56.952198,128.62044 10.824938,0.0523 v 2.00505 l -10.824938,0.90554 z"
id="path811-6" /><path
style="fill:#00ffff;stroke-width:0.264583"
d="m 43.077476,126.12415 c 0,0 0,1.48144 0,0 z"
id="path813" /><path
style="fill:#ff0000;stroke-width:0.264583"
d="m 43.077476,127.91297 h 10.820286 l 0.0047,2.50484 -10.824938,-0.5582 z"
id="path815" /><path
style="fill:#ff0000;stroke-width:0.264583"
d="m 56.961549,132.61111 h 10.820286 l 0.0047,2.50484 -10.824939,-0.5582 z"
id="path815-3" /><path
style="fill:#00ff00;stroke-width:0.264583"
d="m 56.961547,124.9778 h 10.820286 l 0.0047,2.50484 -10.824939,-0.5582 z"
id="path815-3-7" /><path
style="fill:#00ffff;stroke-width:0.264583"
d="m 56.952246,121.34398 h 10.820286 l 0.0047,2.50484 -10.824939,-0.5582 z"
id="path815-3-7-5" /><text
xml:space="preserve"
style="font-size:2.82222px;font-family:OCRA;-inkscape-font-specification:OCRA;fill:#000000;stroke-width:0.264583"
x="43.387394"
y="133.71178"
id="text979"><tspan
sodipodi:role="line"
id="tspan977"
style="font-size:2.82222px;fill:#000000;stroke-width:0.264583"
x="43.387394"
y="133.71178">Motor</tspan></text><text
xml:space="preserve"
style="font-size:2.82222px;font-family:OCRA;-inkscape-font-specification:OCRA;fill:#000000;stroke-width:0.264583"
x="57.271469"
y="138.55627"
id="text979-3"><tspan
sodipodi:role="line"
id="tspan977-5"
style="font-size:2.82222px;fill:#000000;stroke-width:0.264583"
x="57.271469"
y="138.55627">Coder</tspan></text><text
xml:space="preserve"
style="font-size:2.82223px;font-family:OCRA;-inkscape-font-specification:OCRA;fill:#000000;stroke-width:0.264583"
x="76.285095"
y="167.48775"
id="text1154"><tspan
sodipodi:role="line"
id="tspan1152"
style="stroke-width:0.264583"
x="76.285095"
y="167.48775">DFRobot Micro DC geared motor with encoder</tspan></text></g></svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="30.24px"
height="30.24px"
viewBox="0 0 30.24 30.24"
enable-background="new 0 0 30.24 30.24"
xml:space="preserve"
sodipodi:docname="lph_gear_motor_encoder_pcb.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs2096">
</defs><sodipodi:namedview
id="namedview2094"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="25.859789"
inkscape:cx="15.12"
inkscape:cy="15.12"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" />
<g
id="silkscreen">
<line
fill="none"
stroke="#FFFFFF"
stroke-width="0.75"
x1="0.72"
y1="0.72"
x2="0.72"
y2="29.52"
id="line2069" />
<line
fill="none"
stroke="#FFFFFF"
stroke-width="0.75"
x1="0.72"
y1="29.52"
x2="29.521"
y2="29.52"
id="line2071" />
<line
fill="none"
stroke="#FFFFFF"
stroke-width="0.75"
x1="29.521"
y1="29.52"
x2="29.521"
y2="0.72"
id="line2073" />
<line
fill="none"
stroke="#FFFFFF"
stroke-width="0.75"
x1="0.72"
y1="0.72"
x2="11.52"
y2="0.72"
id="line2075" />
<line
fill="none"
stroke="#FFFFFF"
stroke-width="0.75"
x1="18.72"
y1="0.72"
x2="29.521"
y2="0.72"
id="line2077" />
</g>
<circle
id="connector5pin"
fill="none"
stroke="#ffbf00"
stroke-width="1.152"
cx="25.92"
cy="18.719999"
r="1.584" /><circle
id="connector0pin"
fill="none"
stroke="#ffbf00"
stroke-width="1.152"
cx="4.3200002"
cy="4.3200002"
r="1.584" /><circle
id="connector1pin"
fill="none"
stroke="#ffbf00"
stroke-width="1.152"
cx="4.3200002"
cy="11.52"
r="1.584" /><circle
id="connector4pin"
fill="none"
stroke="#ffbf00"
stroke-width="1.152"
cx="25.92"
cy="25.92"
r="1.584" /><circle
id="connector6pin"
fill="none"
stroke="#ffbf00"
stroke-width="1.152"
cx="25.92"
cy="11.52"
r="1.584" /><circle
id="connector7pin"
fill="none"
stroke="#ffbf00"
stroke-width="1.152"
cx="25.92"
cy="4.3200002"
r="1.584" />
<g
id="keepout">
</g>
<g
id="soldermask">
</g>
<g
id="outline">
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,315 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.2"
id="Layer_1"
x="0px"
y="0px"
width="57.643px"
height="71.833px"
viewBox="0 0 57.643 71.833"
xml:space="preserve"
sodipodi:docname="lph_gear_motor_encoder_schematic.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1455">
</defs><sodipodi:namedview
id="namedview1453"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="10.886361"
inkscape:cx="28.84343"
inkscape:cy="31.323597"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" />
<g
id="background">
<rect
x="-28.625"
y="-21.614"
fill="#F2F2F2"
width="122.108"
height="122.062"
id="rect1348" />
</g><g
id="g1372-6"
transform="translate(12.536126,-64.979876)">
<line
fill="none"
stroke="#555555"
stroke-width="0.7"
stroke-linecap="round"
stroke-linejoin="round"
x1="28.799999"
y1="64.799004"
x2="28.799999"
y2="72"
id="line1370-2" />
</g>
<rect
id="part_symbol"
x="7.1999998"
y="7.1999998"
fill="#ffffff"
stroke="#000000"
stroke-width="0.9002"
stroke-linecap="round"
width="43.199001"
height="57.598999" /><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1426-2"
x="14.601288"
y="62.0037">V</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1428-3"
x="17.022188"
y="62.0037">c</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1430-7"
x="19.106089"
y="62.0037">c</text><g
id="pins">
<g
id="g1372">
<line
fill="none"
stroke="#555555"
stroke-width="0.7"
stroke-linecap="round"
stroke-linejoin="round"
x1="28.799999"
y1="64.799004"
x2="28.799999"
y2="72"
id="line1370" />
</g><g
id="g1372-5"
transform="translate(-10.687967)">
<line
fill="none"
stroke="#555555"
stroke-width="0.7"
stroke-linecap="round"
stroke-linejoin="round"
x1="28.799999"
y1="64.799004"
x2="28.799999"
y2="72"
id="line1370-9" />
</g>
<g
id="g1384">
<line
fill="none"
stroke="#555555"
stroke-width="0.7"
stroke-linecap="round"
stroke-linejoin="round"
x1="28.799999"
y1="7.2010002"
x2="28.799999"
y2="0"
id="line1382" />
</g>
<g
id="g1388"
transform="translate(0,10)">
<line
fill="none"
stroke="#555555"
stroke-width="0.7"
stroke-linecap="round"
stroke-linejoin="round"
x1="50.401001"
y1="28.799999"
x2="57.599998"
y2="28.799999"
id="line1386" />
</g>
<g
id="g1392"
transform="translate(0,2)">
<line
fill="none"
stroke="#555555"
stroke-width="0.7"
stroke-linecap="round"
stroke-linejoin="round"
x1="50.401001"
y1="21.6"
x2="57.599998"
y2="21.604"
id="line1390" />
</g>
</g><text
fill="#555555"
font-family="DroidSans"
font-size="3px"
id="text1395"
x="53.310799"
y="22.154301">5</text><text
fill="#555555"
font-family="DroidSans"
font-size="3px"
id="text1397"
x="53.1409"
y="37.4492">6</text><text
fill="#555555"
font-family="DroidSans"
font-size="3px"
id="text1401"
x="30.162399"
y="3.8729999">1</text><text
fill="#555555"
font-family="DroidSans"
font-size="3px"
id="text1403"
x="30.162399"
y="69.109901">4</text><text
fill="#555555"
font-family="DroidSans"
font-size="3px"
id="text1403-22"
x="19.382944"
y="69.476166">3</text><text
fill="#555555"
font-family="DroidSans"
font-size="3px"
id="text1403-2"
x="43.751019"
y="3.8634784">2</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1424"
x="24.6106"
y="62.484901">Gnd</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1424-9"
x="37.544281"
y="12.616499">Gnd</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1426"
x="25.511999"
y="12.5352">V</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1428"
x="27.932899"
y="12.5352">c</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1430"
x="30.0168"
y="12.5352">c</text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1440"
x="27.99662"
y="25.018021"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Droid Sans Mono';-inkscape-font-specification:'Droid Sans Mono'"><tspan
sodipodi:role="line"
id="tspan1981"
x="27.99662"
y="25.018021">Out Blue </tspan><tspan
sodipodi:role="line"
id="tspan1983"
x="27.99662"
y="30.643021" /></text><text
fill="#555555"
font-family="DroidSans"
font-size="4.5px"
id="text1442"
x="27.906532"
y="39.373055">Out Green</text><text
font-family="DroidSans"
font-size="6px"
id="text1447"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.33333px;font-family:'Droid Sans Mono';-inkscape-font-specification:'Droid Sans Mono'"
x="9.6147776"
y="17.202038">DC Motor </text><text
font-family="DroidSans"
font-size="6px"
id="text1447-0"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.33333px;font-family:'Droid Sans Mono';-inkscape-font-specification:'Droid Sans Mono'"
x="13.811852"
y="55.412983">DC Coder </text>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB