CSEduino v3

cseduino3

These are the instructions for assembling CSEduino version 3.

Getting the files

  • The KiCad files can be downloaded from github
  • The required gerber files are in this link

Changes

  • This board was made using KiCad and it is a Single-Sided Board
  • It is pin compatible with the previous ones
  • Can be easily built at home

Bill of Materials

  • 1x ATmega328P-PU microcontroller with Arduino bootloader (U1) (€ 1,59)
  • 1x 28 pin DIP IC Socket (U1)
  • 1x 16 MHz crystal oscillator (XTAL1) (€ 0,44)
  • 2x 22 pF, 50 V ceramic capacitors (C3, C4) (€ 0,06)
  • 1x 7805 linear voltage regulator (U2) (€ 0,22)
  • 2x 100 μF, 25 V electrolytic capacitors (C1, C2) (€ 0,04)
  • 1x 1N4001 rectifier diode (D1) (€ 0,02)
  • 1x SPST momentary normally-open type switch (S1) € 0,08)
  • 1x 10 kΩ resistor (R2) (€ 0,01)
  • 1x 100 nF, 50 V ceramic capacitor (C5) (€ 0,06)
  • 1x 1 kΩ resistor (R1) (€ 0,01)
  • 1x 2-pin male single header (P1)
  • 1x 14-pin female single header (P2)
  • 1x 4-pin female single header (P3)
  • 1x 8-pin female single header (P4)
  • 1x 6-pin male single header (P5)
  • 2x 5-pin male single header (P6, P7)
  • 1x 3mm LED (D2) (€ 0,01)
  • 1x piece of wire

The price presented is an average price. All components are very inexpensive except for the ATmega328P.

Schematics

cseduino4_schematics

The PCB

cseduino3_pcb1cseduino3_pcb2

Voltage Regulator

To assemble the voltage regulator part the required components are:

The 1N4001 rectifier diode is used to ensure some protection to the circuit, the two 100µF electrolytic capacitors will smooth the In/Out current. The 7805 is a linear voltage regulator that will convert voltages from 7 and 30 volts to a fixed 5 volts, with a current up to 1 amp.

Notes:

  • The 1N4001 (D1) is placed at the front of the +Vin
  • One 100µF electrolytic (C2) capacitor sits between +Vin and GND on the 7805 (U2)
  • The other 100µF electrolytic (C1) capacitor sits between +Vout and GND on the 7805 (U2)
  • You can use a 9V battery to easily power the circuit.

Never power the board with both the battery and the USB programming breakout card.

USB/FTDI Programming Header

To assemble the USB/FTDI interface part the required components are:

Notes:

  • The 10k ohm resistor (R2) goes between +5v and Pin 1 (RESET) on the ATmega328P Microcontroller
  • The SPST switch (S1) goes between GND and Pin 1 (RESET) on the ATmega328P Microcontroller
  • The 100nF capacitor (C5) sits between Pin 1 (RESET) on the ATmega328P Microcontroller and FTDI Pin 6 (RTS)

Never power the board with both the battery and the USB programming breakout card.

USB/FTDI Pins:

  • Pin 1: DTR
  • Pin 2: RX
  • Pin 3: TX
  • Pin 4: VCC
  • Pin 5: CTS
  • Pin 6: GND

Microcontroller

To assemble the microprocessor with the headers and external Crystal:

The ATMega328P-PU is a microcontroller. It’s an integrated chip that contains a processor, various types of memory to hold data and binary code and several I/O ports.
 Notes:

  • Each 22pF capacitor (C3, C4) goes between GND and one of the 16 MHz oscillator pins
  • The 16 MHz crystal oscillator (XTAL) connects to Pin 10 and Pin 9 (XTAL2 and XTAL1) on the ATmega328P Microcontroller (U1)
  • When looking at the IC in the photo, notice that pin number 1 is at the top-left of the IC and is marked by a small dot.

The ATmega328P Pin Layout

The numbering scheme used by Arduino is somewhat different from the Pin numbers of ATmega328P so the following image shows the relation between those numbers:

