Você está na página 1de 11

LOOP DETECTOR

21st June 2018 Colpitts Oscillator Based Loop Detector

Introduction: Loop Detectors are most commonly used Vehicle


Detection Method also called as Inductive Loops. The heart of this
detection method is Colpitts Oscillator which uses Tank Circuit to
produce oscillations. These oscillations are then processed using a
microcontroller.
Loop Detector

Loop Detector
C O L P I T T S O S C I L L AT O R BA S E D LO O P D E T E C TO R

ABSTRACT:
An inductive loop consists of wire "coiled" to form a loop that usually is
a square, circle or rectangle shape that is installed into or under the surface
of the roadway.
Inductive loops work like a metal detector as they measure the change
in the field when objects pass over them. Once a vehicle drives over a loop
sensor the loop field changes which allows the detection device to detect the
presence of an object (mainly a vehicle).
Inductive loops are referred to as presence detectors and in traffic
detection are often used in combination with axle sensors to collect
classification data such as speed and length data.

WORKING:
Normally for Loop Detector, a coil of wire, which is in my case is about
6.5 feet in diameter (measurement of 4.5 Ft x 2.5 Ft (Length x Breadth)) with
about 3 loops(turns), is placed under the floor or the road. On the floor or
road, the grooves are cut, and the wire is placed into these groves.
When a metal body like a bike or a car passes over this loop, the car or
bike becomes the core of the loops, the magnetic field and inductance of the
coil is suddenly changed due to the presence of the vehicle.
The microcontroller detects this sudden change in the form of
frequency and then process it. The microcontroller can also classify the
vehicle type as different vehicle size will have different change in inductance
value and accordingly it will give different frequency output value.

Page 1
Loop Detector

CIRCUIT DIAGRAM:
The below circuit explains the working of loop detector-

GPIO 5 : This is the general purpose input output digital pin of Arduino UNO
and also it is Timer1 pin which is used as frequency counter pin or pulse
counter.

Loop Input : This is loop input header of two pins. The loop ends are attached
to this input. The inductance value is about 50uH for the loop size 4.5ft x 2.5ft

Power Supply: The power supply used is 12V DC 1A.

Page 2
Loop Detector

SPECIFICATIONS:
• Tuning: Automatic
• Detection type: Presence/Pulse
• Presence time: Infinity
• Pulse duration: 17 ms
• Signal filtering: Automatic
• Coil/loop inductance: 20 uH – 1000 uH
• Frequency range: 40 kHz – 900 kHz
• Frequency adjustment: Automatic
• Sensitivity: About 1.6 Feet
• Detection speed: <10 ms
• Startup time: ~4 sec
• Power supply: 12 V DC/2A
• Power supply inputs: DC Barrel Jack & 2 pin Screw Terminal
• Current consumption: ~50mA

Page 3
Loop Detector

PIN DESCRIPTION:

1) +12V : This is power supply of loop detector. (Note : Do not use it if loop
detector is powered by 12V Jack )

2) 12V JACK : This is also power supply of loop detector. ( Note : This is
preferred power supply input. When powering loop detector, always use
anyone power input i.e +12V or 12V JACK )

3) Loop Input: This is the loop wire input (No polarity).

Page 4
Loop Detector

4) +5V Output : This is the +5V output from Arduino microcontroller and can
be used to power the other microcontroller.

5) Digital Output : This is the GPIO Pins(9, 10, 11, 12) of Arduino
Microcontroller (UNO, NANO, PROMINI).
SOURCE CODE ON ARDUINO IDE:
#include <SoftwareSerial.h>

#define ESP8266_RX 2 // connect to D2 of NodeMCU

#define ESP8266_TX 3 // connect to D1 of NodeMCU

SoftwareSerial ESPserial(ESP8266_RX, ESP8266_TX); // RX | TX

unsigned long startMillis; //some global variables available anywhere in the program

unsigned long currentMillis;

const unsigned long period = 250; //the value is a number of milliseconds

const unsigned long OCR1_PRESET = 65535; // preset TOP value for Timer1 Output Compare (used
for either OCR1A or OCR1B)

