3

I have following setup (see also schematic in the end)

Arduino Nano is connected via I²C to the PCF8575C (link) IO Expander. Both, SCL and SDA have 10kOhm pull-ups to 5V. The Expander pins are connected to a MOSFET-driver that turns on/off 12V LED stripes. The Expanders Bus address is set via Expanders A0-A2 pins to 0 (0x20). The MOSFET driver pins have to be pulled to logic 1 (above 2.2V) in order to turn on the stripe.

Currently Arduino runs an blink example, that turns all Expander IO pins on/off every second (using Arduino Wire Library), but the MOSFET-driver does not turn on/off any Stripe.

I can manually turn on Stripes by connecting MOSFET-driver pins to Arduinos 5V (or 3.3V)

The power supply to the IO Expander is O.K.

By measuring the resistance between GND and IO pins of the Expander, I can see that it alternates every second (so I²C communication to the Expander works also)

Curious thing: While measuring this resistance (holding the multimeter test leads) to GND and to the IO pin of Expander, the MOSFET-driver turns the Stripes on and off! When I take the test leads away it stops working! Magic?!

What am I missing? Do the output pins of the PCF8575C need some extra pullup/pulldown resistors or something else?

Thank you in advance!

Schematics: Schematics

3
  • 1
    What does the datasheet for the chip tell you? (hint: table on page 3...)
    – Majenko
    Nov 27, 2016 at 11:48
  • @Majenko oh, I see – I need for each output a 1kOhm pullup (to 5V), right? Nov 27, 2016 at 12:08
  • You need a pullup - the actual value depends on your application. 10KΩ is probably better than 1KΩ since it will reduce current wastage.
    – Majenko
    Nov 27, 2016 at 12:09

2 Answers 2

2

Yes, according to the datasheet (which should always be your first port of call for any chip) the outputs are Open Drain. That means you require a pullup resistor, exactly as if the outputs were simple buttons.

5
  • I need a pullup resistor? So one and not 15 (for each output)? Does that mean, I can use single common resistor for all outputs? Nov 27, 2016 at 12:31
  • 1
    No, one pullup resistor per pin you use as an output.
    – Majenko
    Nov 27, 2016 at 12:31
  • okay, thank you, I'll test that today! But anyway, how can this "mysterious" behavior with the Multimeter be explained? Nov 27, 2016 at 12:37
  • 2
    When you measure resistance you are applying a voltage. That voltage is acting like a pullup resistor.
    – Majenko
    Nov 27, 2016 at 12:38
  • Adding of missing pullup resistors to the outputs did the trick. Thank you! Nov 27, 2016 at 18:29
0

Think of the oped drain output (or open collector) as a pin that connects to ground when the device is on. If you connect the anode of an LED to plus and connect the kathode to the open drain pin, then you do not need a pull-up resistor (you may need a current limiting resistor though)

The test leads of the Ohmmeter produce a current to masure resistance, it also provides a current path to ground if the that's where you placed one of the leads. This would explain the Magic

More here about open collector outputs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.