Show Posts
Pages: [1] 2 3 ... 14
1  Using Arduino / General Electronics / Re: AGC Help (Please) on: August 24, 2013, 07:56:26 pm
Thanks for the post.  Ill give it a go.
2  Using Arduino / General Electronics / Re: AGC Help (Please) on: August 24, 2013, 07:07:49 pm
Sorry for the limited info. I will elaborate .

I am making a Visual Eq ( Light organ).  I am trying to keep the Led’s from Maxing out when the volume is set to high.

I am using a atTiny 84 and MSGEQ7.  Because I am new to all this and I am not familiar with the terminology I may of missed spoke. 

I may be looking for a gain limiter. 
3  Using Arduino / General Electronics / AGC Help (Please) on: August 23, 2013, 08:44:47 pm
Hi All,

I Need some input.  I am working on a Visual EQ. I have a thread going here. http://forum.arduino.cc/index.php?topic=182239.0 But I am now stuck. I am trying to incorporate a AGC circuit so the LEDs don't max out  when the MP3 player is at high volume.

My plan is to split the Left and Right channels two ways.   L/R to the AGC and L/R to a LM1036 amp with V/B/T control.

The Issue I am having is finding a AGC that will fit my needs. As I am still learning I not sure what AGC circuit would work best.  I also have no clue how to test the output of my  MP3 player so I will be able to figure out the best sustained Gain.  I hope I am saying all this right.

Well I found this Mic Preamp with AGC, but as I intend to use and Audio Jack I am not sure if it will work.  Any input will be welcome.

http://www.electronicecircuits.com/electronic-circuits/automatic-gain-control-microphone-preamp#more-824

Thanks
4  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 21, 2013, 09:33:31 pm
I think I found something,

Code:
PWMvalue = PWMvalue /2; // bit of a noise filter, so the LEDs turn off at low levels

If I increase it to 30 the leds stop blinking with no music is playing.

I am not sure if that the right thing to fix tho.
5  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 21, 2013, 09:26:36 pm

At this point, you need to re-post your sketch.


Code:
#define msg7RESET 8
#define msg7Strobe 9
#define msg7DCout 0
const int LEDpins[7] = {1,2,3,4,5,6,7}; // there are 5 LEDs and 7 freq bands. So, repeat LEDs

#define pushButton 2

void setup() {
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  for (int x=0; x<7; x++) {
    pinMode(LEDpins[x], OUTPUT);
  }
  pinMode(msg7RESET, OUTPUT);
  pinMode(msg7Strobe, OUTPUT);

  pinMode(pushButton, INPUT); // never actually used in this example.
  digitalWrite(pushButton, HIGH); // Enable internal pull-up
}

void loop() {
  digitalWrite(msg7RESET, HIGH); // reset the MSGEQ7′s counter
  delay(5);
  digitalWrite(msg7RESET, LOW);

  for (int x = 0; x < 7; x++){
    digitalWrite(msg7Strobe, LOW); // output each DC value for each freq band
    delayMicroseconds(35); // to allow the output to settle
    int spectrumRead = analogRead(msg7DCout);

    int PWMvalue = map(spectrumRead, 0, 1025, 0, 255); // scale analogRead’s value to Write’s 255 max
    if (PWMvalue < 50)
      PWMvalue = PWMvalue / 2; // bit of a noise filter, so the LEDs turn off at low levels

    analogWrite(LEDpins[x], PWMvalue);
    digitalWrite(msg7Strobe, HIGH);
  }
}


Thank you
6  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 21, 2013, 09:21:12 pm

The analog output of the MSGEQ7 is connected to physical pin 13 (A0) on the t84.  Disconnect the MSGEQ7 from A0.  Instead connect a potentiometer wired like it is here...
http://arduino.cc/en/Tutorial/AnalogReadSerial

As you rotate the knob on the potentiometer, all the LEDs should get brighter / dimmer #.  If they do not, then you have a problem with the wiring on the t84 or a bug in your sketch.  If that works, then you have a problem with the wiring between the t84 and the MSGEQ7 or a bug in how your sketch interacts with the MSGEQ7.  In other words, you are dividing the application down the middle so you know where to focus your attention.

 
# I assume that is what is supposed to happen.

Thanks for you help. I have been out of town and I just got the time to try your suggestions.

When I used a POT the Leds got brighter and dimmer (100% to 0%)

As I am new at all this and I did not wight the the I have no clue on how to fix it and help would be well received.


