Simple wireless traffic lights

Simple wireless traffic lights

One of site members, Martin Strouhal, wrote: Today I prepared for you example, how to use DDC with relays connected to DK-EVAL. One of my friends asked me for a sample how relays are working. I choose for this demonstration connect to relay LED diode and simulating e.g. street light. However, my fantasy was working farther and I’ve got an idea when I was looking for LED diode and by the way found RGB LED too. It was good change how to show simulated traffic lights for walkers and demonstrate controlling of color states by switching of different branches instead of simple switching on/off.

Firstly I realized circuit only on pre-drilled PCB, but later I decided to make design of PCB with scheme too. On the image below you can see scheme, on which are described individual outputs which are prepared to connect to relay. Name of outputs are same as corresponding name of relay pins. Relays are distinguished by postfix 1 or 2 which are representing first and second relay.

scheme

On next image you can see how demonstration works on the real-demo. If you counted resistors before LEDs with voltage of battery in DK-EVAL (3,2V), you can connect power supply to pins Vbat and GND on DDC-RE. Of course, you can use another external power supply.

board

The LEDs can be controlled by changing states of relays. Controlling pins of relays are C2 and C8 on DK-EVAL. In IQRF module datasheet is written, that this pins corresponding with RC2, RC5 and RC7 on the module. It means that we must set this pins as output and after we can control their states. This can be simply configured via Direct Peripheral Access protocol by command which are below.

Setting pins as output:

00.01.09.00.FF.FF.02.A4.00

And controlling of pins:

00.01.09.01.FF.FF.02.A4.XX

Where instead of double x can be 0 (turn of), 4 (first relay on), A0 (second relay on) or A4 (both relays on).

In attachment is circuit scheme and PCB design.

Download Attachments

Leave a Reply

Your email address will not be published. Required fields are marked *