i2c->dali replies

English posts only please

Moderator: Guido Körber

Post Reply
PSUK
Posts: 2
Joined: Mon Jan 22, 2018 7:09 pm

i2c->dali replies

Post by PSUK »

I am prototyping a Dali controller on an Arduino M0 with LED-Warrior14-02MOD and LED-Warrior-11 power supply, using a level converter on the i2c bus for the 3.3v arm to 5v Codemercs hardware.

The M0 i2c can send broadcast commands to the 14-02MOD and flash the Dali light using i2c 1,255,5 to turn on and 1,255,0 to turn off, the DAli data bus is on channel 5 below.

Image

However if I send 1,2,153 QUERY_DEVICE_TYPE or any other command to receive data from a light, I do not see any data on the Dali bus, any ideas?

I'm using https://github.com/SorX14/dali_master as the base for the code.

Thanks
Last edited by PSUK on Wed Jan 24, 2018 11:43 pm, edited 1 time in total.
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: i2c->dali replies

Post by Guido Körber »

Is this definitely an LW14 you are using? If it is an LW09 it does not handle the commands >31.

Why do you use a level converter? Just pull ups to the 3.3 V of the Arduino are fine. LW14 is an I2C slave, which means it has just open drain outputs.

According to the address you are using you have mapped the LW14 to a new address and then pulled both address pins low?

The scope screenshot is obviously from a transaction that did work?
PSUK
Posts: 2
Joined: Mon Jan 22, 2018 7:09 pm

Re: i2c->dali replies

Post by PSUK »

Yes definitely an LW14.

I'm using a level converter as the LW14 module is powered by 5V from the Dali bus,

Thanks for the questions on the I2C, the I2C analyiser was set wrong so the address displayed incorrectly.
I have left to 2 address pins on the LW14 unconnected as they appear to be pulled high and the module is talking on 0x23, which would be the default in this state.

I used a different Dali module (Mikro-e) to test the bus and received a Dali reply, so I swapped the Dali bus wires to the module and it started working.
I realise there's no polarity on the module bus, so it must have been a bad connection.

Image

So now I can send a request to the light for QUERY_MAX_LEVEL and see an answer 254 on the Dali bus in the logic probe, but receive 9 (1001) in each byte via I2C.

This is valid reply with 1 byte received?

How do I retreive the actual value 254?
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: i2c->dali replies

Post by Guido Körber »

I hope the level converter you are using is galvanically isolated in this case. Otherwise you are connecting your Arduino and its power supply direkt to the DALI bus.

You are continually reading the status register, you have to read the command register to get the actual answer.
Post Reply