Searching \ for '[EE] Quick question on Arduino' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=quick+question+arduino
Search entire site for: 'Quick question on Arduino'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Quick question on Arduino'
2010\05\25@152412 by solarwind

picon face
Hey all, I just purchased an Arduino Duemilanove to experiment with. I
also have a standard 3 pin 10K potentiometer. I currently don't have
any wires where I live and only have these two items. Can I plug the
10K potentiometer directly into the anlog pin row of the Arduino? Can
I set one pin as high output, the opposite pin as low output, and
treat the middle one as an analog input?

2010\05\25@154339 by Bob Ammerman

flavicon
face
Solarwind asked:

> Hey all, I just purchased an Arduino Duemilanove to experiment with. I
> also have a standard 3 pin 10K potentiometer. I currently don't have
> any wires where I live and only have these two items. Can I plug the
> 10K potentiometer directly into the anlog pin row of the Arduino? Can
> I set one pin as high output, the opposite pin as low output, and
> treat the middle one as an analog input?

If:

1: The pin spacing is right
2: The pins are the right size
3: The Arduino's output impedance is low enough to drive the 10K pot (it
probably is)
4: The Arduino's input impedance is high enough to not load the 10K pot (it
probably is)

Then it should probably work. It is unlikely it would damage anything.

-- Bob Ammerman
RAm Systems

2010\05\25@155128 by Oli Glaser

flavicon
face

----- Original Message -----
From: "solarwind" <spam_OUTx.solarwind.xTakeThisOuTspamgmail.com>
To: "PICLIST" <.....piclistKILLspamspam@spam@mit.edu>
Sent: Tuesday, May 25, 2010 8:23 PM
Subject: [EE] Quick question on Arduino


> Hey all, I just purchased an Arduino Duemilanove to experiment with. I
> also have a standard 3 pin 10K potentiometer. I currently don't have
> any wires where I live and only have these two items. Can I plug the
> 10K potentiometer directly into the anlog pin row of the Arduino? Can
> I set one pin as high output, the opposite pin as low output, and
> treat the middle one as an analog input?

Never used an AtMega, but I don't see why not with a 10K pot, as it will
only draw 0.5mA from the pins at 5V (pins should be able to supply a fair
bit more than this) - If it's anything like a PIC you would set the
"high/low" pins as digital outputs then drive them accordingly, and use the
middle analog input pin to monitor voltage. I'd get hold of some wire as
soon as you can though (maybe you can pinch some from somewhere - old
equipment etc) and attach the relevant pot pins to Vdd and GND.


2010\05\25@160021 by Oli Glaser

flavicon
face
>4: The Arduino's input impedance is high enough to not load the 10K pot (it
>probably is)

Just saw this - it's possible the datasheet may *recommend* a lower
impedance for driving the analog input, so it might be worth checking to
make sure, but it's probably going to be around 10K max (PIC16F690 is to
give an example), so you should be okay. Probably best to just try it and
see how it performs, as Bob says it's unlikely to damage anything.


2010\05\25@160706 by RussellMc

face picon face
> Hey all, I just purchased an Arduino Duemilanove

<Shields up>

> to experiment with. I
> also have a standard 3 pin 10K potentiometer. I currently don't have
> any wires where I live and only have these two items. Can I plug the
> 10K potentiometer directly into the anlog pin row of the Arduino? Can
> I set one pin as high output, the opposite pin as low output, and
> treat the middle one as an analog input?

I'm not familiar with the hardware BUT what you suggest sound entirely
reasonable.

... time warp ...

Circuit here arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf
Guff here http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove

ADC0...5 = Port C 0 ...5
Looks good.

What did it cost?



                Russell

2010\05\25@163147 by Isaac Marino Bavaresco

flavicon
face
Em 25/5/2010 16:59, Oli Glaser escreveu:
>> 4: The Arduino's input impedance is high enough to not load the 10K pot (it
>> probably is)
>>    
> Just saw this - it's possible the datasheet may *recommend* a lower
> impedance for driving the analog input, so it might be worth checking to
> make sure, but it's probably going to be around 10K max (PIC16F690 is to
> give an example), so you should be okay. Probably best to just try it and
> see how it performs, as Bob says it's unlikely to damage anything.
>  


Don't forget that the input resistance will be a maximum of 2.5k ohm
when the wiper is at the center and zero ohm at the extremities (parabolic).

