SciELO - Scientific Electronic Library Online

vol.30 issue8Acute extracellular fluid volume changes increase ileocolonic resistance to saline flow in anesthetized dogsWheat bran- but not oat bran-enriched diets increase the mucosal height of the cecum and colon of newly weaned and aged rats author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand




Related links


Brazilian Journal of Medical and Biological Research

Print version ISSN 0100-879XOn-line version ISSN 1414-431X

Braz J Med Biol Res vol. 30 no. 8 Ribeirão Preto Aug. 1997 

Braz J Med Biol Res, August 1997, Volume 30(8) 1009-1016

Low-cost automatic activity data recording system

M.F.D. Moraes, C. Ferrarezi, F.J.A. Mont'Alverne and N. Garcia-Cairasco

Laboratório de Neurofisiologia e Neuroetologia Experimental, Departamento de Fisiologia, Faculdade de Medicina de Ribeirão Preto, Universidade de São Paulo, 14049-900 Ribeirão Preto, SP, Brasil

Material and Methods
Correspondence and Footnotes


We describe a low-cost, high quality device capable of monitoring indirect activity by detecting touch-release events on a conducting surface, i.e., the animal's cage cover. In addition to the detecting sensor itself, the system includes an IBM PC interface for prompt data storage. The hardware/software design, while serving for other purposes, is used to record the circadian activity rhythm pattern of rats with time in an automated computerized fashion using minimal cost computer equipment (IBM PC XT). Once the sensor detects a touch-release action of the rat in the upper portion of the cage, the interface sends a command to the PC which records the time (hours-minutes-seconds) when the activity occurred. As a result, the computer builds up several files (one per detector/sensor) containing a time list of all recorded events. Data can be visualized in terms of actograms, indicating the number of detections per hour, and analyzed by mathematical tools such as Fast Fourier Transform (FFT) or cosinor. In order to demonstrate method validation, an experiment was conducted on 8 Wistar rats under 12/12-h light/dark cycle conditions (lights on at 7:00 a.m.). Results show a biological validation of the method since it detected the presence of circadian activity rhythm patterns in the behavior of the rats.

Key words: circadian rhythm, automated acquisition, actograms, FFT, cosinor, chronobiology


The existence of biological rhythms is a well-known fact for most life forms. It has become important for several lines of research to record activity rhythm data since the literature started to report the interaction between biorhythms and diseases (1), pharmacology (2), genetics (3-5), among others.

The measurement of activity has been proposed in a variety of ways, some of which are incredibly creative: running wheel (6-8), tuned oscillator circuits (9), optical systems (10,11) using photocells, impedance variation detector circuits (12), systems based on inertial forces (13), Doppler effect, piezoelectric effect and electrophysiological signals (14-16), stabilimeters (a cage so supported that it is displaced slightly from resting position by subject's movements) (17), ultrasonic signals (18), and mechanical and electrical contacts in plates (19,20), among others (21).

However, a critical evaluation of these methods used to measure a rhythmic variable, activity in this case, requires some ideal criteria (22): 1) data collection should not influence the rhythmic physiological variables. It has been reported, for example, that wheel running alters the temperature cycle (23). 2) Acquired data should permit a more flexible and powerful analysis, such as the Fast Fourier Transform (FFT; 9,24) or cosinor methods (25). 3) Data should be collected at many times during each oscillating period (increasing frequency spectrum) and for many successive cycles (increasing frequency resolution). 4) Data collection should be automated.

The present report describes a computer-automated system capable of detecting every touch-release action of the rat on the upper portion of the cage, where food and water are located. Among several behavioral items (motor acts) already described for isolated rats (26), very few would trigger the detecting device. Only those components that force the rat in the upright position would be recorded, such as feeding, drinking and exploratory sniffing on the upper portion of the cage. Therefore, this continuous recording of all detected events, reflecting the occurrence of a limited group of behavioral components, strongly suggests the activity pattern of the rat during data collection.

In this sense, the activity measuring method is not much different from that proposed by Beauchamp et al. (20); however, data collection and storage are much improved. The present study is based on the use of an extremely simple, low-cost computer interface coupled to the activity sensors in order to provide immediate computer storage and facilitate analysis. We believe that this feature constitutes the main difference from previously described methods, considerably reducing the cost of a complete sensor-computer interface device. Therefore, the system proposed here is a choice for smaller laboratories that cannot afford the prohibitive prices of commercially available activity detecting packages.

Material and Methods


