View unanswered posts | View active topics It is currently Mon Dec 10, 2018 7:07 am



Reply to topic  [ 6 posts ] 
 Use Utilite for Doppler Microwave Motion and Speed Detection 
Author Message

Joined: Mon Jan 09, 2012 3:16 am
Posts: 351
Post Use Utilite for Doppler Microwave Motion and Speed Detection
Utilite together with an Arduino Uno and a Parallax X-Band Microwave Motion Detector form an interesting motion and speed detection system.



Hardware Required:

1. Utilite
2. Arduino Uno
3. Parallax 32213 X-Band Motion Detector.


Attachment:
Combined.jpg
Combined.jpg [ 40.11 KiB | Viewed 8161 times ]



Principles of Operation:

Attachment:
policerad.gif
policerad.gif [ 18.05 KiB | Viewed 8124 times ]


Combined system

The combined Utilite - Arduino - Parallax System implements a fairly common configuration where there is a remote sensor of some kind; a local microcontoller for controlling the sensor and processing its data, and a higher order computer which provides overall system control, system integration, and a Human Interface (HI). Each of the individual components operate as follows:

1. Parallax Detector

The Parallax Emitter/Detector emits 10.525 GHz microwaves which reflect off of nearby objects. Any moving object in the field of view of the detector reflects waves back to the detector which are slightly different in frequency than the emitted source signal. The difference in frequency between the transmitted and received signals is due to the Doppler effect. The detector combines the original emitted signal and the reflected signal it receives in a mixer and outputs the difference between the two - which is a signal in the audio frequency range.

For more information about the Parallax X-Band Motion Detector see:

http://www.parallax.com/sites/default/f ... v1.1_0.pdf

2. Arduino

The Arduino serves to power, control, and decode the Parallax sensor. The Arduino runs a continuously looping sketch which turns the sensor on and off as directed by Utilite. The Arduino also receives the sensor's audio range Doppler output, counts the the number of cycles the detector outputs in a given gate time, and provides that count value to Utilite via serial communication.

3. Utilite

Utilite using a Perl application implements overall control of the system, higher order calculations, and display of results via a graphical user interface. Utilite uses serial communications to send enable and gate time control comands to the Arduino and to receive pulse count data from Arduino. Utilite then uses the pulse count data received to indicate if motion is detected and to calculate the Doppler frequency and speed of the target. The logic and equations used are as follows:

A. If Pulse Count > 0 Then Motion is Detected

B. Doppler Frequency (Hz) = Pulse Count / Gate Time (sec)

C. Speed (m/sec) = (Doppler Frequency * C) / (2 * F)

Where:
C = Speed of Light = 300,000,000 m/sec
F = Emitted Frequency = 10,525,000,000 Hz

4. Combined System


Parallax Detector Block Diagrams (Top)
&
Overall System Schematic Diagram (Bottom):

Attachment:
Diagrams.jpeg
Diagrams.jpeg [ 135.54 KiB | Viewed 8112 times ]


Last edited by hassellbear on Fri Apr 18, 2014 8:19 pm, edited 21 times in total.



Wed Apr 16, 2014 5:48 am
Profile

Joined: Mon Jan 09, 2012 3:16 am
Posts: 351
Post Re: Use Utilite for Doppler Microwave Motion and Speed Detec
Prototype:
Attachment:
Prototype.JPG
Prototype.JPG [ 131.94 KiB | Viewed 8128 times ]



Results:
Attachment:
Interface.jpeg
Interface.jpeg [ 150.17 KiB | Viewed 8153 times ]



Observations
Attachment:
Radar Equipment.jpeg
Radar Equipment.jpeg [ 195.09 KiB | Viewed 8112 times ]


1. Unlike the typical CW (Continuous Wave) speed radar equipment I am accustomed to experimenting with, the Parallax detector does not seem to respond to any form of modulation of the refelected signal. Radar calibration tuning forks which modulate the reflected signal and simulate a moving object are not detected by the Parallax sensor. The inability to use calibration tuning forks makes it difficult to verify the correctness of the speeds reported by the Utilite - Arduino - Parallax system. Calibration verification has to be accomplished using a moving object having a known speed.

2. The X-Band output of the Parallax sensor produces no response by my commercially available speed radar detectors - even though they are tuned to detect 10.525 Ghz, X-Band signals. I believe this is because the Parallax sensor's output is not a CW signal, but instead consists of short duration (2 kHz, 4% duty cycle) pulses. It may be that the radar detector's anti - falsing features are correctly ignoring the signal of the Parallax device which is typically only used in motion detecting equipment instead of for speed detection.


Conclusions:

