EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: PeterMadach on September 14, 2016, 01:59:49 pm
-
Hey Guys!
I've been having a bit of problem with a project of mine. I've been asked to design a control system for outdoor LED lamps. These lamps mostly have power supplies like this: link (http://www.osram.com/osram_com/products/led-technology/electronic-control-gears-for-led-modules-and-dimmers/outdoor-ecg-for-led-modules/constant-current-dimmable/optotronic597835/index.jsp). These have a DALI comm interface. I've made a prototype circuit using an arduino, and I've been able to dim up or down the LEDs, but I've not been able to read any data from the device. Does anyone have experience with power supplies like these, or DALI in general?
-
Do you have a DALI interface build for read and write like this one for instance?
http://www.st.com/content/st_com/en/products/evaluation-tools/solution-evaluation-tools/led-and-general-lighting-solution-eval-boards/steval-ilm001v1.html (http://www.st.com/content/st_com/en/products/evaluation-tools/solution-evaluation-tools/led-and-general-lighting-solution-eval-boards/steval-ilm001v1.html)
If you are building the control gear you should actually build a master interface. Then the DALI bus needs power so do the driver provide the actual power (voltage) or do you need a dali powersupply?
Then read up on the DALI specifications for your type of control gear (lamp driver) and the 103 (control devices), it has all the commands and return values you search for except for the manufacturers proprietary commands , those are kept secret.
https://webstore.iec.ch/searchform&q=IEC%2062386 (https://webstore.iec.ch/searchform&q=IEC%2062386)
-
I've built the DALI master circuit based on this application link (http://www.nxp.com/files/microcontrollers/doc/ref_manual/DRM004.pdf). I'm using a 12V power supply as the DALI bus voltage. As I've said, I've been able to control the output of the LEDs, using broadcast addressing, but I didn't get any answer to commands that are supposed to read info from the LED driver. Just to test the circuit itself, if I short the DALI bus wires, I get low signal in the input pin of my arduino, so I suppose its not a hardware problem.
-
Well a long time ago for me, so might be not absolute accurate.
How did you do the commissioning where each device gets a unique id from 1 to 63?
Then if you query the devices one by one by their id from 1 to 63 none of the devices respond?
If you have not commisioned the devices and gave them a unique number then you will not get a response.
If the devices choose a random id themselves it could be anything from 1..63 so you should check each one with a query command to see if you get a response.
I think it might be wise to buy a pc dali interface so from usb or rs232 to dali and try example code on that first. I do not know if Osram has software to commision the drivers available?
-
Ah yes you need to sent a special commisioning command and then do the next steps, the good news is that your control gear does NOT have to be able to do this, this is usually done by the installer with special software on a pc.
http://electronics.stackexchange.com/questions/75210/dali-how-commissioning-process-takes-place-in-dali-system (http://electronics.stackexchange.com/questions/75210/dali-how-commissioning-process-takes-place-in-dali-system)
For Osram take a look at:
https://dammedia.osram.info/media/binx/osram-dam-295337/725589.pdf (https://dammedia.osram.info/media/binx/osram-dam-295337/725589.pdf)
-
Thanks, I cover these and get back to you if I havy any questions :-+
-
Well I went through these links you sent, but I have to admit, I'm still in the dark a little bit. The answers on the first link are informative, but not very specific, I'm still trying to figure out what commands should send with my arduino based DALI master to do this commissioning process. As for the OSRAM link, i think they made that software specifically for their own controllers. Is there any documentation on this commissioning process on the command level? Do the ballasts remember their short adress after its assigned?
-
Yes the ballasts remember and keep their adress after commisioning, it is stored in non volatile memory.
So actually a control system does not have to perform the commisioning. It is to control the ballasts after commisioning. I would concentrate on those commands you need to sent , the generic commands are supported by all ballasts, and those should be your concern. The manufacturer specific commands are not but they are also not publicly available.
So to move forward you need someone that can commision your ballasts for you. Any professional light install company should be able to do this.
-
Thanks, good to know. Does reset (command 32) erase that address? Is 0 (zero) a valid short address?
-
OK, so I've been able to address a ballast (it has the short address 0), and it accepts direct and indirect commands for power leveles, and I can see it's working on the LEDs. But when I send a command, which should be answered, I got nothing back. In my growing paranoia, I checked the circuit yet again, it seems to work fine, if i short the DALI bus wires (no ballast connected of course), the input pin on my arduino also goes low, and if I connect an Amp meter to the bus (basically shorting it) I measure around 220-230 mAmps, which seems to be in range of what the standard uses (250mAmps max).
-
I will try to find some info for you but this might take some time since i am out of the country.
-
No worries mate, I'm really grateful for all the help you already gave me. One question you might be able to answer right away: do these ballasts have a default short address assigned to them out-of-the-box, per say 0, or is this commission process necessary every time with a new unit?
-
AFAIK a new ballast has no short address eg it will not respond to any individual query except only to broadcasts.
This site confirms that:
http://www.rayzig.com/manual/rayzig.html?DALIaddresssettingexplained.html (http://www.rayzig.com/manual/rayzig.html?DALIaddresssettingexplained.html)
-
Good, first of all not all commands are supported by all the devices. For each type of device a specification has been made to which commands they could and should answer.
Some commands are mandatory to be supported and some commands fall under the apllication extended configuration commands,
and then you should sent some more data first to force the ballast in this extended state.
So you can transmit power data, that is a good start.
Now some theory:
1) Check the forward frame. It should be 19 bits: 1 AAAA AAAC DDDD DDDD 00
the AAAA and AAA is the 7 bits address but A1 is 0 for short adress and A1..A3 is 100 for group adress for a broadcast A1..A7 are all 1's
2) So the last bit C is a special bit, when 0 that means it is a direct power level command, when 1 it means it is a different command like a query.
So in your query case it should be a 1
Then you also have some exceptions so called special commands but that is out of my knowledge zone.
3) In order to query the device you should know what type of device it is.
In your case it is probably a led module so should fall under the 201 with additions in the 207 spec.
4)If the answer to your query is boolean, and the asnwer is boolean true (yes) it will be all 1's that are sent back, if the answer is boolean false (no) there will be no answer all 0's
If the answer to your query is a bytevalue than that value will be transmitted.
So lets test your module and sent as a test the following query: 'query device type' command (153).
Sent it to your module if it has short address 0 as you think and it should answer 6 (specifying it is a led module):
1 0000 0001 1001 1001
the ballast will then sent a backward frame with value 6
1 0000 0110 00
If it does not than I think your ballast does not have a short adress.
Good luck.
-
So... If I can change the lamp power directly using the 0000 0000 address, and indirectly using the 0000 0001 address, it does have the short address 000 0000, right? Otherwise it wouldn't follow lamp power commands sent to those addresses. But it does, I can change the levels with those addresses, and with broadcast messages, and other addresses don't work, as the shouldn't. But I still don't have an answer if I send out commands that require an answer (I tried with what you have suggested, and some others ).
Is it a valid testing of the receive circuit if I short the bus wires? Thats basically what the ballast does when it answers, right?
-
Is it a valid testing of the receive circuit if I short the bus wires? Thats basically what the ballast does when it answers, right?
Yes that is correct AFAIK.
The applied DALI power supply is a current source of max. 250mA and it should withstand shorting.