7. Electronics design¶
A few notes for this week about documentation:
I've made a list of recommendations to get easily into the documentation process to help me out to have a structure, and with the hope to help others struggling under similar conditions. [Check my notes on my new Tips section.]
Introduction¶
This week I’ve learn to use Kicad and design my own version of the ATSAMD11C hello.D11C.blink.reset.clock I’ve added a switch button and a blue LED.
I’ve made two boards. The first one broke in one corner when I tried to make a hole to use it as a badge, and I used the wrong SMD button. For the second one I’ve removed the hole in the design and used the correct button.
For my board programming I’ve used the programmer I’ve made in the Electronics production week. And I’ve also used the oscilloscope to check the signals in my board as part of the group assignment, check it here.
Electronic components¶
Resistor:
It’s a passive electrical component that holds resistance to an electrical current. Detailed information
Component | Resistor |
---|---|
Type | SMD 1206 |
Value | 0 Ohms, 100 Ohms, 50 Ohms, 1 KOhms |
Code | Check |
Digikey # | 311-100FRCT-ND |
Link | DigiKey |
Formula:
Ohms Law: Resistance = Voltage / Current Example for a 2V, 0.02A LED in a 5 Volts Power Supply: 5V - 2V = 3V; 3V / 0.02A = 150 Ohm
Capacitor:
It’s a passive electrical device used to store temporally a charge, consisting of one or more pairs of conductors separated by an insulator.
Component | Capacitor |
---|---|
Type | SMD 1206 |
Value | 1uF |
Code | None |
Digikey # | C3216X7R1H105K160AB |
Link | DigiKey |
Regulator:
Any electrical or electronic device that maintains the voltage of a power source within acceptable limits.
Component | Regulator |
---|---|
Type | SMD SOT23 |
Value | 3.3V 100mA |
Code | None |
Digikey # | LM3480IM3-3.3/NOPB |
Link | DigiKey |
Diode:
It’s a semiconductor device with two terminals, typically allowing the flow of current in one direction only.
Component | light emitting diode (LED) |
---|---|
Type | SMD 1206 |
Value | 1.8V 0.02A |
Code | None |
Digikey # | 160-1167-1-ND |
Link | DigiKey |
Micro-controller
It’s a compressed micro computer manufactured to control the functions of embedded systems
Component | ATMEL SAMD11C14A Microcontroller |
---|---|
Type | SMD 14 Pin |
Value | 32Bits 48MHz 1.62~3.63V |
Code | ATSAMD11C14A |
Digikey # | ATSAMD11C14A-SSUTCT-ND |
Link | DigiKey |
Electronic Schematics¶
Symbols
Kicad¶
Requirements
- Install Kicad
- Download or clone Fab Academy Kicad Library.
- Add Symbol and Footprints libraries.
- Add Luc and Florent USB and JTAG KiCad footprint files.
- SAMD11 datasheet.
- SAMD11 pinout information.
- Look for availability of components in your local inventory.
Software
On Fedora Linux:
sudo dnf install kicad
Download for any other platform here.
Cloning Fab Academy Kicad Library repository:
git clone https://gitlab.fabcloud.org/pub/libraries/electronics/kicad.git
Kicad Setup¶
Add Symbol library
- Open Kicad, at the menu bar, click on: “Preferences”>”Manage symbol libraries”>”Global libraries”.
- Click on: “Add a new empty row to table”.
- Click on: “Library Path” and search-select the file “fab.lib” in Fab-Academy “kicad” repository.
- Click on: “OK” and close the manager window.
Add footprint library
- Click on: “Preferences”>”Manage footprint libraries”>”Global libraries”.
- Click on: “Add a new empty row to table”.
- Click on: “Library Path” and search-select the file “fab.pretty” in Fab-Academy “kicad” repository.
- Click on: “OK” and close the manager window.
Add custom USB and JTAG footprints
- Download this file
- Extract the content to your Kicad project directory
- Repeat the Add Symbol library and Add footprint library process using the files extracted.
Edit footprints:
Make your own library:
Usage¶
Schematic layout design¶
Symbol:
- Click on: “Place symbol” icon, pulse left click on canvas.
- Select a component preferably from the Fab Academy library
Global label:
- Click on: “Place global label” icon, pulse left click on canvas.
- Write the a new name for a label or select an existing one from the drop-down menu.
Wire:
- Click on: “Place wire” icon, then left-click in the start and end points of the wire, you can connect symbols by clicking in their pin connection area, represented by a circle in the terminals.
No connection:
- Click on: “Place no connection flag”, left-click on every unused connection. This is important to avoid errors in the electrical check tool.
Associate footprints¶
- Click on: “Edit symbol fields” icon in the toolbar.
Associate every symbol to the right footprint in the Fab-Academy footprint library by clicking in every footprint cell and search-find the footprints in the fabacademy footprint library.
For the LED, Resistors, diode and Capacitor, select the type 1206 footprint.
- For the USB and JTAG connectors look into the custom library.
Generate Netlist¶
- Click on: Icon “Generate Netlist” in the top toolbar
- Click on: Button “Generate Netlist”
- Save the ”“.net” file
PCB Layout design¶
- Open the PCB layout editor.
- Click on “Load netlist”.
- Using the wire tool you can trace the tracks of the board.
- Follow the design rules of the week05 assingment.
Troubleshooting¶
During the documentation process I’ve found multiple mistakes in my schematic tht could lead to malfunction or a small explosion. I’ve found also a fliped led in my schematic image. That I’ve corrected except in the screen capture.
Assignment Outcome¶
Schematic¶
For this process I’ve selected the ATSAMD11C hello.D11C.blink.reset.clock board as the base of my design.
- Divided the work in four parts:
- Regulator
- USB connector
- JTAG conector
- Microntroller
- Placed the following list of symbols under the FabAcademy library:
- ATSAMD11C14A
- Regulator
- USB connector
- JTAG connector
USB connector
1. Wired the USB connector to the VCC and GNDREF symbols. 2. Placed Global labels: - VCC - GND - D+ - D- 3. Wired the global labels to the USB connector: - VCC to pin 1 - D- to pin 2 - D+ to pin 3 - GND to pin 4
Regulator
1. Placed the following symbols: - C1 capacitor 1uF 2. Placed global label: - VCC - GND - V3.3 - btn_v33 3. Wired the sub-schema of the regulator. - VCC to pin 2 - GND to pin 3 - V3.3 to pin 1 - pin 1 of C1 between GND and pin 3 - pin 2 of C1 between pin 1 and V3.3 - btn_v33 between pin 1 and V3.3
JTAG connector
1. Placed Global labels: - V3.3 - GND - CLK - DIO - RESET 2. Wired the sub-schema of the JTAG connector. - GND to pin 9 and pin 3 - DIO to pin 2 - CLK to pin 4 - RESET to pin 10 - VTref to V3.3
Microcontroller
1. Placed the following components: - C2 0.1 uF - R1 100 Ohms - R4 100 Ohms - R5 10 KOhms - R6 10 KOhms - LED1 - Button1 2. Placed the following global labels: - GND - RESET - V3.3 - CLK - DIO 3. Wired the left-side of the Microntroller sub-schema: - GND to C2 to RESET and pin 6 - V3.3 to R5 to point between C2 and RESET - V3.3 to R6 to pin 7 - CLK to point between R6 and pin 7 4. Placed the following global labels: - VCC - GND - btn_v33 - D+ - D- 5. Wired the right-side of the Microntroller sub-schema: - GND to Button1 to pin 13 - btn_v33 to point between Button1 and pin 13 - VCC to anode of LED1 - cathode of LED1 to R4 - R4 to pin 1
PCB design¶
- At first the components appear disordered, so the first task it’s to order all the components following the relationship established in the schematic.
- Then I’ve used the pattern in the board I’ve used as base to have a clear idea of the location of the components.
- The Microcontroller goes in the center.
- Regulator at left with its capacitor.
- JTAG conector at the bottom.
- LED at the lest close to the pin 5 of the Microcontroller.
- The clock and reset pull-down at the left.
- Button and pull-up resistor at the right.
Design | Rules |
---|---|
Track | 0.4 mm |
Outline | 1.0 mm |
Clearance | 0.1 mm |
Design Rules check¶
Design rules check its a tool of PCBnew to detect violations to the design rules specified in the pcb design file. Its under the inspect menu of the top toolbar.
My design didn’t had any trouble in the traces as I’ve made a very simple design, still in the future DRC will be an important tool for me to know if the design its suitable to process in MODS and also to have a functional milled circuit board.
3D model¶
I’ve made this capture by using the 3D tool in PCBnew in the view menu of the top toolbar.
Processing files with mods¶
Importing files as SVG.
Traces | Settings |
---|---|
Bit diameter | 0.4 mm |
Speed | 2 mm/s |
Depth | 0.1 mm |
Global speed | 80% |
Outline | Settings |
---|---|
Bit diameter | 1.0 mm |
Speed | 3 mm/s |
Depth | 1.89 mm |
Step cut | 0.4 mm |
Global speed | 100% |
Milling¶
Milling time: 45 min.
I’ve broke one 0.4 mm and one FR1 PCB board, because the board was slightly curved and it didn’t stick to the sacrificial plate.
Solution: 1. Remove the ailed board and clean up thoughtfully the sacrificial bed until all the debris and dust gets removed. 2. Use two sides adhesive tape avoiding any bubble or
Soldering¶
This is my favorite process.
- Stain one the footprints of every component in the board to use it as a mechanical placing connection.
- Solder the components from inside to the outside of the board.
- Place first the Microcontroller and hold it until it is fixed and aligned.
- Solder the remaining pins of the Microcontroller.
- Solder the JATG conector.
- Solder the button.
- Solder the resistances.
- Solder the regulator and capacitor.
- Solder all the remaining components.
First board:
Second board:
Debugging¶
After soldering I’ve performed the Smoke test by connecting the board to a power supply at 5 V. The test passed without any issue. Then I used the multimeter for continuity test and for DC Volt check before and after the regulator and in the power input pin of the Microcontroller. I didn’t found any issues.
Inspecting signals with the Oscilloscope¶
I’ve inspected the board using a oscilloscope and I’ve observed a signal in the led output. I didn’t find any other issue at that time.
The oscilloscope is an instrument to visualize signals in cartesian coordinates. We have a Tektronix TBS1052B-EDU
For this exercise we inspected Antonio’s board.
Every oscilloscope has different interaction, but the principles are the same you have the basic functions for:
- Scale the scope in X and Y axis.
- Change the pitch.
- Make a two channel graph.
- Auto-scale and focus the signal.
Flashing¶
Download files from FabAcademy material:
Clone ASF repository:
git clone git clone https://github.com/avrxml/asf.git
Changing D11C/hello.D11C.blink.make code to point correctly to asf.
I’ve cloned the repository in a local directory ~/repos/asf
Install arm-none-eabi-gcc dependency:
sudo dnf install arm-none-eabi-gcc
Install newlib dependency:
sudo dnf install arm-none-eabi-newlib arm-none-eabi-gcc-cs-c++.x86_64 gcc-c++-arm-linux-gnu.x86_64
Connecting JTAG programmer board:
Flashing:
make -f hello.D11C.blink.make edbg
If the command doesn’t work, you can just used the generated bin file and use edbg like this:
sudo ./edbg -t samd11 -bpv -f hello.D11C.blink.bin
Changing the speed of the blink¶
Files¶
- Custom connector 1x04 male
- Custom SMD header 01x04
- fab-SWD10pin127pitch
- fab-USB_A male plug
- Header smd 1x04
- Week07 kicad project file
- Week07 kicad schematic file
- Week07 kicad net file
- Week07 kicad pcb file
Optionally you can use this link
Download kicad files from gitlab repository as Zip file