Pages: 1 [2]   Go Down
Author Topic: How to make the LED react on input  (Read 3291 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey again
I tryed it with a potentiometer, and i got it to work like i would like with the microphone, but when i connect the microphone again, and change the values, it doesn't work
Logged

New Jersey
Offline Offline
Full Member
***
Karma: 0
Posts: 193
Ard at work
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, now we know that your circuit works to measure 0-5V signals.

This probably means that the signal from the microphone is too small relative to the 0-5V amplitude you are measuring, as Mike was saying earlier, I believe.

You will need to amplify it somehow. You should mention this to your professor as how to do this will depend on what parts you have available in class.
Logged

----------
Mathieu

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have already amplified the signal, the level is now 0.2V. What do you suggest?
Logged

New Jersey
Offline Offline
Full Member
***
Karma: 0
Posts: 193
Ard at work
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So the arduino measures 0-5V just fine with the potentiometer, and you know you have 0.2V at the amplified microphone, but when you connect the two, the arduino measures 0?

(going to lunch, by the way, so I won't be able to reply for a bit)
Logged

----------
Mathieu

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33371
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have already amplified the signal, the level is now 0.2V.

Is this measurement taken before you connect it up to the Arduino's input or when it is connected up?

I suspect that the output of your amplifier is being killed by the arduino's input impedance. Have you connected this up through a capacitor like I said earlier or is it a direct connection? Have you connected the -ve supply on your amplifier to the GND on the arduino. Note that GND on the amplifier is NOT the same as GND on the Arduino if you are running it all off the same supply.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

everybody, thanks for your help!!!
But my time is done, so i talked to my professor, about it. i choose to simulate it with a potentiometer instead. i've used too long time on this projekt...
so i close this post
Logged

New Jersey
Offline Offline
Full Member
***
Karma: 0
Posts: 193
Ard at work
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry to hear that, better luck on the next one!
Logged

----------
Mathieu

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33371
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess we all got an F on that project.  >smiley-sad
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It was proberbly something I did wrong...
But still thanks, for your help, because of that, i got to know a lot about the arduino, and i think, somehow I will score some more grades smiley smiley smiley smiley-wink smiley-wink smiley-wink smiley-wink smiley-wink smiley-wink smiley-wink...
Logged

SF Bay Area
Online Online
Edison Member
*
Karma: 11
Posts: 1244
Arduino Ninja
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought I posted this in another thread on this forum...probably would have needed to tweak the amplification a little for the microphone, but it would do the trick:



This one looks a lot better signalwise, but the response really doesn't look as good as the simpler circuit when you actually build it.

« Last Edit: September 25, 2008, 05:51:24 pm by macegr » Logged

Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ignore this post, wrong topic
« Last Edit: September 28, 2008, 06:29:50 am by oddish2211 » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
int val = 0;

void setup()
{
 // note that you should not call pinMode for the analog pins
 Serial.begin(9600); // initialise serial port for 9600 baud
}

void loop()
 {

   val = analogRead(analogPin);   // read the input pin
   Serial.println(val,DEC);
   delay(250); // delay 1/4 second between readings
}

Would something like this work over the USB port? Would it give off results?
« Last Edit: October 31, 2008, 01:10:45 am by Interesting » Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6250
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A microphone does not provide enough signal to drive the analog inputs without amplification. The circuit in the top picture in macegr's post above is an example of what is needed.
Logged

Pages: 1 [2]   Go Up
Jump to: