Show Posts
Pages: [1] 2
1  Using Arduino / LEDs and Multiplexing / Re: SoftPWM messes with Hardware PWM on: January 24, 2013, 09:10:57 am
Thanks for the reply Grumpy_Mike.

@tack
Yes, thank you. I am trying along those lines. So far the test code seems to work
fine eliminating the need to use hardware PWM altogether. I will try re-writing
the project code & see how SoftPWM responds...would also use 2 more RGB LEDs
instead of 2 single-color LEDs if all goes well.
Thanks for the response. smiley
2  Using Arduino / LEDs and Multiplexing / SoftPWM messes with Hardware PWM on: January 23, 2013, 06:59:07 am
Hi All,

I have connected 2 RGB leds to the 6 PWM pins. I needed a few more PWM pins
& hence I tried the SoftPWM library.

http://code.google.com/p/rogue-code/wiki/SoftPWMLibraryDocumentation

The library in itself works fine and fades-up & down several LEDs. So I decided to use it
in my aforementioned 2-RGB project. I added 2-single-color LEDs that would be connected
to unused normal digital pins. The SoftPWM woks fine on these two. However, it messes with
the working of one of the 2-RGBs that are on hardware PWMs. (One of the 2 RGB's behaves
as if it was receiving digital input in form of 0 & 1 while the other one works fine having
smooth fades & then the previous one behaves erratically while the other behaves as it should.)

If, I comment out SoftPWMBegin(); everything works fine.

Is there a way out?
Thanks.
3  Using Arduino / LEDs and Multiplexing / How many LED's on Pin 13 that already powers the on-board Green L-LED? on: January 17, 2013, 05:29:27 am
Hi

The max pin output current on an Arduino is 40 mA.
So I can put in 2 LED's (with appropriate resistors) on a single pin.
(Each LED will source upto 20 mA)

However pin-13 is already connected to the on-board L - LED (green).
Does this mean I cannot connect 2 normal LED's on Pin 13?

Thank you.
4  Using Arduino / LEDs and Multiplexing / Re: Current flow & Voltage Drops in series & parallel on: January 11, 2013, 08:22:08 am
Thank you all for replying.

@Boffin1

So this is how it works. The voltage drop (Vd) across the resistor is first calculated.
It is 2V (since 5v-3v). Now we decide on the value of resistor so that we get desired current.
Aha! I had tried to read through various posts, but was confused & had to post this noobish question.
(I remember the current/voltage bifurcation always used to confuse me smiley-razz )





Thanks all. This was an education. smiley

Do you want to use 2 LEDs  as they are in different locations, or was it to try and get more illumination ?

For more illumination. smiley Actually, I want to connect at least 2 RGB LEDs to 3 PWM Arduino pins.

Are there some tutorials to brush up the electronics basics (with respect to Arduino.)?
Thanks again.
5  Using Arduino / LEDs and Multiplexing / Re: Current flow & Voltage Drops in series & parallel on: January 11, 2013, 07:04:46 am
Thanks for replyin, Boffin1. Kindly explain this.

third drawing,    5v  less the 3 volts accross the diode = 2v accross the 250R res, by ohms law  = 8 Ma each LED

Also since each Atmega8 pin can source 40ma, in what configuration should the
above 2 LEDs be connected to a single pin so that each LED gets 20ma?
(My confusion stems more from the Voltage drop & how it adds/subtracts in all of this)
Thanks.
6  Using Arduino / LEDs and Multiplexing / Current flow & Voltage Drops in series & parallel on: January 11, 2013, 04:38:26 am
Hi

Though my query is about LED resistance & Voltage drops it really breaks down to basic electronics in context to Arduino.

Lets assume:
Arduino output pin sources 40ma max current
LED has 3V Fwd voltage Drop
LED Max Current is 20 ma

1. In the following figure, what would be the forward voltage of the LED? (& why)



2. In the each of the following 3 figures
                  2.1  how much current would the pin source? (& why)
                  2.2  what would be the Vf on each LED? (& why)
                  2.3  will 20 ma flow through each LED? (& why)







