Categories
Fab Academy AS220 - Providence, RI Fab Academy Providence -Year II - Teaching

FabKit / Fabduino

fabduino
I milled and stuffed Ed Baafi’s Fabduino board version 2. I am still troubleshooting the board, but I may just start over. So far avrdude cannot talk to the chip to burn the bootloader. I have tried the USBtiny and the ATAVRISP2, but I did not have any luck with either one.

I have also tried using just avrdude and the Arduino IDE without success. I have also tried every possible configuration of FTDI plus jumpers to the ISP. (As well as just jumpers to the ISP). I will likely start over, perhaps I overlooked a trace when I was editing the .png file – see “other issues” below.

Error Message (both avrdude and Arduino IDE):

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override this check.

Figuring Out the Pin to Microcontroller Setup:

The Fabduino does not have a 6-pin header, so it needs to be programmed using jumpers attached to the pins that would be on the programming header.

fabduino

Other Issues:

I milled this board several times. When I exported the file as a .png from the origional Eagle board file, there were some jagged edges that caused the toolpath around the microcontroller pins to remain connected. At first I thought that this was due to the Fab modules settings or the bit size. I later figured out that if I cleaned up the problem areas in the .png manually in The Gimp, the toolpath issues went away.

fabduino

Categories
Fab Academy AS220 - Providence, RI Fab Academy Providence -Year II - Teaching

Fab ISP 2.0

Fab ISP - with resistors
This year the Fab ISP programmer (created by David Mellis) was updated by Neil Gershenfeld. The Electronics Production assignment was to mill the board and stuff it. Most of the students had their boards programmed this week. The board shown is the Fab ISP I made. We will be using these programmers through the semester to program the other boards we create.

To Get Started:

  1. First – go to the Fab Academy page for Electronics Production and download Neil Gershenfeld’s updated design (shown in this example).
  2. Then – Read through the MIT Fab ISP page documentation

Mill the Board:

  1. Mill the board traces (hello.ISP.44.old.traces.png) using the Fab Modules or Cad.py
  2. Mill out the board (hello.ISP.44.old.interior.png)
  3. Labeled board diagram  (hello.ISP.44.old.png)

Fab ISP TracesFab ISP Mill OutFab ISP Labeled

Stuff the Board:

Shawn Wallace has provided a Fab ISP labeled board diagram
Fab ISP

“Smoke Test”

  1. Plug the Fab ISP into your computer via the USB cable.
    — If you get an error message from your computer that the board is drawing too much power – and the computer is shutting down the USB port — You have a short somewhere on your board.

Troubleshooting  Short Circuits:

  1. First, do a visual inspection of the board and reflow any solder joints that look cold (not shiny and smooth).
  2. Then, get out your multimeter and check all the connections to make sure that:
    – power and ground are not connected
    – there is not a short on the power line

ATAVRISP2 Programmer Light Indicator Messages

If you are using the ATAVRISP2 programmer (or any other programmer that has a indicator light that lets you know if you board is connected / powered correctly). If you connect the programmer to the 6-pin programming header on your Fab ISP board and you get:

  1. Green Light: means that the header is soldered correctly, the board is getting power and the programmer can sense the microcontroller.
  2. Yellow Light: means that the board is getting power, but most likely the 6-pin programming header is not soldered correctly (re-flow your solder joints / check for cold joints, check for shorts).
  3. Red Light: means that the board is not getting power – check for shorts.

Program the Board:

  1. To program the board, you will need avrdude installed.- For information on where to get and how to use avrdude see:  Very Basic Beginner Assembly Tutorial III: How to Use Avrdude
    – Also see MIT Fab ISP page documentation
  2. Download the firmware from the Fab Academy Electronics Production page.
  3. After unzipping the firmware, open a terminal window (mac / linux – for windows instructions see the tutorials listed above).
  4. Navigate to the downloads folder (or the folder where you saved the firmware).
  5. The board needs power: make sure that the USB connector for the Fab ISP you are trying to program is plugged in to a computer AND that a separate pogramer is plugged in to the 6-pin programming header. (this could be another working Fab ISP or the ATAVRISP2 mentioned above.)
  6. In the terminal window type:
