Pages: 1 2 [3] 4   Go Down
Author Topic: analog input alters voltage... doesn't read properly  (Read 4088 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 56
Posts: 2182
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

UK
Offline Offline
Faraday Member
**
Karma: 47
Posts: 3515
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh no it doesn't smiley

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


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.
Logged

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

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

Quote
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.

Logged

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

Quote
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.

Quote
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.

Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24308
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
anything you disagree with, then take up a new hobby.
smiley-yell
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

UK
Offline Offline
Faraday Member
**
Karma: 47
Posts: 3515
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


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


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Quote
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: https://www.sparkfun.com/products/9191
-These are running at 3.3v- but am I understanding now that they could pull 3.5 somehow?


Logged

Offline Offline
Edison Member
*
Karma: 56
Posts: 2182
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Yes the LEDS are blue- I am using this: https://www.sparkfun.com/products/9191
-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 on when its corresponding Arduino pin gets a digitalWrite LOW.]
« Last Edit: May 01, 2013, 06:31:01 pm by Runaway Pancake » Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

UK
Offline Offline
Faraday Member
**
Karma: 47
Posts: 3515
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

Quote
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

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.

Quote
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?

Quote
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.
Logged

Offline Offline
Edison Member
*
Karma: 56
Posts: 2182
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Absurd.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

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

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.
Logged

Offline Offline
Edison Member
*
Karma: 56
Posts: 2182
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley



I think i understand why a common resistor doesn't work now too:
http://www.edaboard.com/thread146902.html

http://arduino.cc/forum/index.php/topic,17251.0.html
« Last Edit: May 02, 2013, 07:32:09 pm by pcguru000 » Logged

Offline Offline
Edison Member
*
Karma: 56
Posts: 2182
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


« Last Edit: May 02, 2013, 07:41:00 pm by Runaway Pancake » Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Pages: 1 2 [3] 4   Go Up
Jump to: