Electronics-Design

Week 6

Electronics Design

———-

Group assignment:
Individual assignment:

One of the reasons I joined fab academy is to learn electronics design, so this week is a chance to develop my electronic skill I am so excited about the number of things I am going to learn here.

in this week lecture Nail showed us some of the software for electronics design, one of the top software that he recommended is Eagle and Kicad so i will start by experimenting booth of them then decide which one iam going to stick with and in order to do the comparison i will spend one houre on each software

1- KiCad EDA
KiCas Logo

KiCad is an open-source software tool for the creation of electronic schematic diagrams and PCB artwork. Beneath its singular surface, KiCad incorporates an elegant ensemble of the following stand-alone software tools:

KiCas tools

Downloading and installing KiCad

KiCad runs on Cross-platform it works on GNU/Linux, Apple macOS and Windows. You can find the most up to date instructions and download links Here, for me i have windows device so i downloaded windows version.

KiCas Download

After Downloading the software now its time to install it, the software require 5 Gb so make sure you have enough space in your hard drive, for me I don’t have that space on my C drive so I installed it on the D drive

kicad-instalation1
kicad-instalation2
kicad-instalation3
kicad-instalation4

Start new project

Now you are ready to lunch the software, from the main menu start a new project

KiCas Start new project

once you open a new project KiCad is going to create tow file for you

KiCad project layout

Choosing the hello-world board you can find them HERE

Before starting to drow your circuit you need to choose the hello-world board that you want to work with, for me the chip that i have is ATtiny45

KiCad hellot

Next is to check the list of component and instruction of how to use it

so I downloaded all the files and saved them in my laptop the component are :

hello.attiny45.01
hello.attiny45.02
hello.attiny45.03
hello.attiny45.04

Then i looked for the datasheet and pinout of the chip to understand it better i got the pinout frome Here and find other information from HERE

Pin out

Next you have to download the fab liberary for KiCad HERE

After downloading the library you have to upload it to Kicad liberary in order to be able to use them in the schematic

kadding symbol01
adding symbol01
Adding Symbol to Schematic

By clicking a on the schematic board you can add new symbol or just Click A and then search for attiny45 and by right clicking you can see the datasheet and specification of the symbol

adding schematic01
adding schematic02
Adding Symbol to Schematic

Now I added all the component that on the list, then as per the assignment for this week i added a button and a led and a resistor

adding component01t

Wiring thigs up

it was Fun Wiring the componnent together it reminded me How LAB View Programming look like,

Wiring component

Cleaning the Schematic By Labeling

Even though I have enjoyed wiring the schematics still its a process that take time and its not easy to be read by other, So I Decided to try labeling the component to organize the schematic.

To do the Labeling you need to click the (A) symbol found on the right side bar
Place the Labels

This is the schematic after organize it with the labels

Now the schematic look cleaner and readable. Place the Labels

Test the connection with electric rule

By clicking the bug symbol we can run an electric test rule to make sure every thing is good, that test rule is going to check if there is a wire wish is not properly connected or a pin without a connection This

Testing with Design Rule

Analyzing the Problems

After running electric rule test tow errors cam out

Dessign Rule Error

Fixing Schematic Errors
adding schematic01
adding schematic02

Assigning Foot Prints

Next is to assign PCB foot print for the component on the schematic.

assign-footprint01
assign-footprint01

Checking Foot Prints

I had a doubt about ( AVRISP ) that the one I am using is not correct so when I right clicked and viewed foot print I notice the difference

avrisp01
avrisp02
avrispsmd01
avrispsmd02

Generate the netlist

next is to generate the netlist by clicking the button showing the picture below, then save the netlist file in the project directory

generate netlist

Run PCBnew layout

next to click the pcb button next to the netlist button, in order to layout the component to printed circuit board

PCB new Layout

Load the netlist

now you have to load the net list from the file that we saved to in the previous step, then click update pcb

pcb netlist
pcp net list 2

loading the component

past the component in the middle of the screen, you can zoom in and out with the mouse Crouser, notice that the component are connected with this wire, try to organize it first to reduce intersections, by click R button in the keyboard you can flip the component

pcb
pcp

Edit Trace size

now edit the trace according to your machine and according to the bit that you are using to mill, first go to File , then board setup then chose net classes , edit the clearance and Track width, the rest keep it as it is

pcb track
pcb track

Connecting Traces

After spending one hour trying to figure out how to connect them together without intersection, i found that its not an easy job, so I decided to go to sleep and try again tomorrow.

pcb track
sleep meme

Next day enthusiasm

The second day I came with enthusiasm to get things done

will do my best meme

Connecting Traces

I moved the new component on top , tried to make the layout as it show in the picture on the right

pcb track
hello.attiny45

