2.8 SPI LCD part creation help


#1

Hi all,

I’ve created a 2.8 inch LCD display part. Information about the part can be found here:
http://www.lcdwiki.com/2.8inch_SPI_Module_ILI9341_SKU:MSP2807

I used Inkscape to create the .svg files. Initially, all 3 .svg files (breadboard, schematic, & pcb) were very generic. I used the parts editor and created a very generic part.

2.8 inch LCD SPI display.fzpz (7.2 KB)

I reworked my breadboard and schematic .svg to add details and text. Now when in parts editor, when I load the new schematic .svg, the image doesn’t show up in the view. I even tried creating a new part again, using this schematic .svg and it doesn’t appear in the view. I see nothing wrong with the .svg, but I’m no expert.

https://drive.google.com/open?id=16LyqekdpehO_9BhoGQqoaz3V4omMJTFe

Additionally, I am having a small issue with the breadboard .svg, but let’s figure this one out first…

Thanks for any help
Randy


#2

FritzingCheckPart.py to the rescue :slight_smile: your view box is screwed up:

Error 89: File
‘svg.schematic.2.8lcd_977328b1a4d86b634597db07bf1143a4_3_schematic.svg.bak’
At line 18

ViewBox ‘-63.000001 0 0 153.00001’

has characters other than 0-9, whitespace or ‘.’ or not four values.
It must be dimensionless and have 4 numeric values

This is technically probably a bug in the script, but negative values are uncommon in viewbox, Fritzing’s usually start at 0. I attempted to fix this by readjusting the viewbox, but that screws up. I’d suggest redoing schematic from the template available here:

which has the advantage of being the correct scale. You are also lacking terminalIds in this schematic which will cause problems later. It is possible to fix up the current schematic svg, but it is likely to be a fair amount of work and I expect starting from the template will be easier (for some value of easier.)

Peter


#3

Thanks vanepp!

I tried to fix the .svg in Inkscape, but failed. Used the template to create a new schematic.svg that works. Now that this problem is sorted, on to the next one.

While adding details to the breadboard .svg to make it more attractive, I’ve ran into a problem with text. On the real board, by the 4 pin connector is white text ‘J4’, and by the 14 pin connector is the text ‘J2’. I created the ‘J4’ text in Inkscape, then copied and modified it to give me the ‘J2’. Now when I load the .svg in parts editor, the ‘J4’ appears correctly, but the ‘J2’ is scaled down in size. Here’s a link to the file:

https://drive.google.com/open?id=1MDJNWv2lTcCbxiFQu4xZSjKs7G7_wFJp

Once this problem is fixed, I’ll post up the part.

Thanks,
Randy


#4

Try this one:

2.8lcd_breadboard.svg.fzp (17.2 KB)

You need to remove the trailing .fzp to recover the svg file (which is what this really is) because the forum often has problems with rendering svgs. The major change was to remove 2 space:preserves (they break the tspan removal code) and run it through FritzingCheckPart.py. That may help because it will remove extra font-size commands (although I don’t see any) and remove the px from the font-sizes. Inkscape likes to leave a font-size inline command while actually using the font-size in the style command. Fritzing prefers the inline font-size (which is often smaller than the one in the style that Inkscape is rendering.) If the font-sizes have the trailing px (which is required by the CSS standard which Inkscape supports), the Parts editor (usually after an edit though) will set the font size to zero which causes the effect you are seeing. All of these should be removed in this svg by the parts check script. Fritzing also doesn’t support nested tspans (again not present here I don’t think) so the script just removes all the tspans and replaces them with equivalent text xml and it inlines the style commands as not all parts of Fritzing support style (notably bendable legs.)

Peter


#5

Thanks, but your fix didn’t work, and I deleted the file without taking a screenshot of the new problem. You did fix the small font problem, but in the process, the other font (that I duplicated to make the one you fixed) became super sized and it’s color was changed to black.

So naturally, I opened your file in inkscape and looked over the xml to see if I could fix the new problem and what changes were made by you. Seemed like no matter what I tried to fix the problem, the other text was affected. in Inkscape that is. I went back to my file, deleted the duplicated text and created a new text object to replace it. That solved the problem.

Not really sure why that was a problem this time around, as I have duplicated text before in inkscape and it’s never caused a problem before.

Anyway, thanks to your help, I now have the part all pretty looking and working in fritzing, but I want to check the .pdf exports with the real part. Now how good is exporting a .pdf from fritzing and printing it? In the case of this part, it appears good, but I noticed a problem with another part I created…

Thanks,
Randy


#6

I find Inkscape to be quirky. I keep a copy of preference.xml from the installation and when it goes weird (such as deciding to make a copy as an image rather than xml) I replace preference.xml with the version from install and that usually fixes the problem. I assume something changed (possibly something I did via a keyboard hotkey by mistyping) and it just sometimes stops working correctly. About pdf expoert, as far as I know it works most of the time (I haven’t used it though) I usually use the gerber export which sometimes has problems with paths (i.e. pcb view looks fine but gerber output is wrong.) Kjell has fixed at least 5 bugs in gerber export in the development version (but so far you need to build that from source I believe.)

Peter