Loading...
 

How to integrate a light sensor

Scope

This concerns both situations, being the use of a TDS12270 light sensor or a third party light sensor.
In case of TDS12270, this one will be connected to a TDS12301, TDS12311 or PICOS analogue input. In case of the third party sensor, it will be connected to a TDS12310 interface.

Application

A TDS12270 light sensor can be used for several reasons. Depending on the application, you can use the 'day' and 'night' thresholds which can be set on the sensor board (jumper settings - see datasheet). In other applications these thresholds cannot be used and the light sensor signal is to be used in another way. In other words, the use of the light sensor and his hardware and software settings are always related to the application.

How to add a light sensor to your project

Adding a light sensor is comparable to adding a temperature or humidity sensor. Also refer to the chapter 'Analogue Input Interfaces'. In PROSOFT it is done as follows:

  • Click 'Edit' 'Inputs' in de PROSOFT menu bar.
  • Select an analogue input unit or interface or add a new input interface to the system (AUTOBUS).
  • Select the desired individual analogue input and select the desired light sensor which will be connected to it. Three different types can be selected: 'dark', 'normal' and 'sun' light sensor.

Specify the different available parameters depending on the type of the selected light sensor. Below, there are two different applications described more in detail:

CASE: Switching a light in twilight situations (often used case)

To be able to control a light point when it gets dark, there are no specific sensor settings. The light sensor should be set (jumper settings on the sensor circuit board) to a 'dark' (twilight) sensor.

  • Make a condition function which you can call 'dark', wherein the sensor value is set to '< 10 Lux'.
  • Make a process function 'light ON when dark', in which the condition 'dark' (ON if TRUE & OFF if FALSE (all edges)) is controlled and the desired light point is switched ON when the condition is TRUE.
  • Optional: In TIMESOFT you can switch ON the process function for example every day at 5pm and switch it off again at 11pm.
  • To switch OFF the light when the process function is switched OFF, set the ‘Deactivate handling’ to ‘When Process Function is de-activated: switch off output’.

CASE: Control of motorised sun shields and sun screens

To close (or open) electrical sun shields when the light is higher than x lux, the light sensor must be set to 'sun' type (jumper settings and sensor settings in PROSOFT). In this case, there are extra sensor parameters to be set.

  • Go back to the sensor ('Inputs & Others' - 'Analogue input interface').
  • Put the Sensor type to: 'Light sensor (sun)'
  • Below, select 'Flags' from the dropdown box and add a flag. Call it 'No sun'.
  • Set the 'Preset 1 (day)' preset to 7078 Lux.
  • Go to 'Extra' menu in PROSOFT  'Options'  'Option'-tab and add a 'Local Mood' to the 'Auto Start Function'. In this 'Local Mood' add this light sensor and set it to 'Preset: Day' 'ON'.
  • Go to the motor definition to the ‘Sun function’ tab.
  • Add the Flag ‘No sun’ = ‘OFF’ to the ‘Condition to activate sun function’
  • Set the motor position and delays
  • Repeat the last two steps for other motors if necessary
Extra parameters which are influencing the sunshield control can be added trough extra process functions combined with flags and clocks.

The argument 'Hysteresis'

When exceeding the 'day' threshold value, the light sensor will activate the function which is related with it. When the sky is fleeced with clouds, the light values will differ from one moment to another and the system may cross very frequently the preset Lux-threshold. In such case the controlled lights or shields will constantly open/close. This is not what we expect from such system. To solve this problem, the 'hysteresis' was introduced.
Hysteresis means some kind of Lux- window wherein nothing happens. Some kind of zone wherein no threshold is crossed back as soon as it was crossed already. Both the 'day' and 'night' thresholds are provided with a hysteresis.
This means in our applications:

  • The function or action which was selected in the data field is switched OFF when the measured value is larger or equals the set value + the hysteresis value.
  • The function or action which is selected in the data field is switched ON when the measured value is smaller or equals the set value – the hysteresis value.

Image360
The result of using a hysteresis is that in case of balancing Lux values (in the Light sensor case) around the threshold value doesn't result in a constant changing control of the connected output (light, motor…). In practice this means that your light is not switching ON/OFF all the time and the sun shields are not opening and closing all the time (refer to the figures above).

The function which is switched by the light sensor is switched OFF when the following errors occur (errors are also displayed on the display when selecting the concerned sensor):

;Data?' the sensor is in initialising mode or the central unit is waiting for sensor information (lasts no longer than maximum a few minutes).
;Sensor?' there is no sensor signal coming into the analogue interface of the TELETASK system. This may be caused by a defect sensor or a cabling error.

The hysteresis is only active on the set 'day' and 'night' thresholds. When a sensor value is called for in another type of function (example: in a condition), then the hysteresis is not used there.
The hysteresis is to be set in general for all light sensors in the PROSOFT 'Extra '> 'Options' > 'Sensor'. The hysteresis is to be set in steps (max. 10). In the TELETASK LUX-table you can find all top and bottom values by using the number of steps you have set.
  • Example: The hysteresis is set to 5 steps and the set 'day' threshold is 840 Lux. In the TELETASK Lux table you can see that the bottom hysteresis value, which is in this example 5 steps below, is 630 Lux and the top hysteresis level will be 5 steps up and is 1121 Lux.

The TELETASK Lux-values table

In this table you can find the working area of the different light sensor types (dark, normal and sun). Beside of this, as a result of the hysteresis setting in PROSOFT, you can use the table to find out about top- and bottom Lux values which are applicable in your case. For more details about hysteresis, see the text on top if this.

D ↓ - D ↑ Work area of the 'dark' mode
N ↓ - N ↑ Work area of the 'normal' mode; rarely used
S ↓ - S ↑ Work area of the 'sun' mode


TELETASK Lux Values Table

The meaning of a Lux value; practical approach.

When using a light sensor, the Lux values are very important. Everybody knows the 'Lux' argument but for many among us, it is not clear what a certain value stands for. Therefore we supply the table below for your information. Reference examples are included as a practical approach.

Lux values area Light source Application field
20-50 General Cinema room, a shaded museum…
50-100 General Bed room, warehouse, not illuminated exhibition hall …
100-200 General Indoor at home on a clouded day
200-500 Spot Work top in the kitchen, office desk, PC table, … Tasks: cutting vegetables, writing a letter, computer work…
500-1000 Spot Reading a book in a chair with a reading light on, well lighted work top, PC table, hobby area, lighting on a piece of art … Tasks: reading a book, fine kitchen work, sewing, measuring, PC work…
1000-2000 Spot The hobby table, fine mechanical work. Tasks: model- building, pot seedlings, fine graphical work…
2000-5000 Spot + general Blue sky on a spring day
5000-10000 Spot + general Sun reflected on white walls

Based on this table you can decide the settings of your light sensors and the thresholds depending on the application. For the control of a shun shield, the threshold value should be set to 7000 Lux. The light sensor ten should be set to 'sun' (jumper setting).
In twilight situations, a threshold of 100 Lux should be good to control an in- or outdoor ambient light. The sensor should be set to 'dark'.

Switch Language

TELETASK Technical handbook