Infrared data transmission for mechatronic system control.
Manescu, Mihai ; Cristea, Luciana ; Cotoros, Diana 等
1. INTRODUCTION
Many modern technological products result from integrating
mechanical, electrical and computer systems. This combination of
technologies is known as mechatronic systems engineering and such
mechatronic systems are found in numerous applications (Alciatore,
2005). A mechatronic device is one that is able to perceive the
surrounding environment, make appropriate decisions based on that
information, and executes the right decisions (take action). Mechatronic
as a highly interdisciplinary domain, involve sensors, actuators, data
bases, system modelling, locomotion, and system control and data
acquisition. Modern mechatronic systems comprise a number of subsystems,
which rely heavily on digital data communications. Different levels of
complexity of these systems means that the requirements for data
communications range from a simple communication between two devices to
systems with a large number of subsystems using communication network.
In the construction of the mobile mechatronic systems, the
development of robotics and digital circuits lead to the occurrence of
new technologies for information transmission. The transmission line is
generally implemented using electrical wiring but cam involve a variety
of physical medium including radio frequency, infrared, and sound
signals. A transmission line provides a physical medium connecting the
two systems. Among these technologies, the paper presents the study
concerning the data transmission by infrared using USART protocol
(Bishop, 2006).
2. THEORETICAL ASPECTS
The receiver construction includes a TSOP17xx circuit, which
integrates the IR sensor and performs the conversion and demodulation of
the received signal in order to make it compatible with the UART
protocol. The data reaching the receiver are decrypted and may be used
for controlling certain driving devices or save them on a PC (Moreau,
2000). The receiver communicated with the PC by help of the UART type
serial interface. The receiver is a TSO[P.sub.1]738 integrated circuit,
consisting of a demodulator, wave-band filter, amplifier and infrared
sensor that perceive the infrared radiation (fig.1).
[FIGURE 1 OMITTED]
The transmitter is a LED (TSAL6200) which sends infrared radiation
having the wave length of 940nm. The circuit controlling the LED should
assure a modulation frequency (on/off) of 38 kHz because only the IR
signals of 38 kHz are accepted by the receiving TSOP1738 circuit. This
IR interface is able to transmit data with a velocity up to 2400 bps. In
the present situation we work with 1200bps.
This modulation assures the removal of the perturbations produced
by other IR radiations emission sources. There is a large range of
integrated circuits of TSOP1xx type that can be used as a receiver for
different signal demodulation frequencies (Tab1.).
An important characteristic of the modulated signal is its duty
cycle. In this project, the duty cycle is 75% but it also works with
50%. The modulation is accomplished by help of an ATmega8515
micro-controller using a timer set at 38 kHz.
The demodulated signal is taken over from TSOP1738 and processed by
an ATmega162 micro-controller. The demodulated signal is applied at the
serial port input (line RX). On the serial interface (line TX) we
transmit the hexadecimal code towards the PC, corresponding to each
received byte.
The transmitting LED is on 75% of the modulation time. The
demodulated signal on the receiver output applied to the serial port
Atmega162 input is 0 when the transmitter sends signals and 1 when it
does not transmit (LED is off). Data format received on UART is
presented in figure 2. The first transmitted bit is the most
insignificant one. (lsb).
[FIGURE 2 OMITTED]
3. DATA TRANSMISSION PROGRAMMING
In order to be able to also use the program for other
micro-controllers having less power and smaller costs (Attinyll,
Attiny13) this is going to use a single Timer both for the
accomplishment of the signal modulation (38 kHz) and for the bits
transmission (by means of a signal compatible to the serial protocol
RS232) with a 1200 bps (1,2kHz) velocity.
Dividing 38/1.2=31.6, we get a constant showing the fact that
during the transmission of 1 bit, (logical 1) the signal will oscillate 31.6 times (meaning the signal is modulated) (fig.3).
Theoretically the transmission time of a bit should be 31 times the
modulation period. Introducing an "if " instruction before
setting the timer constant, the modulation frequency decreases and thus
we need to lower also the proportionality constant between the two
frequencies.
void timer1_ovf_isr(void)
{
if(cons<=27)//between 26..28
{
TCNT1H = 0xFE; //reload counter high value
TCNT1L = 0x5B; //reload counter low value
}
We experimentally found that a value between 23 and 28 is
admissible instead of 31.6. The decreasing of the signal frequency
modulation (caused by the "if" instruction does not visibly
influence the data transmission.
The main benefit of the Attiny13 micro-controller is the low cost.
It does not dispose of the UART interface making thus the programmes
development and programming errors detection more difficult. This 8 pins
micro-controller includes the following peripherical devices: 1 timer, 2
PWM channels, ADC and SPI.
Attiny13 also contains an 8 bits timer with a prescaler. In order
to configure the timer we need to set 3 registers: TCCR0A, TCCR0B,
TCNT0, and TIMSK0.
TCCR0A--Timer/Counter Control Register A--TCCR0A By this register
we select the operation mode. We initiated it with 0x00 because it is
used as a counter.
TCCR0B--Timer/Counter Control Register B--TCCR0B
FOC0A and FOC0B (FOC0A: Force Output Compare A and B) will be set
to 0 because we do not want to use the PWM lines (fig.4).
WGM02 is 0 (not using PWM)
CS02:0: Clock Select By these bits we select the impulse source
that are going to be counted. These bits can set up the pre-scaler.
In order not to repeat pseudo-randomly generated numbers, we save
as many times the reset procedure is initialized. Thus, each time the
starting point for generating random numbers is different.
We will transmit two codes. The first one is randomly generated.
[FIGURE 3 OMITTED]
[FIGURE 4 OMITTED]
[FIGURE 5 OMITTED]
The second one is generated based on the first using a secret
function. The same function will be applied by the receiver in order to
check the codes validity. The receiver will calculate the function image
for the first code and will compare it to the second code received by
the IR interface.
no_reset=no_reset+1;
varrand=no_reset;
srand(varrand);srand(varrand);
x
x=rand();
TR_by_IR(x);
wait(100);
TR_by_IR(x+100);
wait(100);
The connection modality for the IR led and the source is presented
in figure 5. Power consumption is 25mW.
4. CONCLUSIONS
This type of transmission can be successfully used in different
applications which require the control along not very big distances
(8-10 m). The benefits of this transmission type are: low costs of the
necessary components, low number of components, the transmitter size is
very small, the human operator is not affected in any way. For building
the high-performance multicomputer systems high-performance data
communication/transmission systems are required as interconnection links
between the computers as well as between the accompanying monitoring
facilities scattered over the different applications.
Further work will be focused on the data transmission used in
automatic inspection systems.
5. REFERENCES
Alciatore, G. & Histand, B. (2005), Introduction to
Mechatronics and Measurement Systems, McGraw-Hill
Science/Engineering/Math; 3 edition, 2005
Bishop, H., R. (2006), Mechatronics an Introduction, CRC Taylor&Francis Group
Moreau, B., N. Tomatis et al. (2000). Multimodal Web Interface for
Tasks Supervision and Specification. Proceedings of SPIE Vol. 4195:
Telemanipulator and Telepresence VII. Boston, USA
***(2008) www.atmel.com, Atmel QTouch Library 2.0, Accesed
on:2009-01-15
***(2008) http://www.robotroom.com/Infrared555.html, David Cook
ROBOT ROOM Accesed on:2009-01-28
***(2007) http://www.sigterm.de Tools of Trade for World Domination
Accesed on:2009-01-30
Tab. 1. Integrated circuits capable of demodulating IR signalsf
according to the modulation frequency
Type fo Type fo
TSOP1730 30 kHz TSOP1733 33 kHz
TSOP1736 36 kHz TSOP1737 36.7 kHz
TSOP1738 38 kHz TSOP174Q 40 kHz
TSOP1756 56 kHz