Show Posts
Pages: 1 [2] 3 4
16  Using Arduino / Sensors / Re: Sensor to detect vibration from violin strings? on: March 21, 2014, 08:49:18 am
I can make any modification to the instrument necessary. I can drill holes ect... if needed to (its a junker). I dont want an electric violin as this project isnt for audio purposes. Its more of a proof of concept for another project I will start if I'm able to get this working, A single peizo wont work, I need to detect vibration from the strings individually.
17  Using Arduino / Sensors / Sensor to detect vibration from violin strings? on: March 21, 2014, 07:49:25 am
I'm brainstorming up a project I'd like to build  but I cant figure out how to approach or what sensor would be most appropriate to use. Essentially what I would like to have is a circuit that can detect vibration from a violin string and tell the arduino to light an LED with a brightness that corresponds to the volume (amplitude?) of the sting played. This project isnt for audio purposes so I dont need anything dealing with frequency to pitch conversion or anything like that... just a circuit that lights an LED when a sensor detects its string vibrating. There are 4 strings on a violin so I will want to use 4 LEDs, one for each string.

Here are some potential problems I've thought of that could make this difficult:

1) Depending on the volume and which string is being played, the vibration can be extremely subtle. I know when I play the E string (The highest in pitch) quietly you can't see the string vibrating at all with the naked eye but you can still hear it. I would need a sensor that could tell the arduino that the string is in fact vibrating and producing sound even though the human eye cant see it.

2) At first I thought I might be able to use a modified magnetic pickup for guitar. The voltage produced by the coil could be used as an input to let the arduino know the string was vibrating ... but this idea quickly went into the trash when I realized not all violin strings are made of steel. Many are made of non-conductive materials.

3) Crosstalk. A normal violin bridge is just a single piece of wood, so if I was to use a peizo to sense the vibrations, one strings vibrations would be picked up by all the strings since the bridge of a violin is a solid piece of wood.  I thought maybe I could build a special bridge for the violin that kept all the stings on a separate peizos so that they would be "vibrationally isolated" from each other but I wouldnt know if that would work without experimenting first... and I dont know much about making violin bridges so that could be a cumbersome option.

TL;DR - Need a sensor(s) that tells an arduino that a string is vibrating, which string it is, and how intense the vibration is. 
18  Using Arduino / Programming Questions / Re: Turn of LEDs after 10 seconds - Code mod on: October 15, 2012, 11:27:40 am
Hey now... the delays are necessary. The lights are timed to a song that will be played through the waveshield. They need to stay.
19  Using Arduino / Programming Questions / Turn of LEDs after 10 seconds - Code mod on: October 15, 2012, 10:55:14 am
This is a bit of code written to fade up LEDs one by one and then all fade down together. Could someone help me modify this code to make all the LEDs turn off (no fade) 10 seconds after the last LED fades on?

Code:
int leds[] = {13,11,10,9,6,5,3};

int num = 7;


void init_leds(){
  for(int i = 0; i<num; i++){
    digitalWrite(leds[i],LOW);
    pinMode(leds[i], OUTPUT);  
  delay(200);  
  }
}

void FadeOutLeds(){
  for(int i = 155;i>0;i--){

    for(int j = 0;j<num;j++){
      analogWrite(leds[j],i);
    }
    delay(80);
  }

}

void FadeInLed(int theLed){
  for(int i = 0;i<256;i++){
    analogWrite(theLed,i);
    delay(20);
  }
}


void setup() {                
  // initialize the digital pins as an output.
  init_leds();
}

// the loop routine runs over and over again forever:
void loop() {

  for(int i = 0; i<num;i++){
    FadeInLed(leds[i]);      
  }
  delay(5000);               // wait for 5 seconds
  FadeOutLeds();
 delay(5000);  
}
20  Using Arduino / General Electronics / Re: Would this fry my Arduinos? on: October 06, 2012, 05:18:08 pm
Gotcha, thanks!
21  Using Arduino / General Electronics / Re: Would this fry my Arduinos? on: October 06, 2012, 03:52:58 pm
Ok, but the mA of the combined batteries wont be too much? Its my understanding that voltage will stay at 9V because they are in parallel?