The sensor has 4 main features: a) it only records touch/release movements, to avoid multiple recordings when the rat, for example, lies on the sensor or sleeps while in contact with it; b) it has a sensitivity control, which makes sensor response more or less sensitive to touch; c) it does not interfere with animal behavior, as guaranteed by the use of field effect transistor (FET) technology which reduces current flow to imperceptible values, and d) it has a holding system capable of maintaining the signal for 1 s, in order to detect even the fastest touch/release action. The holding system is the limiting time factor for two consecutive recordings, so the minimum time interval between touches may vary from 1 to 2 s. The schematic drawing of the sensor circuitry is shown in Figure 1A. In Figure 1B there is a layout suggestion for a one-layer printed circuit presented as a mirror image, as is usually required for circuit implementation.

Figure 2A shows sensors being connected to the cage cover. The power supply for the detecting device comes directly from the computer (+5 V and 0 V, digital ground). For proper use, the device requires the animal to be grounded to avoid radio frequency (RF) signals interfering with the touch/release feature. This problem was solved by placing a ground net on the cage floor (Figure 2B). The whole system was left running for a couple of days with no animals in the cage as a reliability test, and no false detection occurred.

Figure 1 - A, Schematic drawing of the sensor circuit. VCC = +5 V; GND = computer ground, 0 V; OUT = out to computer, D0~D7; IN = cage cover. B, Possible layout (mirror image) and respective part placement.

[View larger version of this image (58 K GIF file)]

Figure 2 - A, Connection to cage cover. B, Ground net on cage floor. C, Connections between computer and sensors. D, Complete assembly.

[View larger version of this image (186 K GIF file)]

Computer interface

The interface was designed for an IBM PC XT in order to minimize equipment cost. However, any IBM-compatible computer may be used as well. Connections were made through the parallel port LPT1 (where the printer is connected) at the 0 x 378 hex address. The data bus pins (D0-D7) were used in such a way that each bit was connected to one sensor to allow simultaneous recording of all, if necessary. The trick was to force a specific data bus pin to low voltage (0 V) whenever an event was detected, so that, with safety precautions taken in this virtual short circuit, the parallel port of the IBM PC XT (older model) acted as a bidirectional I/O device. Figure 2C shows the physical connections between sensors and computer.


The software was written in C language; therefore, a C compiler is required, or the program must be converted to another suitable computer language. The software in Table 1 is very simple and permits easy modifications as required by experimental protocols.

It can be seen that the software runs a loop checking for detection on any of the sensors and records the time when such event occurred in that specific sensor file on a hard disk or disk drive. The contents of this output are in text file format (*.TXT) and therefore accessible for analysis with almost any software package. Recording may continue for as long as there is disk space available for file saving.


The present study was conducted on 8 adult Wistar rats, weighing 270-310 g, from the main breeding stock of the Ribeirão Preto School of Medicine. Rats were housed in individual cages and submitted to an artificial lighting system (lights on at 7:00 h, lights off at 19:00 h) at room temperature (22 ± 2oC) and with free access to food pellets and water. The recording system was interrupted every 3 days for cage maintenance and for food and water replacement. The animals remained in the recording environment for at least 3 days prior to data collection in order to minimize stress, after which a 6-day recording took place. All protocols were performed in accordance with the procedures recommended by the Brazilian Society for Neuroscience and Behavior for animal experimentation.


The collected data were plotted in order to visualize the total number of touch-detections per hour (actogram). From the 6-day recording, 128 h were analyzed by FFT in order to highlight the most important frequencies that compose the activity graph for each rat. Also, a statistical spectral analysis was conducted by calculating the cosinor fitted parameters (25) over a period ranging from 10 to 40 h (0.1-h step). The plot, which we named cosinor rhythmometry-period-scan (CRPS), is the amplitude of each fitted sinusoid (cosinor) vs the period used to calculate it. The P<0.05 probability region was determined for each rat (25). In synthesis, this is a region in a gamma x beta plot where the most probable (P<0.05) amplitude and acrophase combination may be encountered for an estimated period. Better understanding of the significance of each term may be obtained by consulting the cosinor rhythmometry method of Nelson et al. (25). All necessary software, including statistical calculations such as those involving cosinor rhythmometry, or graphic presentation, was developed in our laboratory and we will be pleased to provide them free of charge to interested laboratories.


