10 years, 1 month ago.

circuit diagram

provide us the circuit diagram to interface potentiometer with emded board and program (i.e: taking analog input from potentiometer of 1 K , varies between 0-5V)

2 Answers

10 years, 1 month ago.

If possible, use 3v3 not 5V0 Across pointermeter,

otherwise, use a voltage divider to drop the 0 .. 5 Volt span to 0 .. 3.3 Volts,

with a 1K Pot. 17K to wiper, 33K to Gnd, Junction to MBED's Analogue In.

Ceri.

please provide us the circuit diagram

posted by veena attimarad 10 Apr 2014
10 years, 1 month ago.

ceri provided good answers, I'm simply generating pictures - and adding a little discussion.

/media/uploads/WiredHome/5v3divider.png

P2, R1, and R2 are what ceri described. The important factor is to keep the maximum voltage on the analog input at or below 3.3v. If the voltage goes above 3.3, it could damage the micro. When the wiper of P2 is at the top, you have a simple voltage divider of the 17k and the 33k where Vout = Vin * R2 / (R1 + R2) => 5 * 33 / (17 + 33) => 3.3v.

P1 and R3 do the same thing. Here it is 5 * 1000 / (523 + 1000) => 3.29v. The 0.01v difference is likely insignificant compared to the tolerance and linearity error of the potentiometer.

P3 shows the simplest solution. If the pot can be driven directly from the 3.3v supply which feeds the a/d, then you have no worry of over-voltage on the a/d pins.

Why choose one of these over the other? For most applications, the difference is insignificant. The series resistor R1 (17K) will limit the current flow that can get to the analog input. This is important if the 5v supply is not precise, or perhaps is an external 5v supply that could vary (so could be above 5v). On the other hand, the combination of P1 and R3 uses fewer parts, and P3 uses the fewest parts.