Problem with two I2C devices
i help/advice on issue i'm having.
i'm building solar system control/monitoring device based on atmega328p (moteino actually).
it has rf transceiver, oled (i2c) display , th02 temperature/humidity sensor (also i2c device). other connectors monitoring agm battery, inverter voltage , controlling relay switches lights on/off (when command send via rf).
i've been making great progress, until hit wall. there seems kind of conflict between oled , th02 happens when invoke menu system via key-press. i'm not sure if it's hardware or software issue...
as long don't press buttons, both oled , th02 work great, i'm getting temp/humidity readings, displayed on oled, rfm69 receiver works, , relays triggered.
but when press button, menu starts drawing (about half screen) , both oled , th02 lock up. weird temperature/humidity readings, , resetting avr doesn't fix (it reset oled) until cycle power.
i removed calls th02 sketch, still happens.
here's video shows how happens.
only when physically remove th02 sensor, menu system works , shows on oled screen.
i first suspected ram issues, there's plenty available (almost 1k)... try load lot progmem, maybe corrupts somehow? program little on 29k...
i'm attaching schematic , code. code still work in progress, , it's pretty large...
if wants take stub @ this, i'd appreciate it. open source of course, i'll post details on blog when working...
i'm building solar system control/monitoring device based on atmega328p (moteino actually).
it has rf transceiver, oled (i2c) display , th02 temperature/humidity sensor (also i2c device). other connectors monitoring agm battery, inverter voltage , controlling relay switches lights on/off (when command send via rf).
i've been making great progress, until hit wall. there seems kind of conflict between oled , th02 happens when invoke menu system via key-press. i'm not sure if it's hardware or software issue...
as long don't press buttons, both oled , th02 work great, i'm getting temp/humidity readings, displayed on oled, rfm69 receiver works, , relays triggered.
but when press button, menu starts drawing (about half screen) , both oled , th02 lock up. weird temperature/humidity readings, , resetting avr doesn't fix (it reset oled) until cycle power.
i removed calls th02 sketch, still happens.
here's video shows how happens.
only when physically remove th02 sensor, menu system works , shows on oled screen.
i first suspected ram issues, there's plenty available (almost 1k)... try load lot progmem, maybe corrupts somehow? program little on 29k...
i'm attaching schematic , code. code still work in progress, , it's pretty large...
if wants take stub @ this, i'd appreciate it. open source of course, i'll post details on blog when working...
what combined pullup i2c bus ?
perhaps sensor has pullup resistors on board 2k2 or so.
i have links products use.
is moteino 3.3v board ?
are sure every device on i2c uses 3.3v ?
the tho2 3.3v chip, if have pullup resistor scl or sda 5v somewhere, go wrong.
the flat ribbon cable worst cable i2c bus. if split wires, sda , scl signals happier.
you run multi speed i2c scanner : http://forum.arduino.cc/index.php?topic=197360.0
but have sure first th02 not 5v through i2c bus.
perhaps sensor has pullup resistors on board 2k2 or so.
i have links products use.
is moteino 3.3v board ?
are sure every device on i2c uses 3.3v ?
the tho2 3.3v chip, if have pullup resistor scl or sda 5v somewhere, go wrong.
the flat ribbon cable worst cable i2c bus. if split wires, sda , scl signals happier.
you run multi speed i2c scanner : http://forum.arduino.cc/index.php?topic=197360.0
but have sure first th02 not 5v through i2c bus.
Arduino Forum > Using Arduino > Microcontrollers > Problem with two I2C devices
arduino
Comments
Post a Comment