Just for educational purposes (im still learning), whats the advantage of having the switch on the common ground rather than a common + ?
22  Using Arduino / General Electronics / Re: Would this fry my Arduinos? on: October 06, 2012, 03:42:13 pm
Has to be portable, its for a music box. The current is cut as soon as the lid is shut so the circuits will never be on for long periods of time. 9Vs should do the job just fine, but I needed to know if this wiring will achieve what I'm trying to accomplish here.
23  Using Arduino / General Electronics / Re: Would this fry my Arduinos? on: October 06, 2012, 03:15:50 pm
A little confused.... I want to power each with a 9V battery. 2 of the arduinos have LEDs and the third has an adafruit waveshield. Would that work? Im terrified to connect them like this, power it on, and have it wreck the waveshield.

Also, does it make a difference putting the switch on the + or - side of things?
24  Using Arduino / General Electronics / Would this fry my Arduinos? on: October 06, 2012, 02:27:53 pm
Hi, I would like three different arduino boards to all power on at the same time at the flick of a switch. I would also like each to have its own 9v battery. If I were to wire it like this, would it fry my boards?

25  Using Arduino / Microcontrollers / Re: AVR Programmer on: September 21, 2012, 04:13:47 pm
Would I still need to add that file if I went with this one http://www.dfrobot.com/index.php?route=product/product&product_id=405#.UFzAiqTyadR
26  Using Arduino / Microcontrollers / AVR Programmer on: September 21, 2012, 09:26:41 am
Can I use this programmer http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=2136420&productId=2136420&keyCode=WSF&CID=GOOG&gclid=CMD8zNHvxrICFYw-Mgoddh0A6A to overwrite the bootloader on my Arduino Leonardo so that my project will being without delay when powered up?
27  Using Arduino / Project Guidance / Re: Leonardo Question on: September 01, 2012, 09:37:46 am
Making some progress here... for what I've read I can use another Arduino to burn the bootloader using ISP, but in order to upload a sketch and overwrite the bootloader I would need to use an ICSP programmer. Is that correct? If I can use another Arduino to burn the bootloader can I also use it to burn a modified bootloader?
28  Using Arduino / Project Guidance / Re: Leonardo Question on: September 01, 2012, 09:07:03 am
Ah ha! After a little digging, I've found this:

 
Quote
When you upload a sketch, you're using the Arduino bootloader, a small program that has been loaded on to the microcontroller on your board. It allows you to upload code without using any additional hardware. The bootloader is active for a few seconds when the board resets; then it starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will blink the on-board (pin 13) LED when it starts (i.e. when the board resets).

That explains the pulsing LED in the beginning. Im still not sure how to ditch the bootloader though...
29  Using Arduino / Project Guidance / Re: Leonardo Question on: September 01, 2012, 08:59:12 am
Could you maybe explain that a little more? I'm a beginner. Is there a way I can accomplish that without any extra hardware?
30  Using Arduino / Project Guidance / Re: Leonardo Question on: August 31, 2012, 09:29:35 pm
Sorry, I thought posting a video would help facilitate the process, guess not. Thanks for posting the summary though, I really need to figure this out. I don't have a schematic but its really simple, just LEDS connected to pwm pins that fade on in succession. Here is the code I'm using:

Code:


int leds[] = {
  3,5,6,9,10,11,13};
int num = 7;


void init_leds(){
  for(int i = 0; i<num; i++){
    digitalWrite(leds[i],LOW);
    pinMode(leds[i], OUTPUT);     
  }
}

void FadeOutLeds(){
  for(int i = 155;i>0;i--){

    for(int j = 0;j<num;j++){
      analogWrite(leds[j],i);
    }
    delay(80);
  }

}

void FadeInLed(int theLed){
  for(int i = 0;i<256;i++){
    analogWrite(theLed,i);
    delay(20);
  }
}


void setup() {               
  // initialize the digital pins as an output.
  init_leds();
}

// the loop routine runs over and over again forever:
void loop() {

  for(int i = 0; i<num;i++){
    FadeInLed(leds[i]);     
  }
  delay(5000);               // wait for 5 seconds
  FadeOutLeds();
  delay(5000); 
}


Im not certain a schematic would help anyway. Im not sure theres technically anything wrong, from what I've read about the Leonardo the bootloader takes 8 seconds to run which is exactly how long the first LEDs pulse for. I just need to know if theres a way to make them stop and have my project begin right away vs. having to wait 8 seconds before the above code is executed.
Pages: 1 [2] 3 4