Professional Documents
Culture Documents
Embedded Internet Systems
Embedded Internet Systems
SURVEY/MONITERING
INTRODUCTION:
The main object of the project is to monitor and conduct a survey ,i.e; to
calculate the number of customers comming into supermarket ( count ++) , number of customers
going out of supermarket ( count - - ) and to compute the total number of customers at a
particular time of instance.The customer flow ,that is increment ++ and decrement – should be
stored and updated in the manager’s pc at the supermarket by using RABBIT BL2000
MICROPROCESSOR board and its web-server application.
The major part of the project is its possibilities which depends on the input
and output devices ( optical sensor and light source ) chosen to connect with rabbit board.In
clear there should be a signal receiver and signal transmitter such that to provide continoues
loop.If the loop connection is faild or disconnected the count increment ( logical 1 ) or decriment
( logical 0 ) should be happened via rabbit BL2000 mother board.
Case 1 :
Lets say optical sensor O2 and light source L2 are placed at the way
“exit” of the supermarket , if an obstacle disturbs the signal the between O2 and L2 then dynamic
c code takes it as decreasing the count.( i -- )
Case 3 :
Note 1 :
From all the above three cases ,case 2 where the optical sensors are
used is a better way to deal with the objective because there are many good reasons like low
power consumption , accuracy and high operating frequency including with BL2000
compatability , so iam conducting the objective with optical sensors and light source devices.
Note 2 :
I have chosen case 2 that is optical sensor and the light source to connect
with the bl 2000 mother board . The connections and the optical sensor are as follows :
Sensors
Specifications..
Integral Visible Light Cutoff Filter Monolithic Silicon IC Containing Photodiode, Operational
Amplifier, and Feedback Components Converts Light Intensity to a Voltage High Irradiance
Responsivity, Typically 111 mV/( W/cm2) at p = 940 nm (TSL260R)Compact 3-Lead Plastic Package
Single Voltage Supply Operation Low Dark (Offset) Voltage....10mV Max Low Supply
Current......1.1 mA Typical Wide Supply-Voltage Range.... 2.7 V to 5.5 V Replacements for
TSL260, TSL261, and TSL262 RoHS Compliant (−LF Package Only).
PACKAGE S
SIDELOOKER
(FRONT VIEW)
1 2 3
(FRONT VIEW)
1 2 3
There are three connecting pins for the optical sensor they are
We have to connect the voltage input pin indicated as number 1 to the RABBIT
BL2000 voltage supply terminal or power supply ,ie ; screw terminal J2 pin 12.The ground pin
indicated as number 2 is connected manually to screw terminal J9 pin 12 of RABBIT BL2000
.The output pin indicated as number 3 shown in above diagram is connected to RABBIT BL2000
ADC channel 0 input screw terminal J4 pin1.ADC is nothing but analog to digital converter it
converts the analog input from the optical sensor into digital output either logical one or logical
zero , its nothing but circuit “on” and “off”.If the sensor is detecting the signal from the
transmitter it shows no activity if the sensor dosnt detect the signal its count is incremented or
decremented which is i++ or i—in the dynamic c program.In this project iam using a low input
and output sensors such as TSL260R, TSL261R, and TSL262R are infrared light-to-voltage
optical sensors,each combining a photodiode and a transimpedance amplifier(feedback resistor =
16M^,8M^,and 2.8M^ respectively) on a single ,monolithic IC.output voltage is directly
proportional to the light intensity (irradiance) on the photodiode as rabbit board supports the
specified voltage and current input and output specifications.The optical sensor range or light
intensity is measured in nanometers ie; “nm”.
Description of sensor :
These devices have improved amplifier offset-voltage stability and low power consumption and
are supplied in a 3-lead plastic siderlooker package with an integral visible light cutoff filter and
lense.when supplied in the lead (Pb) free package,the device is RoHS compliant.
Functional diagram of sensor logic :
Terminal functions:
GND 1 Ground (substrate). All voltages are referenced to GND.
Lead temperature 1.6mm(1/6 inch) from case for 10 seconds ( s package ) ……………..260ºC
Note :
The device operates at a minimum of 2.7 v and maximum of 5.5 v at proper conditions ,these are
the the best specification values that made me to choose these type of sensor and moreover these
are compatable with the advanced computing single module rabbit BL2000 motherboard.These
temperature values also give a good result of output
Electrical characteristics at VDD = 5v, TA = 25ºc,Lp =940 nm ,RL =10K^
VD dark voltage ..min and max values are same for all models of devices
TSL260R,TSL261R,TSL262R that is min 0 max 10 and type is 4 in mv
DATA SHEET:
Depending on the purpose of client we can take any of the three models and these photo
transistors were made by a company called TEXAS ADVANCED OPTO ELECTRONICS
SOLUTIONS.There are varied range of opto devices to make our task done but by considering
all the factors like response, refresh rate and other atmospheric temperature and light
conditions.Some time voltage flickers may cause irrelavent responcive signal and causes a bad
output or missleneous output ranges which causes mismatch with the Dynamic c program,results
to no functioning the device.
Reference ……………………………………..www.taosin.com
Typical characteristics :
This is a graph taken at different temperature levels of the sensor.
Circuit:
LIGHT SOURCE:
We can use a strong source of light tramission such as light emmiting diodes or
laser light depending on the purpose if we use LED’s that are low power consumption and low
emission rates so some times signal may not be detected by the optical sensor and the program
may leads to crash the BL2000.so for this purpose we are using laser light source with an
external input battery or powersupply.
About BL2000 :
Description
The BL2000 gives OEM designers optional Ethernet connectivity in a low-cost, high-
performance single-board computer. These compact boards are rich with the digital I/O, A/D,
and D/A designers need for embedded control and monitoring applications, and the BL2000's
compact board size of 4.15" x 3.43" (105 mm x 87 mm) allows for easy integration. Ethernet
models are ideal for remotely monitoring and supervising another programmable system or web-
enabling new or existing products.
Features
For the most demanding applications, the BL2000 and BL2020 models include 4 channels of 12-
bit resolution A/D input, 5 channels of dual-purpose input, and 2 channels of 12-bit D/A output.
For applications not requiring high-resolution analog I/O, the BL2010 and BL2030 offer 4
channels of 10-bit resolution A/D input and 7 channels of dual-purpose input. The dual-purpose
inputs are software configurable as analog inputs or programmable-threshold digital inputs.
All BL2000 models can be programmed and debugged over Ethernet/Internet using appropriate
accessory hardware. Systems with built-in 10Base-T Ethernet can be directly controlled and
monitored across networks or the Internet and can also open sockets to remote devices, serve
web pages, or send E-mail.
About Dynamic c:
overview :
Dynamic C has been in use worldwide since 1989. It is specially designed for
programming embedded systems, and features quick compile and interactive debugging. A
complete reference guide to Dynamic C is contained in the Dynamic C User’s Manual.
You have a choice of doing your software development in the flash memory or in the data
SRAM included on the Jackrabbit. The flash memory and SRAM options are selected
with the Options > Project Options > Compiler menu.
The advantage of working in RAM is to save wear on the flash memory, which is
limited to about 100,000 write cycles. The disadvantage is that the code and data might not both
fit in RAM.
NOTE: An application can be developed in RAM, but cannot run standalone from RAM
after the programming cable is disconnected. All standalone applications can only run
from flash memory.
NOTE: Do not depend on the flash memory sector size or type. Due to the volatility of
the flash memory market, the Jackrabbit and Dynamic C were designed to accommodate
flash devices with various sector sizes.
Developing software with Dynamic C is simple. Users can write, compile, and test C and
assembly code without leaving the Dynamic C development environment. Debugging
occurs while the application runs on the target. Alternatively, users can compile a program
to an image file for later loading. Dynamic C runs on PCs under Windows 95 and later.
Programs can be downloaded at baud rates of up to 460,800 bps after the program
Board Initialization
Call this function at the beginning of your program. This function initializes the system I/O ports
and
loads all the A/D and DAC calibration constants from flash memory into SRAM for use by your
program.
The ports are initialized as follows:
void brdInit (void);
Port I/O Function Output Function
State
PA0 Output OUT0/RELAY/LED_DS4 High-Current Driver
Off
PA1 Output OUT1/LED_DS5 High-Current Driver
Off
PA2 Output OUT2/LED_DS6 High-Current Driver
Off
PA3 Output OUT3/LED_DS7 High-Current Driver
Off
PA4 Output OUT4 High-Current Driver
Off
PA5 Output OUT5 High-Current Driver
Off
PA6 Output OUT6 High-Current Driver
Off
PA7 Output OUT7 High-Current Driver
Off
PB0 Input IN6 N/A
PB1 Input CLKA N/A
PB2 Input IN7 N/A
PB3 Input IN8 N/A
PB4 Input IN9 N/A
PB5 Input IN10 N/A
PB6 Output RS485_EN Off
PB7 Output UPGOOD Bad Indicator Off
PC0 Output TXD RS-485 Inactive high
PC1 Input RXD RS-485 N/A
The light source or the change in the light range is taken as the input for the Dynamic c program
and it is converted by the analog to digital converter ports processed and compiled by the rabbit
processor.The voltage range variation makes the program to count the voltage in as addition and
voltage out as the subtraction from the total customers .It is menctioned as T in the program.
SOFTWARE CODDING:
PROGRAMM:
void main()
int i,j,T;
i=0;
j=0;
brdInit();
for(;;)
if (voltagein<2.5)
i++;
printf("total number of customers today %d \n",i);
if (voltageout<2.5)
j++;
T=i-j;
}
some of the commands which were used to complete the task success are as follows.
(1) kbhit :
Library : UTIL.LIB
PARAMETER
channel is the A/D converter input channel (0–10).
RETURN VALUE
SEE ALSO
anaIn, anaInCalib, brdInit
TLC2543 commands
D7–D4
Channel 0 - 10
Channel 11 = (Vref+ - Vref-)/2
Channel 12 = Vref-
Channel 13 = Vref+
Channel 14 = software powerdown
D3-D2
Output data length:
01—8 bits
00—12 bits (normally used as default)
11—16 bits (not supported by driver)
D1
Output data format
0—MSB first
1—LSB first (not supported by driver)
D0
Mode of operation
0—Unipolar (normally used as default)
1—Bipolar
server program:
#define TCPCONFIG1
#use “dcrtcp.lib”
#use “http.lib”
#ximport “d:\work\hellowww.html”hellowww_html
SSPEC_MIMETABLE_START
SSPEC_MIME(“.html”,”text/html”)
SSPEC_MIMETABLE_END
SSPEC_RESOURCETABLE_START
SSPEC_RESOURCE_XMEMFILE(“/hellowww.html”,hellowww_html)
SSPEC_RESOURCETABLE_END
void main()
sock_init();
http_init();
for(;;)
http_handler();
}
FLOW CHART:
BLOCK DIAGRAM OF THE CIRCUIT :
MONITOR
OR
DISPLAY
RESULT :
CONCLUSION:
This program works under certain conditions only.such as when there is no much repetation
because analog to digital conversion takes some time to get the calculations done.we can use
different sensors with high transmission and reception qualities but the costfactor becomes high.
In the program i have taken 2.5v as the cutoff voltage range such that to identify
the change in the light intensity .The variation in the light intensity or the analog inputs causes
the open circuit and it just takes it as a count either to increment or to decrement it.The count is
dependent on the {for(;;)} for loop in the program.
SUGGESTIONS :
Continuous input voltage may cause internal noise and may cause to hardware-failure
so low-noise sensors can be used
By using a high intensity source of analog inputs like laser can give effective outputs
and accurate results but to embed the rabbit port with the laser is a much though and
risky process.
By using infrared LED’s the task can be made to locost and the only drawback with
infrared led’s is that it has low input ranges and so external noise my cause the system
failure .
Using photo sensors is a good deal with the aim which has give .
REFERENCE :
http://www.rabbit.com/products/bl2000/
http://www.rabbit.com/documentation/SamplesRoadmap/roadmap.pdf
http://www.rabbit.com/documentation/docs/manuals/DynCFunctionReference/DynCFunRef.pdf
http://www.taosinc.com/default.aspx
http://www.goblack.de/desy/digitalt/sensoren/tsl-250/tsl250r.pdf
http://search.digikey.com/scripts/DkSearch/dksus.dll?
lang=en&WT.medium=cpc&WT.campaign=1654&site=UK&WT.term=optical+sensor&keywor
ds=Optical+Sensors&WT.content=text&WT.source=google&cshift_ck=1393856448cs60558108
0&WT.srch=1
APPENDIX :
appendix a:
The number of customers coming in and going out of a supermarket needs to be monitored.The
system should be capable of recording data on total customers visiting the store and the total
number of customers in the store at any one time.The data needs to be reduced.Both the recorded
and instantaneous data should be made available to the store manager’s Pc.
advantages:
miniature in hardware.
disadvantages:
The only disadvantage with this system is due to the light and external noise
interface may cause in failure or improper result.
appendix b :
connections are done as per the block diagram shone in the circuit block diagram :
available options : we can choose any of the following photo sensors
DEVICE TA PACKAGE − LEADS PACKAGE DESIGNATOR ORDERING NUMBER
TSL260R 0C to 70C 3-lead Sidelooker S TSL260R
TSL260R 0C to 70C 3-lead Sidelooker — Lead (Pb) Free S TSL260R−LF
TSL260R 0C to 70C 3-lead Surface-Mount Sidelooker — Lead (Pb) Free SM TSL260RSM−LF
TSL261R 0C to 70C 3-lead Sidelooker S TSL261R
TSL261R 0C to 70C 3-lead Sidelooker — Lead (Pb) Free S TSL261R−LF
TSL261R 0C to 70C 3-lead Surface-Mount Sidelooker — Lead (Pb) Free SM TSL261RSM−LF
TSL262R 0C to 70C 3-lead Sidelooker S TSL262R
TSL262R 0C to 70C 3-lead Sidelooker — Lead (Pb) Free S TSL262R−LF
TSL262R 0C to 70C 3-lead Surface-Mount Sidelooker — Lead (Pb) Free SM TSL262RSM−LF
appendix c :
An Overview of Dynamic C
Dynamic C has been in use worldwide since 1989. It is specially designed for programming
embedded systems, and features quick compile and interactive debugging. A complete
reference guide to Dynamic C is contained in the Dynamic C User’s Manual.
You have a choice of doing your software development in the flash memory or in the data
SRAM included on the Jackrabbit. The flash memory and SRAM options are selected
with the Options > Project Options > Compiler menu.
The advantage of working in RAM is to save wear on the flash memory, which is limited
to about 100,000 write cycles. The disadvantage is that the code and data might not both
fit in RAM.
NOTE: An application can be developed in RAM, but cannot run standalone from RAM
after the programming cable is disconnected. All standalone applications can only run
from flash memory.
NOTE: Do not depend on the flash memory sector size or type. Due to the volatility of
the flash memory market, the Jackrabbit and Dynamic C were designed to accommodate
flash devices with various sector sizes.
Developing software with Dynamic C is simple. Users can write, compile, and test C and
assembly code without leaving the Dynamic C development environment. Debugging
occurs while the application runs on the target. Alternatively, users can compile a program
to an image file for later loading. Dynamic C runs on PCs under Windows 95 and later.
Programs can be downloaded at baud rates of up to 460,800 bps after the program