Request - Gikfun TEA5767 FM Stereo Radio Module


#1

Does anyone have a Fritzing version of this part or know where I can find it?:

Thanks
-Wes


#2

Nice job on the breadboard svg file, I expect you will have little trouble making parts. Below is a rough log of how I made this part starting from your breadboard svg. You can start from the same part I did and run through the steps to create the part which should give you a good start on creating new parts. If anything is unclear, feel free to ask.

Start with the TEA5767_FM_Stereo_Radio_Module.svg

it is scaled wrong so we need to fix that.

ungroup select group breadboard and alt-cntrl-g to ungroup til there are no more groups (only once in this case).

From the tool bar record the current x y w and h values in px (the finest resolution)

x 0 y 0 w 113.088 h 124.445

Check edit->preferences->Behaviour->Transforms->Scale stroke width is ticked (it is also the first of the last 4 icons on the top of the tool bar which is easier to find.)

click file->Document Properties to get the properties page up. In the Scale section near the bottom the Scale x: is 25.40000 which is incorrect. So

edit->select all

change the scale from 25.40000 to 10.41667 (the desirable scale for Fritzing.)

click in the drawing windoe to make the scale take effect, the image gets much larger.

edit->select all

then change the tool bar from

x 0 y -179.00 w 275.754 h 303.446 px back to

x 0 y 0 w 113.088 h 124.445 as recorded above. You may have to do this several times as sometimes the rescale changes the other coords (I don’t know why, I think to do with stroke-widths).

file->save as filename plain svg (you need to select this in the bottom select bar, the default is Inkscape which Fritzing dislikes sometimes.)

download Keyes l9110 Fan module from

edit it in parts editor and change metadata to

Title TEA5767

description

SMAKN brand new 76-108MHZ 5V TEA5767 FM Stereo Radio Module with Cable Antenna for Arduino EK1705(New version)

url

Label M

Family FM radio

Varient variant 1

Tags

FM radio receiver module
TEA5767

then save as new part, Filename Prefix TEA5767

exit parts editor and go back to the mine parts bin and export the new part via right click export part then close without saving.

unzip the part to directory TEA5767

cp TEA5767_FM_Stereo_Radio_Module.svg svg.breadboard.TEA5767_a7544f98c2afdf1374271e998592e1eb_1_breadboard.svg

to get your breadboard as the breadboard svg then edit it in Inkscape (we need to add the connectors)

Start Fritzing and drag a generic male header in to any view, then set it via Inspector to 4 pins, male, single row. Edit it with the parts editor, make no changes and save as new part. Then from fritzing export the part to the TEA5767 exit Fritzing withoug saving and unzip the fzpz file.

With Inkscape edit the 4 pin header breadboard in directory Generic male header - 4 pins

it is scaled wrong so we need to fix that.

ungroup select group breadboard and alt-cntrl-g to ungroup til there are no more groups (only once in this case).

From the tool bar record the current x y w and h values in px (the finest resolution)

0 0 38.400 9.600

Check edit->preferences->Behaviour->Transforms->Scale stroke width is ticked (it is also the first of the last 4 icons on the top of the tool bar which is easier to find.)

click file->Document Properties to get the properties page up. In the Scale section near the bottom the Scale x: should be 104.16666 hwich is incorrect. So

edit->select all

change the scale from 104.16666 to 10.41667 (the desirable scale for Fritzing.)

click in the drawing windoe to make the scale take effect, the image gets much larger.

edit->select all

then change the tool bar from

x 0 y -86.400 w 384.000 h 96.000 px back to

0 0 38.400 9.600 as recorded above. You may have to do this several times as sometimes the rescale changes the other coords (I don’t know why, I think to do with stroke-widths).

file->save as filename plain svg (you need to select this in the bottom select bar, the default is Inkscape which Fritzing dislikes sometimes.)

edit->copy to copy the entire connector

then paste in to the svg.breadboard.TEA5767_a7544f98c2afdf1374271e998592e1eb_1_breadboard.svg Inkscape document

then group before doing anything else so the connector is in a group to make positioning it easier.