1. The overall system is very sensitive to motion. It even detects off-axis movement occurring in the side lobes of the antenna radiation pattern.

2. Utilite again demonstrates its versatility in fulfilling and performing a wide variety of roles.


The Code:

Arduino Sketch

/*
Arduino Sketch for controlling and reading output of Parallax
X-Band Motion and Speed Detector

Darryl E. Hassell
4/8/2014
*/

#include <FreqCounter.h> //Call Arduino Frequency Counter Library

// Declare and set variables
char INBYTE = '-';
int ledPin = 13; // LED on pin 13
int radarPin = 12; //Radar enable on pin 12
int gatetime = 1000; //Frequency Counter Gate Time in mSec
int looptime = 1000; //Program loop interval in mSec
long int count = 0;


void setup()
{
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(radarPin, OUTPUT);
}


void loop()
{
// Begin-Read and execute control characters from Utilite

{
INBYTE = Serial.read(); // read next available byte

// Disable sensor by sending character '0'
if( INBYTE == '-' )
{
digitalWrite(ledPin, LOW); //Disable detector
digitalWrite(radarPin, LOW); //Turn led off
}

// Enable sensor by sending character '1'
else if( INBYTE == '+' )
{
digitalWrite(ledPin, HIGH); //Enable setector
digitalWrite(radarPin, HIGH); //Turn led on
}

//Set gate time fast (1 sec) by sending character 'F' - 1 Hz resolution
if( INBYTE == 'F' )
{
gatetime = 1000; //Set counter gate time to 1000 mSec (1 Sec)
looptime = 1000; //Set program loop interval to 1000 mSec (1 Sec)
}

//Set gate time slow (10 sec) by sending character 'S' - 0.1 Hz resolution
if ( INBYTE == 'S' )
{
gatetime = 10000; //Set counter gate time to 10000 mSec (10 sec)
looptime = 10000; //Set program loop interval to 10000 mSec (10 Sec)
}

//End-read and execute control characters from Utilite

//Count number of cycles during specified gate time
FreqCounter::f_comp= 8; // Set compensation to 8
FreqCounter::start(gatetime); // Count cycles for specified gate time
while (FreqCounter::f_ready == 0) // wait until counter ready

//Clear and initialize count variable
count = 0;

//Read number of cycles counted during gate time
count = (FreqCounter::f_freq);

//Display number of cycles counted during gate time
Serial.println(count);

delay(looptime);
}

}



Perl App for Utilite

#!/usr/bin/perl -w
#
# Perl/TK script for controlling and reading Arduino based X-Band Motion Detector
# Motion.pl
# Darryl Hassell
# 4/15/2014

# Load Modules
use Tk;
use Device::SerialPort;

# Define and Initialize Variables
$count = '--';
$countdivisor = '--';
$freq = '--';
$freq_label = '--';
$speed = '--';
$speed_label = '--';
$target = '--';
$target_label ='--';

# Configure Serial Port
my $port = Device::SerialPort -> new("/dev/ttyACM0");
$port -> baudrate(9600);
$port -> databits(8);
$port -> parity("none");
$port -> stopbits(1);

# Initialize Arduino to Off and Fast Gate
sleep(1);
$port -> write('-');
sleep(1);
$port -> write('F');
sleep(1);
$countdivisor = 1;

# Create Main Window
$WinMain = MainWindow -> new;
$WinMain -> resizable (0,0);

# Label Main Window
$myframe = $WinMain -> Frame ();
$myframe -> Label(-text => 'Utilite/Arduino X-Band Motion and Speed Detector', -font => "helvetica 15 bold") -> pack ();
$myframe -> pack ();

# Measure Window
$myframemeasure = $WinMain -> Frame (-relief => 'groove', -bd => 5);
$myframemeasure -> Label(-text => 'Measure', -foreground => 'black', -font => "helvetica 12 bold") -> pack ();

$onbutton = $myframemeasure -> Button (-text => ' On ', -foreground => 'black', -background => 'steelblue', -command => \&on_button);
$onbutton -> pack (-side => 'left');

$offbutton = $myframemeasure -> Button(-text => ' Off ', -foreground => 'black', -background => 'green', -command => \&off_button);
$offbutton -> pack (-side => 'right');

$myframemeasure -> pack (-side => 'left');
$myframemeasure -> pack (-padx => 5, -pady => 40);


# Gate Time Window
$myframegate = $WinMain -> Frame (-relief => 'groove', -bd => 5);
$myframegate -> Label(-text => 'Gate', -foreground => 'black', -font => "helvetica 12 bold") -> pack ();

$fastbutton = $myframegate -> Button(-text => 'Fast',-foreground => 'black', -background => 'yellow', -command => \&fast_button);
$fastbutton -> pack (-side => 'left');