Thank you.
7  Using Arduino / Programming Questions / Re: randomSeed(analogRead(0)); on: January 01, 2013, 10:23:43 am
Is it necessary for this function randomSeed(analogRead(0)); to be preceded by
Serial.begin(9600); as seen here...

http://arduino.cc/en/Reference/RandomSeed

In short, is the analogpin 0 affected by Serial.begin?
Thanks.
8  Using Arduino / LEDs and Multiplexing / Re: Is 0 equivalent to Ground? on: December 12, 2012, 02:54:10 pm

Thank you very much. I will let this info sink & post back here
when I bump into an obstacle.
Thanks again.
9  Using Arduino / LEDs and Multiplexing / Re: Is 0 equivalent to Ground? on: December 12, 2012, 02:25:00 pm
Thanks for replying, dc42.

The max current sink capacity for the Digital Pin of Atmega8 is 40 mA?
What is the source capacity?

Considering the above image, will it work without any problem?
How many Ohms resistor should I use on each pin?

Lastly, I would be grateful if you can tell me  how to use NPN tansistors (BC548)
as switches in the above diagram? (including the resistor values)

Thanks.
10  Using Arduino / LEDs and Multiplexing / Is 0 equivalent to Ground? on: December 12, 2012, 01:33:12 pm
Hi

Electronics newbie here. A few queries regarding Atmega8.

1. Does a 0 on the Digital Output pin of Atmega8 equivalent to Ground?

If I connect a LED  + Resistor betwen D-Out pins 1 & 2, with Pin 1 outputting '1'
& pin 2 outputting '0', will it light the LED?

If so, is it safe to do so instead of using Ground?
(I read something about considering the sink current & such!)

2. Will the following work?

My aim to control the gradual dimming & brightening of individual LED's.



Thank you.
11  Using Arduino / General Electronics / Re: Arduino Atmega Standalone - need for Capacitors & Crystal? on: February 26, 2012, 03:51:24 am
@MarkT Wow. That was heavy smiley I will have to read it several times more & cross-reference it with the help of Google Uncle before I fully understand it. Thanks all the same for willing to share your knowledge.
12  Using Arduino / General Electronics / Re: Arduino Atmega Standalone - need for Capacitors & Crystal? on: February 25, 2012, 08:58:58 am
Thank you all for replying smiley

Quote
I just don't understand why you don't want to use it in your project....( I don't know your situation... )  

@Techone Nothing like that. I was just curious to know what was the need & what prevents the internal clock from being used as is. Beginners knowledge sake smiley
13  Using Arduino / General Electronics / Re: Arduino Atmega Standalone - need for Capacitors & Crystal? on: February 24, 2012, 02:28:09 pm
Thanks John, Fat D & Rob for replying. So the internal clock would require a new bootloader.
That doesn't help if one wishes to program the chip on-board & just place it on a PCB.

A new bootloader & a fuse select is needed for the internal clock to work.
Got it. So, primarily, the chip is dependant on the clock frequency that its corresponding
bootloader was burnt on.

14  Using Arduino / General Electronics / Arduino Atmega Standalone - need for Capacitors & Crystal? on: February 24, 2012, 08:33:31 am
Hi

I have read several tutorials showing how to run an Arduino Uno Atmega chip as standalone
after programming it on the Arduino board. My query is-
Why do we need capacitors & 16MHz Crystal?

If I have grasped it correctly, the capacitors on the power-pins are required to remove
the DC ripple effect.

About the 16 MHz Crystal, I think Arduino Uno has 16MHz external clock & this Crystal
does that function on the standalone. However,  the Atmega328 chip has an internal clock.
Can I not use it, without the Crystal, on the standalone board?

Project intention: 3x & 4x LED Cube
Source: http://www.instructables.com/id/Standalone-Arduino-ATMega-chip-on-breadboard/
15  Using Arduino / LEDs and Multiplexing / Re: Using PWM pins for digital & analog writes alternately? on: February 23, 2012, 05:32:29 am
Oh so that means if I want to drive 5 columns using the PWM (common anode to each pwm),
it wont have the desired effect of the columns fading in & out but would strobe/blink.
That sucks. :-) Thanks John for letting me know why!
Pages: [1] 2