Intro to CAD: Difference between revisions
(37 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This page is for the Intro to Engineering ENGR 122 EE/CPE Section |
This page is for the Intro to Engineering ENGR 122 EE/CPE Section |
||
Two Dimensional CAD |
==Two Dimensional CAD== |
||
* [http://www.3ds.com/products-services/draftsight/download-draftsight/?xtor=SEC-6-GOO-%5b%5d-%5bold%5d-S-%5bdraftsight%5d&gclid=CIr898Cm7bsCFYN_Qgodjk8Arg DraftSight] is an AutoCAD clone. Presently it is rather like AutoCAD 2006 or 2007. |
* [http://www.3ds.com/products-services/draftsight/download-draftsight/?xtor=SEC-6-GOO-%5b%5d-%5bold%5d-S-%5bdraftsight%5d&gclid=CIr898Cm7bsCFYN_Qgodjk8Arg DraftSight] is an AutoCAD clone. Presently it is rather like AutoCAD 2006 or 2007. |
||
** [http://www.3ds.com/fileadmin/PRODUCTS/DRAFT_SIGHT/PDF/GETTING-STARTED-GUIDE.pdf Getting Started With DraftSight] |
** [http://www.3ds.com/fileadmin/PRODUCTS/DRAFT_SIGHT/PDF/GETTING-STARTED-GUIDE.pdf Getting Started With DraftSight] |
||
Line 7: | Line 7: | ||
** [http://viewer.zmags.com/publication/5cb01be7#/5cb01be7/1) Master Flipbook Volume 1] |
** [http://viewer.zmags.com/publication/5cb01be7#/5cb01be7/1) Master Flipbook Volume 1] |
||
** [http://viewer.zmags.com/publication/bd1e972f#/bd1e972f/1 Master Flipbook Volume 2] |
** [http://viewer.zmags.com/publication/bd1e972f#/bd1e972f/1 Master Flipbook Volume 2] |
||
** [ |
** [https://www.youtube.com/playlist?list=PL0D91F2C0FF4BE3F3 Lynons' Share DraftSight Webinars] |
||
** [http://www.youtube.com/watch?v=5-TD-TzsHsY Adding new line styles to your drawing] |
** [http://www.youtube.com/watch?v=5-TD-TzsHsY Adding new line styles to your drawing] |
||
** [http://www.opticalillusion.net/optical-illusions/pinnas-intertwining-illusion/ Lab 1, Optical Illusion Exercise] |
|||
** [https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&docid=rfAfMXhvlVRe-M&tbnid=ge6y_tLe4TkB9M:&ved=0CAUQjRw&url=http%3A%2F%2Fwww.anopticalillusion.com%2F2013%2F12%2Fpinnas-illusory-intertwining-effect%2F&ei=gsHNUv_qItPjoASe1IKYDw&bvm=bv.58187178,d.cGU&psig=AFQjCNGwTXUhCKhv7C39kHMJTxKcP9QbeA&ust=1389302530108958 Lab 1, Optical Illusion Exercise] |
|||
* [http://www.unm.edu/~bgreen/autocad/AutoCAD%202.pdf Orthographic Projection (Front, Side and Top View) Drawing Tutorial] |
* [http://www.unm.edu/~bgreen/autocad/AutoCAD%202.pdf Orthographic Projection (Front, Side and Top View) Drawing Tutorial] |
||
===FreeCAD=== |
|||
===Persistence of Vision Bike Light 2015=== |
|||
Freecad is a two and three dimensional open source mechanical CAD program. |
|||
The POV project will use the Arduino Mini Pro which is a very inexpensive Arduino on a circuit board measuring 18 mm x 34 mm. The LEDs will be [http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/HB/Data%20Sheets/C503B%20BAS%20BAN%20BCS%20BCN%20GAS%20GAN%20GCS%20GCN%201094.pdf Cree C503B-GAS-CB0F079] which are green and very bright. The idea is that this POV device attaches on a bicycle wheel, and as it spins it will show cartoons or messages. An [http://playground.arduino.cc/Main/MPU-6050 MPU-6050 accelerometer] module circuit, part number [http://playground.arduino.cc/uploads/Main/MPU6050-V1-SCH.jpg GY-521], will be used to compute the angular velocity from the centripital acceleration. |
|||
*[https://www.freecadweb.org/wiki/ FreeCAD Wiki] |
|||
===CAD Projects=== |
|||
*[http://fweb.wallawalla.edu/~frohro//ClassHandouts/ Class Handouts] |
|||
====Persistence of Vision Wand 2016==== |
|||
*[http://www.wavywand.com/ The Wavywand, a commercial product done by my old student, Adriaan Smit] |
|||
*[http://www.openobject.org/opensourceurbanism/Bike_POV_Beta_2 Scott Mitchell's Arduino code for a bike light] |
|||
*[https://www.arduino.cc/en/Main/ArduinoBoardNano Arduino Nano (the original one, not the one we have that uses the CH340G USB/Serial comverter)] |
|||
*[https://youtu.be/VP6np8DuG8I Here is a video on how to put your WWU 2016 POV device into its case without breaking the case or board.] |
|||
=====Kicad Footprints===== |
|||
*[http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/SW-520D.kicad_mod SW-520D Kicad Footprint] |
|||
*[http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/arduino.mod Arduino Nano Footprint] |
|||
====Persistence of Vision Bike Light 2015==== |
|||
The POV project will use the Arduino Mini Pro which is a very inexpensive Arduino on a circuit board measuring 18 mm x 34 mm. The LEDs will be [http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/HB/Data%20Sheets/C503B%20BAS%20BAN%20BCS%20BCN%20GAS%20GAN%20GCS%20GCN%201094.pdf Cree C503B-GAS-CB0F079] which are green and very bright. The idea is that this POV device attaches on a bicycle wheel, and as it spins it will show cartoons or messages. An [http://playground.arduino.cc/Main/MPU-6050 MPU-6050 accelerometer] module circuit, part number [http://playground.arduino.cc/uploads/Main/MPU6050-V1-SCH.jpg GY-521], will be used to compute the angular velocity from the centripital acceleration. A register map for programming purposes can be found [http://www.invensense.com/mems/gyro/documents/RM-MPU-6000A-00v4.2.pdf here]. |
|||
*The starting CAD drawing from Ralph Stirling is [http://people.wallawalla.edu/~rob.frohne/ClassHandouts/Intro_to_Cad/2015/wheelcase2.dxf here]. |
*The starting CAD drawing from Ralph Stirling is [http://people.wallawalla.edu/~rob.frohne/ClassHandouts/Intro_to_Cad/2015/wheelcase2.dxf here]. |
||
*[http://www.dipmicro.com/img/1/GY521-MOD-2.jpg A photo of the GY-521] which is 0.6" x 0.8" approximately. |
*[http://www.dipmicro.com/img/1/GY521-MOD-2.jpg A photo of the GY-521] which is 0.6" x 0.8" approximately. |
||
*[http://playground.arduino.cc/Main/MPU-6050 A page on using the MPU-5060 accelerometer] which is the part in the GY-521. |
|||
*The website I pulled up in class with the measurements for the [http://www.dx.com/p/gy-521-mpu6050-3-axis-acceleration-gyroscope-6dof-module-blue-154602#.VNvKHfnF98E accelorometer] are here. |
*The website I pulled up in class with the measurements for the [http://www.dx.com/p/gy-521-mpu6050-3-axis-acceleration-gyroscope-6dof-module-blue-154602#.VNvKHfnF98E accelorometer] are here. |
||
*[http://www.digikey.com/product-detail/en/BK-82/BK-82-ND/2079903 These] are the battery clips we will be using. |
*[http://www.digikey.com/product-detail/en/BK-82/BK-82-ND/2079903 These] are the battery clips we will be using. |
||
Line 21: | Line 36: | ||
*[http://4.bp.blogspot.com/-lsbHPKOtTKk/UxpT6-zXaRI/AAAAAAAABU8/KQJ_yrpIYcE/s1600/GY-521_MPU-6050_Arduino-Wiring-Diagram_Example.png Schematic on wiring the GY-521 to the Arduino Pro Mini] |
*[http://4.bp.blogspot.com/-lsbHPKOtTKk/UxpT6-zXaRI/AAAAAAAABU8/KQJ_yrpIYcE/s1600/GY-521_MPU-6050_Arduino-Wiring-Diagram_Example.png Schematic on wiring the GY-521 to the Arduino Pro Mini] |
||
*[https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/Examples Jeff Rowberg's nice I2C library for the MPU-6050] |
*[https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/Examples Jeff Rowberg's nice I2C library for the MPU-6050] |
||
*[http://www.geekmomprojects.com/mpu-6050-dmp-data-from-i2cdevlib/ Demos using Jeff Rowberg's library and the MPU-6050] |
*[http://www.geekmomprojects.com/mpu-6050-dmp-data-from-i2cdevlib/ Demos using Jeff Rowberg's library and the MPU-6050] Note: This requires that digital I/O pin 2 be connected to the INT of the GY-521. |
||
*[http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/HB/Data%20Sheets/C503B%20BAS%20BAN%20BCS%20BCN%20GAS%20GAN%20GCS%20GCN%201094.pdf Data Sheet for the Cree LEDs we are using] |
*[http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/HB/Data%20Sheets/C503B%20BAS%20BAN%20BCS%20BCN%20GAS%20GAN%20GCS%20GCN%201094.pdf Data Sheet for the Cree LEDs we are using] |
||
* Photos of the Arduino Pro Mini |
* Photos of the Arduino Pro Mini |
||
Line 28: | Line 43: | ||
* Check your files at [https://www.my4pcb.com/net35/FreeDFMNet/FreeDFMHome.aspx#_ga=1.135621233.1922064481.1424304322 this cite]. |
* Check your files at [https://www.my4pcb.com/net35/FreeDFMNet/FreeDFMHome.aspx#_ga=1.135621233.1922064481.1424304322 this cite]. |
||
===Persistence of Vision Bike Light Project 2014=== |
====Persistence of Vision Bike Light Project 2014==== |
||
This project will use a 3.3 volt [http://arduino.cc/en/Main/ArduinoBoardProMini Arduino Pro Mini] clone that you will design the circuit board, housing, and software for. [https://en.wikipedia.org/wiki/Persistence_of_vision Persistence of vision] is a psychological effect that allows you to see two dimensional images that were created by one dimensional flashing LEDs. Here are some similar projects: |
This project will use a 3.3 volt [http://arduino.cc/en/Main/ArduinoBoardProMini Arduino Pro Mini] clone that you will design the circuit board, housing, and software for. [https://en.wikipedia.org/wiki/Persistence_of_vision Persistence of vision] is a psychological effect that allows you to see two dimensional images that were created by one dimensional flashing LEDs. Here are some similar projects: |
||
*[http://www.youtube.com/watch?v=OKmpINvPJYk This] is video shows some POV projects from Japan. |
*[http://www.youtube.com/watch?v=OKmpINvPJYk This] is video shows some POV projects from Japan. |
||
Line 36: | Line 51: | ||
*[http://www.instructables.com/id/Persistence-of-Vision-wand-for-Arduino/ Another simple Arduino POV device with understandable code.] |
*[http://www.instructables.com/id/Persistence-of-Vision-wand-for-Arduino/ Another simple Arduino POV device with understandable code.] |
||
*[http://www.instructables.com/id/Persistence-of-Vision-Wand/ A POV wand with 20 LEDs, and fairly understandable code.] |
*[http://www.instructables.com/id/Persistence-of-Vision-Wand/ A POV wand with 20 LEDs, and fairly understandable code.] |
||
*[http://www.instructables.com/id/Arduino-Persistence-of-Vision-Display/ A POV Example with 10 LEDs, and fairly complicated code.] |
|||
We will have an [http://www.freescale.com/files/sensors/doc/data_sheet/MMA8452Q.pdf MMA8452 accelerometer] that communicates via a serial [http://www.arduino.cc/en/Reference/Wire I2C interface.] The accelerometer will measure the angular acceleration, which will allow the velocity of the bike wheel to be calculated. This will make it possible to flash LEDs at the proper time intervals to spell words, draw pictures, etc., as you ride your bike down the road at night. |
We will have an [http://www.freescale.com/files/sensors/doc/data_sheet/MMA8452Q.pdf MMA8452 accelerometer] that communicates via a serial [http://www.arduino.cc/en/Reference/Wire I2C interface.] The accelerometer will measure the angular acceleration, which will allow the velocity of the bike wheel to be calculated. This will make it possible to flash LEDs at the proper time intervals to spell words, draw pictures, etc., as you ride your bike down the road at night. |
||
* [https://gist.github.com/ghedo/6750945 Here is an Arduino library for using the MMA8452Q.] |
* [https://gist.github.com/ghedo/6750945 Here is an Arduino library for using the MMA8452Q.] |
||
Line 43: | Line 59: | ||
* The [http://www.kingbrightusa.com/images/catalog/SPEC/APT2012SECK.pdf LEDs we purchased] are 20 mA with a forward voltage drop of 2.3 volts, and there are some restrictions on the currents you can draw from the ATMEGA328P shown [http://wiblocks.luciani.org/FAQ/faq-atmega328-pin-current.html here]. |
* The [http://www.kingbrightusa.com/images/catalog/SPEC/APT2012SECK.pdf LEDs we purchased] are 20 mA with a forward voltage drop of 2.3 volts, and there are some restrictions on the currents you can draw from the ATMEGA328P shown [http://wiblocks.luciani.org/FAQ/faq-atmega328-pin-current.html here]. |
||
* [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Accelerometers/MMA8452Q-Breakout-v11-fixed.pdf Schematic of the accelerometer from Sparkfun] |
* [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Accelerometers/MMA8452Q-Breakout-v11-fixed.pdf Schematic of the accelerometer from Sparkfun] |
||
* [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Boards/Arduino-Pro-Mini-v13.pdf Schematic of the Arduino we are basing this from] |
* [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Boards/Arduino-Pro-Mini-v13.pdf Schematic of the Arduino we are basing this from] |
||
===Getting Started with Kicad=== |
|||
*[http://docs.kicad-pcb.org/en/getting_started_in_kicad.html Getting Started in Kicad] |
|||
*[http://docs.kicad-pcb.org/en/kicad.html#_introduction Kicad Official Documentation] |
|||
*[http://happyrobotlabs.com/posts/tutorials/tutorial-3d-kicad-parts-using-openscad-and-wings3d/ Tutorial on using OpenSCAD, Wingz, and meshconv to make 3D Kicad models] |
|||
====Setting Up the Environment and Getting Started==== |
|||
* Some environment variables should be set such as the two below. Put them in your ~/.profile file at the end. |
|||
export KIGITHUB='https://github.com/KiCAD' |
|||
export KISYS3DMOD='/usr/local/share/kicad/modules/packages3d' |
|||
* In order for them to be activated, you need to logout and login again, or if you don't want to do than right now you can also paste the two lines above into a terminal and start kicad from that. |
|||
* Some environment variables should be set such as the two below. Put them in your ~/.profile file at the end. |
|||
export KIGITHUB='https://github.com/KiCAD' |
|||
export KISYS3DMOD='/usr/local/share/kicad/modules/packages3d' |
|||
kicad |
|||
* If you want the 3D viewer to know about your Aerodyne_v2 parts, you need to put a symbolic link to the 3D parts in the /usr/local/share/kicad/modules/packages3d/ directory, by doing this from the directory containing the KiCadLib-master directory. |
|||
$ sudo ln -s /KiCadLib-master/3D /usr/local/share/kicad/modules/packages3d/3D |
|||
====Make the Schematic in EESchema==== |
|||
You should have done this already. |
|||
====CVPCB, Associating Footprint Patterns with Parts==== |
|||
* Start CVPCB from EESchema after completing the design rules check and creating a netlist. |
|||
* Make sure to point the library tables to your [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/Aerodyne_v2.pretty.tar.gz Aerodyne_v2.pretty] directory, and select the library type as kicad. You find the tables in CVPCB under Preferences->Library Tables, and you can add a line in the project specific tables. The ${KIPRJMOD} environment variable expansion is the directory of your project. |
|||
[[File:Project_Tables.png|800px|Project Files Screenshot]] |
|||
* Now you should be able to find the parts you need to associate in PCBNew. |
|||
====PCBNew, Designing your Circuit Board==== |
|||
* Read the [http://edn.com/electronics-blogs/all-aboard-/4429390/Ten-best-practices-of-PCB-design?cid=nl_edn&elq=ee97eb731fbd4d13ac9e2c3cc18ba608&elqCampaignId=15922 The Ten Best Practices of PCB Design]. |
|||
* After saving in PCBNew, go back to EESchema and start PCBNew. |
|||
* Import your [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/intro_batterybrd.dxf board outline] using File->Import->DXF File, and place it in the middle. |
|||
* In the Design Rules, change the clearance and track width to 0.008 inches under Net Classes Editor, and set the minimum trace width to 0.008 inches in the Global Design Rules. [[File:Design Rules.png|800px|Design Rules Screenshot]] |
|||
* Using the tool on the right of the toolbar for fast access to the web based router, export your Spectra Design file and open it in the web based Free Router. This may take a minute. |
|||
* In the Free Router, under Parameter->Autoroute click the Detail Parameter, and set the via costs to 8. Hit return and close the windows for parameters. [[File:FreeRouter.png|800px||FreeRouter Screenshot]] |
|||
* Hit the autorouter button and watch it route your board. |
|||
* You may have some violations because the pitch of the accelerometer is smaller than we have allowed somewhere. You can ignore this. |
|||
* Make sure everything went well and your board was able to complete routing. |
|||
* Save the Spectra Session .ses file, and import it back into PCBNew. |
|||
* Run a Design Rules Check in PCBNew, and fix any problems. |
|||
* Put ground plane on both layers. |
|||
* Put your name on the front silk screen layer. |
|||
* Plot the Gerbers, being sure to check the boxes for all the ones we need. [[File:Plot Gerbers.png|800px|Plot Gerbers Screenshot]] |
|||
* Run [https://www.my4pcb.com/net35/FreeDFMNet/FreeDFMHome.aspx FreeDFM Check]. |
|||
* Compress your directory, and upload it to D2L. |
|||
====Kicad Libraries==== |
====Kicad Libraries==== |
||
Line 81: | Line 138: | ||
====Kicad Videos and Other Information==== |
====Kicad Videos and Other Information==== |
||
*[[Engineering_Electronics]] |
*[[Engineering_Electronics]] |
||
{{#ev:youtube|-G6ZHrA4Pck}} |
{{#ev:youtube|-G6ZHrA4Pck}} |
||
*[https://www.youtube.com/watch?v=zK3rDhJqMu0 Getting Started Using KiCAD] |
|||
*[https://www.youtube.com/playlist?list=PLCNJWVn9MJuORLQ3ds_U3D7RILfE4zdoL Ashley Mills Video Tutorials on Kicad] |
*[https://www.youtube.com/playlist?list=PLCNJWVn9MJuORLQ3ds_U3D7RILfE4zdoL Ashley Mills Video Tutorials on Kicad] |
||
*[https://www.youtube.com/playlist?list=PLy2022BX6Esr6yxwDzhqYZyuuenJE2s5B Getting to Blinky series with Chris from Contextual Electronics] |
|||
*[https://www.youtube.com/watch?v=CCG4daPvuVI Push and Shove Routing it Kicad] |
|||
*[https://www.youtube.com/watch?v=chejn7dqpfQ Differential Traces, and Length Tuning of Single and Differential Traces] |
|||
=====2018 Videos Made by the Professor===== |
|||
===Getting Started with Kicad=== |
|||
*[https://youtu.be/G6GLJbYmkpI The Kicad Project Manager, an Introduction] |
|||
====Setting Up the Environment and Getting Started==== |
|||
*[https://youtu.be/mxrdvrWgagY EESchema, the Kicad Schematic Entry Tool, an Introduction] |
|||
* Some environment variables should be set such as the two below. Put them in your ~/.profile file at the end. |
|||
*[https://youtu.be/rzGkvogO2x8 Adding Parts to a Schematic in Kicad] |
|||
export KIGITHUB='https://github.com/KiCAD' |
|||
*[https://youtu.be/atXXBu0f_QU Making your own Footprint in Kicad] |
|||
export KISYS3DMOD='/usr/local/share/kicad/modules/packages3d' |
|||
*[https://youtu.be/QTuSD9vxmD8 Making a new Schematic Symbol Starting from a Similar Existing Symbol in Kicad] |
|||
* In order for them to be activated, you need to logout and login again, or if you don't want to do than right now you can also paste the two lines above into a terminal and start kicad from that. |
|||
*[https://youtu.be/KNYKaDVRTIQ Making a PCB from the schematic using Kicad PCBNew] |
|||
* Some environment variables should be set such as the two below. Put them in your ~/.profile file at the end. |
|||
*[https://youtu.be/7K1xT9wBxQg How to construct a 3D model for Kicad using FreeCAD and the Kicad StepUp Tool] |
|||
export KIGITHUB='https://github.com/KiCAD' |
|||
*[https://youtu.be/XwGz29WlbBY How to import an existing 3D model from 3D Content Central for use in Kicad with FreeCAD and the Kicad StepUp workbench] |
|||
export KISYS3DMOD='/usr/local/share/kicad/modules/packages3d' |
|||
kicad |
|||
* If you want the 3D viewer to know about your Aerodyne_v2 parts, you need to put a symbolic link to the 3D parts in the /usr/local/share/kicad/modules/packages3d/ directory, by doing this from the directory containing the KiCadLib-master directory. |
|||
$ sudo ln -s /KiCadLib-master/3D /usr/local/share/kicad/modules/packages3d/3D |
|||
====Make the Schematic in EESchema==== |
|||
You should have done this already. |
|||
====CVPCB, Associating Footprint Patterns with Parts==== |
|||
* Start CVPCB from EESchema after completing the design rules check and creating a netlist. |
|||
* Make sure to point the library tables to your [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/Aerodyne_v2.pretty.tar.gz Aerodyne_v2.pretty] directory, and select the library type as kicad. You find the tables in CVPCB under Preferences->Library Tables, and you can add a line in the project specific tables. The ${KIPRJMOD} environment variable expansion is the directory of your project. |
|||
[[File:Project_Tables.png|800px|Project Files Screenshot]] |
|||
* Now you should be able to find the parts you need to associate in PCBNew. |
|||
==== |
====Kicad Libraries==== |
||
* [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/MMA8452Q.lib MMA8452Q Accelerometer EESchema library] |
|||
* Read the [http://edn.com/electronics-blogs/all-aboard-/4429390/Ten-best-practices-of-PCB-design?cid=nl_edn&elq=ee97eb731fbd4d13ac9e2c3cc18ba608&elqCampaignId=15922 The Ten Best Practices of PCB Design]. |
|||
* [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/MIC5205.lib MIC5205 Voltage Regulator EESchema library] |
|||
* After saving in PCBNew, go back to EESchema and start PCBNew. |
|||
* |
* [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/battery.lib Battery EESchema library] |
||
* [http://kicad.rohrbacher.net/quicklib.php Kicad Schematic Part Creator] |
|||
* In the Design Rules, change the clearance and track width to 0.008 inches under Net Classes Editor, and set the minimum trace width to 0.008 inches in the Global Design Rules. [[File:Design Rules.png|800px|Design Rules Screenshot]] |
|||
=====Footprints for CVPCB and PCBNew===== |
|||
* Using the tool on the right of the toolbar for fast access to the web based router, export your Spectra Design file and open it in the web based Free Router. This may take a minute. |
|||
* [https://github.com/AerodyneLabs/KiCadLib Use the BAT-AA-BK92 footprint] |
|||
* In the Free Router, under Parameter->Autoroute click the Detail Parameter, and set the via costs to 8. Hit return and close the windows for parameters. [[File:FreeRouter.png|800px||FreeRouter Screenshot]] |
|||
* [http://cds.linear.com/docs/en/packaging/Carsem%20MLP%20users%20guide.pdf This is a document telling about the QFN footprints.] |
|||
* Hit the autorouter button and watch it route your board. |
|||
** [http://cache.freescale.com/files/shared/doc/package_info/98ASA00063D.pdf This is the QFN COL 16 package details.] |
|||
* You may have some violations because the pitch of the accelerometer is smaller than we have allowed somewhere. You can ignore this. |
|||
* [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/Aerodyne_v2.pretty.tar.gz This library (Aerodyne_v2.pretty) has '''all''' the special footprints we need.] |
|||
* Make sure everything went well and your board was able to complete routing. |
|||
* [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/intro_batterybrd.dxf This is the board outline drawing.] You can import this into PCBNew, using File->Import->DXF File. |
|||
* Save the Spectra Session .ses file, and import it back into PCBNew. |
|||
* Run a Design Rules Check in PCBNew, and fix any problems. |
|||
====EESchema Checklist==== |
|||
* Put ground plane on both layers. |
|||
* ATMEGA328P |
|||
* Put your name on the front silk screen layer. |
|||
* MMA8452Q |
|||
* Plot the Gerbers, being sure to check the boxes for all the ones we need. [[File:Plot Gerbers.png|800px|Plot Gerbers Screenshot]] |
|||
* MIC5205 |
|||
* Run [https://www.my4pcb.com/net35/FreeDFMNet/FreeDFMHome.aspx FreeDFM Check]. |
|||
* Do you really want an LED to tell you the device is on? (I'm guessing probably not, so make sure you didn't put one in if you don't.) |
|||
* Compress your directory, and upload it to D2L. |
|||
* Batteries |
|||
* Programming cable connector |
|||
* LEDs |
|||
* Are the LEDs distributed over Ports B, C and D? |
|||
* No errors in the design check? |
|||
* Do you have the DOC linked to the datasheet for each important part? |
|||
* Do you have the datasheet URL in the datasheet field for each important part? |
|||
* Does your schematic look need and tidy? |
|||
* Do you have pull up resistors on the I2C bus lines SCL, SDA, and SA0? |
|||
* Did you include a programming header for the bootloader? |
|||
====Example Schematics & Footprints==== |
|||
* [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/POV_Light_5.svg This is an example schematic.] It has provision using jumpers K1 and P3 to select either two or three batteries and a voltage regulator, or two batteries without a regulator. You don't need to do this. I am doing it, so I can have a board that can be configured either way for debugging possible issues. I recommend picking one or the other power supply method. |
|||
* [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/CVPCB.png Example Footprint Selection] You need to select the Aerodyne_v2.pretty in the Preferences->Library Tables in CVPCB in order to find the special footprints. |
|||
====Parts Ordered By Ralph==== |
|||
[http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/dk_order.png This is Ralph's parts order.] |
|||
====Kicad Videos and Other Information==== |
|||
*[[Engineering_Electronics]] |
|||
{{#ev:youtube|-G6ZHrA4Pck}} |
|||
*[https://www.youtube.com/playlist?list=PLCNJWVn9MJuORLQ3ds_U3D7RILfE4zdoL Ashley Mills Video Tutorials on Kicad] |
|||
*[https://www.youtube.com/watch?v=zK3rDhJqMu0 A brief video tutorial showing the whole process.] |
|||
*[https://www.youtube.com/watch?v=CCG4daPvuVI Using the new Interactive Push/Shove Router in Kicad] |
|||
*[https://www.youtube.com/watch?v=eulAvdYqYGg A short introduction to using Kicad for PCB design with version 4 of Kicad] |
|||
==Arduino Programming== |
|||
This section describes how to program your Arduino. We will start out with your [http://arduino.cc/en/Main/ArduinoBoardProMini#.Uwo_k3Wx3YAArduino Pro Mini]. |
This section describes how to program your Arduino. We will start out with your [http://arduino.cc/en/Main/ArduinoBoardProMini#.Uwo_k3Wx3YAArduino Pro Mini]. |
||
====Tool Chain Setup==== |
====Tool Chain Setup==== |
||
Line 134: | Line 210: | ||
** On OS X, here is the [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41 driver download site]. |
** On OS X, here is the [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41 driver download site]. |
||
* On Ubuntu you can load it with Synaptic Package Manager (synaptic), and it should already be there on the virtual machines we set up. |
* On Ubuntu you can load it with Synaptic Package Manager (synaptic), and it should already be there on the virtual machines we set up. |
||
* [ |
* [http://forum.arduino.cc/index.php?topic=145397.0 Use Codeblocks as Your Arduino IDE on Ubuntu] |
||
*[http://www.mupuf.org/project/arduide.html ArduIDE is a QT based IDE for Arduino development.] |
|||
Here is a video showing how to setup the Arduino IDE for your Pro Mini 3.3V ATMEGA328P device. |
Here is a video showing how to setup the Arduino IDE for your Pro Mini 3.3V ATMEGA328P device. |
||
Line 154: | Line 231: | ||
You can use C++ to make Arduino libraries. [http://arduino.cc/en/Hacking/LibraryTutorial#.Uw1F5HWx3YA Here] is a tutorial on how. There is a library already made for the MMA8452Q [https://gist.github.com/ghedo/6750945 here.] There is a tutorial on installing an Arduino library [http://arduino.cc/en/Guide/Libraries#.Uw1HxXWx3YA here.] And [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/MMA8452Q.zip here] is the zip file for the library. Download it; don't extract it. Go to the Arduino IDE and select Sketch->Import Library->Add Library. In the file selection dialog that comes up, select the MMA8452Q.zip. It will unzip it into your sketchbook/libraries directory. Then to use it, read the source code on the library. There is an example sketch in the files there that will help you figure out how to read the accelerometer. |
You can use C++ to make Arduino libraries. [http://arduino.cc/en/Hacking/LibraryTutorial#.Uw1F5HWx3YA Here] is a tutorial on how. There is a library already made for the MMA8452Q [https://gist.github.com/ghedo/6750945 here.] There is a tutorial on installing an Arduino library [http://arduino.cc/en/Guide/Libraries#.Uw1HxXWx3YA here.] And [http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/MMA8452Q.zip here] is the zip file for the library. Download it; don't extract it. Go to the Arduino IDE and select Sketch->Import Library->Add Library. In the file selection dialog that comes up, select the MMA8452Q.zip. It will unzip it into your sketchbook/libraries directory. Then to use it, read the source code on the library. There is an example sketch in the files there that will help you figure out how to read the accelerometer. |
||
===Bootloader Programming=== |
====Bootloader Programming==== |
||
The bootloader is a program that needs to be loaded into the ATMEGA328P before you can program your Arduino with the USB/serial programmer. |
The bootloader is a program that needs to be loaded into the ATMEGA328P before you can program your Arduino with the USB/serial programmer. |
||
Line 160: | Line 237: | ||
I put the [[Bootloader Programming]] procedures here so I will know what I did later. |
I put the [[Bootloader Programming]] procedures here so I will know what I did later. |
||
===Arduino Links=== |
|||
*[http://cdn2.boxtec.ch/pub/diverse/ch340g-datasheet.pdf Translation of the CH340G Datasheet] |
|||
**[http://www.seeedstudio.com/wiki/images/7/7c/CH340DS1_EN.PDF CH340 data sheet] |
|||
**[http://www.sunrom.com/m/4511 CH340G pinout] |
|||
*[http://www.instructables.com/id/Arduino-Nano-ATmega238PCH340G-v30-PCB-layout/ Nano with CH340G] Some reverse engineered data. |
|||
*[https://translate.google.com/translate?hl=en&sl=de&u=http://www.mikrocontroller.net/topic/368322&prev=search Arduino Uno with CH340G] |
|||
*[http://people.wallawalla.edu/~Rob.Frohne/ClassHandouts/Intro_to_Cad/ArduinoNano.pdf Arduino Nano with Ch340G Schematic] Thanks to Bobby Locke. |
|||
*[http://forum.arduino.cc/index.php?topic=141759.0 Minimize current draw on an Arduino Pro Mini] (older PCB). |
|||
*[http://donalmorrissey.blogspot.com/2010/04/putting-arduino-diecimila-to-sleep-part.html A set of articles on putting the Arduino to sleep for power saving.] |
Latest revision as of 17:03, 11 February 2018
This page is for the Intro to Engineering ENGR 122 EE/CPE Section
Two Dimensional CAD
- DraftSight is an AutoCAD clone. Presently it is rather like AutoCAD 2006 or 2007.
- Orthographic Projection (Front, Side and Top View) Drawing Tutorial
FreeCAD
Freecad is a two and three dimensional open source mechanical CAD program.
CAD Projects
Persistence of Vision Wand 2016
- The Wavywand, a commercial product done by my old student, Adriaan Smit
- Scott Mitchell's Arduino code for a bike light
- Arduino Nano (the original one, not the one we have that uses the CH340G USB/Serial comverter)
- Here is a video on how to put your WWU 2016 POV device into its case without breaking the case or board.
Kicad Footprints
Persistence of Vision Bike Light 2015
The POV project will use the Arduino Mini Pro which is a very inexpensive Arduino on a circuit board measuring 18 mm x 34 mm. The LEDs will be Cree C503B-GAS-CB0F079 which are green and very bright. The idea is that this POV device attaches on a bicycle wheel, and as it spins it will show cartoons or messages. An MPU-6050 accelerometer module circuit, part number GY-521, will be used to compute the angular velocity from the centripital acceleration. A register map for programming purposes can be found here.
- The starting CAD drawing from Ralph Stirling is here.
- A photo of the GY-521 which is 0.6" x 0.8" approximately.
- A page on using the MPU-5060 accelerometer which is the part in the GY-521.
- The website I pulled up in class with the measurements for the accelorometer are here.
- These are the battery clips we will be using.
- Pinout for the Arduino Pro Mini
- Schematic on wiring the GY-521 to the Arduino Pro Mini
- Jeff Rowberg's nice I2C library for the MPU-6050
- Demos using Jeff Rowberg's library and the MPU-6050 Note: This requires that digital I/O pin 2 be connected to the INT of the GY-521.
- Data Sheet for the Cree LEDs we are using
- Photos of the Arduino Pro Mini
- Check your files at this cite.
Persistence of Vision Bike Light Project 2014
This project will use a 3.3 volt Arduino Pro Mini clone that you will design the circuit board, housing, and software for. Persistence of vision is a psychological effect that allows you to see two dimensional images that were created by one dimensional flashing LEDs. Here are some similar projects:
- This is video shows some POV projects from Japan.
- Arduino on a breadboard spinning with a motor.
- Another spinning POV display.
- Simple Code for a simple POV device using the Arduino.
- Another simple Arduino POV device with understandable code.
- A POV wand with 20 LEDs, and fairly understandable code.
- A POV Example with 10 LEDs, and fairly complicated code.
We will have an MMA8452 accelerometer that communicates via a serial I2C interface. The accelerometer will measure the angular acceleration, which will allow the velocity of the bike wheel to be calculated. This will make it possible to flash LEDs at the proper time intervals to spell words, draw pictures, etc., as you ride your bike down the road at night.
The power source for your POV device can be two or three AA, or AAA batteries. You need to design the packaging. Some suggestions that you can consider are:
- Use clear vinyl tubing and corks in the end to house the circuit board, and tie wrap it to the spokes on your bike.
- The LEDs we purchased are 20 mA with a forward voltage drop of 2.3 volts, and there are some restrictions on the currents you can draw from the ATMEGA328P shown here.
- Schematic of the accelerometer from Sparkfun
- Schematic of the Arduino we are basing this from
Getting Started with Kicad
- Getting Started in Kicad
- Kicad Official Documentation
- Tutorial on using OpenSCAD, Wingz, and meshconv to make 3D Kicad models
Setting Up the Environment and Getting Started
- Some environment variables should be set such as the two below. Put them in your ~/.profile file at the end.
export KIGITHUB='https://github.com/KiCAD' export KISYS3DMOD='/usr/local/share/kicad/modules/packages3d'
- In order for them to be activated, you need to logout and login again, or if you don't want to do than right now you can also paste the two lines above into a terminal and start kicad from that.
- Some environment variables should be set such as the two below. Put them in your ~/.profile file at the end.
export KIGITHUB='https://github.com/KiCAD' export KISYS3DMOD='/usr/local/share/kicad/modules/packages3d' kicad
- If you want the 3D viewer to know about your Aerodyne_v2 parts, you need to put a symbolic link to the 3D parts in the /usr/local/share/kicad/modules/packages3d/ directory, by doing this from the directory containing the KiCadLib-master directory.
$ sudo ln -s /KiCadLib-master/3D /usr/local/share/kicad/modules/packages3d/3D
Make the Schematic in EESchema
You should have done this already.
CVPCB, Associating Footprint Patterns with Parts
- Start CVPCB from EESchema after completing the design rules check and creating a netlist.
- Make sure to point the library tables to your Aerodyne_v2.pretty directory, and select the library type as kicad. You find the tables in CVPCB under Preferences->Library Tables, and you can add a line in the project specific tables. The ${KIPRJMOD} environment variable expansion is the directory of your project.
- Now you should be able to find the parts you need to associate in PCBNew.
PCBNew, Designing your Circuit Board
- Read the The Ten Best Practices of PCB Design.
- After saving in PCBNew, go back to EESchema and start PCBNew.
- Import your board outline using File->Import->DXF File, and place it in the middle.
- In the Design Rules, change the clearance and track width to 0.008 inches under Net Classes Editor, and set the minimum trace width to 0.008 inches in the Global Design Rules.
- Using the tool on the right of the toolbar for fast access to the web based router, export your Spectra Design file and open it in the web based Free Router. This may take a minute.
- In the Free Router, under Parameter->Autoroute click the Detail Parameter, and set the via costs to 8. Hit return and close the windows for parameters.
- Hit the autorouter button and watch it route your board.
- You may have some violations because the pitch of the accelerometer is smaller than we have allowed somewhere. You can ignore this.
- Make sure everything went well and your board was able to complete routing.
- Save the Spectra Session .ses file, and import it back into PCBNew.
- Run a Design Rules Check in PCBNew, and fix any problems.
- Put ground plane on both layers.
- Put your name on the front silk screen layer.
- Plot the Gerbers, being sure to check the boxes for all the ones we need.
- Run FreeDFM Check.
- Compress your directory, and upload it to D2L.
Kicad Libraries
- MMA8452Q Accelerometer EESchema library
- MIC5205 Voltage Regulator EESchema library
- Battery EESchema library
- Kicad Schematic Part Creator
Footprints for CVPCB and PCBNew
- Use the BAT-AA-BK92 footprint
- This is a document telling about the QFN footprints.
- This library (Aerodyne_v2.pretty) has all the special footprints we need.
- This is the board outline drawing. You can import this into PCBNew, using File->Import->DXF File.
EESchema Checklist
- ATMEGA328P
- MMA8452Q
- MIC5205
- Do you really want an LED to tell you the device is on? (I'm guessing probably not, so make sure you didn't put one in if you don't.)
- Batteries
- Programming cable connector
- LEDs
- Are the LEDs distributed over Ports B, C and D?
- No errors in the design check?
- Do you have the DOC linked to the datasheet for each important part?
- Do you have the datasheet URL in the datasheet field for each important part?
- Does your schematic look need and tidy?
- Do you have pull up resistors on the I2C bus lines SCL, SDA, and SA0?
- Did you include a programming header for the bootloader?
Example Schematics & Footprints
- This is an example schematic. It has provision using jumpers K1 and P3 to select either two or three batteries and a voltage regulator, or two batteries without a regulator. You don't need to do this. I am doing it, so I can have a board that can be configured either way for debugging possible issues. I recommend picking one or the other power supply method.
- Example Footprint Selection You need to select the Aerodyne_v2.pretty in the Preferences->Library Tables in CVPCB in order to find the special footprints.
Parts Ordered By Ralph
Kicad Videos and Other Information
- Getting Started Using KiCAD
- Ashley Mills Video Tutorials on Kicad
- Getting to Blinky series with Chris from Contextual Electronics
- Push and Shove Routing it Kicad
- Differential Traces, and Length Tuning of Single and Differential Traces
2018 Videos Made by the Professor
- The Kicad Project Manager, an Introduction
- EESchema, the Kicad Schematic Entry Tool, an Introduction
- Adding Parts to a Schematic in Kicad
- Making your own Footprint in Kicad
- Making a new Schematic Symbol Starting from a Similar Existing Symbol in Kicad
- Making a PCB from the schematic using Kicad PCBNew
- How to construct a 3D model for Kicad using FreeCAD and the Kicad StepUp Tool
- How to import an existing 3D model from 3D Content Central for use in Kicad with FreeCAD and the Kicad StepUp workbench
Kicad Libraries
- MMA8452Q Accelerometer EESchema library
- MIC5205 Voltage Regulator EESchema library
- Battery EESchema library
- Kicad Schematic Part Creator
Footprints for CVPCB and PCBNew
- Use the BAT-AA-BK92 footprint
- This is a document telling about the QFN footprints.
- This library (Aerodyne_v2.pretty) has all the special footprints we need.
- This is the board outline drawing. You can import this into PCBNew, using File->Import->DXF File.
EESchema Checklist
- ATMEGA328P
- MMA8452Q
- MIC5205
- Do you really want an LED to tell you the device is on? (I'm guessing probably not, so make sure you didn't put one in if you don't.)
- Batteries
- Programming cable connector
- LEDs
- Are the LEDs distributed over Ports B, C and D?
- No errors in the design check?
- Do you have the DOC linked to the datasheet for each important part?
- Do you have the datasheet URL in the datasheet field for each important part?
- Does your schematic look need and tidy?
- Do you have pull up resistors on the I2C bus lines SCL, SDA, and SA0?
- Did you include a programming header for the bootloader?
Example Schematics & Footprints
- This is an example schematic. It has provision using jumpers K1 and P3 to select either two or three batteries and a voltage regulator, or two batteries without a regulator. You don't need to do this. I am doing it, so I can have a board that can be configured either way for debugging possible issues. I recommend picking one or the other power supply method.
- Example Footprint Selection You need to select the Aerodyne_v2.pretty in the Preferences->Library Tables in CVPCB in order to find the special footprints.
Parts Ordered By Ralph
Kicad Videos and Other Information
- Ashley Mills Video Tutorials on Kicad
- A brief video tutorial showing the whole process.
- Using the new Interactive Push/Shove Router in Kicad
- A short introduction to using Kicad for PCB design with version 4 of Kicad
Arduino Programming
This section describes how to program your Arduino. We will start out with your Pro Mini.
Tool Chain Setup
You can program Arduinos from a PC, Mac or Linux. On OS X and Windows, you need to download the software:
- The download page is here.
- On Windows and OS X, you need to install the driver for the PL2303 usb to serial port device used for programming the arduino.
- On Windows you need to force this driver version by going to device manager, choose update driver from right click into prolific adapter, the choose "browse my computer for driver software", then "let me pick...". On the next window, it should show you different versions of the driver, and you need to choose ver 3.3.2.102. Here is a link to the driver.
- On Windows 8, you will need a special driver from here. Then you will need to follow these instructions.
- On OS X, here is the driver download site.
- On Ubuntu you can load it with Synaptic Package Manager (synaptic), and it should already be there on the virtual machines we set up.
- Use Codeblocks as Your Arduino IDE on Ubuntu
- ArduIDE is a QT based IDE for Arduino development.
Here is a video showing how to setup the Arduino IDE for your Pro Mini 3.3V ATMEGA328P device.
Programming Hardware Connections
The Pro Mini requires a USB to serial TTL device to program it. The ones we purchased don't have the DTR line, so you have to push the reset button on the arduino, then hit the upload button on your computer, and wait until it says "uploading," and then release the reset button on the arduino. The serial connections are shown in the photo.
The color code for the wires is:
- Black is GND which connects to the arduino GND.
- Red is +5 volts which connects to the arduino VCC.
- Green is TXO which connects to the arduino RXI
- White is RXI which connects to the arduino TXO
Note: The serial communications protocol is kind of like whispering secrets. You put your lips up to the other person's ear. (TXO -> RXI) T stands for transmit, and R for receive.
- Here is my source code for my five LED_Blinker.
Building the Accelerometer Library
You can use C++ to make Arduino libraries. Here is a tutorial on how. There is a library already made for the MMA8452Q here. There is a tutorial on installing an Arduino library here. And here is the zip file for the library. Download it; don't extract it. Go to the Arduino IDE and select Sketch->Import Library->Add Library. In the file selection dialog that comes up, select the MMA8452Q.zip. It will unzip it into your sketchbook/libraries directory. Then to use it, read the source code on the library. There is an example sketch in the files there that will help you figure out how to read the accelerometer.
Bootloader Programming
The bootloader is a program that needs to be loaded into the ATMEGA328P before you can program your Arduino with the USB/serial programmer.
We really should have provided a programming header for that as well as the one for the USB/serial programmer, but since we didn't, the professor will program your ATMEGA328P units using the information on this web page.
I put the Bootloader Programming procedures here so I will know what I did later.
Arduino Links
- Nano with CH340G Some reverse engineered data.
- Arduino Uno with CH340G
- Arduino Nano with Ch340G Schematic Thanks to Bobby Locke.
- Minimize current draw on an Arduino Pro Mini (older PCB).
- A set of articles on putting the Arduino to sleep for power saving.