This week assigment is to make a hello-world board. The hello world default board is shown here. The default hello world board contains a microcontroller, an oscillator, a capacitor and a pull-up resistor. The default clock value of microcontroller (Attiny44) is 8 Mhz. We have added an external resonator 20 Mhz to speed up the controller. It's a best practice to add a resonator for precise clock applications.
The appropriate value for the pull-up resistor is limited by two factors. The first factor is power dissipation. If the resistance value is too low, a high current will flow through the pull-up resistor, heating the device and using up an unnecessary amount of power when the switch is closed. This condition is called a strong pull-up and is avoided when low power consumption is a requirement. The second factor is the pin voltage when the switch is open. If the pull-up resistance value is too high, combined with a large leakage current of the input pin, the input voltage can become insufficient when the switch is open. This condition is called having a weak pull-up. The actual value of the pull-up’s resistance depends on the impedance of the input pin, which is closely related to the pin’s leakage current. However the resistance value for Attiny 44 is specified in its data sheet as 10KOhm to 20kOhm, We have opted 10kohm resistor for the pull-up.
step 1:- Usr/share/kicad/libraryAlso the footprint file need to be copied on the folowing location and can be downloaded here.
step 2:- /usr/share/kicad/footprints/
Draw the schematic diagram from the hello world board. Use the following tools 'Place component' , 'place wire' etc. It would be a slightly difficult for the first time, you can use shotcut keys like 'm' for move 'r' for rotate components etc. You could use 0 ohm resistor to complete the PCB at a later stage. I have faced similar problem while designing PCB, and added 0 Ohm resistors in the corresponding schamatic circuits at two locations. In addition to the default hellow-world schematic, we need to add a LED and a switch to the circuit. We can use any free pins on the IC. Since voltage is 5v, the LED need to be protected by a resistor (560Ohm to 1kOhm) will be sufficient depend upon the LED. The switch can be connected to ground through a resistor, say 10kohm. My schematic is shown below.
Once after finishing the schematics click 'generate net list' icon and save. Now we need to assign components to the schematic. Run CvPCB icon, and add the SMD components. Generally 1206 code is used for SMD components like resistors and capacitors. After selecting all components click 'generate net list' and save. Every time you need to repeat this, if you alter your schematic.
We are going to design the PCB for a single sided copper clad board. Run Pcbnew icon, this will launch another window. Click the active layer icon and select single track. If You want, you can change the grid to 25mils for better tracks. Click Designrules>design rules>, I have opted 0.5 mm track width, click ok.
There are two 0 Ohm resistors connected to ground terminal at later design, However those two wires need not be routed, since it's connected to ground already. My PCB drawing is shown below. All the components are placed in such a way to reduce the size of PCB within 3cmx3cm. However, I wish I could make it even smaller. All the schematics and PCB design files are available for download here.
The PCB milling is done using Modella MDX 20 machine. Open the terminal window using fab command, and open the svg/png file. Parameters for milling operation is shown in the below picture. You can do complete milling by setting offset parameter = -1. The milling operation is done using 1/64" drill bit and PCB cutting by 1/32" tool bit.
The SIL horizontal male pins are costly and not easily available. This can be replaced by straight male header pins. You need to dill the holes accordingly for the 6 pins. All the components were soldered along with the male header pins. For better soldering, you can add soldering flux.
sudo avrdude -c usbtiny -b 9600 -p t44
The output from the above command is shown below.
Finally the Attiny44 need to be programmed and connected to FTDI cable. The program tells to read character typed through keyboard and and display in the table. Installed the Arduino software and opened tools>port>devttyUSB0.Then click tools>serial monitor, they type the characters. The files for compiling can be downloaded from here. The folowing comands are used for compiling the files.
sudo make program-usbtiny
sudo make program-usbtiny-fuses