Regards,

Isaac

__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/

2010\05\25@170403 by Spehro Pefhany

picon face
At 03:59 PM 25/05/2010, you wrote:
> >4: The Arduino's input impedance is high enough to not load the 10K pot (it
> >probably is)
>
>Just saw this - it's possible the datasheet may *recommend* a lower
>impedance for driving the analog input, so it might be worth checking to
>make sure, but it's probably going to be around 10K max (PIC16F690 is to
>give an example), so you should be okay. Probably best to just try it and
>see how it performs, as Bob says it's unlikely to damage anything.

Data sheet for the ATMega48 says optimized for < 10K, and of course
the 0~2.5K looking into the wiper (or maybe 0.1~2.6K counting the
output drivers and contact resistance) is much less than 10K.

>Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com



2010\05\25@172843 by Michael Watterson

face picon face
Spehro Pefhany wrote:
>
> Data sheet for the ATMega48 says optimized for < 10K, and of course
> the 0~2.5K looking into the wiper (or maybe 0.1~2.6K counting the
> output drivers and contact resistance) is much less than 10K.
>
>
>  
Surely a max of 5K = 10K/2  ?
OK though


2010\05\25@173437 by Bob Blick

face
flavicon
face

On Tue, 25 May 2010 22:29:03 +0100, "Michael Watterson" said:
> >
> > Data sheet for the ATMega48 says optimized for < 10K, and of course
> > the 0~2.5K looking into the wiper (or maybe 0.1~2.6K counting the
> > output drivers and contact resistance) is much less than 10K.
> >
> >
> >  
> Surely a max of 5K = 10K/2  ?
> OK though

No, think of it as two 5k resistors in parallel. Check out Thevenin
equivalent if you are curious.

Cheerful regards,

Bob

--
http://www.fastmail.fm - Email service worth paying for. Try it for free

2010\05\25@174723 by Michael Watterson

face picon face
Bob Blick wrote:
{Quote hidden}

Duh! yes of course.

Too much sun today.

don't take any notice of me till there has been 24hrs not exceeding 18C

I was doing field tests today. Of Aerials. In a Field. It's about 6C to
10C hotter  than is usual.

2010\05\25@175008 by Spehro Pefhany

picon face
At 05:29 PM 25/05/2010, you wrote:
>Spehro Pefhany wrote:
> >
> > Data sheet for the ATMega48 says optimized for < 10K, and of course
> > the 0~2.5K looking into the wiper (or maybe 0.1~2.6K counting the
> > output drivers and contact resistance) is much less than 10K.
>
>Surely a max of 5K = 10K/2  ?
>OK though

No. Each end of the element is connected to a "stiff" voltage source
(tens of ohms source impedance, so let's say zero). Let's also ignore
the wiper contact resistance, so we have an ideal pot.

The resistance from the wiper to side CCW is alpha * 10K = R1 where
alpha is 0..1 depending on the pot angle.

The resistance to side CW is (1-alpha) * 10K = R2

The parallel (Thevenin equivalent) resistance of the two is R= R1*R2/(R1+R2)

= 10K * alpha * (1-alpha)  (a parabolic curve, as Isaac said)

if alpha = 1 or 0, then R = 0

We can see** that the maximum is at alpha = 0.5  and
we have R = 10K * 0.5^2 = 2.5K  (two 5K resistances in parallel)

** if you want to do it by the book, set the derivative = 0 to find
the maxima/minima and we get 1-2*alpha = 1 => alpha = 0.5.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com



2010\05\25@180543 by Michael Watterson

face picon face
Spehro Pefhany wrote:
>
> We can see** that the maximum is at alpha = 0.5  and
> we have R = 10K * 0.5^2 = 2.5K  (two 5K resistances in parallel)
>
> ** if you want to do it by the book, set the derivative = 0 to find
> the maxima/minima and we get 1-2*alpha = 1 => alpha = 0.5.
>  
/me goes to bed to sleep off the effects of too much outdoors :-)


2010\05\25@184211 by Oli Glaser

flavicon
face
Sorry, I seem to have started a "pot" debate :-) I wasn't suggesting by what
I said that the 10K pot would actually cause anything like 10K to be seen by
the pin, just that it was worth checking out the maximum recommended input
impedance (in case it was a lot lower than expected) Maybe should have been
a bit clearer though, could of been misleading. Amazing how seemingly simple
things like pots can cause confusion sometimes, easy to make a mistake when
quickly glancing at stuff - I'm always graphing stuff in microsoft math and
using spice in case my brain has gone to sleep, which it tends to do a lot
nowadays :-)


