CLICK HERE FOR INDEX PAGE

 USING ANALOGUE INPUT - POTENTIOMETER/VARIABLE RESISTOR

V. Ryan 2010

 

A potentiometer is another analogue device, that can be used as an input to a microcontroller circuit . A potentiometer’s resistance varies, being determined by turning a long handle. A 100k potentiometer, will have a range of resistance, from 0 ohms to 100 kilo ohms.

The animation below, shows a potentiometer handle being turned to increase and reduce resistance. The potentiometer can have hundreds of resistance values, depending on the resistance level.
 
Using Circuit Wizard software, the resistance value of a potentiometer can be altered.

The animations starts with a 4.67% resistance level and reaches a resistance level of 28.33%. It can go all the way up to 100% resistance, preventing current flow, in a circuit.

The resistance is altered by using the computer’s mouse, to turn the potentiometer’s dial.
 
 
 
The circuit below, shows a potentiometer being used as an input device, connected to input A/D 1. When the resistance of the potentiometer rises to a particular level (approximately to 27% resistance), the LED illuminates and the solenoid energises.

Diagram ‘C’ shows the complete circuit and the resistance value of the potentiometer, analogue sensor, as the LED illuminates.
(Circuit produced using Circuit Wizard software)
 
The 3D circuit (below) is a GENIE E18 PIC microcontroller circuit, similar to the one above. The potentiometer is the only input. When the handle is turned either clockwise or anticlockwise, its resistance varies immensely. This means that a potentiometer can have a large range of settings, making it ideal as an analogue sensor.
PROGRAMMING - ANALOGUE INPUT
 
Circuit Wizard software ensures that programming an analogue input is easy and straightforward. The flow chart below, has been constructed to control the previous GENIE E18 microcontroller circuit (above).

The potentiometer analogue input, is connected to A/D1. This input is continually monitored by the GENIE E18 (see Analogue box of the flow chart). When it’s resistance falls outside a range (10 - 68), the microcontroller outputs current at outputs Q0 and Q7. This means that the LED illuminates and the solenoid energises.
 
 
 
CLICK HERE FOR PIC-MICROCONTROLLER INDEX PAGE
 
 
 
Google
 
Web www.technologystudent.com