Now create two lines to facilitate the alignment of the connectors. I usually copy a line via edit->copy / edit->paste from a schematic svg (which has lots of lines.) Then set the stroke width to 1. Now rotate one of the lines by 90 degrees and position tham in the center of the first connector pin circle (see svg svg.breadboard.TEA5767_a7544f98c2afdf1374271e998592e1eb_1_breadboard-lines.svg for an example of what I mean.) Now drag the connector group you copied in til the connector pin is centered on the center of the connector cricle which will mean the connector is now properly aligned. The text needs some adjusting and moving. The font size should be 35 px, so in xml editor replace the current long style command with font-size:35px;font-family:OCRA;fill:#000000 (which is all that is needed.) As well the translate is undesireable, so remove it by selecting it in xml editor and replacing the matrix(0,1.0000021,-0.99999791,0,0,0) with rotate(90) and click set. The text will change position but not rotation (because of the rotate(90), so select the text and then use either the tool bar or click and drag to move the text back to the correct position. Make sure in xml editor that the text actually moves and Inkscape doesn’t use a translate (other than the rotate(90) to move it. Now delete the two lines we used to align the connector, then select the connector group and ungroup it (to remove the transforms that were added to move it around). Now delete the connector0-3 terminal elecments in xml editor, terminalIds aren’t needed in breadboard and add space. Select the mounting holes one at a time and in xml editor change the fill from #808080 to #ffffff (white) to make the mounting holes appear through the board. click edit->select all and then group. In xml editor change the id of the group just created to breadboard to set the layerId and breadboard is done. So file->save as, set plain svg as the type and click save and then replace to save the finished svg.

pcb

pcb’s scale is already 10.41667 so we don’t need to rescale it. It already has the 4 connector pins properly set up in their groups as well. So edit select all and click rotate 90 degrees counter clockwise to align the pads the same as breadboard. Delete group silkscreen (we are going to replace it with the path from breadboard to get the board outline.) Ungroup copper1leaving only copper0 with the 4 connectors in it. Now in the breadboard svg, edit->select all and copy then paste the result in to the pcb svg. Ungroup the breadboard group in the pcb svg and delete all the parts and the header (leaving only the mounting holes and connector holes which provide the alignment for the pads.) Now select copper0 and click raise selection to the top so the pads are on top of the breadboard group. Now use the x and y coords on the tool bar to move copper0 til it is over top of the connectors from breadboard (svg.pcb.TEA5767_a7544f98c2afdf1374271e998592e1eb_1_pcb-pads-aligned.svg). Now ungroup the breadboard group because we are going to delete most of it. Delete all the components leaving only the connectors the board path and the mouting holes. Delete the header connector and the holes under them. For the 3 mounting holes there are two choices: the usual one is to leave them on silkscreen, if the user of the part wants the mounting holes drilled they need to drag a hole from core parts ove the pad in silkscreen to drill it (that is what I have done here.) The alternative is to
name the 3 holes nonconn0 nonconn1 and nonconn2 and move them in to the copper0 group. This (with the next setting) will cause the holes to be drilled in the pcb. Now select each hole in turn and set the style from whatever it is to fill:#000000;stroke:none which will create a black hole in the silkscreen layer (or a hole if it is in copper0). For each mounting hole set both 4x and rx (which are ellipses because of the scale we did in breadboard) to 39.5 to end up with r 39.5 rather than rx and rx. Gerber creation breaks if holes are not a circle. Last select the blue background path and change it to the proper silkscreen outline by changing style in xml editor from whatever it is to fill:none;stroke:#000000;stroke-width:10 which sets the proper 10 thou wide board outline in silkscreen. Pcb is now done so ungroup copper0 so there are no groups (to avoid translates again) then edit->select all, file->document properties-> Resize pat to content then Resize page to drawing of selection to adjust the viewbox size correctly. Now drag a selection rectange around the 4 connectors and group it twice (for copper1 and copper0). Set the top group id to copper1 and the group inside it to copper0. Edit->select all group and name the group silkscreen. Now select copper1 in xml editor and Unindent node to move copper1/copper0 out of silkscreen and in to root. file->save as plain svg and save and pcb is done.

schematic