2010\05\25@202634 by Vitaliy

face
flavicon
face
solarwind wrote:
> Hey all, I just purchased an Arduino Duemilanove to experiment with. I
> also have a standard 3 pin 10K potentiometer. I currently don't have
> any wires where I live and only have these two items.

I was frequently out of components, but never out of wires and solder. Don't
you have an unused appliance you can scavenge the wires from? :)


> Can I plug the
> 10K potentiometer directly into the anlog pin row of the Arduino? Can
> I set one pin as high output, the opposite pin as low output, and
> treat the middle one as an analog input?

If the leads are wider than what the female pins are designed for, you may
actually cause some mechanical damage.

Vitaliy

2010\05\25@203628 by Spehro Pefhany

picon face
At 06:06 PM 5/25/2010, you wrote:
>Spehro Pefhany wrote:
> >
> > We can see** that the maximum is at alpha = 0.5  and
> > we have R = 10K * 0.5^2 = 2.5K  (two 5K resistances in parallel)
> >
> > ** if you want to do it by the book, set the derivative = 0 to find
> > the maxima/minima and we get 1-2*alpha = 1 => alpha = 0.5.
> >
>/me goes to bed to sleep off the effects of too much outdoors :-)

Hey, I made the calculus optional for a warm summer day. ;-)

>Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
EraseMEspeffspam_OUTspamTakeThisOuTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com



2010\05\26@000451 by RussellMc

face picon face
> Hey all, I just purchased an Arduino Duemilanove

<Shields up>

> to experiment with. I
> also have a standard 3 pin 10K potentiometer. I currently don't have
> any wires where I live and only have these two items. Can I plug the
> 10K potentiometer directly into the anlog pin row of the Arduino? Can
> I set one pin as high output, the opposite pin as low output, and
> treat the middle one as an analog input?

I'm not familiar with the hardware BUT what you suggest sound entirely
reasonable.

... time warp ...

Circuit here arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf
Guff here http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove

ADC0...5 = Port C 0 ...5
Looks good.

What did it cost?



                Russell

2010\05\26@050042 by solarwind

picon face
On Tue, May 25, 2010 at 4:06 PM, RussellMc <apptechnzspamspam_OUTgmail.com> wrote:
{Quote hidden}

Standard price, $30. Got it out of a store near university. They have
lots of parts for a reasonable price. Looks like they get everything
from Sparkfun.

I don't have wires because I'm not at home anymore. I should bring
over my development setup here though.

And the potentiometer physically fits into the female socket
perfectly. I was asking if it was safe to do so. This is the first
time I'm touching an AVR.

2010\05\26@052833 by William \Chops\ Westfield

face picon face

On May 26, 2010, at 2:00 AM, solarwind wrote:

> And the potentiometer physically fits into the female socket
> perfectly. I was asking if it was safe to do so. This is the first
> time I'm touching an AVR.

Should work fine.  You'll have to map the "analog" pins to equivalent  
pin numbers for use with pinMode() and digitalWrite(), but that's  
easily done (Analog 0 is 14, and so on.) (IF you stay within the  
arduino software framework...)

BillW

2010\05\26@074042 by Olin Lathrop

face picon face
Oli Glaser wrote:
> Just saw this - it's possible the datasheet may *recommend* a lower
> impedance for driving the analog input, so it might be worth checking
> to make sure, but it's probably going to be around 10K max (PIC16F690
> is to give an example), so you should be okay.

Keep in mind that the output impedence of a 10Kohm pot is 2.5Kohm max,
assuming the inputs are fixed voltages.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2010\05\26@074334 by Olin Lathrop

face picon face
Michael Watterson wrote:
> Surely a max of 5K = 10K/2  ?

Surely not.  At the center position, it looks like a divider with two 5Kohm
resistors.  Those are effectively in parallel for the purpose of computing
the impedence.  The result is therefore 5Kohm/2 = 2.5Kohm.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2010\05\26@075049 by RussellMc

face picon face
>  ...The result is therefore 5Kohm/2 = 2.5Kohm.


Only if you bypass the ground connection :-).



                           R

More... (looser matching)
- Last day of these posts
- In 2010 , 2011 only
- Today
- New search...