creating a web-viewable png file from a kicad circuit diagram

A schematic in PNG file format

As one of my informal new years resolutions, I’ve been using KiCad 7 to document how I wire various components together, to then use those wiring schematics to generate a high quality web-viewable PNG image. It’s not that hard, but the workflow isn’t intuitive either. I’m using a circuit diagram I will be using in another post to illustrate what I’m doing with the Raspberry Pi 5, but for this post I’m documenting how I created it.

KiCad 7.0.10 with my finished schematic

You’re viewing the KiCad schematic editor. I’ve finished my simple circuit diagram, and I’m ready to create an image to publish on the web. To do that, I need to create a plot. That happens by clicking the plotter symbol on the editor. The plotter symbol is five in from the left edge, just to the right of the printer symbol. When I click that symbol I get the following.

That’s how KiCad is set up to create a plot file in SVG (scalable vector graphics) format, a textual XML-based markup language that describes how to create that drawing/plot in another application. I choose color and plot background color because any other combination produces bare lines with no backgrounds, and to be honest, it looks bad. Go with color for this.

Inkscape 1.3.2

The final step is to open the SVG plotter file into Inkscape and then export it as a PNG. After opening the file in Inkscape, click the Export tab on the far right. Select export to PNG, then up on the DPI field enter 300. The default is 96 DPI which produces a small PNG file with poor detail. Going to 300 DPI produces a file that looks excellent with plenty of sharp, clean lines and detail all around. After clicking the Export button at the bottom right you can close Inkscape. Inkscape will ask if you want to save changes; just exit without saving.

All of this was performed on my regular Linux Mint computer, the MinisForum UM250. It would be interesting to see if this could be done completely on a Raspberry Pi 5.

report #3 on using ubuntu 23.10 with a raspberry pi 5 — blinkin’ lights

This is the third (an extremely short) post concerning my use of a Raspberry Pi 5, this time trying out some very simple physical programming; blinking four LEDs in quick sucession. Note that this is based on the setup performed in the prior two posts. The very basic schematic at the top of this post illustrates four individual LEDs connected to four different GPIO pins on the Raspberry Pi 5 GPIO connector. Using gpiozero with Python 3 (3.11.6 as of the date of this post) and the following script, I illuminate four individual LEDs in quick succession, then sleep two seconds before starting again.

#!/usr/bin/env pythonfrom gpiozero import LEDfrom time import sleepled1 = LED(22)led2 = LED(23)led3 = LED(24)led4 = LED(25)while True:led1.on()sleep(.05)led1.off()sleep(.05)led2.on()sleep(.05)led2.off()sleep(.05)led3.on()sleep(.05)led3.off()sleep(.05)led4.on()sleep(.05)led4.off()sleep(2)

The code is uniquely simple in that all I have to do is assign four LEDs to four pins, and then I can turn each one on and off.

I chose the specific GPIO pins for this example in part because they’re physically close together on the connector, and because internally they’re also logically close together (i.e. GPIO22 to GPIO25, in succession).

I’m also back on the KiCad train for good, finally, so that I won’t have to waste time remembering/relearning basic abilities to create schematics for what I physically design. I hope my drawings become clearer fairly quickly.