After connecting the component like the one in the picture I can notice here is the place to the push button and the led

connecting traces01

Connecting Traces Solved

every thing went smooth after connecting the main component, the last problem was connecting GND of ATtiny45 , push button , ftdi connector,

connecting-traces02.png
connecting-traces03.png

Adding Outline Boarder

after connecting all traces now its time to make the boarders, you can use the graphic line button on right side bar , then make sure of the size of your board by measuring it with

boarders button
dimentions button

boarders button
dimentions button

Fill and connect GND

to make board cleaner you can fill the empty spaces and to make use of the filled copper to connect all GNDs together, you can do that by click add filled zone button found on the right side bar, then click on the border, a window will pop up choose Fcu and choose GND and specify the clearance and distance according to your machine and your mill bit

filled-cupper01
filled-cupper02

filled-cupper03
filled-cupper04

Fixing filling error

by testing the electric rule i can notice the problem that showing its mean there is some unconnected places and from the fill, so i solved it by reduce the clearance spaces, another problem is that the ground of ATTiny should not e connected directly to the other grounds, it should be connected to capacitor ground only , so i used the keep out area button to unconnected it from the fill and connect it ageing to the capacitor

filling error

Adding Keep out Area

by click the keep out button on the right side bar, and then select the area to keep it out of the filling, and the area we want to keep it out is the area arount the Attiny45.

solving-traces.png
Solving Traces
avrispsmd01
avrispsmd02

Add margin, and select your cut area

then add margin around the pcb in order make the machine cut the border, change the view to margin and use graphics lines and draw the border , next change the view to Dwg.User and draw around your drawing.

 margin01
margin02
margin03
margin04

Now open mods form Here

Start by Right Clicking your muse, then choose programs , then open server programs ,then PCB Svg

 margin01
mods02
mods01.png

Now this is over view of the program you can find link on what dose each model Do From here mods over view

Upload picture to mods

So first select the file that want to cut, and then invert it in order for the Machin to mill it correctly, click invert to invert the black with white color mods over view

Tools diameter

now put the diameter for the cutting , make tool diameter to 0.4 mm and the drill depth to 0.1 mm and then hit calculate, make the speed 4 and the XYZ axis to zeros.

tool-dimeter
tool-dimeter1

Saving and downloading the files

in order to save and download the file you have to add another module to the end, delete the WebSocket device model and replace it with Save file module

save-module01
save-module01
save-module03
save-module04
click calculate
calculate
Repeat for the margin cut file

repeat the same process for the margin cut but change the depth of the cut to 2 mm

margin cut

Cutting with Roland SRM-20

now its time to set the machine to cut the circuit, i have full documentation on how to use Roland srm-20 and its software VPanel Here

setting-srm20
setting-srm20

Cutting with Roland SRM-20

now its time to change the bit to 1/64 to make the z axis to zero.

calculate

i broked the bit

After removing the nail from the drill, I lowered the machine and forgot that I had put it in the continuous Mode, and broked the bit. every thing stopped here till i order another one to continue

calculate

buying new bit and continue the work

it took one week to be able to find new bit to continue with the work so i bout couple of 1/64 and 1/32 to not stop again if one is broke,

i already finished with setting the mods for engraving the circuit so i did that first then i changed the setting to cut it out.

 cutting-01.png
cutting-02.png
cutting-03.jpeg

soldering the circuit

After cutting the circuit now its time to solder the electronics parts and pins on it, i use glue to fix the parts on the circuit first then used solder ink and heat gun to solder it

 soldering01.png
soldering02.jpeg
soldering03.jpeg

programming ATtiny45 With Arduino as isp

first you need to have Arduino ide you can download it from here depends on your operation system choose the one suitable with you

calculate

programming ATtiny45 With Arduino as isp

i foloowed this toturial to upload the sketch using

add attiny board

First you want to open File > Preferences.

calculate

Then, at the bottom of the pop up menu where you see “Additional Boards Manager URLs” you want to copy and paste “https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json" (without the quotation marks).

calculate

Now click OK.

Navigate to Tools > Board > Board Manager. calculate

Scroll down to the bottom and you should find “attiny”. Click the install button and the words “Installed” should appear when the task is complete.

To confirm that you have added support for the boards, navigate to Tools > Board and you should see ATtiny at the bottom of the list.

Setup Arduino As ISP

Navigate to File > Examples > ArduinoISP. Open the sketch and upload it to your Arduino.

attiny45

choose the board attiny microcontrollers attiny 25/45/85

attiny45

choose the processor to attiny 45

attiny45

choose the internal clock 8 MHZ

attiny45

burn bootloader

attiny45

pinout

calculate

adding button to the code

Arduino program

you can download Ardino program from here

Kicad Files

you can download Kicad files from here you can download SVG files from here