Class PCF8591

All Implemented Interfaces:
DeviceInterface, AnalogInputDeviceFactoryInterface, AnalogOutputDeviceFactoryInterface, DeviceFactoryInterface, AutoCloseable

public class PCF8591
extends AbstractDeviceFactory
implements AnalogInputDeviceFactoryInterface, AnalogOutputDeviceFactoryInterface, DeviceInterface

Analog to Digital Converter. 4 analog in / 1 analog out.

Datasheet: http://www.nxp.com/documents/data_sheet/PCF8591.pdf.

Note the raspoid driver states there is a known bug when reading digital values from PCF8591 if analog output is disabled.

Instructions:
The jumpers control whether analog input channels of the IC are connected to the analog sources:

  • Jumper P4 for AIN1: The temperature sensed by the R6 thermister is provided to the ADC.
  • Jumper P5 to AIN0: The R7 photocell voltage (resistance drop) is provided to the DAC.
  • Jumper P6 to AIN3: The single turn 10K ohm trimpot voltage (resistance drop ? brighter light, lower resistance).

From my experiments, the inputs / jumpers are configured as follows:

  • AIN0: trimpot (P6)
  • AIN1: LDR (P5)
  • AIN2: ?temp? (P4)
  • AIN3: AIN3

Removing a jumper allows an input channel to be fed from one of the external pins, labelled accordingly.