is scaled correcly so we first adjst the text. Set pin 1 to VCC pin 2 to SDA pin 3 to SCL and pin 4 to GND to match the breadboard pins. Change the label from Fan Motor Module to TEA5767 FM Radio Module. Set the style on all three to font-size:60px;font-family:‘DroidSans’;text-anchor:middle;fill:#000000;stroke:none . Then move the text to be centered in the box. Technically we are done, schematic will work like this, but there are a number of flaws that don’t meet graphics standards so lets fix this properly. Lets start with the rectangle rect7. Set style to fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round. Set toolbar x 0.1 y 0 to position it. Then select connector0pin, (pin 1), we see it is a line (line10 in this case) with a retangfont-size:35px;font-family:‘DroidSans’;text-anchor:middle;fill:#555555le set to connector0pin below it. We don’t need both, so in xml editor rename line10 to connector0pin and delete the rectangle below it. Set the style from what it is to fill:none;stroke:#555555;stroke-width:10;stroke-linecap:round then set using the tool bar x 0 y 0.400 w .105 (you may need to loop around this a few times to get the correct settings). This makes the pin the correct color and length. Then make sure connector0terminal is x 0 y .4 w .01 h.01 to set the terminal position correctly. Now select the digit 1 (the pin number) set the style to font-size:35px;font-family:‘DroidSans’;text-anchor:middle;fill:#555555 from whatever it is and then use the tool bar to postion the number somehwhat out from the pin. Repeat this for connectos 1, 2 and 3. Now select the pin labels one at a time and set the style to font-size:49px;font-family:‘Droid Sans’;text-anchor:start;fill:#555555 from whatever it is. Once they are all done, put a selection box around all the pin labels and the TEA5767 labels and move them left by .1 in via the tool bar. Schematic should now be finishes so edit->select all file->document properties Resize page to drawing or selection then group and name the group schematic. file->save as plain svg and exit Inkscape.

fzp file

edit part.TEA5767_a7544f98c2afdf1374271e998592e1eb_1.fzp with a text editor. In the second line change

<module fritzingVersion="0.9.3b" referenceFile="fan_module_ff34c99ca7719a7b0c278c201eb6ac9e_1.fzp" moduleId="TEA5767_a7544f98c2afdf1374271e998592e1eb_1">

to

<module fritzingVersion="0.9.3b" referenceFile="TEA5767_a7544f98c2afdf1374271e998592e1eb_1.fzp" moduleId="TEA5767_a7544f98c2afdf1374271e998592e1eb_1"> 

to correct the reference file name. Then down to connector0. First change the description to VCC to match breadboard and schematic. Then in the breadboard p line remove " terminalId=“connector0terminal”
so

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

becomes

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

as we aren’t using the breadboard terminalId. Repeat this for the other 3 connectors and the fzp is done. Now run the part through FritzingCheckPart.py to remove the px from font-size and do a variety of other corrections that Inkscape adds in. Then zip the 5 file in to an fzpz file and test it. That produces this part which should do what you need:

TEA5767.fzpz (8.6 KB)

Peter


#3

Wow Peter, That’s a lot of messing about! I didn’t even get past the first few sentences before I had a question: Why is the scaling important and why is the new scaling value (10.41667) such an odd one? Where did that come from???

I’m using fritzing primarily for illustrative purposes. Here’s a page I put together last night using your TEA5767 fritzing part:

Building the Beeper/RTC/FM Radio Assembly

I’ve released an open source project and am using fritzing to help document the build.

-Wes


#4

The part file format document has an explanation, basically to make the document units be 1 thousandth of an inch.

edit: forgot the document url:

As well it makes automatically checking parts easier, so it could (it doesn’t yet, but I’m working on a new version) verify that terminals are on a .1 in boundary. I’m not entirely sure why the scale is such an odd number, but I think it is because the svg standard currently sets resolution to be 96dpi (up from 90 dpi earlier) and the likely means 1 thousandth of an inch becomes 10.41667 to 8 digits of precision.

Yep, that is a lot of what I use fritzing for as well. I rarely make boards, but it is the only tool I know of that will let me document a collection of modules that make up a useful tool. It’s why I have been pushing to get development restarted for years. Luckily for all of us the fab also finds Fritzing valuable as their CTO is the one that has been successful in restarting devlelopment.

Peter