0
\$\begingroup\$

I am trying to connect the following components to an AVR ATMega2561:

I have already managed to connect the 1-Wire interface, but I am now wondering if I can connect the light sensor as a slave through the 1-Wire interface, or do I need to use I2C for both the interface and the sensor?

Here's an image of the sensor's symbol without going too deep into the documentation:

Is there a component I am missing that would let me connect it using the 1-Wire interface? Or do these two components (1-Wire Master interface and the sensor) have to be connected independently, both using I2C (SCL, SDA)?

I apologize if this is a pretty basic question, but I've been searching online for quite some time and I couldn't find anything. I also looked for other light sensors with 1-Wire but I couldn't find any - some temperature or humidity sensors can use 1-Wire, but I didn't find any ambient light sensors that do.

\$\endgroup\$
1
  • \$\begingroup\$ Search for "1-Wire-to-I2C Master Bridge". There are standard products that do exactly what you want, or you could program a small (6-pin or 8-pin) MCU to do the same thing. \$\endgroup\$
    – Dave Tweed
    Commented Jul 24, 2021 at 11:36

1 Answer 1

2
\$\begingroup\$

You can't use DS2484 this way. As per it's datasheet general description section:

The DS2484 is an I2C-to-1-WireM bridge device that interfaces directly to standard (100kHz max) or fast (400kHz max) I2C masters to perform protocol conversion between the I2C master and any downstream 1-Wire slave devices

And there is a schematic below:

DS2484 schematic

It works the other way. You interface it with I2C from MCU (the master) and it allows to communication with 1-Wire slave devices. Your APDS-9250 are I2C slave device just as the DS2484. Most MCUs, including ATMega2561 have I2C master interface. You can use it to directly attach the APDS-9250 to your I2C interface.

If you still need to use DS2484 (no for the APDS-9250), you can attach it on the same I2C bus. But make sure that slave addresses will be different. Other way it to implement either 1-Wire or 2nd I2C interface in software.

\$\endgroup\$

Your Answer

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

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