1
\$\begingroup\$

I need a help from someone who knows DALI standard well and has experience on it and knows DALI control gears' structure.

I make a DALI related application and aim to detect if the connected lamp is broken. To do so, I send following commands to the DALI control gear (slave)

0x92 Check if there is a lamp failure 
0x93 Check if the lamp is operating 
0x9B Check if the slave is in power failure mode 

before it, I disconnect the lamp unit, then send the commands above, however, the slave unit does not report any failure. I use couple different DALI unit of Tridonic. I wonder why removing a lamp source do not generate a failure report?

Could you please explain the logic how the DALI control gears detect the broken lamps (e.g. in what cases the DALI unit generates response to 0x92, 0x93, 0x9B)?

What command is the best to detect the broken lamps?

EDIT: I send 144 query message, its definition on the standard:

enter image description here

As a reply, I get this signal at the oscilloscope: enter image description here

means:

start bit(1) |  reply (8)          | stop bits(2)
     1       |  0 0 0 1 0 1 0 0    | 1 1 

means:

  • 0: the ballast is working fine
  • 0: no lamp failure is detected (if there is no lamp unit, why it is not a failure? and what is the description of the failure?)
  • 0: arc power is off?
  • 1: limit error -- (I send 0xFEA0 which is an arc power setting, I could not understand why it is 1)
  • 0: no fading is ongoing
  • 1: reset state is present
  • 0: it has short address
  • 0: no power failure ( it received RESET command and arc power control command)

the timing is a little bit bad but I have an ad-hoc method to read it successfully anyway. I get the same reply if the lamp unit exist or if I remove the lamp unit on the run-time.

I wonder why DALI do not generate a failure if the lamp unit does not exist (or removed on the run-time)? What cases are defined as failure? I wanted to test that I can detect the lamp failures (without breaking my lamp unit:), so that I am disconnecting the lamp unit. Is it a wrong thinking? If it is so, how should I have tested it so that I can get the lamp failure report from the DALI slave?

What command (or command sequence) is the most reliable way to detect a broken LED lamp (by querying from DALI LED control gear)?

I feel like I cause to take one's time to get a reply. I would be happily give 100 bounty for a satisfactory answer to show my gratitude.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I've added the DALI tag and created the wiki entry for it, pending acceptance by the mods. \$\endgroup\$
    – Martin
    Jul 2, 2013 at 14:00

2 Answers 2

3
+100
\$\begingroup\$

Adding as a seperate answer because the new question is different from the original:

