KiCad Tutorial for Arduino: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(Created page with "Create a new project in KiCad Click on the first icon to create a schema. Press a to add a component, choose Atmega328P-PU and place them somewhere The reference names will...")
 
No edit summary
 
Line 1: Line 1:
Create a new project in KiCad
=Create a new project in KiCad and Add Components=


Click on the first icon to create a schema.
Click on the first icon to create a schema.
Line 20: Line 20:
Press a to add a push button (SW_Push) and edit the value to be Reset.
Press a to add a push button (SW_Push) and edit the value to be Reset.


We add VCC with a and GND with a.


We add VCC with a and GND with a.
=Draw Connections=


We will now draw connections.  Using the line tool.
We will now draw connections.  Using the line tool.
Line 37: Line 38:
default voltage is high, we connect pin 1 to VCC as well via a 10k Ohm
default voltage is high, we connect pin 1 to VCC as well via a 10k Ohm
resistor.
resistor.
=Annotate=


Now that we connected each component we are going to annotate the schema.  This will number each component uniquely.  Do this with Tool -> Annotate Schematic.
Now that we connected each component we are going to annotate the schema.  This will number each component uniquely.  Do this with Tool -> Annotate Schematic.
=Check and Correct the Circuit=


Now press the bug button with the green check mark (or Tools -> Electrical Rules Checker).
Now press the bug button with the green check mark (or Tools -> Electrical Rules Checker).
Line 49: Line 54:


It tells us that pin 21 should not connected to VCC, so we disconnect it.
It tells us that pin 21 should not connected to VCC, so we disconnect it.
=Assign Footprints=


Now we have a verified our schematic, we are going to assign footprints.
Now we have a verified our schematic, we are going to assign footprints.

Latest revision as of 06:00, 11 March 2020

Create a new project in KiCad and Add Components

Click on the first icon to create a schema. Press a to add a component, choose Atmega328P-PU and place them somewhere

The reference names will have a ? behind it. This will become a number later such that each component is unique.

Press a to add 3 resistors (R) (You can rotate them with r) and place them somewhere

For the three resistors, edit the values by double clicking or pressing v. Leave the R? value as is and add as values 220 Ohm, 220 Ohm, and 10k Ohm.

Press a to add 2 LEDs and add the value "Red". You can rename the reference with u and change it to Led?

Press a to add 2 capacitators (C) and add as value 22 muF for both

Press a to add a Crystal and edit the value to be 16 MHz. You can rename the reference with u and change it to Crystal?

Press a to add a push button (SW_Push) and edit the value to be Reset.

We add VCC with a and GND with a.

Draw Connections

We will now draw connections. Using the line tool.

Connect VCC with pin 7, pin 21, pin 20 and one of the 220 Ohm resistors. Connect this resistor with one of the leds. The current should follow the direction of the triangle.

Connect Ground with Ground on the Atmega (pin 8, pin 22), and to the led of above. This led will show whether the board is powered or not.

Pin 19 is connected to the other 220 Ohm resistor and to the led, the led with Ground.

The crystal is connected to pins 9 and 10, and on the other side to the two capacitors. The capacitors are connected to ground.

The push button is connected to pin 1 and ground. If the Arduino measures 0V on pin 1, it will reset itself. To make sure that the default voltage is high, we connect pin 1 to VCC as well via a 10k Ohm resistor.

Annotate

Now that we connected each component we are going to annotate the schema. This will number each component uniquely. Do this with Tool -> Annotate Schematic.

Check and Correct the Circuit

Now press the bug button with the green check mark (or Tools -> Electrical Rules Checker).

We will now see that many pins were not connected. For each point in the file (a green arrow) add a "Not connected flag" (blue cross). When rerunning the verifier, we get the message that VCC and Ground are not powered. We can solve this by adding a power and ground flag:

Press a and add the PWR_FLAG connected to VCC with a line. Press a and add the PWR_FLAG connected to Ground with a line.

It tells us that pin 21 should not connected to VCC, so we disconnect it.

Assign Footprints

Now we have a verified our schematic, we are going to assign footprints.

We will assign the following footprints by doing Tools -> Assign Component Footprint:

Atmega1 : DIL28, This version cannot find the right package, but we add here Socket_Strips:Socket_Strip_Straight_2x14_Pitch2.54mm.

To see whether the component matches the real world, you can press "View selected footprint".

The other components are: - Capacitators_THT:C_Disc_D5.0m_W2.5mm_P5.00mm - Crystals:Crystal_HC18-U_Vertical - LEDs:LED_D5.0mm - Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical - Buttons_Switches_THT:SW_PUSH_6mm

Links