Figure 3 shows the actograms for rat number 5 in two distinct ways. First, Figure 3A shows the number of touches per hour throughout the 6-day time course. Second, Figure 3B shows raw data presented in a form where time evolution can be seen either vertically (from day 1 to 6) or horizontally (48-h period where the right half of the plot always indicates the next day). The size of the bars is proportional to a maximum (largest bar) of 742 (maximum number of touches per hour recorded during the 6-day period). The rhythmometric analysis of rat number 5 actograms is plotted in Figure 4. Analysis was conducted both by FFT (Figure 4A) and cosinor methods. CRPS (Figure 4B) and the P<0.05 probability region (Figure 4C) indicate the presence and accuracy of a circadian activity rhythm (CAR), respectively. Figure 4D overlaps the fitted sinusoidal curve calculated by the cosinor method over a 24-h period, with original raw data from Figure 3A.

Since all rats gave similar results (data not shown) we used rat number 5 for the demonstration of the proper operation of the system.

Figure 3 - Locomotor activity records of rat number 5. A, A 6-day recording reported as number of touches per hour versus time. B, Actogram representation with successive days presented one below the other in chronological order (see details in text). The bars at the bottom of the record represent the light/dark cycles to which the animal was exposed, with shaded bars corresponding to the dark portion of the 12/12-h light/dark cycle.

[View larger version of this image (43 K GIF file)]

Figure 4 - Rhythmometric analysis of the actogram of rat number 5. A, Fast Fourier Transform (FFT). B, Cosinor rhythmometry-period-scan (CRPS). C, Probability region according to cosinor rhythmometry (25); p, acrophase; a, amplitude. D, Overlapped fitted cosinor sinusoid waveform on the actogram of rat 5 (Figure 3A).

[View larger version of this image (28 K GIF file)]


The low-cost characteristics of the system (including computer interface) does not affect its quality since the results suggest a clear CAR detection by the system, consistent with previous studies in rats (6) indicating nocturnal activity. CAR is evidenced not only by the main peak in the CRPS (at 24 h, P<0.05; mesor = 151.7 ± 0.5; amplitude = 118 ± 6; acrophase = -175 ± 3; Figure 4B) but also by the FFT (at frequency 0.04 h-1; Figure 4A). The system also provides powerful analysis tools since all data may be stored in text file format (time table). This feature makes it possible to directly load data into commercially available statistical and graphic software packages.

When comparing the proposed system with other activity detecting circuits, two advantages are easily noted: the computer interface is included and assembly cost is lower than that of all previously mentioned systems. Also, system assembly does not require any special skill or training since in similar detection devices described in the literature the system is believed not to influence recording, because the current needed to "fire" the sensor is extremely low due to FET architecture. 4001 is a semiconductor, which has a very high speed and extremely low power consumption (complementary metal oxide semiconductor, CMOS). However, the touch-release feature, in this case, may be considered an improvement of the previously used Schmitt Trigger technology (20) since it avoids undesired continuous event signaling.

The "generality" of the recorded event, i.e., touch-release action on the upper portion of the rat cage, to which we assigned some behavioral items, may be considered a disadvantage for many applications of this system. This problem could be solved by either coupling other types of activity measuring devices to trigger the touch-release sensor (photo-cells), or by using different touch-release sensors to discriminate among feeding, water intake and exploratory sniffing.

Other applications of this system, besides the detection of CAR activity, that have been tested by other laboratories in our department (unpublished data), include connection of the system to a drinking bottle in a metabolic cage, as a "thirst" motivation recording, application in studies of anxiety, with activity plots analysis, and rat movement recording with sensors used as position indicators.


1. Smolensky MH & Reinberg A (1991). Medical chronobiology with special reference to temporal patterns in epileptic seizures. In: Dreifuss FE, Meinardi H & Stefan H (Editors), Cronopharmacology in the Therapy of Epilepsies. Raven Press, New York.        [ Links ]

2. Reinberg A, Smolensky MH & Labrecque G (1991). Chronopharmacology and chronotherapeutics: concepts and principles. In: Dreifuss FE, Meinardi H & Stefan H (Editors), Cronopharmacology in the Therapy of Epilepsies. Raven Press, New York.        [ Links ]

3. Kyriacou CP (1994). Working round the clock with mouse 25. Trends in Neurosciences, 17: 313-314.        [ Links ]

4. Ebihara S, Tsuji K & Kondo K (1978). Strain differences of the mouse's free-running circadian rhythm in continuous darkness. Physiology and Behavior, 20: 795-799.        [ Links ]

5. Ebihara S & Tsuji K (1976). Strain differences of the mouse's wheel-running behavior. Japanese Psychology Research, 18: 20-29.        [ Links ]

