Archive for the ‘Uncategorized’ Category.

Kicad esp32 schematic symbol

esp32_kicad

I’m starting a esp32 design as a possible migration path from the esp8266 based espusb. The esp32 is currently low availability, and is a much more expensive part, but figured I’d give it a crack. First up, a schematic symbol. I hate how long these things take, and that they rarely get shared, so here’s mine (download below).

Download here (contains esp32.lib): esp32lib

The esp32 wroom32 design

wroom32_gerbs2

Espressif kindly provide the schematics and layout files for the esp32 based WROOM32. In preparation for my own design (based on my espusb) I’ve been looking over these files.

The zip file they provide (local copy) contains wroom32_pcbdesign files in a variety of formats. The source .PCB and .SCH files appear to be included, but there are no notes and I couldn’t determine which tool they are for (if you know please comment – my best guess is OrCAD). They also include pdf printouts of the schematic and and layout. The Layout pdf is reproduced to the right. However, it doesn’t show any of the silk and only appears to be the top copper layer. I therefore generated the image above from the gerbers that are also included.

The gerbers also don’t use a naming convention I’m familiar with, but from what I can tell the WROOM32 is a 4 layer board. I’m kind of surprised that they didn’t try and squeeze everything onto 2 layers, like they do with the esp1. Will be interesting to see if the esp32 also forces me to start doing 4 layer designs.

For reference, the BOM and schematic are below:

wroom32_bomwroom32_sch

Dual esp8266 board

espdual

I’ve been playing with a new esp8266 design. The board has 2 esp8266s on one PCB. It’s based around my espusb design.

The board contains a ch340g usb interface, an MSP1603 buck converter to power the 2 esp8266s. The SPI buses of the esps are linked so that they can communicate. There are headers that allow the 2 esps to be programmed independently.

One idea of course is that I could uses these boards to build a basic mesh network. I think they’ll be fun to play around with in any case. Gerbers and Kicad files below. If boards work, and there’s any interest, I might stick them in my shop. If you think you’d like one email me ([email protected]).

Kicad design files and gerbers: espusb_dual

Weird PCB Layouts with Kicad

flowerpcb2

I designed the board above for my solar flower kit. It was partly an experiment is designing a weird shaped PCB, with funky traces and complex edges.

The process is kind of messy, and requires command line tools. If you’re a graphic designer and would like me to do this for you, click here. If you want to do this yourself, my notes are below.

The board edges have to be imported into Kicad separately from the graphics. You can only import DXF files. I use Inkscape to design the board edges and then export them as DXF. In Kicad in PCBnew select “File->Import->DXF” and import the DXF into the “Edges.cuts” layer.

First, I designed the flower shaped edge cut in Inkscape. In recent versions of KiCad it’s pretty easy to import the edgecuts. Firstly create your edges in Inkscape, ensure that the design is a simple line drawing and save it as a DXF file. Then just select “File->Import->DXF” in KiCad, and import the DXF into the Edge.cuts layer.

Creating interesting looking traces is more difficult. Kicad doesn’t really have a concept of non-straight line traces, and pads are similarly limited. There’s a tool in Kicad called “Bitmap2Component” which is ok for basic logos, but it doesn’t work that well with vector graphics.

For graphics I therefore use svg2mod. This is a neat little command line tool which takes a vector image into a Kicad component composed of a bunch of straight-line segments. After you’ve downloaded the tool you can run it as follows on an SVG:

./svg2mod.py -i ~/design.svg -o ~/design.mod -p 0.1

The “-p” parameter determines how many segments a curve is broken into, and may require some experimentation. svg2mod also works with multi-layer SVG files. You can create mask, copper, and silk layers and import them all into the Kicad component (the svg2mod readme specifies all the layer names you need to use).

You can them import the .mod component into Pcbnew and place it as you would any other part. In my case, I’d mark locations where LEDs should sit on the Inkscape design. I then placed LEDs over these in Pcbnew, this ensures that the drill holes get created correctly. I also had a small layout in the center of the board, the traces designed in Inkscape therefore needed to be manually aligned, and of course your DRC never passes.

That’s the basic process, and while it’s pretty messy but it works and you can create some entertainingly odd PCBs this way.