Visualize a/some Final Project Idea.
Make a Press-Fit Structure using CAD and Laser Cutter
Make a One-sided Printed Circuit Board.
For this assignment, I model the FabISP after Valentin Huen's USB-stick design that does not require a Micro-USB cable for connecting to the computer
Scan and Print Object in 3 Dimensions.
Make Something Big.
The goal this week is to familiarize our self with the workflow of digital machining...
Draw your own schematics and traces using Eagle.
Make a Mold and Cast it.
Instead of working on this assignment individually (busy week), I joined another classmate Ismail, where we tried to cast a heatsink in metal
Program a Micro-Controller.
The goal this week is to bring intelligence to the circuit board. To do that, we connect the microcontroller we milled and soldered in week 6 to the AVR programmer we created in week3.
1. Convert C code into Hex: sudo make program-usbtiny
2. Prepare the programmer to write: make -f Makefile program-usbtiny-fuses
3. Write the Hex to the microcontroller: make -f Makefile program-usbtiny
4. Unplug the programmer from the microcontoller
5. Look up serial port number: ls /dev/tty*
dhcp-18-111-2-197:ep-hello ptinn$ ls /dev/tty*
/dev/tty /dev/ttysd
/dev/tty.Bluetooth-Incoming-Port /dev/ttyse
/dev/tty.Bluetooth-Modem /dev/ttysf
/dev/tty.iPad-WirelessiAP /dev/ttyt0
/dev/tty.usbserial-FTHBSO75 /dev/ttyt1
/dev/ttyp0 /dev/ttyt2
/dev/ttyp1 /dev/ttyt3
/dev/ttyp2 /dev/ttyt4
6. Run ahello world: python term.py /dev/tty.usbserial-FTHBSO75 115200
dhcp-18-111-2-197:ep-hello ptinn$ python term.py /dev/tty.usbserial-FTHBSO75 115200 Nov 4 10:28:14 dhcp-18-111-2-197.dyn.mit.edu Python[6509] <Error>: The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 587, in callit func(*args) File "term.py", line 45, in idle wait = ser.inWaiting() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/serial/serialposix.py", line 449, in inWaiting s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str) IOError: [Errno 6] Device not configured Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__ return self.func(*args) File "term.py", line 31, in key if (ord(key) == 13): TypeError: ord() expected a character, but string of length 0 found Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__ return self.func(*args) File "term.py", line 31, in key if (ord(key) == 13): TypeError: ord() expected a character, but string of length 0 found Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__ return self.func(*args) File "term.py", line 31, in key if (ord(key) == 13): TypeError: ord() expected a character, but string of length 0 found Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__ return self.func(*args) File "term.py", line 31, in key if (ord(key) == 13): TypeError: ord() expected a character, but string of length 0 found Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__ return self.func(*args) File "term.py", line 31, in key if (ord(key) == 13): TypeError: ord() expected a character, but string of length 0 found Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__ return self.func(*args) File "term.py", line 33, in key ser.write(key) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/serial/serialposix.py", line 518, in write raise SerialException('write failed: %s' % (v,)) SerialException: write failed: [Errno 6] Device not configured
Code blocks generated using: http://hilite.me/
Make the microcontroller do something.
#include <avr/io.h> #include <util/delay.h> #define output(directions,pin) (directions |= pin) // set port direction for output #define set(port,pin) (port |= pin) // set port pin #define clear(port,pin) (port &= (~pin)) // clear port pin #define pin_test(pins,pin) (pins & pin) // test for port pin #define bit_test(byte,bit) (byte & (1 << bit)) // test for bit set #define PWM_delay() _delay_us(25) // PWM delay #define led_port PORTB #define led_direction DDRB #define red (1 << PB1) #define green (1 << PB0) #define blue (1 << PB2) int main(void) { // // main // unsigned char count, pwm; // // set clock divider to /1 // CLKPR = (1 << CLKPCE); CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0); // // initialize LED pins // set(led_port, red); output(led_direction, red); set(led_port, green); output(led_direction, green); set(led_port, blue); output(led_direction, blue); // // main loop //
DDRB: Data Directory Registry Port
MOSI: SPI Master Data Output / Slave Data Input
MISO: SPI Master Data Input / Slave Data Output
XTAL1: Crystal Oscillator Input
XTAL2: Crystal Oscillator Output
CLKPR – Clock Prescale Register
PROJECT=hello.RGB.45 SOURCES=$(PROJECT).c MMCU=attiny45 F_CPU = 8000000 CFLAGS=-mmcu=$(MMCU) -Wall -Os -DF_CPU=$(F_CPU) $(PROJECT).hex: $(PROJECT).out avr-objcopy -O ihex $(PROJECT).out $(PROJECT).c.hex;\ avr-size --mcu=$(MMCU) --format=avr $(PROJECT).out $(PROJECT).out: $(SOURCES) avr-gcc $(CFLAGS) -I./ -o $(PROJECT).out $(SOURCES) program-bsd: $(PROJECT).hex avrdude -p t45 -c bsd -U flash:w:$(PROJECT).c.hex program-dasa: $(PROJECT).hex avrdude -p t45 -P /dev/ttyUSB0 -c dasa -U flash:w:$(PROJECT).c.hex program-avrisp2: $(PROJECT).hex avrdude -p t45 -P usb -c avrisp2 -U flash:w:$(PROJECT).c.hex program-usbtiny: $(PROJECT).hex avrdude -p t45 -P usb -c usbtiny -U flash:w:$(PROJECT).c.hex program-dragon: $(PROJECT).hex avrdude -p t45 -P usb -c dragon_isp -U flash:w:$(PROJECT).c.hex
Add a sensor to the Microcontroller to listen to the world.
1. avrdude: Error: Could not find USBtiny device
2. avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.
Collection of photos from shop demos.
Enhancing the Percussion User Interface of Open-Source MIDI Controller.
This project is inspired by the Sugarcube-MIDI project created by Amanda Ghassaei for Instructable. Here I try to focus refining the form factor of the device as a handheld instrument. The intention is to improve the percussion quality of the device by fully utilize a 9-degree-of-freedom sensor (accelerometer, gyroscope and magnetometer
This page documents the issues and progress made so far during the investigation.
I start by examining the gripping experience of electronic objects found in the lab. Handles come in different sizes: the handle of OLPC (~2cm) is designed primarily for carrying, while handle of Sense 3D scanner (~3.5cm) is more suitable for stable handling and movement control.
In a typical MIDI-Controller, analog potentiometers are used for adjusting tempo, and sound velocity. They can also be used to provide more funcitonal assignments beyond the number of buttons in the grid (4x4). Here I imagine the use case where one wants to control the instrument with only one hand while using the other hand for other pursposes. Here, we disover the need to create spaces inside the handle to house the potentiometers.
Based on the usability and scale/dimensional requirement collected from previous two steps, I move on to building a 3D model using Rhino.
The electric tambourine is made up of multiple electronic components, including pre-fabricated 4x4 silicon button pad for LED, breakout board, and 9-DOF position sensor. During the integration process, I went through a few sources on the following: