Tutorials - Fab Academy at AS220 Labs - Providence, RI

Output Device Examples / Concepts

Topics:

LEDs

Concepts: All About LEDs
http://learn.adafruit.com/all-about-leds

Hello RGB

Hello RGB

RGB LED Concepts:
http://www.tumblr.com/tagged/how-do-rgb-leds-work
Arduino Code Example:
http://fab.cba.mit.edu/classes/863.12/people/sophia/project11.html

Hello LED Array (Charlieplexing)

Hello LED Matrix

Charlieplexing / LED Array Concepts:
http://www.instructables.com/id/Charlieplexing-LEDs--The-theory/
Vinyl Cutter LED Array (big):
http://www.instructables.com/id/light-circuit/
Programming LED Array in C (changing the code):
http://academy.cba.mit.edu/2012/students/lubsen.astrid/Assignment13.html
Arduino Charlieplexing Library:
http://playground.arduino.cc/code/charlieplex
Charlieplexed RGB LEDs in Arduino style C:
http://academy.cba.mit.edu/2012/students/holt.joshua/JH_week13.html

Hello LED Matrix

Board in Action

Programming Hello LED Array with the FabISP

programming

To Flash the Microntroller:

To program your Hello LED Array - download all the files, under LED array.

I am using a ATtiny44:

sudo make -f hello.array.44.make program-usbtiny

If Working - This is the Terminal Output Produced

avr-objcopy -j .text -O ihex hello.array.44.out hello.array.44.c.hex;\
avr-size --mcu=attiny44 --format=avr hello.array.44.out
AVR Memory Usage
----------------
Device: attiny44

Program:     358 bytes (4.4% Full)
(.text + .data + .bootloader)

Data:          1 bytes (0.2% Full)
(.data + .bss + .noinit)


avrdude -p t44 -P usb -c usbtiny -U flash:w:hello.array.44.c.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e930c
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "hello.array.44.c.hex"
avrdude: input file hello.array.44.c.hex auto detected as Intel Hex
avrdude: writing flash (358 bytes):

Writing | ################################################## | 100% 1.08s



avrdude: 358 bytes of flash written
avrdude: verifying flash memory against hello.array.44.c.hex:
avrdude: load data flash data from input file hello.array.44.c.hex:
avrdude: input file hello.array.44.c.hex auto detected as Intel Hex
avrdude: input file hello.array.44.c.hex contains 358 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.68s



avrdude: verifying ...
avrdude: 358 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


Motors

Different types of Motors (Overview):
DC Motors Concepts: H-Bridge / PWM
MOSFETS (for switching large loads, like motors)
Finding Stepper Motor Coil Pairs (for wiring):
Great Resources from Paul Badger's RISD Physical Computing Classes
Arduino Servo Library

Hello Stepper

Hello RGB

If the stepper board is not working. I test the following:

  • Wires are wired in the wrong order -- try swapping them
  • Step pulses are too short for the motor -- try making them longer
  • Step current is too low for the motor -- try increasing PWM current
  • Not all MOSFETs working -- try probing with scope