7. Electronics design

Group assignment: * Use the test equipment in your lab to observe the operation of a microcontroller circuit board (in minimum, check operating voltage on the board with multimeter or voltmeter and use oscilloscope to check noise of operating voltage and interpret a data signal) * Document your work to the group work page and reflect on your individual page what you learned

  • For example, how much energy does it consume.
  • For example,

Link to the current version of the group documentation

Individual assignment: * Redraw one of the echo hello-world boards or something equivalent. * Add (at least) a button and LED (with current-limiting resistor) or equivalent input and output, check the design rules, make it, test it.

Learning outcomes

  • Select and use software for circuit board design. KiCad was selected and used.
  • Demonstrate workflows used in circuit board design

Have you answered these questions?

  • Linked to the group assignment page. Yes.
  • Documented what you have learned in electronics design.
  • Explained problems and how you fixed them, if you make a board and it doesn’t work; fix the board (with jumper wires etc) until it does work: New board was designed, there were problems with short circuit and broken traces.
  • Included original so design files (KiCad, etc.). Yes and yes. Gerber files can be generated from these design files according to the instructions below.
  • Included a ‘hero shot’ of your board.
  • Loaded a program and tested if your board works. Done and Covered in Week 09 documentation.

Reflection of the group assignment

In this weeks group assignment I learned how to interprete serial data created by AtTiny412 UART. There were some non-trivial issues to consider. Please see the group documentation.

Introduction

In this weeks indicidual assignment we design and implement a circut board based on the given information.

Installation of KiCad libraries was required. The installation instructions for the libraries as well as libraries are availlable in the library’s Gitlab page shown below.

The instructions were followed. The source for the instructions is the page mentioned above.

I checked the KiCad version and we were using Kicad 6. Then we downloaded Fab Electronics Library from here and decompressed the zip file to a local directory, safe place.

The button for downloading the file is shown here:

KiCad was opened for setting up the library paths. New project was created and Schematic Layout Editor was opened. Then the library paths were set.

  • Preferences -> Manage Symbol Libraries was used to add fab.kicad_sym as symbol library.

  • Preferences -> Manage Footprint Libraries was used to add fab.pretty as footprint library.

Preferences -> Configure Paths was used to add variable named FAB. The variable was set to point to the fab library directory where the library was deflated earlier.

Setting up the library paths and variable enables the custom components in the fab library to be found.

Designing the circuit board

In order to design a circuit board, a new project must be created. This creates .kicad_pcb and .kicad_sch files for printed circuit board and schematics respectively.

The design is usually done by designing the schematics first and then using autorouter to create the circuit board.

Adding a component

The component is added by using Add a symbol button in the right. The shortkey for this functionality is a.

Pressing a or clicling the icon opens Choose Symbol window.

Typing AtTiny412 to the search line finds Microcontroller_ATtiny412_SSFR component.

Pressing Ok selects the component. It can be placed by pressing the left mouse button in the suitable position in the schematic editor.

The list of components used in the desing is: - C - LED - Conn_PinHeader_1x03_P2.54mm_Horizontal_SMD - Conn_PinHeader_FTDI_1x06_P2.54mm_Horizontal_SMD - Conn_PinHeader_1x03_P2.54mm_Horizontal_SMD - R - BUTTON_B3SN - Microcontroller_ATtiny412_SSFR

Also symbols Power_GND for ground, Power_PWR_flag and VCC were used.

Connecting components

The components were connected by using Add a wire-button in the right. After the button is pressed, the two component terminals to be connected are left-clicked.

The result of adding the components, annotating and connecting them is shown below:

Assigning footprints

The footprints were assigned by using Assign Footprints.

The symbols and their footprint assignments can be seen below.

Apply, Save Schematic & Continue was then pressed. OK closes the window.

Routing the design

Printed Circuit Board was created by pressing Open PCB in board editor.

