ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Inputs and outputs > Sensors > An introduction to sensors

An introduction to sensors

Introduction

Sensors are used in ANY-maze to determine some physical value, for example, temperature or light level. ANY-maze currently supports four types of sensors:

 Temperature sensors - to either determine the ambient temperature or the temperature of some specific thing. 
 Light sensors - to determine the light intensity in lux. 
 Weight sensors - to determine the weight of something;, for example, the weight of food consumed by an animal. 
 Humidity sensors - to determine the relative humidity of the air, usually in a cage or piece of apparatus.  

Sensors can be read before a test starts, which would be appropriate to register the temperature of the water in a water-maze, or continuously throughout the experiment, which would be appropriate to measure an animal's food consumption across a 12 hour period.

Connecting a sensor to ANY-maze

Clearly, if ANY-maze is going to measure the value of a sensor, then the sensor device will have to be physically connected to your computer. In some cases, the sensor may be an integral part of a device you are using - this is the case, for example, with the temperature sensor in OPAD, which registers the temperature of the OPAD thermal elements. In other cases, you can connect a sensor using a special piece of equipment called an Input/Output device (usually abbreviated to 'I/O device') which acts as an interface between your PC and the actual sensor.

You'll find full details about the I/O devices which can be used with ANY-maze in the I/O devices supported by ANY-maze topic - but suffice to say that at present, only the ANY-maze interface and OPAD support sensors.

Using sensors

Having connected a sensor to your computer, you then need to add two elements to your protocol in order to use it: an I/O Device element, for the physical I/O device to which the sensor is connected, and a Sensor input for the sensor itself.

In fact, I/O devices usually support multiple sensors, so you only need to set up the I/O device element once to make all of its sensors available within the protocol. For example, an ANY-maze interface supports as many as 8 sensors - but you only need to include the device itself in the protocol once for all the sensors to be available. The process of adding an I/O device to your protocol is described in detail in the Setting up an I/O device topic.

It doesn't matter what type of sensor input you want to include in your protocol (it can be any of those listed above); in all cases, you simply add a 'Sensor' element.

As mentioned above, sensors can be set to be read once at the start of a test, or they can be read continuously throughout the test.

Reading a sensor at the start of a test causes the sensor's value (in degrees, lux, grams or %) to be included in the test results. This is useful as you can then analyse the result just like any other value; so, for example, you could read the light level in a plusmaze before every test in an experiment, and then check that there was no significant difference between the light levels for your treatment groups.

Reading a sensor throughout a test is useful if you expect the sensor's value to change. For example, if you place the animal's food on top of a weight sensor, then you can register the amount of food the animal eats during the experiment. Not only will you know how much the animal ate overall, but you will know when it ate and how much it ate on each occasion. For example, you might test the animal over 24 hours and then divide the test into 1 hour periods - you would then be able to see how much the animal ate during each hour of the test.

Another advantage of reading a sensor continuously is that it can be used in procedures. For example, you could create a procedure which would determine if the animal has eaten more than 10g of food and if it has, trigger some sort of action, which might end the test, activate a shocker, play a sound, etc.

Sensors can also be used by the ANY-maze watchdog to alert you if a sensor's value goes outside certain limits. This feature is independent of experiments, and a sensor that the watchdog is monitoring can simultaneously be used in an experiment if desired.

See also:

 The ANY-maze interface 
 The AMi sensor ports 
 Configuring AMi sensors 
 The ANY-maze Watchdog 
 Setting up a sensor 
 Sensor measures 
 An introduction to procedures 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0171