clerew5 | 4 Apr 2012 00:15
Picon
Favicon

I2C bus problem

I have a NSLU2 thst is being used to control a heating system. I have brought out the i2c bus (the one that
drives the clock chip) just like the wiki pages say, and amongst the various devices on that bus there are
some Texas PCF8575 I/O Expander chips, for listening to push buttons, lighting leds and, in particular,
for operating relays that will turn boilers off and on.

Now the doco for the PCF8575 quite definitely states that upon power-on (specifically before the power
supply has risen to 1.2V) the chip resets itself so that all the outputs are High (i.e. +ve, provided you
provide a suitable pullup-resistor). And I have arranged one of those outputs so that when it is high it
inhibits all those relays, so no boilers come on until the system has booted and the control program has
started. The doco says clearly that after reseting these outputs to high they remain in that state until
the i2c bus dictates otherwise.

Nevertheless, the relays are coming on as soon as power is plugged in, before the slug even begins its boot
process. So what is happening? I cannot see how the i2c bus stuff in Slogos can have awoken that early and, in
any case, it does not even know the bus address of these devices. So can it be the manner in which the power
comes on? Note that I have bypassed the 'on' button (again according to the wiki), so the slug is on so long as
its power supply is plugged it (and plugging it in starts the boot process).

Helpful suggestions welcomed.

------------------------------------

Ingo Flaschberger | 4 Apr 2012 00:35
Picon

Re: I2C bus problem

Hi,

switch the relais-power-supply "on" via one of the leds.
(I had the problems that a serial to 1wire converter gets "confused" by 
serial boot messages, so I switch it on after bootup via a led).

bye,
    Ingo

Am 04.04.2012 00:15, schrieb clerew5:
> I have a NSLU2 thst is being used to control a heating system. I have brought out the i2c bus (the one that
drives the clock chip) just like the wiki pages say, and amongst the various devices on that bus there are
some Texas PCF8575 I/O Expander chips, for listening to push buttons, lighting leds and, in particular,
for operating relays that will turn boilers off and on.
>
> Now the doco for the PCF8575 quite definitely states that upon power-on (specifically before the power
supply has risen to 1.2V) the chip resets itself so that all the outputs are High (i.e. +ve, provided you
provide a suitable pullup-resistor). And I have arranged one of those outputs so that when it is high it
inhibits all those relays, so no boilers come on until the system has booted and the control program has
started. The doco says clearly that after reseting these outputs to high they remain in that state until
the i2c bus dictates otherwise.
>
> Nevertheless, the relays are coming on as soon as power is plugged in, before the slug even begins its boot
process. So what is happening? I cannot see how the i2c bus stuff in Slogos can have awoken that early and, in
any case, it does not even know the bus address of these devices. So can it be the manner in which the power
comes on? Note that I have bypassed the 'on' button (again according to the wiki), so the slug is on so long as
its power supply is plugged it (and plugging it in starts the boot process).
>
> Helpful suggestions welcomed.
>
(Continue reading)

clerew5 | 4 Apr 2012 13:08
Picon
Favicon

Re: I2C bus problem


--- In nslu2-linux@..., "clerew5" <clerew5 <at> ...> wrote:
>
Replying to my own message:

> Now the doco for the PCF8575 quite definitely states that upon power-on (specifically before the power
supply has risen to 1.2V) the chip resets itself so that all the outputs are High (i.e. +ve, provided you
provide a suitable pullup-resistor). And I have arranged one of those outputs so that when it is high it
inhibits all those relays, so no boilers come on until the system has booted and the control program has
started. The doco says clearly that after reseting these outputs to high they remain in that state until
the i2c bus dictates otherwise.
> 
> Nevertheless, the relays are coming on as soon as power is plugged in, before the slug even begins its boot
process. So what is happening? I cannot see how the i2c bus stuff in Slogos can have awoken that early and, in
any case, it does not even know the bus address of these devices. So can it be the manner in which the power
comes on? Note that I have bypassed the 'on' button (again according to the wiki), so the slug is on so long as
its power supply is plugged it (and plugging it in starts the boot process).

Nothing like composing a long message to this list to make you work out the problem for yourself :-( .

Actually, the PCF8575 was working as advertised, but the pull-up resistor was not man enough to silence the
relays (though it actually did reduce the voltage applied to them). A smaller resistor should fix it.

------------------------------------


Gmane