$slowbutton = $myframegate -> Button(-text => 'Slow',-foreground => 'black', -background => 'steelblue', -command => \&slow_button);
$slowbutton -> pack (-side => 'right');

$myframegate -> pack (-side => 'left');
$myframegate -> pack (-padx => 5, -pady => 40);

# Target Detection Window
$myframetarget = $WinMain -> Frame (-relief => 'groove', -bd => 5);
$myframetarget -> Label(-text => ' Motion ', -foreground => 'black', -font => "helvetica 12 bold") -> pack ();
$target_label = $myframetarget -> Label(-text => "$target", -foreground => 'red', -font => "helvetica 12 bold") -> pack ();
$myframetarget -> pack (-side => 'left');
$myframetarget -> pack (-ipadx => 0, -ipady => 2);
$myframetarget -> pack (-padx => 5, -pady => 40);

# Doppler Display Window
$myframedoppler = $WinMain -> Frame (-relief => 'groove', -bd => 5);
$myframedoppler -> Label(-text => 'Doppler Freq.', -foreground => 'black', -font => "helvetica 12 bold") -> pack ();
$freq_label = $myframedoppler -> Label(-text => "$freq".' Hz', -foreground => 'red', -font => "helvetica 12 bold") -> pack ();
$myframedoppler -> pack (-side => 'left');
$myframedoppler -> pack (-ipadx => 0, -ipady => 2);
$myframedoppler -> pack (-padx => 5, -pady => 40);


# Speed Display Window
$myframespeed = $WinMain -> Frame (-relief => 'groove', -bd => 5);
$myframespeed -> Label(-text => ' Speed ', -foreground => 'black', -font => "helvetica 12 bold") -> pack ();
$speed_label = $myframespeed -> Label(-text => "$speed".' m/sec', -foreground => 'red', -font => "helvetica 12 bold") -> pack ();
$myframespeed -> pack (-side => 'left');
$myframespeed -> pack (-ipadx => 0, -ipady => 2);
$myframespeed -> pack (-padx => 5, -pady => 40);


$WinMain -> repeat(1000, \&proc_data);
MainLoop();

# Subroutines

sub proc_data
{
#Grab Arduino Output
my $char = $port -> lookfor();

if ($char)
{
$count = $char;
}

#Test Data for Motion (Count > 0)
if ($count > 0)
{
$target = 'Detected !';
$target_label -> configure ('-text' => $target);
}

else
{
$target = 'Searching';
$target_label -> configure ('-text' => $target);
}

#Compute Frequency and Speed

if ($countdivisor == 1)
{
$freq = sprintf("%.0f", ($count/$countdivisor));
$freq_label -> configure ('-text' => "$freq".' Hz');
$speed = sprintf("%.0f", (($freq)*(3e8))/((2)*(10.525E9)));
$speed_label -> configure ('-text' => "$speed".' m/sec');
}

if ($countdivisor == 10)
{
$freq = sprintf("%.1f", ($count / $countdivisor));
$freq_label -> configure ('-text' => "$freq".' Hz');
$speed = sprintf("%.1f", (($freq)*(3e8))/((2)*(10.525E9)));
$speed_label -> configure ('-text' => "$speed".' m/sec');
}

}




sub off_button
{
$port -> write('-');
$onbutton -> configure (-background => 'steelblue');
$offbutton -> configure (-background => 'green');
}

sub on_button
{
$port -> write('+');
$onbutton -> configure (-background => 'red');
$offbutton -> configure (-background => 'steelblue');
}

sub fast_button
{
$port -> write('F');
$fastbutton -> configure (-background => 'yellow');
$slowbutton -> configure (-background => 'steelblue');
$countdivisor = 1;
}

sub slow_button
{
$port -> write('S');
$fastbutton -> configure (-background => 'steelblue');
$slowbutton -> configure (-background => 'yellow');
$countdivisor = 10;
}


Wed Apr 16, 2014 6:58 am
Profile

Joined: Fri Mar 25, 2016 7:48 am
Posts: 1
Post Re: Use Utilite for Doppler Microwave Motion and Speed Detec
very nice........

_________________
== Solitaire ==


Fri Mar 25, 2016 7:49 am
Profile

Joined: Mon Jun 04, 2018 2:53 pm
Posts: 1
Post Re: Use Utilite for Doppler Microwave Motion and Speed Detec
arduino projects pdf is a book used for learning A Tour of Arduino, LED Projects, Sensor Projects, Light Projects, Sound Projects, and Power Projects.
http://computersciencepdf.com/arduino-projects-pdf/


Mon Jun 04, 2018 2:54 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.