Skip to content

6. Electronic design

group project:

For the group assignment, we have to try out some lab test equipment. We ordered the DSO123 oscilloscope and the LA104 logic analyzer to be able to use in the lab and at home.

Before testing we need a subject. So we took an arduino Nano and programmed it to blink the internal LED with 500ms on time and 1500ms off time. We also have it write to the serial port. So we can test that also.

First we connect an analog channel of the oscilloscope and see the rising and falling of the voltage on the LED pin. After that we connect the same LED pin to a digital channel and also can see the on-off sequence.

We also connected the TX pin of the arduino to the logic analyzer to see data on the UART. We still have to learn more on how to use this tool, so we have to watch some tutorials. To be able to use this at full potential.

Hello board design

After first looking in our small inventory we found that we had the ATtiny45, the ESP32 and the ESP-01 microcontroller we could use for this assignment.

First try

I used the Attiny45 for my ISP, so I thought to also use this one in the hello-board.
hello.ftdi.45 board
But I wanted to add a button and 2 LEDS and after some fiddling around in the Kicad software. I couldn’t get around to placing everything so that I could draw all of the traces I wanted. I also didn’t have a lot of time this week, so I stopped this attempt.

Second try

I had some ESP-01 modules laying around. So I could also give that one a try. Maybe this one goes better. hello.ESP-01

Starting using Kicad is something to get used to a bit. But once I got all libraries and footprints installed, it went ok to make the schematic. During the BCN class we also installed the fab library.
That makes it a bit easier to find the components from the fab inventory list.

1. Create schematic with Eeschema

I started out by placing every component I needed on the page. One of each and I copied some where I needed multiple. Making the schematic based on the board layout of the hello board takes a bit of figuring out what goes where. But I also tried to make the basic schematic first and then compared it to the traces of the example. I also added an extra button and 2 LEDs. My aim was to make the complete circuit board into something that looks like a little robot. 2 LED eyes and I wanted to place the buttons on the hands. The mcu in the belly and the FTDI connector as feet. Once the basic schematic was done, after some researching on how to connect the LED’s and buttons up. I also looked up the pinout of the ESP-01.

ESP-01 ESP8266 pinout diagram gpios pins

Now I could try and figure out where to connect everything up. The hello board already has a reset button and a slide switch to choose programming mode or running mode.

2. Create PCB layout with Pcbnew

After everything in the schematic is ok, it’s time to switch to another window. We start Pcbnew and click the “update pcb from schematic” button. This places all footprints of the components in one big pile on the workspace. You have to now move them around an put them where you want them on your final board layout. After this you have to draw the traces between all the components. Drawing the traces is the hardest part. You have to route them all around and sometimes finding room to go under some parts or between pads. I had to move some components or turn them upside down to be able to route all of the traces. You can run a design rules check by clicking on the ladybug icon. This shows you what parts are not connect or give errors. Also what traces are to close to other pads or so. Really handy!

3. Export to svg and edit the outline for the board in Inkscape

Once satisfied with the board and the traces it is easy to export to svg. I only had the copper layer selected to export and put the pen size to 0.1mm

In Inkscape I made the traces invert so they were white on a black background. I also imported the little robot I made for my website icon. This I stretched and deformed a bit until I got all parts of my board inside something that maybe still looks a bit like a robot 😉

I made separate layers, one for the traces and one for the outline. And a black background layer.

The final outline image I also made white and filled it white also. That way if imported in Mods, there will only be 1 line around the shape to cut the board out.

I use the export to png command in Inkscape to export 2 images. The traces and the outline. Made sure they have the same dimensions and have a 1000 dpi. This also makes it easier to convert them to milling code in Mods.

My files: - kiCad project - kicad schematic - kicad board - traces svg - traces png - outline png

4. milling the board

First attempt to mill the board using a 0.2 Vshaped mill was a failure

I will have to try again. Maybe using a 0.1 V-milling bit. This test also failed. Next thing I will do is adjust my traces and make them 0.4mm thick instead of 2.5mm.
Hopefully that works and I can still route everything as I want to.
To be continued....

update 22/03/2021 Nearly 2 weeks later already.

failed milling

After some more failures I started the design process again and made a somewhat simpler version of my board. Maybe that could have bigger traces and be easier to mill.

new board

I also played around and tested using only 2 offsets instead of 4 in Mods, but that made no real difference in the end result of the milling.


Still waiting for new better endmills to arrive I did the board again using a broken 0.3 endmill and got good results now.

I also decided to give my original board another go and adjusted the placement of the components and the traces a bit. I made them a little thicker to 0.4mm now. Ran into some trouble, because they got to close together and still had to adjust them and re-route them a lot to get an acceptable result


I finally got this redesign like I wanted it and also tried milling it.


Meanwhile I continued with Isabel the adventure of getting her ISP board programmed on the mac. We get closer to succes step by STEP

isp isabel

5. soldering

I also looked up the datasheet of the LED’s we have: I wanted to see what the current usage of these was. I found that the LEDs use around 30mA current and have a forward voltage of 2.1V Using an (online resistor calculator)[] I could look up what resistors I actually have to use. Since the ESP-01 is a 3.3V device instead of a 5V I also had to take this into account.


Soldering started out fine until I noticed that I received 90° angled headers instead of the vertical ones I needed.

wrong headers

These also have a different footprint, so to wide for my design. I also looked up a datasheet for those headers to see the footprints and dimensions.

different footprint

I ordered new ones, but could not wait and tried to improvise a header with 2 single row headers of which I bent the legs a bit. I seemed to fit, but I had to re-solder them once to many and finally tore the copper from the board while de-soldering and adjusting them.

broken pads from desoldering

I milled this board again and waited patiently for the correct headers to arrive. Now soldering went fine and I got these 2 final boards now.

heroshot 2 boards heroshot 2 boards

Updated files: esp_board2.sch - esp_board2 kiCad project - esp_board2kicad schematic - esp_board2 kicad board - esp_board2_traces svg - esp_board2_traces png - esp_board2_outline png

6. testing

I doublechecked everything after soldering. Traces and connections seem in order. But I noticed another rookie mistake. On one of my boards the 8pin female header to attach the ESP-01 module is upside down. That is actually a mistake made doing the routing in KiCad, but I had not seen it at that time. I should put the ESP board upside down. Maybe I could resolder the pinheader on the board for that. But for now, I will use some jumper cables to attach it.

pic board with jumpers

7. programming

The programming part will be done and documented in the embedded_programming week. There I will test and program my boards, hopefully with different ways of coding and programming it.

Last update: June 8, 2021