radar trap with mattel hotwheels speed gun

Hi,

i am working on a personal radar speed trap to remind people to slow down a bit.

Now i am searching for a way to read the frequency and in a next step the speed out of the microwave radar from a Hotwheels Speed Radar Gun Hacking the Hot Wheels Radar Gun.
Is this possible with Arduino UNO?
I came through some code Arduino Forum which probably makes it possible but how does it work with the mattel radar?

maybe someone is stuck here too. the hotwheels radar gun is a very usefull an inexpensive toy to work with - if you know how...

From what I read of the device it already "takes out the doppler frequency" in its internal mixer. You don't have to worry about doing it yourself as working with such high frequencies is the hardest part. You just need to use the output signal. That means the frecuency components you will be working with are low and not the microwave signal itself. The doppler frequency range will be in the audio range and below that, even for the fastest moving objects (cars I guess). Those low frequencies will be a piece of cake for Arduino. Measure the frequency every second or so and then calculate the speed from there. I don't see why you want to use an Arduino if the device does all that by itself. Well I guess you should have your reasons.
Good Luck.

Thanks for your answer. You are right it is working pretty well without any influence. But i want something to happen if the measured speed is to high. I thought of a flashlight and a foto or a audio warning. But don't worry i am not using it on cars...

Maybe the easier way to get a speed signal out of it is to read out the display?

Have you made any progress with the Mattel Radar gun? I found some resources and I can easily read the input to the Mattel microprocessor. I have not figured out the formula or relationship between the signal and speed.

Heres hoping you are still watching this post and have had some level of success.

Bryan

Hej Bryan,

yes still watching. My level of success was very mellow and its been a while now. Here are some memoryfragments: Yes getting some data out of it was easy. I copied the data (numbers) in a excelsheet and made a diagramm so i saw some peaks and stuff. But they changed randomly so i didn't get a real speed measurement out of it. The signal is very instable it reacts on every move so you have to filter it or control the triggering. So maby you have more luck and hopefully find the right code to encode the data...
What are your plans with it anyway?

Best Regards,

Jasper

I have made some decent progress. The frequency does jump around quite a bit, but I have been able to filter it out -to some extent- just by clipping the spikes. Next I will do some averaging work to find a stable reading. Here is a bit of code I have cobbled together. Yes I know there are some pieces of un-used garbage floating around in the code, haven't spent much time cleaning it up as its a proof of concept thus far.

What I plan on doing with it is a speed readout for my street that can hopefully slow the idiots down driving past my house and kids. I have a matrix LED marquee display -circa 1980's- that I am re-purposing once I sort out the wiring for all the shift registers.

//* connect pin 7 to input circuit

#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
#include <FreqPeriod.h>
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

double lfrq;
long int pp;

float kph = 0;
float mph = 0;
float omax = 0;
float nmax = 0;
float kmax = 0;
int count = 0;

void setup() {
  Serial.begin(9600); 
  FreqPeriod::begin();
  lcd.begin(16, 2);

  Serial.println("Radar ON!!!");
  lcd.print("   Radar ON!!!");
  delay(1000);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("KPH:");
  lcd.setCursor(0,1);
  lcd.print("MPH:");

}

void loop() {
  uint8_t buttons = lcd.readButtons();

  pp=FreqPeriod::getPeriod(); // read the value from the sensor:
  lfrq= 16000400.0 / pp;

  if (buttons & BUTTON_SELECT) {
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("KPH:");
    lcd.setCursor(0,1);
    lcd.print("MPH:");
  }
  if(lfrq < 5000)
  {

    if (pp ){
      count++;


      Serial.print("Freq:");
      Serial.print(lfrq);
      Serial.print(" Hz  / ");

      Serial.print("Count: ");
      Serial.print(count);
      Serial.print("  /   ");

      mph = (lfrq / 31.36);
      kph = (mph * 1.609344);
      nmax = mph;
      constrain(mph,0,100);
      constrain(kph,0,100);

      if(nmax > omax)
      {
        omax = nmax;
        kmax = omax * 1.609344;
      }

      Serial.print(kph);
      Serial.print(" KPH ");
      Serial.print(mph);
      Serial.println(" MPH");

      lcd.setCursor(11,0);
      lcd.print(kph,2);
      lcd.setCursor(11,1);
      lcd.print(mph,2);
      lcd.setCursor(4,0);
      lcd.print(kmax,2);
      lcd.setCursor(4,1);
      lcd.print(omax,2);

      if(count == 10)
      { 
        omax = 0;
        count = 0;
      }
    }
  }
}
pp=FreqPeriod::getPeriod(); // read the value from the sensor:

this is all you do to get the value from the Matell radar? how did you wire it to the board?

I was reverse engineering the wave guide to try figure out how they tied it into the main circuit. Some google searching found that someone had already done the heavy lifting (yeah!). The board has all of the amps and comaritor circuit complete with a nice handy "test" pin on the trace leading to the chip. I tied onto it straight to an input on the Arduino.

https://courses.cit.cornell.edu/ee476/FinalProjects/s2009/cdl32_mjc89/cdl32_mjc89/index.html

Zerodegreec:
I have made some decent progress. The frequency does jump around quite a bit, but I have been able to filter it out -to some extent- just by clipping the spikes. Next I will do some averaging work to find a stable reading. Here is a bit of code I have cobbled together. Yes I know there are some pieces of un-used garbage floating around in the code, haven't spent much time cleaning it up as its a proof of concept thus far.

What I plan on doing with it is a speed readout for my street that can hopefully slow the idiots down driving past my house and kids. I have a matrix LED marquee display -circa 1980's- that I am re-purposing once I sort out the wiring for all the shift registers.

//* connect pin 7 to input circuit

#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
#include <FreqPeriod.h>
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

double lfrq;
long int pp;

float kph = 0;
float mph = 0;
float omax = 0;
float nmax = 0;
float kmax = 0;
int count = 0;

void setup() {
  Serial.begin(9600);
  FreqPeriod::begin();
  lcd.begin(16, 2);

Serial.println("Radar ON!!!");
  lcd.print("  Radar ON!!!");
  delay(1000);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("KPH:");
  lcd.setCursor(0,1);
  lcd.print("MPH:");

}

void loop() {
  uint8_t buttons = lcd.readButtons();

pp=FreqPeriod::getPeriod(); // read the value from the sensor:
  lfrq= 16000400.0 / pp;

if (buttons & BUTTON_SELECT) {
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("KPH:");
    lcd.setCursor(0,1);
    lcd.print("MPH:");
  }
  if(lfrq < 5000)
  {

if (pp ){
      count++;

Serial.print("Freq:");
      Serial.print(lfrq);
      Serial.print(" Hz  / ");

Serial.print("Count: ");
      Serial.print(count);
      Serial.print("  /  ");

mph = (lfrq / 31.36);
      kph = (mph * 1.609344);
      nmax = mph;
      constrain(mph,0,100);
      constrain(kph,0,100);

if(nmax > omax)
      {
        omax = nmax;
        kmax = omax * 1.609344;
      }

Serial.print(kph);
      Serial.print(" KPH ");
      Serial.print(mph);
      Serial.println(" MPH");

lcd.setCursor(11,0);
      lcd.print(kph,2);
      lcd.setCursor(11,1);
      lcd.print(mph,2);
      lcd.setCursor(4,0);
      lcd.print(kmax,2);
      lcd.setCursor(4,1);
      lcd.print(omax,2);

if(count == 10)
      {
        omax = 0;
        count = 0;
      }
    }
  }
}

Hello Zerodegreec and Arduinofreak, did you guys could make this to work ?
Because I could not make this to work and get the cars speed with Arduino...
If you could help me, I really appreciate that! Check out my post: Radar Speed based on doppler device - Sensors - Arduino Forum

Hello.

I too want to make a speed trap! (I want mine to tweet the speeder with a picture).
Did you nail down the code? Thanks!

Sam