Alien Motion Tracker Build

Experimental Settings

Experimental Settings

Some settings you can play with an experimental configurations. You may need to pull the latest version of the software from GitHub in order to try some of this:

Radar Vertically Aligned

If you want to test the radar module clipped directly to the pi such that its mounted vertically, then:

  1. Locate the alienmotiontracker/radar/config folder.
  2. Make a folder and MOVE the two BGT60TR13C_... files into it
  3. Copy the two files from the Vertical folder into this one

And that's it! Restart the software and see how well it works (or not!)

Lower Power Usage (battery lasts longer)

This is an experiment with lowering computational requirements of the received radar data. Witth the default settings, the radar should have a resolution of around 3cm. However, the tiny display we're using only really has a resolution of around 6cm.

This small changes configures the radar to have that lower resolution, which reduces the amount of computations that need to be performed, reducing the CPU usage and this battery life is increased!

Detection quality shouldn't really be affected - Let me knwo how you get on with this!

  1. Locate the alienmotiontracker/radar/config folder.
  2. Make a folder and MOVE the two BGT60TR13C_... files into it
  3. Copy the two files from the Experimental_LowerPowerUsage folder into this one

And that's it! Restart the software and see how well it works (or not!)

Data Logging and Playback

In my video I said that I recorded what the device was doing while I was playing Laser Quest/Tag. This is how you enable that, and how you also enable playback.

  1. Locate the alienmotiontracker folder.
  2. Open the main.py file in a text editor
  3. Locate the line that says self.dataLog = False and change it to self.dataLog = True
  4. Restart the software. A file will be automatically saved ino the folder looking called somethign like datalog_yyyymmdd_hhmmss_ms.bin

To play back the recordings:

  1. Locate the alienmotiontracker folder.
  2. Open the main.py file in a text editor
  3. Locate the line that says self.dataLog = True and change it back to self.dataLog = False
  4. Locate the line that says self.replayFile = None and change it to self.replayFile = "datalog_yyyymmdd_hhmmss_ms.bin" (change it to be the name of the file that was created)
  5. Restart the software and it will play back. Once it runs out of data it will continue being a normal tracker again.
  6. To disable the playback, set self.replayFile = None
Alien "Blob" Size

If you want to change the size of the alien "blob" detection that gets created then (yes it should have been a constant lol):

  1. Locate the alienmotiontracker folder.
  2. Open the main.py file in a text editor
  3. Scroll down to the def renderAliens(self, nowTime, timepos): function
  4. Find the line defradius = 13
  5. The 13 is the radius in pixels. Increase it to (for example) 15 for larger blobs!
Reverse Display

If you find the aliens are being detected mirrored (backwards) or you want to point the display towards the detected aliens, then change the following to flip the angle:

  1. Locate the alienmotiontracker folder.
  2. Open the main.py file in a text editor
  3. Scroll down to the def renderAliens(self, nowTime, timepos): function
  4. Locate the TWO lines where you find this:pos = ( (math.cos(alien.angle + self.rotationAngle) * distance) + 160, (math.sin(alien.angle + self.rotationAngle) * distance) + 160 )
  5. Change them both to this: pos = ( 160 - (math.cos(alien.angle + self.rotationAngle) * distance), (math.sin(alien.angle + self.rotationAngle) * distance) + 160 )
Louder "blips" when no detections happen

You can change the volume of the pulse sound that occurs when while the radar scanning is happening by:

  1. Locate the alienmotiontracker folder.
  2. Open the alienaudio.py file in a text editor
  3. Scroll down until you find idlepadded[:len(raw_click)] = raw_click * 30.0
  4. The 30.0 is a volume multiplier. Increase for louder sounds, and decrease for quieter. It may also be a limitation of the speaker too
Audio Cut-Out "silent noise"

If you want to change the volume of the "noise" added to keep the USB audio device alive then:

  1. Locate the alienmotiontracker folder.
  2. Open the alienaudio.py file in a text editor
  3. Scroll down until you find self.silentNoise = (np.random.rand(block_size).astype(np.float32) * 2 - 1) * 0.3e-3
  4. The 0.3e-3 is a volume multiplier. You can also write or replace that as 0.0003
  5. Increase or decrease that number to get what you want. A value of 1 would be very loud! 0 would be silent.
Sensitivity Settings

If you want to experiment with sensitivity and detection, then theres a whole range of magic numbers you can play with:

  1. Locate the alienmotiontracker folder.
  2. Open the radar/signal_proc.py file in a text editor
  3. Scroll down to the def update_with_sensitivity function
  4. There's lots of numbers in here, experiment and see what they do. - Let me know if you find anything cool! - ChatGPT can likely explain this file to you.