Industrial Circuit Board Design and Microprocessor Programming Bachelor of Science Thesis in Mechatronics
Total Page:16
File Type:pdf, Size:1020Kb
Industrial circuit board design and microprocessor programming Bachelor of Science thesis in Mechatronics FREDRIK HÖGBERG Department of Signals and Systems CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden 2017 REPORT NO. XXXX XXXX Industrial circuit boar! design and %icroprocessor pro$ram%in$ FREDRIK HÖGBERG Depart%ent of Signal and S'ste%s CH)*MERS UNI,ERSIT- OF TE(HNO*OG- Gothenbur$, S/eden 2017 Industrial circuit board design and microprocessor pro$ra%%in$ FREDRIK HÖGBERG FREDRIK HÖGBERG, 2017 Technical report no xxxx544 Depart%ent of Signals and S'ste%s Chal%ers +ni6ersit' of Technolo$' SE-412 96 G;tebor$ S/eden Telephone + 46 (0)31-772 1000 (o6er5 Hot Screen 2000 is an industrial heat press machine that can be used to attach screen prints on clothin$. This thesis will go in to details on ho/ the circuit board and pro$ra% was ma!e for this %achine. Chal%ers Reproservice G;tebor$. S/eden 2017 CHALMERS Signals and Systems, Bachelor@s Thesis XXXX5XX I Abstract The %ain obAect of this proAect is to design and %aBe circuitr' to control a industrial heat press %achine. The circuitr' consist of a 0 la'er boar! containin$ a %icro controller. displa' %odule. )( DC module. te%perature controller and electronics to control electromechanical devices. The fra%e of reference /ill $o through the basics steps in designin$ and %anufacturin$ electrical circ"itry /ith digital and analo$ technolo$y and explain the basics of the most com%on electrical components use! in circuitr' toda'. The fra%e of reference /ill also sho/ ho/ to create sche%atic and circuit design "sin$ Ki()D and ho/ to pro$ra% a Microchi& %icroprocessor in the C pro$ra%ing lan$"a$e. This Bno/le!$e /ill then be i%ple%ente! in the circuit design of the industrial heat press %achine. The i%&le%entation /ill provi!e useful infor%ation about com%on &ractises but also pitfalls to a6oi!. CHALMERS Signals and Systems, Bachelor@s Thesis XXXX5XX II Sammanfattning H"6udsyftet %e! proAeBt Cr att designa och producera BretsBort för att styra en industriell 6Cr%epress%asBin. KretsBortet bestDr a6 en 2-la$ersBi6a som innehåller en %iBrokontroller. displa'%odul. )( D(7%odul. te%peraturregulator och eleBtroniB för att st'ra eleBtromekaniska anordnin$ar. Referensra%en Bom%er att $D i$enom $runderna i design och till6erBnin$ a6 eleBtriska Bretsar %e! digital och analo$ teBnik. Detta a6snitt Bom%er att förBlara $runderna för de 6anli$aste elektrisBa Bomponenterna som an6Cnds i Bretsar ida$. I det här a6snittet avhandlas hur %an skapar sche%aritnin$ och BretsBortsla'out i Ki()D. ,i!are besBri6s hur %an kan pro$ra%%era en Microchi& %iBroprocessor i pro$ra%%erin$sspråBet (. Sist besBri6s C6en processen för etsnin$s a6 BretsBort sa%t placerin$ och lödnin$ a6 Bomponenter %e! hjCl& a6 yt%onterin$steBnik. Kunskapen Bom%er i%ple%enteras i BretsBortsdesignen för den industriella 6Cr%epress%asBinen. I Genomförandet an6Cnds 6anli$t föreBom%ande teBniBer och %etoder %en ska ocBsD visa på fall$ropar som bör undvikas. CHALMERS Signals and Systems, Bachelor@s Thesis XXXX5XX III Table of Contents 1. INTR !"CTION.............................................................................................12 1.1. BacB$round.........................................................................................................................20 1.2. Purpose and goal.................................................................................................................20 1.3. Deli%itation........................................................................................................................2? 2. METHOD L $%............................................................................................14 3. FRAME OF RE(ERENCE..............................................................................15 3.1. Electrical component theor'...............................................................................................2E 3.1.1. Resistors and the basics la/s of electricit'..................................................................2E 3.1.2. Capacitor and the comple4 number re&resentation......................................................2: 3.1.3. Inductor........................................................................................................................23 3.1.4. Diode............................................................................................................................23 3.1.5. Bipolar Junction Transistor (BFT>................................................................................2G 3.1.6. Field EHect Transistor (FET>.......................................................................................29 3.1.7. Triode for alternatin$ current (TRI)(>......................................................................01 3.1.8. O&to-isolator................................................................................................................01 3.1.9. Microcontroller Microchip PIC16FG33)....................................................................02 3.1.10. Displayinterface HD883G1........................................................................................00 3.1.11. Pne"%atic s'ste% and control....................................................................................0? 3.1.12. Part suppliers and manufacturers...............................................................................0? 3.2. Pro$ra%%in$ the PIC16FG33) in C...................................................................................08 3.2.1. GN+ E%acs Editor......................................................................................................08 3.2.2. Compiler tools..............................................................................................................0E 3.2.3. Microcontroller set"&...................................................................................................0: 3.3. Introduction to Ki()D.......................................................................................................03 3.4. Sche%atics design in Ki()D..............................................................................................09 3.4.1. Adding a component....................................................................................................09 3.4.2. Creating a component..................................................................................................09 3.4.3. Connect the components..............................................................................................?1 3.4.4. )nnotate the components.............................................................................................?2 3.4.5. Design rules and validation..........................................................................................?2 3.5. Generate netlist in Ki()D..................................................................................................?0 3.6. Generate BOM in Ki()D...................................................................................................?0 CHALMERS Signals and Systems, Bachelor@s Thesis XXXX5XX I, 3.7. Circuit Board La'out in Ki()D.........................................................................................?0 3.7.1. Design rules and validation..........................................................................................?E 3.7.2. 3D vie/er.....................................................................................................................?E 3.7.3. MaBin$ footprints.........................................................................................................?E 3.8. Generating production files.................................................................................................?E 4. IM*LEMENTATION......................................................................................'+ 4.1. Creating ne/ soft/are written in C that will run on alrea!y produces machines...............?3 4.2. Find out /h' 2EJ of current production run do not pass test and 6eriIcation and correct the issue......................................................................................................................................?3 4.3. Create the sche%atics for the ne/ circ"it design................................................................?3 4.4. Design the PCB la'out of the ne/ circ"it design................................................................?G 4.5. Port the C pro$ra% so it will run on the ne/ circ"itr'........................................................?G 4.6. MaBe a prototype of the ne/ design...................................................................................?9 4.7. Test and verify the function of the prototype......................................................................82 5. RESULT.............................................................................................................&# 5.1. The pro$ra%........................................................................................................................80 5.1.1. Set"&............................................................................................................................80 5.1.2. LCD dri6er...................................................................................................................88 5.1.3. Interrupt function.........................................................................................................88 5.1.4. Destroying eepro% me%or'.........................................................................................8: