Go Down

Topic: Logic 1 reads 4V ? (Read 1 time) previous topic - next topic

Watcher

Dec 18, 2016, 10:16 am Last Edit: Dec 18, 2016, 10:17 am by Watcher
Consider this diagram :



When the PCF8574 outputs 1s, the voltage at its output reads 4V which then leads to about 0.9-1V at the output of the inverter (74HC04). This doesn't affect the operation of the darligton driver and the relays which operate as expected.

I only noticed this when connected some LEDs on OUT0-OUT5. The leds  dimly lit even when the relays are off (logic 0 at the output of the hex inverter).

I know this is pretty basic but I am puzzled why this is happening!



stowite

#1
Dec 18, 2016, 10:40 am Last Edit: Dec 18, 2016, 10:41 am by stowite
Post withdrawn.

sterretje

When this happens, what does your Vcc read.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Zapro

The pins on the PCF8574 can only source 100 µA.



// Per.

Watcher

Quote
When this happens, what does your Vcc read.
Vcc is always 4.978V supplied from a 7805 regulator or from USB.

Watcher

Quote
The pins on the PCF8574 can only source 100 µA.
Correct. Thats why there are pullup resistors in the circuit. (10K)

outsider

OUT0 on the inverter or the ULN2803?

outsider

Check to see if there's a voltage difference between the ULN2803's ground and other ground points.

Southpark

#8
Dec 18, 2016, 03:07 pm Last Edit: Dec 18, 2016, 06:16 pm by Southpark
Have you got decoupling capacitors close to your supply pins of ic's?

And are your ic's etc grounds all connected to the same 'gnd'?

Also... if the pcf8574 is configured for 'outputs'..... then external pullup resistors aren't required, right?

dlloyd

P6 and P7 on the PCF8574T are net named as +LED1 and +LED2. The circuit for these LEDs isn't shown, but it implies that you're trying to source LED current when you should be sinking LED current instead. Also, the LED current limiting resistors (not shown) would need to limit the current to within 10mA.

The required pullup resistors for SDA, SCL and INT are not shown. What is their value?

The PCF8574T has quasi-bidirectional I/Os. Being non totem pole type, the outputs don't yield solid voltage levels.

Quote
When the PCF8574 outputs 1s, the voltage at its output reads 4V
Perhaps your 10K pullups could be a bit stronger (i.e. 3.3K - 4.7K).

ricky101

What is the purpose of the 74HC04  inverter ?

Typically your indicator leds would be on the ULN2803As outputs...


Southpark

#11
Dec 18, 2016, 06:18 pm Last Edit: Dec 18, 2016, 06:27 pm by Southpark
yep..... dlloyd is right. P6 and P7 pins, when configured for 'output' (and for the purpose of driving LEDs), will require resistors in series with the LEDs, and the LEDs will light up when P6 and P7 are commanded to go 'low' (which means sinking current). The pcf8574 will struggle to source current to the LEDs.

So, in this particular situation, the way to 'drive' the LEDs is to sink current when you want the LED to light up. This means, the positive terminal of the LED will be connected to Vcc, and the remaining LED terminal connected to a resistor, and the other end of the resistor will be connected to the output pin of the pcf8574.

dlloyd

#12
Dec 18, 2016, 06:44 pm Last Edit: Dec 18, 2016, 06:44 pm by dlloyd
Starting to think that this push-pull I/O expander would have been a better fit, possibly no need for 74HC04.

Watcher

Thanks for all the responses!

Quote
Check to see if there's a voltage difference between the ULN2803's ground and other ground points.
No difference. All is soldered on a PCB with solid ground.


Quote
Have you got decoupling capacitors close to your supply pins of ic's?

And are your ic's etc grounds all connected to the same 'gnd'?

Also... if the pcf8574 is configured for 'outputs'..... then external pullup resistors aren't required, right?
Yes I have decoupling caps. Eventhough the problem appears under steady state conditions and caps would affect it much.

Yes all grounds are connected together.

Pullup resistors are there since the PCF has a very low current source capability.








Watcher

Quote
P6 and P7 on the PCF8574T are net named as +LED1 and +LED2. The circuit for these LEDs isn't shown, but it implies that you're trying to source LED current when you should be sinking LED current instead. Also, the LED current limiting resistors (not shown) would need to limit the current to within 10mA.
There are current limiting resistors for these leds eventhough they are not show here.

Quote
The required pullup resistors for SDA, SCL and INT are not shown. What is their value?
4.7k

Quote
Typically your indicator leds would be on the ULN2803As outputs...
Not necessarily. Since according to datasheet the PCF can drive leds directly.


Quote
Perhaps your 10K pullups could be a bit stronger (i.e. 3.3K - 4.7K).
Now this does make sense! I had the same thought as well. In other words, since the PCF only has a very low current source capability (100uA), it is up to the external resistor to source the necessary current to 'establish' a proper logic 0 and 10K might be too high. I intend to try 4.7K but since these are SMD 1206 array resistors , I have ordered another set at 4.7k to try out.



Go Up