6. Richter CP (1922). A behavioristic study of the activity of the rat. Comparative Psychology Monographs, 1: 1-55.        [ Links ]

7. Johnson RF, Moore RY & Morin LP (1988). Running wheel activity in hamsters with hypothalamic damage. Physiology and Behavior, 43: 755-763.        [ Links ]

8. Aguilar-Roblero R & Vega-Gonzalez A (1993). Splitting of locomotor circadian rhythmicity in hamsters is facilitated by pinealectomy. Brain Research, 605: 229-236.        [ Links ]

9. Svensson TH & Thieme G (1969). An investigation of a new instrument to measure motor activity of small animals. Psychopharmacologia, 14: 157-163.        [ Links ]

10. Boyles DL & Wright JW (1977). Photocell system for recording circadian drinking patterns in rodents and primates. Physiology and Behavior, 18: 755-757.        [ Links ]

11. Czech DA (1984). A versatile integrated circuit activity monitor for small animals. Physiology and Behavior, 32: 871-874.        [ Links ]

12. Tomkins PT & O'Donovan J (1981). A fully automated open-field apparatus incorporating rearing detection. Physiology and Behavior, 26: 741-746.        [ Links ]

13. Weyers MH & Annys M (1982). Two apparatus for detection of motility and water consumption of rodents. Physiology and Behavior, 29: 759-762.        [ Links ]

14. Gelder RN, Van Edgar DM & Dement WC (1991). Real-time automated sleep scoring: validation of a microcomputer-based system for mice. Sleep, 14: 49-55.        [ Links ]

15. Roncagliolo M & Vivaldi EA (1991). Time course of rat sleep variable assessed by a microcomputer-generated data base. Brain Research Bulletin, 27: 573-580.        [ Links ]

16. Tomei C, Abraini JH & Rostain JC (1991). A new device for behavioral analysis on rats exposed to high pressure. Physiology and Behavior, 49: 393-396.        [ Links ]

17. Parreño A, Saraza ML & Subero C (1985). A new stabilimeter for small laboratory animals. Physiology and Behavior, 34: 475-478.        [ Links ]

18. Akaka WH & Houck BA (1980). The use of an ultrasonic monitor for recording locomotor activity. Behavior Research Methods and Instrumentation, 12: 514-516.        [ Links ]

19. Whitmoyer DI, Masco D & Carrer HF (1983). An electronic open field. Physiology and Behavior, 30: 635-637.        [ Links ]

20. Beauchamp J, Donovick PJ & Burright RG (1972). An automated system for long term and continuous computer compatible recording of feeding, drinking, and general activity behaviors of rodents. Physiology and Behavior, 8: 765-768.        [ Links ]

21. Aoki S, Kondo T & Ishiura M (1995). Circadian expression of the dnaK gene in the cyanobacterium Synechocystis sp. strain PCC 6803. Journal of Bacteriology, 177: 5606-5611.        [ Links ]

22. Moore-Ede MC, Sulzman FM & Fuller CA (1982). Physiology of circadian timing system. In: Moore-Ede MC, Sulzman FM & Fuller CA (Editors), The Clocks that Time Us. Harvard University Press, Cambridge, London.        [ Links ]

23. Golombek DA, Ortega G & Cardinali DP (1993). Wheel running raises body temperature and changes the daily cycle in golden hamsters. Physiology and Behavior, 53: 1049-1054.        [ Links ]

24. Refinetti R (1993). Laboratory instrumentation and computing: comparison of six methods for the determination of the period of circadian rhythms. Physiology and Behavior, 54: 869-875.        [ Links ]

25. Nelson W, Tong YL, Lee JK & Halberg F (1979). Methods for cosinor-rhythmometry. Chronobiologia, 6: 305-323.        [ Links ]

26. Garcia Cairasco N, Doretto MC, Prado RP, Jorge BPD, Terra VC & Oliveira JAC (1992). New insights into behavioral evaluation of audiogenic seizures. A comparison of two ethological methods. Behavioural Brain Research, 48: 49-56.        [ Links ]

Correspondence and Footnotes

Address for correspondence: N. Garcia-Cairasco, Laboratório de Neurofisiologia e Neuroetologia Experimental, Departamento de Fisiologia, FMRP, USP, 14049-900 Ribeirão Preto, SP, Brasil. Fax: 55 (016) 633-0017. E-mail:

Research supported by FAPESP (No. 93/2023-2). Received October 14, 1996. Accepted June 13, 1997.

Creative Commons License All the contents of this journal, except where otherwise noted, is licensed under a Creative Commons Attribution License