Your Manchester decoding is correct but the bit order is b8-b7 etc to b0 so you have the bit decoding backwards. The set bits are b2 = arc power ON and b4 = Fade is running. These make sense as you have sent broadcast DAPC to level 0xA0 and have set a long fade time (5.6 seconds.

There are multiple errors in your command listing

  • msg 5 0xA370 would store 0x70 in DTR, presume you mean 0xA307
  • msg 8 0x072E stores DTR as fade time in gear with short address 3. DTR 7 means fade time is 5.6 seconds. If you want 16s, DTR should be 10 = 0x0A.
  • msg 3 & 4 & 10 Intialise and Terminate are only needed for the programming the short address commands (the randomise and binary search), not for setting configuration values like fade time and group addresses.
  • msg 12 queries status of gear at short address 3.

I'd get rid of the extra messages, have one gear on the bus, use broadcast messages and command 146 so you don't even have to interpret bits, it's either responding or not. Frankly, the number of errors made in your amended question doesn't give me confidence in your code. However, since the gear is reporting to be on, a missing lamp should give you a lamp fail. It doesn't matter when the lamp was removed. There are many electronics causes for lamp fail to be reported, depending on the lamp technology. For fluorescent lamps it is not just current from one end to the other, it can be broken heater wires at one end or failure to start up after a defined strike period, or some other reason found when monitoring the currents and voltages of the tube.

Edit: now that the question is specifically about LEDs, IEC6236-207 is applicable.

Command 240 Query Features tells you if the gear supports such things as open circuit detection, load decrease detection, thermal shut down, current protection etc. If your gear tells you it doesn't detect open circuit or detection of load decrease (bits 1 and 2) then you are not going to get lamp fail detection from this gear. But if it does, you could determine which type of lamp failure had occurred with Command 251, Query Failure Status which responds with bit 1 for open circuit and bit 2 for load decrease.

Note that commands above 236 are Application Exended Query Commands which mean they need preceeding by Command 272 Enable Device Type with data 6 (for LEDs).

The response to Command 146 Query Lamp failure, and bit 1 in the response to Command 144 Query Status are the result of an OR operation on the bits 0 to 4 in the Failure Status reported in Command 241 Query Failure Status.

In summary, I think this particular gear does not detect lamp failure as an open circuit condition, and it probably doesn't detect lamp failure as other conditions either; you're query is correct but just not supported by the gear.

\$\endgroup\$
7
  • \$\begingroup\$ Sorry that I wanted to write msg5:0xA307 and msg12:0x0790. thanks a lot for the other comments and information. I only use LED lamps. I test it with this lamp luxoworks.com/en/database/zumtobel/60812652 and its control gear. The control gear is connected to an external part via a cable looks like a phone socket. I will try it with DC MAXI JOLLY US DALI control gear. \$\endgroup\$
    – sven
    Jul 2, 2013 at 17:20
  • \$\begingroup\$ would you have a different method suggestion (rather than removing the lamp unit) to test if DALI control gear produce the fail report? \$\endgroup\$
    – sven
    Jul 2, 2013 at 17:22
  • \$\begingroup\$ I connected Zumbotel's 60813907 (4x2, 3W LED) lamp to DC MAXI JOLLY USB DALI gear. it generates 00101000 with lamp attached, 00100000 without lamp. It still does not generate 1 for the bit1 (lamp failure) \$\endgroup\$
    – sven
    Jul 2, 2013 at 18:04
  • 2
    \$\begingroup\$ Some LED drivers don't detect lamp failure. You need to check with IEC62386-207. Under command 146 Query Lamp Failure it says "“No” is no guarantee that no lamps have failed." So it doesn't look possible with that driver. \$\endgroup\$
    – Martin
    Jul 2, 2013 at 18:21
  • 1
    \$\begingroup\$ I've edited this answer to be more complete, but I don't think you are doing anything wrong. Command 144 Query Status is fine, and removing the lamp to simulate failure is fine. \$\endgroup\$
    – Martin
    Jul 3, 2013 at 8:42
2
\$\begingroup\$

First check your physical layer setup before attempting to get the right query. Check that you are using an appropriate power supply (DALI requires a 11.5V to 20.5V d.c. power supply current limited to less than 250mA) which connects to your control device and the control gear (ballast).

Then send queries which you know will always get a response, such as 144 Query Status, or 153 Query Device Type. Check that your forward frame meets the timing requirements such as pulse width, start bit, stop bits, Manchester encoding and that your transmitter circuit is capable of pulling the power supply down to 4.5V at least during the low pulses.

When all this works, you are ready to try Command 146 Query Lamp Failure. If the gear has detected a failed or missing lamp, you should get a Yes response of 0xFF. In DALI, the No response is no response, the line stays in the high idle state. Bear in mind lamp failure can usually only be detected when the gear is driving the lamp to the on state, i.e it is looking for a lack of current when there should be current. So use Direct Arc Power with value 254 to set the lamp on full before Command 146 Query Lamp Failure.

It is unusual to state DALI commands as one hex byte. which makes me think you might be sending an 8 bit rather than 16 bit frame (bits counted before Manchester encoding). 8 bit frames are backwards frames, from the gear to the control device, produced in response to a query only. So make sure your first byte in the 16 bit forward frame is the address, start by using the broadcast address with only one gear (ballast) connected. If you have several gear connected, you need to either be able to handle collisions in the responses (which is normal and expected part of the way DALI works) or have software to set up the short addresses, which is quite a complex process involving randomisation and binary search.

  • 0x92 = 146 Query Lamp Failure - this is the one you want.
  • 0x93 = 147 Query Lamp Power On - tell you if the lamp is currently on (ie the gear is driving the lamp to the on state). However, the lamp might have failed.
  • 0x9B = 155 Query Power Failure - tells you if the gear has just been powered on and has not yet recieved any commands which change its level from the default power on level.
\$\endgroup\$
2
  • \$\begingroup\$ Thanks a lot Martin, I read your answer some time ago. Sorry that I have not responded before, I wanted to review my work again to see if I would have a further question. It is very precious for me to find someone who knows DALI :) On my experiment, I have only one slave and supply the DALI bus by 12V. I assign the short address and able to send commands and get reply from the slave (I noticed that the slave do not reply the queries if the command is broadcasted). I am reviewing my work again then test it in a hour or so, then let you know how it went. I appreciate a lot your help. \$\endgroup\$
    – sven
    Jul 2, 2013 at 14:31
  • 1
    \$\begingroup\$ Gear must respond to broadcast queries, it is mandatory, irrespective of whether or not they have a short address, and whether or not that would create a collision in the reply. Of course, their response might be No. You should have no problems with Tridonic gear in this respect. \$\endgroup\$
    – Martin
    Jul 2, 2013 at 15:40

Your Answer

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

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