Ask HN: Could I build a radar for tracking cars and boats?

6 points by jvanderbot 4 days ago

I have a street where cars travel a bit too fast sometimes, and a family cabin where boats do too.

I think it'd be fun to plot speeds and courses, just for science, so to speak.

By "build" I mean make an antenna, signal generator, signal processor, and record echos to output range and velocity for fusing, association, and tracking, possibly using an MCU to record or broadcats tracks (position and speed over time).

I'm intimately familiar with tracking math and code (EKF, Batch Filters, old Bar Shalom methods, track association, etc).

I'm mildly familiar with MCU programming and PCB layout (have 3-ish decent PCB+MCU projects done in last 15 years).

I'm not familiar with FPGA, DSP, or complex signal processing.

I'm a Ham General and can manage electronics, oscilloscopes, etc.

Presumably the hardest part is timing and signal generation, and then signal processing.

Roadside ranges are < 100m, speeds < 20m/s.

Lakeside ranges are 100-200m, speeds as high as 20m/s.

Is this even legal? I live in the USA.

solardev 4 days ago

There's projects like: https://blog.arduino.cc/2021/06/29/diy-radar-speed-sign-look... but not sure about the regulations.

Not radar, but last year there was a thread from someone who uses a webcam to record trains, and measures speed just through their pixel changes and framerate: https://news.ycombinator.com/item?id=35738987

Might work well enough for fixed-route travel... railways especially, but maybe roads are close enough? Probably not as good if the vehicle has more directional freedom and can move diagonally or straight away from the camera. It's less likely to run into any radio licensing issues, though.

lnwlebjel a day ago

Late to the party, but this is something I've wanted to do for a long time. My background is in signal processing but the hardware has always been somewhat mysterious to me. Here is an interesting link from MIT:

http://ocw.mit.edu/resources/res-ll-003-build-a-small-radar-...

Other notes: https://hackaday.com/2015/04/07/build-a-phased-array-radar-i...

https://makezine.com/article/craft/diy-phased-array-radar-fr...

I really like the idea of using wifi signals, such that you'd have to build a receiver only. I'm not sure what the range would be but it seems like getting traffic speeds in front of the house would be possible.

JohnFen 4 days ago

> Is this even legal? I live in the USA.

IANAL, not even remotely, but I have some amount of familiarity with this stuff. Don't take me at my word, though. Get expert advice instead.

FCC rules absolutely apply here, and the FCC has explicit guidance for radar transmitters (https://docs.fcc.gov/public/attachments/DA-96-2040A1.pdf). But which specific laws apply depends on a lot of things, such as what frequencies you're using.

The laws are a lot more lenient if you aren't selling the thing you make, but they still exist. In general, they boil down to "you can't cause interference with licensed transmitters" and "you can't use more than a weak signal without a license".

If I were doing a project like this, I'd probably look very hard at non-radio solutions, such as perhaps laser ranging, where there isn't much legal risk.

  • solardev 4 days ago

    You don't need to make your own radar and go through the FCC licensing on your own, though. There are commercially made hobbyist modules like https://www.digikey.com/en/products/detail/st-engineering-ur... that are already licensed: https://fcc.report/FCC-ID/VECHB100

    • jvanderbot 3 days ago

      It's difficult to tell from the three page datasheet what effective range I would get. But that's a starting point at least.

      • solardev 3 days ago

        As other posters mentioned, you would probably quickly run into FCC issues trying to scale up the radar to something powerful enough to reach across a lake.

        Probably one of the other solutions (LIDAR, machine vision in the visible, etc.) would be better for that? Or if it doesn't have to be all the time, maybe just hover a drone above them and record downwards?

        • jvanderbot 3 days ago

          "Just hover a drone over them and record downwards" seems a lot harder! What a world where that's considered easier than other sensing options.

          I think vision is a good plan for a lake, with wide baseline. It's not great for a street with oncoming traffic.

          Turns out, however, that there are COTS radars that will work in the <100m range so I might go that route for the house, and try vision for the lake.

farseer 3 days ago

Even if any of it is not legal, as long as you transmit only on common free for all frequencies such as Wifi, it would be very difficult to catch you. You can always plead innocence by saying you were building the next gen wifi point to point link in your garage.

  • JohnFen 3 days ago

    In practice, if you're just making a one-off for personal use, you'll probably get away with it for as long as nobody complains about it.

    If you do get a knock on your door, and the agents don't think you're actually trying to be malicious, what will happen is that you'll be told to stop. If you don't stop, then you'll get fined and your equipment will be confiscated.

    BTW, WiFi frequencies are not "free for all", they're just permissively licensed.

giantg2 3 days ago

It would be interesting to use motion tracking on a web cam to target vehicles with lidar.

  • jvanderbot 3 days ago

    This is what I'm trying to avoid. The complexity there is enormous. Webcams have rolling shutters and decent latency, pointing a lidar from a camera detection is not trivial - there's distortion and delays and everything would need to be very fast and steady. It's a very hard actuation and sensing problem. How do I even calibrate it so I know the lidar is pointing at the right pixels?

    Easier to use a few cameras on my roof (for wide baseline) and do triangulation. Maybe with GPS edge trigger.

    But the appeal of a small antenna and MCU is also a factor. A 5W transmitter is small and easy to use, there isn't any traffic to deal with just occasional cars, Doppler effects are fairly well understood and radar has been around for 80 years so there's some retro cool too.

    • solardev 3 days ago
      • jvanderbot 3 days ago

        Yes it would. Those track targets at a few feet, meaning all that shaking it's doing when it's "Pointing" would just wave the laser around in the general direction of the car that is much further away.

        from 4-5 feet away, a person with 2 foot width ~= .5 radians or 28 degrees of pointing accuracy needed, and no tracking accuracy needed since it doesn't seem to follow targets well. (that second link the target is all of 2 feet away and 1 foot width).

        100m away, an aproaching car has 2m width ~= 1/50 radians, or ~1 degree of pointing accuracy. More to keep on center of mass.

        And a car at that range would be about 20 pixels wide. That doesn't inspire feelings of robust visual tracking the way "Big blue blob of paper that fills 20% of the view" would.

        • solardev 2 days ago

          Makes sense. Thanks for the explanation!

pinewurst 4 days ago

You could consider something like piggybacking on a WiFi signal which would be legal.

inquisitor27552 3 days ago

seems legal, i mean as long as you dont accidentally attach cannons to it and turn it into battleships.

brudgers 3 days ago

There are probably more intersting hobbies that aren’t motivated by anger at other people for just going about their lives in reasonable ways.

Is this even legal?

If it matters, ask your lawyer. If it doesn’t matter, it doesn’t matter. Good luck.