The F.Cu (front copper layer was selected. Respectively Edge.Cuts was used for surroundings of the circuit board.

Grid was set to 0.1000 in (2.5400mm) in the selection in the middle top of the window. Route tracks was pressed for routing.

After several rounds of iteration and manual adjustment of the tracks and circuit board boundaries in the Edge.Cuts layer, the following result was obtained:

Closer look to the first milled version of the circuit board.

Later changes in design

This is my first iteration of the project. I made an assembled a second version, because while searching for a shortcut between GND and VCC, I removed button without breaking it. Any SMD component with multiple legs should be cut to pieces before attemtping to remove it. It is hard to keep multiple pads molten at the same time and usually one pad can’t take the stress. See my Output Devices documentation for more information. This is also more detailed description of the milling process. Please see it too.

At the first round I also noticed a few problems with the design. It was difficult to solder the capacitor. So, I changed the PCB layout in order to avoid the problems. I moved the pcb closer to the edge of the board. I also moved the led to a place where there is more space around it. A new circuit board is also about 1mm narrower than the old one was.

The new layout:

The Design files for the project

The schematics file. The pcb file. The F-Cu Gerber file. The Edge Cuts Gerber file.

Milling the pcb

Note that milling the pcb is also described in detail in my Output Devices documentation for more information, which functions are needed in the Circuit Pro user interface.

Plot files were created from KiCad. Because the board was milled with LPKF, gerber files were required.

The Gerber files are created in KiCad. First the Fabrication Output -> Gerbers is selected.

Then F.Cu and Edge.Cuts are selected to the file to be produced.

Then Plot is pressed and the files are stored in the selected directory.

Generated Gerber files were moved to the milling machine in a USB stick.

The stick was moved to Circuit Pro workstation and Circuit Pro program was started.

The CircuitPro process starts with pressing load default template, if you start from the scratch.

There was a list of icons. Clicking through the list of icons and adding the information was a way how to complete the milling.

We told to the milling machine the circuit board type, single sided, copper on top.

We told the milling machine that we were using FR4 circuit board material. Copper layer thickness for the boardd was 0.18 mm.

The created files for the board were loaded to the program:

The outline was successfully imported:

The copper layer was successfully imported:

The isolation method was selected. We also chose Universal Cutter 0.2mm and End Mill 1 mm as tools.

The contour cutting method was selected:

We ended up using vertical slides and the following contour cutting parameters:

The settings were ready for the milling.

Here are again the parameters used for milling:

Then we began connecting to the machine

Note that the Circuit Pro does not scan for available machines. The machine type is currently selected from a long list of supported machines. This can be avoided by starting the machine before Circuit Pro.

Connection to the machine worked.

At this point the milling board was empty and in a dire need for some material for milling.

There was a camera window for a camera installed in a mill.

There was a display showing the lifetime of the tool bit. Note that there was not much lifetime left for 2.0 mm spiral drill. We decided to move on anyway.

At this point the software asked us to mount the material.

Circuit board was taped on the table of the machine.

The mounting of the circuit board was acknowledged to the software.

The position of the material for the beginning must be pointed to the machine.

There was an UI for X/Y positioning.

The milling head was moved to a siotable position.

The position was selected in the software (P1).

Then it was time to set the second point (P2).

UI was again used for selecting the point.

The design fits inside the selected area.

The settings were saved.

We needed to calibrate the line width.

We chose the position for the line.

Warming up before milling the calibration line took some time.

The machine made test mill in order to calculate the line width. After milling the confirmation was asked for the measurement.

Then the width of the line was measured.

0.219 mm line width was measured. The result in the microscope was acceptable and the line width was acceptable. We could proceed to milling.

After calibration, the circuit board was milled.

In the second run there was a warning about the condition of the 0.1 milling bit. Warning was placed outside the visible screen, so resolution of the screen was changed in order to move the pop-up window to visible area. We continued with the old bit and it worked.

After the circuit board was milled, the glass fiber dust was washed off (FR4 board) and the components collected for soldering.

Soldering the components

The components were soldered with the help of flux under the microscope. Paint marker was used to mark the vcc pins. There was no problems in soldering on the second round, because the PCB was redesinged in order to avoid the problems. Tape was used to hold the board and the connectors in place.

In order to solder the components, some info was needed. There was no silk printing in the circuit board for the diode direction nor for the IC directions. The IC had cut edge on pin 1 side, outside from the circuit board. The diode had a faint green line upwards in the picture.

The components were soldered under microscope.

An finally, “the hero shot.” Paint pen was used to mark the VCC pins (red) and the programming pin for the data line for programming the device.

Programming

The test programming of the device was successful and the device appeared to be working, because the test program managed to blink the led. The testing was done with Arduino Software but it was done with instructors tools purely for confirming, if the device works. The programming of the device and the problems in programming the device are covered in the Embedded programming Week documentation.