analog input alters voltage... doesn't read properly

Look if you don't understand what you are doing why the *** are you arguing. You need a resistor in seriese with each LED segment otherwise you damage things because your not in control of the current. Any one who thinks you don't need some sort of current control with an LED is just an idiot.

You could get by with one resistor between the CA and its +voltage IF you are mux'ing the segments.
If you're mux'ing digits then you should place a resistor, in your case, between each LED cathode and its corresponding Arduino output.
Did you say what colour this display is? Blues tend to have VF in the neighbourhood of 3.5V or so.
The resistor value ? = (V_source - VF) / 0.01

Oh no it doesn't :slight_smile:

A capacitor has a high (infinite?) DC resistance but it can have a very low AC impedance. That's why one is called resistance and the other impedance.

For effective coupling between circuits the output impedance of one should match the input impedance of the other.

You have described the effect perfectly yourself - the sample and hold capacitor needs to receive enough electrons quickly enough. If you supply a DC input the capacitor will fill up and then you will see the full input resistance.

...R

Grumpy_Mike:
Yes it does!
You are mixing up the input impedance of the A/D with the output impedance you need from your input source to drive it. While the input impedance of the A/D is very high, if you just connected it up to a signal with a high output impedance then the input sample and hold capacitor will take time to charge up once you switch channels. Therefore you will not be able to measure several channels in quick succession. However, the analogue input will still have a high impedance.

Robin2,
If you know that little about electronics then stop advising people. You have a dangerous mish mash of concepts that will confuse people.

For effective coupling between circuits the output impedance of one should match the input impedance of the other.

That reffers to power transfer which is not what we are talking about here.

In testing everything works 100% so I am not exactly sure why I need to add more components.

Because you are not testing it enough you are just going off functionality, this is not good enough when dealing with hardware.

You have to make sure that you are not stressing the components and that it will continue to work and not fail prematurely.
Read this:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html
Anything you don't understand I will be happy to explain, anything you disagree with, then take up a new hobby.

really was aiming for super simple lol

Super simple designs are good but they need to be right, repeatable and work under all reasonable circumstances.

anything you disagree with, then take up a new hobby.

:stuck_out_tongue_closed_eyes:

It wouldn't be the first time I've been confused. So clear things up and tell me what are we talking about here?

...R

Grumpy_Mike:
That reffers to power transfer which is not what we are talking about here.

Grumpy_Mike:

In testing everything works 100% so I am not exactly sure why I need to add more components.

Because you are not testing it enough you are just going off functionality, this is not good enough when dealing with hardware.

You have to make sure that you are not stressing the components and that it will continue to work and not fail prematurely.
Read this:-
LEDs
Anything you don't understand I will be happy to explain, anything you disagree with, then take up a new hobby.

really was aiming for super simple lol

Super simple designs are good but they need to be right, repeatable and work under all reasonable circumstances.

I am not disagreeing- I am totally ignorant with most of this stuff.

I don't however feel that this needs to be repeatable- Id just like to get it working for my bike, don't really care if I could mass produce it or not.

But regardless- I'd like it to last- so if resistors are necessary than I wouldn't argue about that.

Two things-
What is meant by "mux'ing"?

Yes the LEDS are blue- I am using this: 7-Segment Display - LED (Blue) - COM-09191 - SparkFun Electronics
-These are running at 3.3v- but am I understanding now that they could pull 3.5 somehow?

pcguru000:
Two things-
What is meant by "mux'ing"?

Yes the LEDS are blue- I am using this: 7-Segment Display - LED (Blue) - COM-09191 - SparkFun Electronics
-These are running at 3.3v- but am I understanding now that they could pull 3.5 somehow?

"Mux'ing", short for multiplexing. If you can have two or more segments on at once, then they aren't mux'ed. If your sketch strobed quickly through them repeatedly, only one possibly on at any time, then they'd be mux'ed.
Anyway, you should have the CA wired to +5. If you use a 100? resistor for each segment they'll pull around 15mA [as (5-3.5) / 100 = 0.015], with 220? resistors they'll pull 6mA [as (5-3.5) / 220 = 0.006]. 100? and 220? are "standard value" resistors.