unsigned long pulseCnt = 0; // for saving the timer value

int overflowT1 = 0; // timer overflow (65535)

int sampleTime = 17; // sample time to collect timer values of 5ms

int sampleFactor2 = 2;

unsigned long pulse_array[6] = {};

int pulse_array_index = 0; // 0...5

long initialfrq = 0;

long floatfrq = 0;

long diff = 0;

unsigned long prev_value = 0;

unsigned long detection_strength = 0;

unsigned long count_car = 0;

unsigned long count_bike = 0;

unsigned int state = 0;

int variable=2;

String variable1="";

void initT1() { // setup timer1

TCCR1A = 4; // timer Mode, - Timer1 is set in CTC Mode (Clear Timer on Compare
match)

NOTE: Double click above snippet to open the source code.

Page 5
Loop Detector

SENSING LOOP GEOMETRY:


Sensing loops are preferably rectangular form in shape and should be
installed in vertical or horizontal positions depending upon the site and use
case. Note that the if the size of loops are small then the height of detection
is also affected causing problems in detection of high bed vehicles and some
SUV cars.

This is because the detection height is measured as 2/3rd of small leg


of the loop. For example, if the loop geometry is 3ft x 6ft then the detection
height will be of 2 feet (2/3rd of small leg i.e. 3feet).

The loop geometry can vary depending upon the site where the loop
will be installed. Loop sizes will be explained below(Ref. Fig 1).

Also, the loop turns are determined depending upon the use case.
For example, if loop detectors are installed to determine heavy vehicles such
as cars, SUV, Truck etc. then the turns can be of 3 turns and 4 turns or more
to determine the light vehicles such as bikes.

Note that, more number of turns results in more stability in


detection. But in general, 3-6 turns are considered as standard and good
practice.

While installing the loop wires in the pavement try to make the
height of pavement as much as equivalent to the road surface leaving about
2-3mm(Ref. Fig 1).

Proper installation of the loops is essential for reliable and accurate


vehicle detection. Most vehicle detector problems are caused by improper
loop installation.

Page 6
Loop Detector

Loop sizes may differ depend on the lane, width, traffic patterns, and type of
vehicles to be detected.

Following loop sizes are used today with most access control systems:

• Large Rectangular loops (i.e 4’ x 8’, 6’ x 8’, 6’ x 12’) are used to detect
larger vehicles and high bed vehicles(trucks).
• Small size loops (i.e. 2’ x 5’, 3’ x 6’, 6’ x 6’) are used to detect smaller
vehicles, such as motorcycles and automobiles
• Important Note: Typical detection height is about 2/3rd of the shortest
leg of the loop.

Page 7
Loop Detector

SENSING LOOP GEOMETRY FOR SMALL VEHICLE DETECTION SUCH AS


BICYCLES:
1)

2) Quadrupole Loop

Page 8
Loop Detector

USEFUL INFORMATION ABOUT LOOP INDUCTANCE CALCULATION:


This useful calculation will confirm that the proper configuration and
installation techniques are applied for application.
• The typical sensing height is 2/3rd of the shortest leg of a loop (in feet). Therefore a 4’ x 8’ loop
typically has a detection height of 2.66 feet.
• The inductance of a conventional four-sided loop can be estimated using the formula:

L = P x (T2+ T) / 4 Where, L = Loop Inductance in micro Henries


P = Loop Perimeter in feet
T = Number of turns of wires in saw slot
Therefore a 4’ x 8’ loop with 4 turns would be:
L = (4 + 8 + 4 + 8) x (42+ 4) / 4
L = 24 x (16 + 4) / 4 L = 24 x 20 / 4
L = 24 x 5
L = 120 micro Henries
Note: Loop feeder cable typically adds 0.22 micro Henries of inductance per foot of cable

Page 9
Loop Detector

REFERENCE DATA AND MEASUREMENT:


1) Recommended Number of Turns per size of the Loop (Fig 2).

2) Calculation of loop inductance (Fig 3).

Page 10

Você também pode gostar