TP-Link router turned into a DALI automated lighting controller

dali-control-in-tplink-router

The members of Shackspace continue to put up impressive hacks based around the tiny TP-Link routers. This time around [Timm] has shoehorned a DALI controller inside the router case. This is a protocol we don’t remember hearing about before. The Digital Addressable Lighting Interface is a control network for commercial lighting. That way people responsible for taking care of large buildings can shut off all the lights at night (to name just one use). The new room at Shackspace has this style of controllers in its lights.

The two brown wires coming into the router make up the data bus for the DALI system. It connects to the add-on PCB which uses an Atmel AT90PWM316 microcontroller. The chip is specifically designed for DALI networks which made the rest of the project quite easy. It talks to the lights, the router talks to it, bob’s your uncle, and you’ve got network controlled lighting. Get this in a big enough building and you can play some Tetris.

In case you were wondering. Yes, this project has already been added to their TP-Link firmware generator.

Comments

  1. Eirinn says:

    I wish I was able to do something like this. I’d probably resort to an Arduino with an Ethernet shield :/

  2. lwatcdr says:

    You can use this as an Ethernet shield if you want. You can get them with a USB port to interface anything you want to it.

  3. ulzii says:

    it is cool! please, where is openwrt’s codes

  4. Teemu Hakala says:

    I have just woken up and am eating breakfast. This project seems interesting and is somewhat close to what I’m working on.

    Interested, I looked at your schematics. I might need more coffee but my first impression is that the galvanic isolation achieved with optoisolators might not be that isolative at all. Seeing how the different grounds do indeed connect via resistors and that the DALI voltages are created non-isolatively. I took a look at uart2dali_mr3020_2.sch as it is newest of the lot.

    Galvanic isolation is something of an interest for me as my current big project, Ell-i system platform, uses Ethernet and PoE for communications and power. We are interested in interfacing other existing systems such as DALI and KNX.

    • Eirinn says:

      This is how that sounds to me :P

    • Farkanoid says:

      Hah, interestingly enough we’ve been tasked to create a DALI and DMX-enabled ballast for one of our clients yesterday, one of the prerequisites being a minimum of 2.5kV galvanic isolation between nodes

      • Teemu Hakala says:

        We use a flyback switch mode psu for powering the Ell-duino node from PoE. This maintains isolation nicely. At some time we are going to do a DMX and a DALI interface (open hardware) and we are going to need some more flybacks per node so that the interface part has its own floating supply for the few components it needs.

        Also I noticed I cannot have more than one url for the comments so I chose the Ell-i one instead of Helsinki Hacklab.

      • Whatnot says:

        It’s a 16v data line though…seems not too hard to isolate such a thing one would think.
        Although since it must support various brightnesses I guess a simple solid state relay won’t do and you need something fancier. But still.

        • Teemu Hakala says:

          DALI data lines are a two wire bus much like RS-485 or I2C or DMX. The isolation requirement stems from not wanting trouble when a DALI installation grows bigger than one fuse group. Also the comms-only nodes might be end user touchable so isolation is a safety issue as well. Ethernet by itself is isolated so this mod should not pose any real trouble even if it is not really isolated.

    • Timm says:

      Yes, you are right. The controller is not isolated. But this is the same interface which is shown in the datasheets. For prototyping I didn’t want to build my own bus interface with comparators.

      Typically an external power supply with 16V and 250mA is used. They are quite expensive. So I decided to build a (cheap) constant current driver on the pcb. I have a newer version with a constant current driver which can be switched off. So you can still use an isolated DALI controller with an external supply.

      • Teemu Hakala says:

        Ell-i project will have a open hw open source implementation of a isolated flyback design for all to reap. I’m not sure when this will be available but we aim to provide ourselves isolated communications to many different networks.

        At the moment we like controlling the smpsu switch element directly from mcu without using dedicated silicon for that. The ARM Cortex M0 has plenty of oomph to do that, so we can cut cost this way.

        Our github is at http://github.com/Ell-i/ and we now have only the beginnings: a devboard implementing PoE with a Linear smpsu and STM32 Cortex M0 with Arduino Due compatible pin headers and Arduino IDE support.

        I’ll be happy to report at HaD when we have mcu controlling its own smpsu.

  5. Alex Haldane says:

    Out of interest, how does it work hacking things then selling them on. As in, if I were to use one of these routers in a project I’m making to sell on, would it be legal? I would be buying the routers then just ripping them out the enclosure and using the PCBs

  6. valent says:

    Here is a nice explanation of Dali lighting system:

  7. valent says:

    Can you please also explain did you buy DALI lighting modules for your hackerspace or you also made the lighting modules?

    We would like to also use this for our hackerspace, but DALI modules are quite expensive.

    If you bought them please share the source that you used, thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 91,346 other followers