ATmega328P Pins:

  • Pin 1 - RST: Connect to 10k Resistor -> GND, Connect to Push button -> 100nF capacitor -> Connect to Pin 6 (USB/FTDI)
  • Pin 7, 20 - VCC: (+5V)
  • Pin 8, 22 - GND
  • Pin 9 - XTAL1: Connect to 22pF capacitor -> GND, Connect Crystal
  • Pin 10 - XTAL2: Connect to 22pF capacitor -> GND, Connect Crystal
  • Pin 2 - RXD: Connect to Pin 4 (USB/FTDI)
  • Pin 3 - TXD: Connect to Pin 5 (USB/FTDI)
  • Pin 2, 3, 4, 5, 6, 11, 12, 13 ,14, 15, 16, 17, 18, 19: Digital Pins
  • Pins 4, 11, 12, 15, 16 ,17: Pins with PWM
  • Pin 23, 24, 25, 26 , 27, 28: Analog Pins
  • Pin 21 - AREF: is not connected.

Assembling the board

Tools required for assembling

  • Soldering Iron
  • Solder

Soldering components

Solder the components in the following order:

  • Wire
  • Resistors (R1, R2)
  • 1N4001 (D1) - Watch Side
  • Ceramic Capacitors (C3, C4, C5)
  • Crystal (XTAL)
  • SPST switch (S1)
  • IC Socket (U1)
  • Male Head Pins (P1, P2, P3, P4, P5, P6, P7)
  • Electrolytic Capacitors (C1, C2)
  • 7805 (U2)
  • ATmega328P (U1)

IC Socket (U1)

Place the IC Socket with pin 1 on the top.
 Components:

  • U1 - 28 pin DIP IC Socket

Resistors (R1, R2)

The Resistors don’t have polarity but R1 is different from R2.

Components:

  • R1 - 1 kO resistor
  • R2 - 10 kO resistor

1N4001 (D1)

Solder the component in the board with the stripe (-) on the left.

Components:

  • D1 - 1N4001 rectifier diode

Ceramic Capacitors (C3, C4, C5)

The Ceramic Capacitors don’t have polarity but C5 is different from C3 and C4.

Components:

  • C3 - 22 pF, 50 V ceramic capacitor
  • C4 - 22 pF, 50 V ceramic capacitor
  • C5 - 100 nF, 50 V ceramic capacitor

Crystal (XTAL)

The Crystal doesn’t have polarity.
 Components:

  • XTAL - 16 MHz crystal oscillator

SPST switch (S1)

To solder this component you should straighten the pins so it fits in a 3 x 3 space.
 Components:

  • S1 - SPST normally-open type switch

Male Head Pins (J1, J2, J3, J4, J5, J6, J7)

These should be soldered carefully. Solder only one pin at the beginning so its easier to straighten the head, then solder the rest.
Solder carefully according to the image.

  • P1 - 1x14-pin male header
  • P2 - 1x8-pin male header
  • P3 - 1x4-pin male header
  • P4 - 1x6-pin male header
  • P5+P6 - 1x5-pin male header
  • P7 - 1x2-pin male header

LED (D2)

The LED has a longer leg (+) which should be placed on the upper side, the smaller leg (-) should be on the bottom side.

Components:

  • D2 - LED (3mm)

Electrolytic Capacitors (C1, C2)

The C1 should have the (-) side up and the (+) side down. The minus is normally identified by a white strip and shorter leg.
The C2 should have the (-) side down and the (+) side up.

Components:

  • C1 - 100 µF 25 V electrolytic capacitor
  • C2 - 100 µF 25 V electrolytic capacitor

7805 (U2)

The metal side should be facing right and letters on the chip should be facing left.
 Components:

  • U2 - 7805 linear voltage regulator

ATmega328P (U1)

Then, after finishing you can put the ATmega328P on the socket according to the image.
 Components:

  • U1 - ATmega328P-PU microcontroller

The fully assembled board will look like this:

Running a Test Sketch

Open Arduino IDE. Select The proper hardware - Menu Tools -> Board -> Arduino Duemilanove w/ ATmega328.

i901

Select the correct Serial Port after connecting the FTDI Breakout board In the Menu Tools -> Serial Port.

i902

Without adding anything else you can run the following sketch (Menu File -> Examples -> 01. Basics -> Blink):

i900

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
  This example code is in the public domain.
 */
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int  led = 13;
// the setup routine runs once when you press reset:
void  setup () {
  // initialize the digital pin as an output.
 pinMode (led, OUTPUT );
}
// the loop routine runs over and over again forever:
void  loop () {
  digitalWrite (led, HIGH ); // turn the LED on (HIGH is the voltage level)
  delay (1000); // wait for a second
  digitalWrite (led, LOW ); // turn the LED off by making the voltage LOW
  delay (1000);               // wait for a second
}

After Uploading (Ctrl-U) the program should start afterwards.
The LED on the board should blink every second.

Note: Do not connect the external power to the board when using the USB/FTDI programming breakout card.