How to Make Circuits in the Fab Lab: Difference between revisions

From Fab Lab Wiki - by NMÍ Kvikan
Jump to navigation Jump to search
Amy (talk | contribs)
No edit summary
mNo edit summary
 
(36 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Tutorials]][[Category:Circuits]]
How To Make Circuits in the Fab Lab
Making a circuit requires several mini-projects:  
Making a circuit requires several mini-projects:  


= Design and Architecture =
== Decide what function your circuit board should have ==
== Decide what function your circuit board should have ==
A good approach is to write down in words how the circuit board should work.
A good approach is to write down in words how the circuit board should work.
* download a cad file from the hello-world circuits section on the http://fab.cba.mit.edu/about/fab/ or from [[hello world electronics]]
* download a cad file from the hello-world circuits section on the http://fab.cba.mit.edu/about/fab/ or from [[hello world electronics]]
* Look for open hardware solutions on the internet.* Or design [[custom circuit]]  
* Look for open hardware solutions on the internet.
* Or design [[custom circuit]]


== Create the schematic and board layout in a CAD program ==
== Create the schematic and board layout in a CAD program ==
Use e.g.  Eagle or Cad.py, ,or Gimp (drawing tool), Inkscape or Open Office or draw it with black pen and scan and trace. The gap should be the right size and shape.
Use e.g.  Eagle or Cad.py, ,or Gimp (drawing tool), Inkscape or Open Office or draw it with black pen and scan and trace. The gap should be the right size and shape.
* [[eagle|Eagle]]


 
= Physical Fabrication =
== Fabricate the board ==
== Machine the board ==
Physically milling or cutting out the board which connects components  
Physically milling or cutting out the board which connects components  
* [[Making circuit boards on Modela]]
* [[Making circuit boards on Modela]]
Line 19: Line 19:
* [[Making circuit boards on Epilog Laser]]
* [[Making circuit boards on Epilog Laser]]


