Tracking TV Stand
|Software apps and online services:|
|Hand tools and fabrication machines:|
Developing a Walabot as a tool for construction and healthcare applications is a worthy contribution to society, which is why most ideas involve these two industries, but I saw the opportunity to break from the mold of standard submissions. A tracking TV stand can increase the quality of life and the standards of tailoring entertainment to an individual and group’s needs. For this reason, I developed a technical demonstration of the tracking TV stand.
This project is intended to develop Walabot’s impact in the entertainment sector.
The tracking TV stand will use a Walabot device as the means to monitor activity in front of it. Any display can have tracking with the help of the Walabot. Homes, shopping centers, restaurants and bars all will have more immersing television viewing with the Walabot.
The Walabot will be mounted on the stand facing the viewing area to capture the environment and people in it. Using the radio frequency technology, the Walabot will track individuals’ movements and respond by moving the TV to allow everyone to have great views! Whether it is in a shopping mall display to give passing customers the best view or at a house party to tailor to the guests, the Walabot is the perfect device for the task!
The Walabot will work in tandem with a motor to rotate a monitor to give the audience the best view possible.
- Audience Tracking: The Walabot will track the concentration of individuals in view of the TV. It will determine the optimal angle to position the TV based on where the audience is across the viewing area.
- Individual Tracking: The Walabot will motion track individuals in the viewing area to give them the best view as they move around the environment.
All tracking will be done at a continuous rate to match the changing environment, which makes the Walabot perfect for this project.
Design the Parts
The design for a tracking TV stand is relatively simple. A rotating turn table on which the TV sits is attached on the vertical axis to the stationary stand.
Modify a Standard Servo
Using a standard servo (I used a Futaba S3003) to power the rotation of the monitor seemed to work. But, I considered that the torque required to move larger monitors would be too great for a standard service to safely manage. Because of this fact, it was necessary to modify the servo’s internal to allow for continuous rotation. With continuous rotation achievable, a gearing ratio could be applied to increase the torque output of the servo, which would allow it to turn larger screens.
- Step 1: Open the servo and melt the “stopper” on the spline gear (this is the gear that you can see rotating on the outside of the servo).
- Step 2: Remove the potentiometer from on the board and solder three male-male wires of different colors in its place. Make sure to know which color is attached to each hole.
- Step 3: Cut a hole in the side of the servo case to allow the added wires to come out, and put the wires through them.
- Step 4: Solder the three added wires to the potentiometer in the opposite way that it was attached to the board. The signal wire is the same, but the ground and power voltages are switched because the plate spins the opposite direction of the servo due to a gearing interaction.
- Step 5: Close the now modified servo.
- Step 6: Attach the spline gear ordered from www.servocity.com to the spline of the Futaba standard servo. It is important to note that a Futaba standard servo has 25 spline teeth (these are the small ones on the inside of the central hole) while other brands may have 24. A spline gear will not be compatible with a servo if it has a different number of spline teeth so use caution in your purchases.
Assemble the TV Stand
The parts were made using 3D printed PLA.
- Step 1: Take the four M5X30 bolts and assemble the eight nylon washers and 4 wheels on them to make four separate wheel hubs.
- Step 2: Place each wheel hub in the baseClamp printed parts.
- Step 3: Attach the potentiometerAdapter with the modified servo potentiometer in it to the plain bore gear with hub, and place the gear with the hub in the hole on the turnTable.
- Step 4: Pace the standard servo in the basePlate part in the designated cutout near the center and the potentiometer on the axis of rotation. Make sure the spline gear does not hit the ribs on the turnTable.
- Step 5: Attach the baseStand, baseClamp, and baseStandMagnet parts to the basePlate using super glue.
- Step 6: Place the Walabot magnet into the baseStandMagnet part, and allow the Walabot to magnetically adhere to the full assembly.
- Step 7: Place the turnTable on top of the assembly with the monitor on top. Be sure to check there is meshing between the gear of the servo and of the turnTable.
- Wire the SystemTo connect the physical assembly to the electrical components of the tracking TV stand, use the following instructions and the diagram in schematics:
- Step 1: Solder lead wires from the ground and power plates on the battery supply. There are two wires coming from the ground plate and one from the power plate. One wire from the ground plate attaches to the ground wire of the servo and the other is on the ground pin (top row third from the left) of the Raspberry Pi. The power lead wire attaches to the power of the servo.
- Step 2: Attach the signal wire of the servo to pin to the top row sixth from the left (two pins between ground and this attachment pin) of the Raspberry Pi.
- Step 3: Power the Raspberry Pi with a 700mA outlet plugin with a USB male end (phone charger) into the Raspberry Pi.
- Step 4: Power the Walabot with the powered USB hub.
from imp import load_source import wiringpi import math import time servo = 1 # The pin the servo signal wire is connected to totalDegrees = 130 # Range of the servo +-(130/2) lastAveragePosition = 0 # Previous average position of targets from Walabot lastMoveTime = time.time() # When the servo was moved last minimumAverageDelta = 10 # Amount of degrees required for servo to move maximumStillTime = 10 # Maximum amount of time servo will be still for servoSpeed = 20 # Speed of servo in degrees/second (only tells servo when to turn off after setting position) turntableAxisOffset = 10 # cm's of space between axis of turntable and Walabot origin point # Allows angles to be calculated for direct aiming of turntable # Sets up the servo pin with wiringpi library def startServo(): wiringpi.pinMode(servo, wiringpi.PWM_OUTPUT) wiringpi.pwmSetMode(wiringpi.PWM_MODE_MS) wiringpi.pwmSetClock(384) wiringpi.pwmSetRange(1000) # Sets the position of the servo (degrees) def setServo(deg): value = deg / totalDegrees / 2 + 0.5 wiringpi.pwmWrite(servo, int(123.6 * (value) + 14 * (1 - value))) # Stops the servo from moving def stopServo(): wiringpi.pwmWrite(servo, 0) wiringpi.pinMode(servo, 0) # Connect to the Walabot, if failed wait and try again def connect(): while True: try: bot.ConnectAny() except bot.WalabotError as err: time.sleep(1) else: print("Connected") return # Setup Walabot profile and scanning area def setup(): bot.SetProfile(bot.PROF_SENSOR) bot.SetArenaR(10, 300, 2) bot.SetArenaTheta(-1, 1, 1) bot.SetArenaPhi(-40, 40, 2) bot.SetThreshold(60) bot.SetDynamicImageFilter(bot.FILTER_TYPE_NONE) print("Configured") # Begin Walabot calibration def calibrate(): bot.Start() bot.StartCalibration() print("Calibrating") while bot.GetStatus() == bot.STATUS_CALIBRATING: bot.Trigger() print("Ready") # Disconnect Walabot def disconnect(): bot.Stop() bot.Disconnect() print("Disconnected") # Main function # Scans for targets # Averages position # Moves servo to position def function(): global lastAveragePosition, lastMoveTime # Get targets from Walabot bot.Trigger() targets = bot.GetSensorTargets() average = 0 count = len(targets) # Find average position of all targets for target in targets: angle = math.degrees(math.atan(target.yPosCm / (target.zPosCm + turntableAxisOffset))) average += angle # If any targets found, determine if should move the servo if count != 0: average /= count delta = abs(average - lastAveragePosition) # Only move servo if targets moved at least minimumAverageDelta degrees # Or it has been >= maximumStillTime since the last servo move if delta >= minimumAverageDelta or time.time() - lastMoveTime >= maximumStillTime: print("Move: " + str(average) + "\n") lastMoveTime = time.time() startServo() setServo(average) time.sleep(delta / servoSpeed) stopServo() lastAveragePosition = average # Main code start # Setup Walabot library bot = load_source("WalabotAPI", "/usr/share/walabot/python/WalabotAPI.py") bot.Init() bot.SetSettingsFolder() # The Walabot setup process connect() setup() calibrate() # Setup WiringPi library and servo wiringpi.wiringPiSetup() startServo() # Make sure turntable starts at 0 degree position setServo(0) time.sleep(2) stopServo() # Main loop execute main function repeatedly try: while True: function() except KeyboardInterrupt: stopServo() disconnect()
Read More: Tracking TV Stand