This guide is provided for informational and educational purposes only. While every effort has been made to ensure accuracy, the author accepts no responsibility for errors, omissions, or outcomes resulting from the use of this material. Building, soldering, programming, and operating electronic devices involve risks that include but are not limited to electric shock, burns, fire, or equipment damage. By following this guide, you assume full responsibility for your safety, your tools, your materials, and the final device. Always follow appropriate safety practices and proceed at your own risk.
NOTE: If you get a VERY SLOW FRAMERATE then you are being throttled. See power throttling
On this page you can find setup instructions on how to create a fresh Raspberry Pi disk image, add all the required components, and finally install the motion tracking software.
It's fairly easy to do. If you want a quick alternative, then you can download a pre-made image instead (unzip and write to 32G SD card).
This image may need the motion tracker code updating to the latest version. To do this, delete the "alienmotiontracker" folder in the home directory, then repeat step 9.
NOTE: Before starting this, you will need to have soldered everything up first! Otherwise you won't be able to test it.
Write a fresh Pi image to a 32G or larger SD Card.
Set HostName to raspberrypi
Set Username and Password to alien
Insert card, and boot the pi.
Connect the Pi to Wifi or Ethernet using the menu in the top right corner
Install all updates and reboot
Configure PI for IO: First via the Raspberery Pi Configuration utility, then in Interfaces, enable SSH, VNC, SPI and I2C.
Next open a bash/command prompt and type:
sudo raspi-config
Then: Goto "Interface Options" and enable SSH, VNC, SPI and I2C again, just to be sure
Goto "Advanced Options" and choose Expand Filesystem
Exit and reboot.
Open a bash/command prompt and enter the following commands in order. This will take some time:
If 48 and 68 are not present then you have a wiring problem and need to have another look at your PCB and cable connection. If they are there then the Pi can happily see the Accelerometer and Analog to Digital converter boards!
Test 2: With the DreamRF+Radar hat connected, open a NEW bash/command prompt enter the following commands:
cd alienmotiontracker
sudo ~/luma-env/bin/python run_streaming_tracker.py
If all is well you should see the following output:
If the radar was detected correctly, it will have the above ID and the chip will be identified as BGT60TR13C. If not, please check it is connected correctly.
For now, LEAVE THIS PROCESS RUNNING!
Test 3: Open another bash/command prompt and type in the following:
cd alienmotiontracker
~/luma-env/bin/python main.py
And The tracker software should start. NOTE: While the splash screen is displayed, the accelerometer is being calebrated. DO NOT MOVE It while the splash screen is visible.
Auto-Start Configuration. Kill off any of the bash/command prompts you have running and start a new one, and enter the following:
At this point, NANO, a simple text editor will appear. Use the cursor keys and add the following line somewhere near the top.
gpio=20=op,dl
Press CTRL+O and then Enter to save it, then press CTRL+X to exit.
USB Audio Configuration - With the USB Audio device plugged in, start a new bash/command prompt and type in:
sudo raspi-config
Then use the cursor keys to browse to: System Options >> Audio
Select USB Audio
Select OK and Exit.
Tip: Disable starting the GUI for better performance
Finally, reboot the Pi from the menu.
After this is all done, your Pi, with the hardware connected should boot up and work. This will be the first time you get to play with the setup!
Some useful commands:
Start the Service (start the tracker):
sudo systemctl start startup_scripts.service
Stop the Service (stop the tracker):
sudo systemctl stop startup_scripts.service
List Running Python Processes:
pgrep -a python3
Stop a single Process:
sudo kill <Process ID>
Start the GUI (if you have disabled it)
sudo init 5
Power Throttling Troubleshooting: If the framerate is slow, you are probably being throttled due to poor power supply. You need to use thicker wires, double them up and shorten them!
You can see this while the desktop is visible, or by using the following command:
vcgencmd get_throttled
You will get a response like: throttled=0x50005 or throttled=0x50000
Then you have or are being throttled.
Ideally it needs to look like throttled=0x0 which means everything is running ok. If you see any '1' or '4' then you also have an issue.
If the problem still persists, as a LAST RESORT you can do this, but this might make the system unstable:
sudo nano /boot/firmware/config.txt
At this point, NANO, a simple text editor will appear. Use the cursor keys and add the following line somewhere.
avoid_warnings=2
Press CTRL+O and then Enter to save it, then press CTRL+X to exit.
Disclaimer: This guide is provided for informational and educational purposes only. While every effort has been made to ensure accuracy, the author accepts no responsibility for errors, omissions, or outcomes resulting from the use of this material. Building, soldering, programming, and operating electronic devices involve risks that include but are not limited to electric shock, burns, fire, or equipment damage. By following this guide, you assume full responsibility for your safety, your tools, your materials, and the final device. Always follow appropriate safety practices and proceed at your own risk.