== Solder the board ==
== "Stuffing": Solder components on to the board ==
Solder the components to the board.
Solder the components to the board.
If you want to where the components should be you could look at the file design, in .cad file or you can check out  
If you want to where the components should be you could look at the file design, in .cad file or you can check out  
* [[Soldering]] -> Gisli
* [[Soldering]] -> Gisli
* [[Good Vs. Bad Soldering]]
* [http://www.fablab.is/w/images/8/8e/Circuits_descriptions.pdf Circuit descriptons. pdf]
* [http://www.fablab.is/w/images/8/8e/Circuits_descriptions.pdf Circuit descriptons. pdf]
* [http://www.fablab.is/w/images/b/b0/Scotts_New_MIT_Hello_World_Circuits.pdf Scotts new Hello World Circuits description]
* [http://www.fablab.is/w/images/b/b0/Scotts_New_MIT_Hello_World_Circuits.pdf Scotts new Hello World Circuits description]


Solder the board.
= Microcontroller Programming =
 
== Make a programming cable ==
== Make a programming cable ==
* [[Make a programming cable]] -> Pedro
There are several different types of cables used to program the AVR microprocessor.  The cables are different based on the number of wires used, the types of connectors on either end, and the program used on the computer for downloading [[hex code]] to the processor.
* [[DASA programming cable]] uses the serial port on the computer and the program [[avrdude]].  The microcontroller end may use an [[MTA connector]], [[6-pin ISP connector]], or [[programming clip]].  Consult this guide for [[Making_serial_cables|making cables with MTA connectors]].
* [[DAPA programming cable|DAPA or BSD programming cable]] uses the parallel port on the computer and the program [[avrdude]] or [[uisp]].  The microcontroller end may use a [[MTA connector]], [[6-pin ISP connector]], or [[programming clip]].


== Write the Program ==
== Write the Program ==
Line 37: Line 39:
== Programming the microcontroller ==
== Programming the microcontroller ==
If you are using the Fab Labs, AVR microcontrollers
If you are using the Fab Labs, AVR microcontrollers
*Use ICP (In Circuit Programmer)
* Use ICP (In Circuit Programmer), sometimes often called ISP (In System Programmer)
*AVRDUDE
* [[avrdude|AVRDUDE]]
*  
*[[Few Linux commands used to program AT Tiny 45]] 
-> Jan
-> Jan


= Testing and Troubleshooting =
== Test the microcontroller ==
== Test the microcontroller ==
Plug the microcontroller in.
Plug the microcontroller in.
Line 48: Line 51:


== Troubleshooting ==
== Troubleshooting ==
* Is the power on?
If your board is not working, follow the step to troubleshoot it:
* Is the battery plugged in?
 
* Is the power going to the microcontroller?
{| class="wikitable" border="1"
** Use multimeter, to measure the power and it should be around 3,3 Volts to 5 Volts for the hello boards.
|-
* Is the board soldered rightly?
!  Check
!  Problem
!  Possible solution
|-
|  Battery voltage
|  Voltage too low
|  Replace the battery
|-
|  Microcontroller voltage terminals
|  No voltage or too low (it should be around 3,3 V to 5 V for the hello boards)
*Follow the track and check every component voltage (capacitor, voltage regulator)
*Check the solder there is no electrical continuity
*If the solder is ok, replace the component ([[desoldering|Learn here how to un-solder properly]])
|-
| Solder
| Doesn't do what I wanted
|
*Check every single solder ([[soldering|Learn here how to solder properly]])
*Check the voltage
|-
| Code
| Doesn't do what I wanted
| Take a breath and review your code
|}
 
 
If you cannot download your code to the microcontroller, follow the step to troubleshoot it:
 
{| class="wikitable" border="1"
|-
!  Check
!  Problem
!  Possible solution
|-
|  If the cable is done right
|  Software [[avrdude]] gives error:
 
avrdude:AVR device not responding;
avrdude: initialization failed, rc=-1
          Double check connections and try again, or use -F to override this check.
|
*Follow the [[Making_serial_cables|Making serial cables]] tutorial to build a cable
*Check for electrical continuity at the cables end
|-
|Permissions on accessing port 0 
|Error running [[avrdude]]: 
avrdude: can't open device "/dev/parport0": Permission denied
avrdude: failed to open parallel port "/dev/parport0"
|
Type the following to see the permissions on the parallel port 0
ls -l /dev/parport0
 
Type the following to change permissions to users
sudo chmod 0766 /dev/parport0
 
Type the following to check if the permissions were changed
ls -l /dev/parport0
|}
 
= External Links =
* [[http://sound.westhost.com/troubleshooting.htm http://sound.westhost.com/troubleshooting.htm]]
* [[http://www.morsex.com/building/atoz4.htm http://www.morsex.com/building/atoz4.htm]]
 


-> Nuno
[[Category:Tutorials]] [[Category:Circuits]]

Latest revision as of 13:01, 14 August 2014

Making a circuit requires several mini-projects:

Design and Architecture

Decide what function your circuit board should have

A good approach is to write down in words how the circuit board should work.

Create the schematic and board layout in a CAD program

Use e.g. Eagle or Cad.py, ,or Gimp (drawing tool), Inkscape or Open Office or draw it with black pen and scan and trace. The gap should be the right size and shape.

Physical Fabrication

Machine the board

Physically milling or cutting out the board which connects components

"Stuffing": Solder components on to the board

Solder the components to the board. If you want to where the components should be you could look at the file design, in .cad file or you can check out

Microcontroller Programming

Make a programming cable

There are several different types of cables used to program the AVR microprocessor. The cables are different based on the number of wires used, the types of connectors on either end, and the program used on the computer for downloading hex code to the processor.

Write the Program

Write the program (in e.g. assembler or C) , compile the program so that the microcontroller will understand it -> Jan

Programming the microcontroller

If you are using the Fab Labs, AVR microcontrollers

-> Jan

Testing and Troubleshooting

Test the microcontroller

Plug the microcontroller in.

  • Is the power on?


Troubleshooting

If your board is not working, follow the step to troubleshoot it:

Check Problem Possible solution
Battery voltage Voltage too low Replace the battery
Microcontroller voltage terminals No voltage or too low (it should be around 3,3 V to 5 V for the hello boards)
  • Follow the track and check every component voltage (capacitor, voltage regulator)
  • Check the solder there is no electrical continuity
  • If the solder is ok, replace the component (Learn here how to un-solder properly)
Solder Doesn't do what I wanted
Code Doesn't do what I wanted Take a breath and review your code


If you cannot download your code to the microcontroller, follow the step to troubleshoot it:

Check Problem Possible solution
If the cable is done right Software avrdude gives error:
avrdude:AVR device not responding; 
avrdude: initialization failed, rc=-1 
         Double check connections and try again, or use -F to override this check.
  • Follow the Making serial cables tutorial to build a cable
  • Check for electrical continuity at the cables end
Permissions on accessing port 0 Error running avrdude:
avrdude: can't open device "/dev/parport0": Permission denied
avrdude: failed to open parallel port "/dev/parport0"

Type the following to see the permissions on the parallel port 0

ls -l /dev/parport0

Type the following to change permissions to users

sudo chmod 0766 /dev/parport0

Type the following to check if the permissions were changed

ls -l /dev/parport0

External Links