Go Down

Topic: Analog pin problems (Read 4334 times) previous topic - next topic

alkopop79

Since my last post I've been experimenting with different pull-down resistor and pot values. Unfortunately, whatever resistor I use the connections effect each other. I came to the conclusion that I have to break the connection between the pull-down and the analog pin the moment I connect a voltage source. Alas, I tested the concept on the breadboard and it works (I simply removed pull-downs from the connected analog pins). I wonder, is there a plug socket that breaks the existing connection between the pull-down while creating a new connection? Or should I add a transistor switch driven by the voltage source inserted?

GoForSmoke

When switching analog inputs quickly, SOP is to sample the new pin twice and ignore the first read.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

johnwasser


I wonder, is there a plug socket that breaks the existing connection between the pull-down while creating a new connection?


Yes.  Many mono and stereo phone jacks (like for headphones) have a switch which opens when you plug in a cable.  In normal use this disconnects the speaker(s) when you plug in headphones but can be used for your pull-down resistors.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

alkopop79


Grumpy_Mike

Quote
Unfortunately, whatever resistor I use the connections effect each other.

That is because the values you are using are too large.
If the impedance of anything fed into the analogue inputs is greater than 10K, there is not enough time to charge the sample capacitor before the sample is taken.
So can you lower your impedance?
Your solution of shorting it out will only result in you not getting the right value the first time you take the reading although you might miss this.

alkopop79

I've tried 1 ohm to 1 M reistors and some in between. No succes. What are you suggesting, Mike?

alkopop79


Your solution of shorting it out will only result in you not getting the right value the first time you take the reading although you might miss this.


I guess if I add a short delay, it would should be all right.

alkopop79

[quote author=Grumpy_Mike link=topic=72289.msg597190#msg597190 date=1321357387
That is because the values you are using are too large.
If the impedance of anything fed into the analogue inputs is greater than 10K, there is not enough time to charge the sample capacitor before the sample is taken.
So can you lower your impedance?
[/quote]


Sorry Mike but I'm still struggling with the idea of impedance. Can you give me an example? And what does that mean that the analog inputs have great impedance? What are the implications of these?

alkopop79

If the analog input has high impedance, what happens when you add a low and a high impedance source?

alkopop79

If an analog input has high impedance (whatever it means), does it mean it allows more current through than a low impedance input? Any help to shed some lights on this issue would be appreciated!

alkopop79

BTW, does it help if I set the internal pull-ups? Are they any better or reliable than the external ones?

Grumpy_Mike

Quote
Are they any better or reliable than the external ones?

No.

An impedance is like a series resistance to the voltage source. In your case the voltage source is a resistance so it means the value.

Quote
I guess if I add a short delay, it would should be all right.

No... the delay you need is between the switching of the multiplexer and the grabbing of the sample. This can only be acheaved by taking two readings of the same panel.

Quote
I've tried 1 ohm t

If you truly have then you have something else that is seriously wrong. Can you provide a schematic of what you have.



alkopop79



alkopop79

Grrrrrrrrrrrrr, direct link here:

http://tiny.cc/hwg2r

Go Up