Milestone 1
Table of contents
Overview
The objective of this milestone is for each student to prepare a laser tag unit for their own use throughout the course. Pass off and assignment submissions for Milestone 1 will be accomplished individually.
Kits for your laser tag units are available for purchase through the ECE Shop in CB 416. As a part of this milestone, you are expected to assemble your laser tag kit and integrate your analog board designed in ECEN 340. Once tested, your laser tag unit will become a development platform for completing other milestones.
General Requirements
- Verify that you have an analog board that meets specifications
- Review LiPo battery safety
- Assemble laser tag kit and integrate analog board
- Verify functionality of laser tag unit
Specifications
Analog Board Receiver
Verify that you can receive a net 100 mV RMS FFT signal from an LED in a laser tag unit excited with a 0 - 3.3V, 1471 Hz square wave at a distance of 40 feet (net meaning the difference from the next largest peak).
You will be using the laser tag unit mounted on the wall in the lab for the light source. Use an oscilloscope at a test station in the rear of the Analog Lab to capture one-half second of data from the output of your receiver. Save the raw data from the oscilloscope on a USB flash drive in CSV format. The raw data needs to be collected with a sample rate of 100 ksamples/second.
You can use the FFT capability of the oscilloscope to check if you meet the specification before capturing the CSV file that you will submit.
Oscilloscope settings:
- Horizontal scale: 50 ms/
- Under the save menu select CSV
- Under the save menu select settings set the number of samples to 50,000
You can verify the sample rate by reading the data into MATLAB and subtracting the time sample. The MATLAB code would be the following.
1/max(diff(t))
The MATLAB output should be 1E5.
LiPo Battery Safety
Lithium Polymer (LiPo) batteries are generally safe when used correctly and protected from thermal, mechanical, and electrical stress. If not, they can unleash their power in a display of fire. When the LiPo battery is properly installed in the laser tag unit, it will be protected from mechanical stress or damage by the cover. Furthermore, it will be protected from electrical stress during operation by the battery management circuitry on the main digital board. Thermal protection will need attention from you. The best temperature for storing LiPo batteries is between 40 and 72 degrees Fahrenheit. Never store them above 80 degrees.
The greatest risk to your LiPo battery is mishandling before it is installed in the laser tag unit. Do not drop, dent, or puncture the battery pack. If it has been dropped, dented, or damaged in any way, do not install the battery. Purchase another battery and dispose of the damaged one following the steps outlined in the article below.
Review the section on Lithium-Ion and Lithium Polymer Batteries, and then take the quiz on Learning Suite.
Laser Tag Kit Assembly
View the Laser Tag Kit Assembly Video for helpful instructions. Kit assembly occurs in five main steps:
- Handle and trigger
- I/O backend
- Analog frontend
- Main digital board (plus acrylic, battery, & handle)
- Final assembly
Your kit does not contain the LiPo battery for safety reasons. When you are ready to insert your battery, you can obtain one from the ECE Shop in CB 416. It is included in the price of your kit.
Verify Functionality
Program your laser tag unit with a diagnostic program by following these steps:
- Connect a USB cable from a lab machine to the laser tag unit (top opening)
- Open a terminal window on the lab machine
- Enter the commands below
wget https://byu-cpe.github.io/ecen390/media/milestones/m1/diag.img
export IDF_TOOLS_PATH=/opt/esp5; . /opt/esp5/esp-idf/export.sh
esptool.py write_flash 0x0 diag.img
If you are programming the diagnostic with your own computer and have installed the ESP32 tools yourself, the second line above (export) may be different for your system.
The main trigger button and the four navigator (NAV) buttons on the laser tag unit can be used to control the diagnostic program. Their function is listed below:
- Trigger: Transmit on the selected channel while holding the button
- NAV Left: End the program
- NAV Right: Flash all NeoPixels for 1/2 second
- NAV Up: Increment the transmit channel selection
- NAV Down: Decrement the transmit channel selection
When first powered on, a startup sound is played. The receiver is always active. Energy received on the 10 player frequency channels is continuously updated on the LCD.
Pass Off and Submission
Analog Board Receiver
Submit the oscilloscope captured CSV file for the “M1 Receiver Passoff” assignment on Learning Suite.
This CSV file should be time-domain data sampled by the oscilloscope over 0.5 seconds and not a screen shot.
LiPo Battery Safety
Take the quiz on Learning Suite.
Laser Tag Unit
Run the laser tag diagnostic program on your assembled laser tag unit and show a TA that it is fully functional.
- Demonstrate a sound at power on.
- Flash the NeoPixels by pressing the NAV Right button.
- While holding the trigger, shine the beam at a wall and show that you can focus the optics to a small spot.
- While holding the trigger, show that a prominent energy bar is displayed on the LCD indicating that the transmit signal is feeding back into the receiver.
- Cycle through the other channels and show that the displayed energy bar follows the selected channel when pressing the trigger.