make clean

Then type:

make hex

Then type:

make fuse

Then type:

make program

If you get errors – read the errors and follow instructions.  If avrdude cannot connect to your board’s microcontroller – you should follow the “Troubleshooting Short Circuits” steps above and ask your instructor for help.

To Verify That Your ISP is working correctly:

Mac OS –> go to the System Profiler >> Hardware >> USB >> Hub:

Step – By – Step:

  1. Click  the “apple” menu in your main toolbar
  2. Select “about this mac”
  3. Select “more info”
  4. Under the “Contents” menu in the left hand navigation- Under the “Contents” menu in the left hand navigation
    – Click “Hardware” to expand the hardware menu (if not already expanded)
    – Click “USB”
    – Under the “USB Device Tree”
    – Click “Hub” to expand the hub menu (if not already expanded)
    – “FabISP” should be listed in the hub menu
  5. Your Fab ISP device has been successfully programmed and is recognized by your computer.

Linux:

  1. Still working on this……. details coming soon.

After You Have Programmed the Board:

  1. Remove the 0 ohm resistor and solder bridge as shown in the picture below.

Fab ISP without jumpers

Categories
Fab Academy AS220 - Providence, RI Fab Academy Providence -Year II - Teaching Laser Cutting

Laser-Cut Acrylic Press-Fit Construction Kit

I am working through all of the Fab Academy / How to Make Almost Anything projects a second time (as a TA) with the students of the 2011 Fab Academy. My project from last year for the computer-controlled cutting unit was a tension-fit construction kit made from a deck of cards. This year I did some text cuts in masionite (hardboard) and then used some brightly colored acrylic that I found in the scrap bin at AS220 Labs. The resulting construction kit used pink, white, opaque black, translucent black, and blue acrylic. I created the following piece styles:

  • rectangular star piece (cut in black)
  • rectangular diamond piece (cut in white)
  • round piece (cut in all colors)
  • bottom connector piece (used to connect any two pieces together or to help the construction stand up)
  • standard connector piece

""

"" "" ""  

Masionite Test Cuts


