12/21/2023 0 Comments Xampp control panelAll the applications described above except the initialization are made every two minutes, this being realized with the function call asteapta_sec(120) For the server application to work, the installation of the Windows XP compatible XAMPP 32.exe was necessary. The characters from buffer are sent one by one to a serial interface, in the background of a for loop, using the function call afisare_caracter(unsigned char). The third parameter of the function – 10, represents the base in which the information from temp is converted. After the itoa(buffer, temp, 10) function call, the value from temp is transformed into a line of characters which are stored in the unsigned char buffer. Then, the acquisition process of the data begins in the conditions that initially, the ADC data entry port was set: the conversion is started wait until the conversion has ended and the obtained value is stored in the ADC registry the value from the registry is taken and stored in the internal variable val_adc Next is the temperature computing, which is made by the function calculez_temp(int) following this call, the temperature value will be found in the int temp variable. These procedures are called in the init_devices () procedure. When the application starts, first of all the microcontroller ports initiate → port_init (), UART interface → uart0_init (), the ADC converter → adc_init(). The bluetooth_online.c contains the functions, which initializes the microcontroller, acquires the sensor data, processes this data and sends them to the central server using the Bluetooth principle. The source code has been written in ‘C’ language, using the ICC AVR program. For sending data, the Windows HyperTerminal is used, set on the COM port and having the following parameters: 8 data bits, 1 stop bit, no parity, hardware protocol, 9600 kbps. The adaptor’s green LED is turned on, to show that the steps have been made correct. The steps that are made are the following: the software for the Bluetooth adaptor is installed the adaptor is connected to the PC’s USB and the searching for Bluetooth devices is started when the LMX9820A is found its name will appear as “Serial Port Device” right click on the device name that was found and choose the option pairing the PIN code of the device is inserted – 0000 and OK is pressed. To manage the connection, it is necessary to know whether the adaptor is compatible with SPP profile. A master module can support up to 3 slaves. ![]() LMX9820A can work with an independent slave - module. Through an external processor or host (personal computer) all the available profile applications could be set to the PPS profile, for example: Dial Up Networking, Fax, LAN Access. This circuit works together with other Bluetooth modules that supports the same PPS profile or can connect through the UART serial interface to a processor or direct to the system, depending of the application. The National Semiconductor LMX9820A Bluetooth is a SPP (Serial Port Profile) module with an included chip antenna, having UART interface, which, practically emulates a data serial transmission – the data received on the UART is sent further also on the UART interface. The reading of this voltage is made through the ADC5 port of the ATmega8. ![]() Also, a semi adjustable potentiometer of 10K Ω for realizing the sensor calibration is used, thus the sensor voltage drop, at 0 the temperature of 25 C is of 2,98V, and the variation of the voltage with the temperature is linear and of approximately 0 10mV/ C. For temperature measurement the LM335Z sensor from the National Semiconductor is used, supplied to 5V. The Figure 1 shows the block diagram of the hardware system implemented. The last n values can be seen the n dimension can be set by the user. Also, using the created updated on the Internet page in a t time interval, and the previous values are stored in the data base. The local acquisition of the temperature signal is accomplished using an ATmega8with micro-controller. The temperature is For distance communication, the system connects to one of the terminals and interposes the communication with a second terminal implicated in the application. from any computer connected to the Internet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |