Fall 2004

  • Phys Comp

Fall 2005

  • Advanced Tech
  • The Creative Act
  • Video for New Media

Spring 2005

  • Conceptual Design
  • Networked Objects
  • Video Art

Spring 2006

  • User Centered Design

Post-ITP

Links

  • robseward.com
  • Generative Theory Of Tonal Music Software

Recent Entries

  • Slowly
  • More
  • Light studies continued
  • Continued
  • Library Light Study Continued
  • Library light study
  • Final Project
  • Kitchen Inventory System User Scenario
  • 10 (approx.) Ideas
  • Kitchen Observations 1-5

Archives

  • February 2007
  • May 2006
  • April 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • May 2005
  • March 2005
  • February 2005
  • January 2005
  • November 2004
  • October 2004
  • September 2004

« Lab 3 - Analog Input | Main | Beer Garden Sound Meter -- Project 1 »

October 04, 2004

Lab 4 - Analog Out

Lab 4: Servo/Analog out. I had problem with the servo responding bizarrely to the analog input. I also built a musical instrument of sorts using freqout.



-----

I ran into a problem in the second step. Following the instructions in the lab, the analog output (using PWM) would only go from 1 to 1.5 volts, instead of 1 to 2 volts. As a result the servo would only move in 50% of it's full range. This is what fixed it. I changed the equation in the lab:

pulseWidth = minPulse + (pulseRange * (sensorValue/10)) / 100

to this:

pulseWidth = minPulse + ((pulseRange * (sensorValue / 100)) /10)

I'm not sure exactly why this works, but one possibility is that pulseRange * (sensorValue / 10) creates a number too large for the chip to process. Dividing it by 100 creates a manageable value that can be then divided by 10. Unfortunately, this results in the loss of some resolution in the reading/translation of the analog input.

Did anyone else have this problem?


Here's a video of the servo.

For my application, I made something like a musical instrument. I used analog input from a pot as a parameter for the freqout function. I tried to use two pots and two freqout functions to get harmony, but I'm not sure the chip is capable of that. It resulted in this cool rhythm though.

Here's a video with sound.

Posted by rus200 at October 4, 2004 01:44 PM