Difference between revisions of "How to Make Circuits in the Fab Lab"

From Fab Lab Wiki - by NMÍ Kvikan
Jump to: navigation, search
(Troubleshooting)
(Troubleshooting)
Line 51: Line 51:
 
== Troubleshooting ==
 
== Troubleshooting ==
 
If your board is not working, follow the step to troubleshoot it:
 
If your board is not working, follow the step to troubleshoot it:
 
* Check if the power is on:
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 70: Line 68:
 
*Check the solder there is no electrical continuity
 
*Check the solder there is no electrical continuity
 
*If the solder is ok, replace the component
 
*If the solder is ok, replace the component
 +
|-
 +
| Solder
 +
| Doesn't do what I wanted
 +
| *Check every single solder (Learn here how to [[soldering|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,  
+
If you cannot download your code to the microcontroller, follow the step to troubleshoot it:
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 82: Line 89:
 
|-
 
|-
 
|  If the cable is done right
 
|  If the cable is done right
|  Software [[AVRDUDE]] gives error:  
+
|  Software [[avrdude]] gives error:  
  
 
  avrdude:AVR device not responding;  
 
  avrdude:AVR device not responding;  
Line 91: Line 98:
 
*Check for electrical continuity at the cables end
 
*Check for electrical continuity at the cables end
 
|-
 
|-
|   
+
|Permissions on accessing port 0    
 
|Error running avrdude:   
 
|Error running avrdude:   
 
  avrdude: can't open device "/dev/parport0": Permission denied
 
  avrdude: can't open device "/dev/parport0": Permission denied

Revision as of 23:33, 15 January 2010


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

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

  • Use ICP (In Circuit Programmer)
  • AVRDUDE

-> 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
Solder Doesn't do what I wanted *Check every single solder (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:

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.
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

  • asdf