Show Posts
Pages: 1 2 [3] 4 5 ... 25
31  Using Arduino / Programming Questions / Re: Code for logarithmic volume control on: January 06, 2014, 02:40:00 pm
BTW Is 45K a good value for line audio control?  I wasn't sure which resistance is best for this (10K,50K or 100K)?
32  Using Arduino / Programming Questions / Re: Code for logarithmic volume control on: January 06, 2014, 02:34:03 pm
or
Code:
for (int i=0; i< 255; i++)
  {
    float y = 255- a * log(255-i);  // more dynamic in the end
    Serial.print(i);
    Serial.print('\t');
    Serial.println(y);
  }

Awesome! Thank you very much!!!  smiley-grin

Oops... Pulled trigger too soon on linear, didn't see that one smiley-sad Oh well, thanks the info tho!  I'll get that one for my next project
33  Using Arduino / Programming Questions / Re: Code for logarithmic volume control on: January 06, 2014, 02:27:15 pm
Don't logarithmic pots exist? Otherwise many of the steps are just wasted.
I couldn't find any digital logarithmic pots (do they exist?) besides I already ordered some MCP4241 (10K, 50K and 100K)...
34  Using Arduino / Programming Questions / Code for logarithmic volume control on: January 06, 2014, 02:19:28 pm
Hi,

Does anyone have a snippet of the code that can do logarithmic change?  I'm building Arudino based volume controller that will do so via Digital Pot IC.

Thanks! smiley
35  Using Arduino / Audio / volume control w/ remote (which POT?) on: January 05, 2014, 10:12:29 pm
I'm planning to build arduino based Volume controller. I have TiVo hooked up to 30" monitor via HDMI. Out from monitor comes out audio cable and into powered speaker. I want to able to control volume via TiVo IR remote. I have lots of experience with IR receiver hooked to arduino, but never worked with digital POTs.  
Could someone recommend me a good IC for this and should I get 10K or 100K pot?
36  Using Arduino / Microcontrollers / Re: Does timer2 uses PWM on Pin 5 on ATMega328? on: December 30, 2013, 09:04:55 am
Pin 5 is Timer0 OCR-B so, no, no Timer2 involved.
Thanks!  There goes my theory smiley  Gotta keep digging the library, maybe it's defined somewhere else...
37  Using Arduino / Microcontrollers / Does timer2 uses PWM on Pin 5 on ATMega328? on: December 29, 2013, 07:37:16 pm
That's a quick question in the topic, however if more info needed here's a background story smiley
I'm building RGB controller with Audio and remote based on Arduino (ATmega328). I need 3 PWM pins to control LED brightness, however I'm finding difficulty finding 3rd available PWM because I'm also using WaveHC and IRRemote libraries.
I know that PWM is available pins 3,5,6,9, 10 and 11.  D11 is used by SPI. PWM on D9 is used by WaveHC library's timer1
I only have pins 3, 5 and 6 available to me however I found that PWM on Pin5 doesn't work when I use IRRemote library, as soon as I enable it LED connected to PIN5 stops fading.  I believe this library uses timer2. Does timer2 somehow affects PWM on PIN5? 
I actually found code in the library where it looks like I can change which PWM pin I use but modifying it has no affect which leads me to believe that timer2 is hardwired to PWM on pin 5. Can someone confirm that it's the case ? If so I'll have to cut some traces and free up only remaining PWM pin (D10).
Also if someone suggest softPWM library, I have already tried it. It conflicts with IRRemote because both use timer2. And there are no more timers left for me on ATMega328 smiley-sad
38  Using Arduino / Project Guidance / Re: Arduino based serial/terminal monitor on: November 27, 2013, 02:29:17 pm
No worries! I'll figure something out.
Great display tho. Looks gigantic compared to Nokia 5115 LCD. I just ordered another one (OLED this time) from them.
39  Using Arduino / Project Guidance / Re: Arduino based serial/terminal monitor on: November 27, 2013, 11:21:11 am
The digi-ole can read a straight serial line.  
Got my display today, awesome!
But I think you were wrong about it being able to read serial straight... It simply doesn't work, I think display expects few commands before it can start reading, so there's no way around using MCU in between.. Unless I'm not doing something right...
40  Using Arduino / Programming Questions / Re: Serial Event not detecting EOL on: November 20, 2013, 07:58:20 pm
Please ignore. I found issue. I had to chose "newLine" from pulldown menu in the Serial monitor smiley Sorry never noticed that option.
41  Using Arduino / Programming Questions / Serial Event not detecting EOL on: November 20, 2013, 07:52:17 pm
I'm using Arduino example sketch "Serial Event" with IDE 1.0.5 and running on Uno clone.
For some reason it doesn't detect end of line " if (inChar == '\n')  "
I basically type text in the Serial monitor window and press enter...
I know that SerialEven() function itself works, because I added debug Serial.println and it shows that data is being received...
Code:
void serialEvent() {
  while (Serial.available()) {
    Serial.println ("received data");
    // get the new byte:
    char inChar = (char)Serial.read();
    // add it to the inputString:
    inputString += inChar;
    // if the incoming character is a newline, set a flag
    // so the main loop can do something about it:
    if (inChar == '\n') {
      Serial.println ("end of line");
      stringComplete = true;
    }
  }
}

What am I doing wrong?
42  Using Arduino / Project Guidance / Re: Arduino based serial/terminal monitor on: November 18, 2013, 04:34:42 pm
Just ordered Dig-Ole's LCD screen!  Couldn't decide between plain LCD and OLED, but I think since OLDE uses more power LCD would  be better for battery operated functionality smiley
43  Using Arduino / Project Guidance / Re: Arduino based serial/terminal monitor on: November 18, 2013, 03:57:32 pm
Great idea about Serial LCDs! I never worked with them, but if the can just read serial input directly it means I don't even need MCU attached. Thanks!
44  Using Arduino / Project Guidance / Arduino based serial/terminal monitor on: November 18, 2013, 01:01:40 pm
I'm planning to make a very specific arduino based device to display serial output of another device (i.e. second arduino). When troubleshooting MCU circuits I find myself running between my soldering workbench and computer (that's on another floor) to see serial output after I made a change in circuit . I have no room for laptop near my workbench... So I'm thinking of making a simple handheld ATmega based serial monitor device that will have small LCD screen (already ordered Nokia 5110 screen) and be portable (maybe even battery operated). 
Should be simple enough, however if someone already did this I'd love to hear about it, so i don't reinvent bicycle smiley 
P.S. I did Google the subject but couldn't find anything relevant...
45  Using Arduino / General Electronics / Re: RC filter for DAC on: November 18, 2013, 09:54:39 am
Quote
I don't get any noticeable noise when I bypass it, not sure why Adafruit designed it
It is to reduce the sampling noise you can't here but that could affect the rest of the circuit or those people with better hearing.

Quote
I think I will redesign PCB and remove this filter
No if you are going to do anything then redesign it with a better filter, this is only a first order filter so it does not roll off very fast, put in a second or fourth order filter using some op amps. If you want to remove more noise then lower the cut off frequency of the filter.
Thanks!  I will look into second or fourth order filter (never heard this term before). However main goal is to keep this PCB as tiny as possible with thru the whole components (it's meant for SFX in small toys) and sound quality is not a major issue, as long as there are no really bad hum or buzz that's immediately noticeable smiley
Pages: 1 2 [3] 4 5 ... 25