[I'm sure you get it, but with CA, the LED is [u]on[/u] when its corresponding Arduino pin gets a digitalWrite LOW.]

While several people have correctly said that you need resistors with LEDs nobody seems to have actually explained why.

The reason is simple. An LED needs a certain minimum voltage to get it to pass electricity and emit light (around 3.3v) but once the voltage is above that threshold the LED offers no resistance to the extra electricity and it could easily conduct too much current and burn itself out. The resistor limits the maximum current to a level that is safe for the LED. If you don't have a resistor the LED only survives by chance and will most likely fail when it is most inconvenient.

An LED is completely different from a regular light bulb because the light bulb can't take too much current if the voltage is correct.

...R

While several people have correctly said that you need resistors with LEDs nobody seems to have actually explained why.

Err. beg you pardon but what was that link about:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Robin2:
It wouldn't be the first time I've been confused. So clear things up and tell me what are we talking about here?

Power transfer involves maximizing the product of voltage and current in the load. When you do the maths it turns out the maximum transfer is when the output impedance of one device matches the input impedance of the other. However, here we do not want to transfer power but transfer voltage. To do this requires that the output impedance be very small compared to the input impedance. With an arduino the input impedance is very high and if you supply it from an output impedance of 10K then you get virtually perfect voltage transfer.

The point about an impedance is that in most cases the value is frequency dependent so when quoting an impedance you should also specify the frequency where that impedance applies.

I don't however feel that this needs to be repeatable

So you only want it to work with your individual arduino and LEDs now, you do not care if it fails when the components age?

These are running at 3.3v- but am I understanding now that they could pull 3.5 somehow?

No voltage is not pulled, only current is pulled. Voltage is dropped when current flows. If you put a certain current down the LED ( it will say what this current is in the data sheet ) the LED will drop 3.5V across it. Or it takes 3.5V to pass that current. If you only have 3.3V available then you do not have enough voltage to correctly drive your LED. You have no way of controlling the current because you do not have enough voltage to drop across a current limiting resistor. In short you can't do it in a safe way. It might function but that does not mean it works. Are you fine with it working only at a fixed temperature?

So you project needs to be even more complex than just adding a resistor, you need a boost constant current LED driver.

Grumpy_Mike:
So you project needs to be even more complex than just adding a resistor, you need a boost constant current LED driver.

Absurd.

So I am open to suggestions as to how you control the current through an LED that drops 3.8V at operating current when you only have 3.3V available without using a boost converter.

Are you advocating using no current limiting resistor. I thought you knew better than that. Or do you have a smart solution? I am eager to know.

Grumpy_Mike,
pcguru has an Uno (it's there in his big darned PNG), there's 5V available on it - which I noted in my Reply_#37: "Anyway, you should have the CA wired to +5."
He was putting the 7-segment's CA to 3V in the belief, howbeit mistaken, that that would obviate any need for resistors.

And this 100% true- however, I still don't understand why i would need to move them to the 5v+ pin... this would overvolt the led's and damage them.

I understand now that LEDs once "lit" could essentially drag more current than they OR the system is made for... and so we put resistance inline to protect from that possibility.

Since in my situation the 3.3v (or 5v if I'm given a solid reason why) - see below ... line is powering a CA 7-seg. this to me means I could put a resistor in ONLY that + voltage line because this is the source voltage, the others (digital pins) just act as grounds.

Anyhow- I got my 9v regulators today, I just soldered them up but I ran out of daylight to go test this... i'll check it out tomorrow evening and report back- hopefully with better results :slight_smile:

I think i understand why a common resistor doesn't work now too:

http://arduino.cc/forum/index.php/topic,17251.0.html

You have to connect the CA to +5, and NO, doing so will NOT "overvolt and damage them" - unless you don't use a resistor!
When the LED is ON it's its forward voltage is "3.5V"
So, the balance of the 5V will be across the resistor - 1.5V
That 1.5V across the resistor will determine the LED current
1.5V / 100? = 15mA

I spelled all of that out in Reply#37. You're not reading.

PERFECT i am starting to understand! Thank you for this confirmation, i had just read this:

And now I am going to put a 102 ohm resistor (brown - black - red - gold) [right ? hehe] on each ground wire for this display.

zzzz.. think i read this wrong- 4band vs 5 band resistors :confused: guess brown black red gold is actually 1000 ohms lol

Looks like ill have to get to radioshack for some 80-100 ohm resistors...

How can I test that the resistors are working? Should i just use a spare LED? I don't want to fry a segment on this display...

Get 100? (brown-black-brown) resistors - or my head will explode.

"How can I test that the resistors are working?"
The only way to KNOW is with a voltmeter.
+5 to CA, one lead of one resistor to any segment (cathode) with the other lead to Gnd.
There will be approx 1.5V across that resistor.

If the "spare" LED is a blue LED, you can use that.
If the "spare" LED is another colour then it will have a different forward voltage and skew the results.

Sounds good thanks- yeah I was expecting that the spare would have to be a blue one, and I figured it'd have to be tested with voltmeter.

I'll check this out tomorrow. THANK YOU everyone.

Hopefully this solves the issues I was having initially w/ the analog input voltage being skewed once plugged into my bike.

Thanks. I had overlooked the fact that you can feed a small water pipe from a large one.

...R

Grumpy_Mike:
Power transfer involves maximizing the product of voltage and current in the load. When you do the maths it turns out the maximum transfer is when the output impedance of one device matches the input impedance of the other. However, here we do not want to transfer power but transfer voltage. To do this requires that the output impedance be very small compared to the input impedance. With an arduino the input impedance is very high and if you supply it from an output impedance of 10K then you get virtually perfect voltage transfer.

The point about an impedance is that in most cases the value is frequency dependent so when quoting an impedance you should also specify the frequency where that impedance applies.