""""

Categories
Fab Academy AS220 - Providence, RI Fab Academy Providence -Year II - Teaching tutorials / notes

Mercurial Troubleshooting

Mercurial Logo

Last year at Fab Academy we used Bazaar for distributed version control.  This year we are using Mercurial.

Mercurial Troubleshooting / Notes From 02.02.2011 Session With Neil Gershenfeld:

TAKE NOTE: If you try to push and Mercurial mentions:

  • multiple branches
  • multiple heads
  • outstanding uncommitted changes
  • archive has diverged
  • or any other similar message
  • and then asks if you want to push anyway..

DON’T DO IT! This creates multiple heads.

After you give Mercurial a command, look at the output, read all the messages and respond to them.

These notes should help with some common problems we have all been having.

General Command Meanings:
pull pulls down current state of the archive (brings changes)
merge remote hg directory has new changes, if your local copy is an older version, merge reconciles them.
commit stores a “snapshot” of your copy of the archive
push sends changes back to central server we are all using (MIT copy)
update takes the changes and puts them in the working copy of the directory

Updated Steps:

– if you added new work to your directory:

hg add
hg commit -m "your commit message here"
hg pull

– if you get new stuff (files added) when / after pulling
– you need to merge:

hg merge
hg push

If You Delete a Local File / Directory in Your “firstname_lastname” folder:

  • You will need to tell Mercurial to “record a delete for missing files”
  • You will run into problems if you don’t do this!

– Depicted Here:

hg add
hg rm -A

– You will get a very long listing both of removed files and files that Mercurial says “still exist and will not be removed”.

Example:

[many files listed above as “not removing”…………]
not removing
Web/videos/video/module_02.html: file still exists (use -f to force removal)
removing
Web/labs/providence/anna_kaziunas_france/resources/html_workshop/HTML_Basics_2.0.odp

  • >>> do not force remove anything
  • This is what should happen.
  • Mercural is updating.
hg commit -m "your commit message here"
hg pull

Errors and Issues:

If the Archive Has Diverged:

You try to push and get any of the following:

  • “archive has diverged” message
  • “abort: push creates new remote heads on branch ‘default’!”
  • “abort: crosses branches”
  • or something similar to the above messages

– You need to Pull and Merge. DO NOT FORCE PUSH.

– First, pull to make sure you have an up to date copy of the archive.

hg pull

– if you try to push and get: “abort: outstanding uncommitted changes (use ‘hg status’ to list changes)”

hg commit -m "your commit message here"

– You should check status:

hg status

– if you have a “!” in front front of a file or directory name in the status listing, it means you deleted a file that Mercurial is tracking.

– Mercurial gets confused.

Example:

$hg status
!
Web/labs/providence/AnnaKaziunasFrance/resources/html_workshop/HTML_Basics_2.0.odp
!
Web/labs/providence/AnnaKaziunasFrance/resources/html_workshop/HTML_Basics_2.0.pdf

– To fix this –> do the following:

hg add

– tell Mercurial to record a delete for missing files

hg rm -A
hg commit -m "your commit message here"
hg pull

– if you get a message about “multiple heads” –> see next topic below.

If Mercurial Mentions “Multiple Heads”:

Example:

$ hg pull
pulling from ssh://hg@fab.cba.mit.edu/academy
searching for changes
adding changesets
adding manifests
adding file changes
added 50 changesets with 162 changes to 113 files (+1 heads)
abort: crosses branches (merge branches or use –check to force update)
warning: changegroup hook exited with status 255
(run ‘hg heads’ to see heads, ‘hg merge’ to merge)

– to remove heads, list heads:

hg heads

– Mercurial will list heads .

Example:

$ hg heads
changeset: 480:00cdd8eef593
tag: tip
parent: 479:f09cf2bc12ba
parent: 476:e519545ebdd5
user: Kinga Kubowicz <email@gmail.com>
date: Thu Feb 03 13:40:38 2011 +0100

summary: merge
changeset: 430:da050aca6ab4
user: Anna Kaziunas France <email@kaziunas.com>
date: Thu Feb 03 08:23:21 2011 -0500
summary: created external css for resources page

  • To merge with one of these heads (you can have many heads) –> type the number after “changeset:”
  • I have shown the number in bold so you can see them more easily.
  • For example, to merge with head –>changeset: 480:00cdd8eef593

– type:

hg merge 480

– If there are multiple heads (more than one listed as the output of hg heads) you wil need to repeat the merge for each head until there is only one left
– Then commit your changes:

hg commit -m "commit message"
hg push

– don”t push if it says you shouldn’t – “archive has diverged” – then pull instead.

hg pull
hg update
hg heads

– if you can’t get all the heads resolved or the error messages – re-clone the archive.

To Re-Clone The Archive:

– if you have new work in your firstname_lastname directory, make a copy and save in a directory outside of the “academy” directory
– delete the “academy” directory
– re-initialize the hg repository:

hg init

The rest of the instructions are here: http://academy.cba.mit.edu/tutorials/mercurial/ follow steps 5 to the end of the tutorial.

If You Get a “waiting for log on working directory” Message:

– use CONTROL + C to interrupt

.DS_Store Error – MAC only

– If you try to merge and get the following:

$ hg merge

local changed Web/labs/.DS_Store which remote deleted
(d)elete? ged version or

–> hit the <ENTER> key.
– Then commit the changes

hg commit -m "removed .DSstore file"