Thanks

 
7  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 14, 2013, 04:42:17 pm
Geoff,

I think you may of misunderstood me.

I Can get it to work fine if I use the uno. it is when I put it on the at84 it gets buggy.

I was going to test as advised

(For a simple test you could replace the MSGEQ7 with a potentiometer (voltage divider).  If adjusting the voltage has the desired affect then you can be certain the problem is the interface between the t84 and the MSGEQ7.)

I was not sure of how to do that.  I will take a look at the link you sent me.

And thanks for you input.
8  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 14, 2013, 04:17:18 pm

Sounds like your sketch is not correctly interacting with the MSGEQ7.  For a simple test you could replace the MSGEQ7 with a potentiometer (voltage divider).  If adjusting the voltage has the desired affect then you can be certain the problem is the interface between the t84 and the MSGEQ7.


Sorry to be a pain, but could you tell me what Pin on the MSGEQ7 I would use.

Please and Thanks
9  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 12, 2013, 05:56:36 pm
I Think I know whats going on.

If I unplug the strobe pin (Pin 4 on the Eq7 ) and just let it sit it the LED's go dark. if I just put my hand by the jumper the LED flicker.
10  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 12, 2013, 04:21:42 pm

Yes.

The analog inputs are on port A (PA0 through PA7).  The number (e.g. PA1) is the parameter for analogInput (e.g. 1).


The Code I am using calls for 9 Digital Pins and 1 Analog pin. This is what I am using.

   Physical Pin#  ON Tiny84              Connected to :
                3  (D1)                                LED
                5  (D2)                                LED
                6  (D3)                                LED
                7  (D4)                                LED
                8  (D5)                                LED
                9  (D6)                                LED
              10  (D7)                                LED
              11  (D8)                                MSGEQ7 Reset  PIN 7
              12  (D9)                                "         " Strobe Pin 4
              13  (AO)                                "         " OUT   Pin 3
               
          Am I doing somthing wrong ?

         -KC

               
11  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 12, 2013, 12:16:55 pm

I take it The (D's) stand for Digital.  If so Doesn't the *$ have any Analog
12  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 12, 2013, 12:52:48 am

You have the MSGEQ7 output connected to which physical pin on the t84?


#define msg7RESET 8     Pin 7
#define msg7Strobe 9    Pin 4
#define msg7DCout 0     Pin 3
13  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 11, 2013, 11:58:17 pm

If it has enough pins the t84 should work.


Ok I got it to load to an At84 and it works, kind of.

The Code is for an light organ. When I play music the LED flash as programed. The issue is when no music is playing,
led's 1-5 glow.

Any Ideas.

Here Is my code with changes.

Code:
#define msg7RESET 8
#define msg7Strobe 9
#define msg7DCout 0
const int LEDpins[7] = {1,2,3,4,5,6,7}; // there are 7 LEDs and 7 freq bands.

#define pushButton 2

void setup() {
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  for (int x=0; x<7; x++) {
    pinMode(LEDpins[x], OUTPUT);
  }
  pinMode(msg7RESET, OUTPUT);
  pinMode(msg7Strobe, OUTPUT);

  pinMode(pushButton, INPUT); // never actually used in this example.
  digitalWrite(pushButton, HIGH); // Enable internal pull-up
}

void loop() {
  digitalWrite(msg7RESET, HIGH); // reset the MSGEQ7′s counter
  delay(5);
  digitalWrite(msg7RESET, LOW);

  for (int x = 0; x < 7; x++){
    digitalWrite(msg7Strobe, LOW); // output each DC value for each freq band
    delayMicroseconds(35); // to allow the output to settle
    int spectrumRead = analogRead(msg7DCout);

    int PWMvalue = map(spectrumRead, 0, 1025, 0, 255); // scale analogRead’s value to Write’s 255 max
    if (PWMvalue < 50)
      PWMvalue = PWMvalue / 2; // bit of a noise filter, so the LEDs turn off at low levels

    analogWrite(LEDpins[x], PWMvalue);
    digitalWrite(msg7Strobe, HIGH);
  }
}


14  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 11, 2013, 10:25:52 pm
Thanks
15  Using Arduino / Programming Questions / Re: ATTiny2313 Pin help on: August 11, 2013, 08:54:54 pm
Code:
int spectrumRead = analogRead(msg7DCout);

The t2313 does not have an analog-to-digital convert.

Well thats not good.  Do you know what Attiny I would be able to use.

Also thanks for the info.

-kc
Pages: [1] 2 3 ... 14