How to build it

How to build it (3)

You can control your projector from a computer running Windows.  It can turn your projector on & off, change video sources, and do just about anything that your remote can do.  The projector is connected to your compute via a serial cable and commands are given through shell commands.  This can be done on a schedule, too, thanks to the Windows Task Scheduler feature built into Windows.

 

To control your projector with Windows, you will need these things

1. Projector with an RS232 serial port.  This port can have a DB9 serial port (most common) or a round DIN serial port.  A DB serial port has five pins in one row, and four pins in the second row.  Projectors with only USB ports are not able to be used for control.

2. "Straight through" serial cable, DB9 to DB9.  Typically this is a female to female cable.

3. Null modem adapter like this.  This may be needed for some projectors.  If your projector does not respond to commands, add this to the "straight through" serial cable above.

4. USB to serial adapter cable, such as this.  This cable adapts the USB port on the Windows computer to communicate to the DB9 serial port on the projector.

 

Finding hex control codes for your projector

Your projector listens for commands entering its serial port.  This allows you to turn the projector on, off, change video sources, etc., simply by sending commands to this port.  These commands are in the "hex" language, such as 00, AB, F1, B12, etc.

Different brands and models of projectors use different hex codes for these commands.  Your projector's manual should have an area that list these codes.  If you do not have the manual, search Google for "hex codes xxx projector" where "xxx" is the brand and model of your projector.  You can also find manuals for projectors by googling "xxx projector Clary Business Machines".  

Here is an example of hex control codes for a Boxlight Seattle WX25NU projector.  For example, hex command "43 30 30 0D" will turn on the projector and "43 30 31 0D" will turn it off.

This document should also indicate your projector's serial port communication settings (baud rate, data length, parity, stop bit, and flow control).  This information is important for your Windows computer to properly communicate with the projector's serial port, so write it down.

 

Connect your projector to your Windows computer

1. If your USB serial adapter came with a driver installation CD, install the driver.  It is important to do this before connecting the adapter to your computer!

2. Connect the USB serial adapter cable to the computer's USB port.

3. Connect the DB9 serial cable to the USB serial adapter cable.

4. Connect the other end of the DB9 serial cable to your projector.  

5. Make sure the projector has its power cable connected.  It does not need to be turned on yet, but it does need to be in "standby" mode.  Some projectors indicate standby with a flashing power light.

 

Finding the COM port of your USB serial adapter 

When you connect the USB serial adapter to your computer, Windows will assign a COM port to it.  This could be "COM1", but could vary depending on the existing ports on your computer.  To find the port of your adapter, do the following:

1. From the Windows Start menu (press the [Windows] key on your keyboard), type "Device Manager" then press [Enter].

2. A list of devices appears.  

3. Double-click the Ports section to open it.

4. In the list of ports, you should be able to identify your adapter by its name or brand.  In my case, my adapter displays as "Tripp Lite USB to Serial port (COM3)".  If your device shows-up as "Unknown" or something similar, try reinstalling the driver that came with your adapter.

5. In my case, my adapter is connected to COM3.

6. You're done!

 

Create hex files

You need to create special "hex files" that contain the hex commands to control your projector.  However, these files cannot be created with a word processor nor Windows Notepad.  They must be created with a Hex Editor program such as UltraEdit, Notepad++ (with the hex editor plugin), or similar.

1. Start your Hex Editor program.

2. Enter the hex codes that turn on your projector.  For example, for a Boxlight projector, these codes are 43 30 30 0D

3. Save the hex file with the name on.bin

4. Create additional hex files with other projector commands, such as codes 43 30 31 0D into file off.bin which will turn the projector off.

 

Controlling the projector

Now it's time to see if everything works!

1. Open a command prompt.

2. The first step is to set the port settings so that the projector can understand the commands coming to it.  Refer to the projector's serial port communication settings (baud rate, data length, parity, stop bit, and flow control) that your wrote-down in the earlier steps.

3. Enter this command: mode com3 baud=9600 parity=n data=8 stop=1    (change the COM port, baud, parity, data, and stop setting to match your projector)

4. Enter this command: copy /b on.bin com3

5. If all works well, your projector will turn on (wait a minute for the lamp to warm up).

 

If the projector is not responding...

1. Make sure the projector is connected to power.

2. Make sure the projector is in "standby" mode (not completely off).

3. The serial cable may need a "null modem adapter" added to it.  This adapter reverses pins 2 & 3 for the receive & transmission lines; some projectors need this.  Add the null modem adapter to the serial cable, then play the playlist again.

4. Your on.bin file was not created with a true hex editor.  Remember, you cannot use Windows Notepad nor a word processor to create this file.  Use UltraEdit or Notepad++ with the hex editor plugin installed to create this file.

 

Control the projector on a schedule

Your computer can turn on/off your projector on a schedule, such as several times a day, daily, weekly, etc.  This is accomplished through Windows Task Scheduler program that comes with Windows.

1. Create a batch file that turns on your projector:

a. Start Notepad, then enter these commands:

mode com3 baud=9600 parity=n data=8 stop=1

copy /b on.bin com3

b. Save the batch file with the name: projector-on.bat

2. To test the batch file, enter "projector-on.bat" at the shell prompt.  Your projector should turn on.

3. Configure Windows Task Scheduler so that it runs this script daily/weekly/etc.  These webpages have helpful instructions for using Windows Task Scheduler:

https://www.thewindowsclub.com/how-to-schedule-batch-file-run-automatically-windows-7

http://www.get-itsolutions.com/create-windows-task-scheduler-and-schedule-to-run-bat-file

https://www.computerhope.com/issues/ch000785.htm

4. That's it!

You can control your projector from a computer running Linux or Mac OSX.  It can turn your projector on & off, change video sources, and do just about anything that your remote can do.  The projector is connected to your compute via a serial cable and commands are given through shell commands.  This can be done on a schedule, too, thanks to the Cron scheduler built into Linux / Mac OSX.

 

To control your projector with Linux and/or Mac OSX, you will need these things

1. Projector with an RS232 serial port.  This port can have a DB9 serial port (most common) or a round DIN serial port.  A DB serial port has five pins in one row, and four pins in the second row.  Projectors with only USB ports are not able to be used for control.

2. "Straight through" serial cable, DB9 to DB9.  Typically this is a female to female cable.

3. Null modem adapter like this.  This may be needed for some projectors.  If your projector does not respond to commands, add this to the "straight through" serial cable above.

4. USB to serial adapter cable, such as this.  This cable adapts the USB port on the Linux/Mac computer to communicate to the DB9 serial port on the projector.

 

Finding hex control codes for your projector

Your projector listens for commands entering its serial port.  This allows you to turn the projector on, off, change video sources, etc., simply by sending commands to this port.  These commands are in the "hex" language, such as 00, AB, F1, B12, etc.

Different brands and models of projectors use different hex codes for these commands.  Your projector's manual should have an area that list these codes.  If you do not have the manual, search Google for "hex codes xxx projector" where "xxx" is the brand and model of your projector.  You can also find manuals for projectors by googling "xxx projector Clary Business Machines".  

Here is an example of hex control codes for a Boxlight Seattle WX25NU projector.  For example, hex command "43 30 30 0D" will turn on the projector and "43 30 31 0D" will turn it off.

This document should also indicate your projector's serial port communication settings (baud rate, data length, parity, stop bit, and flow control).  This information is important for your Linux/Mac computer to properly communicate with the projector's serial port, so write it down.

 

Connect your projector to your Linux/Mac computer

1. Connect the USB serial adapter cable to the computer's USB port.

2. Connect the DB9 serial cable to the USB serial adapter cable.

3. Connect the other end of the DB9 serial cable to your projector.  

4. Make sure the projector has its power cable connected.  It does not need to be turned on yet, but it does need to be in "standby" mode.  Some projectors indicate standby with a flashing power light.

 

Finding the name of your USB serial adapter 

When you connect the USB serial adapter to your computer, Linux/Mac will assign a name to it.  This could be "ttys0", but could vary depending on the make/model of your adapter.  To find the correct name of your adapter, do the following:

1. Open a shell / command prompt.

2. Enter this command: ls /dev/serial/by-id

3. The result should display the name of your adapter, such as "usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0". 

Note: If nothing is shown, then your adapter may need Linux/OSX drivers installed or perhaps your adapter is not compatible with Linux/OSX.

4. Enter this command: ls /dev/serial/by-path  

5. The result should show technical information about your adapter, such as "platform-3f980000.usb-usb-0:1.4:1.0-port0".  Note the phrase "usb-0:1.4" in this example.  This is helpful for the next step.

6. Enter this command: dmesg | grep tty

7. The result should list the active serial ports on your computer, such as "usb 1-1.4: pl2303 converter now attached to ttyUSB0".  

8. Remember the "usb-0:1.4" phrase from Step 5?  It somewhat matches the "usb 1-1.4" phrase from Step 7.  This is your USB serial adapter.  Therefore, "ttyUSB0" is the name of your adapter.

9. You're done!

 

Controlling the projector

Now it's time to see if everything works!

1. Open a shell / command prompt.

2. Enter this command: sudo chmod 666 /dev/ttyUSB0  (replace "ttyUSB0" with your adapter's actual name if necessary)

3. The above command sets permission for you to send commands to the serial adapter.

4. Find your projector's hex codes for "ON", "OFF", and "VIDEO".  Each hex code precedes with "\x", so hex codes "43 30 30 0D" to turn on a Boxlight projector would be entered as "\x43\x30\x30\x0D".  

5. For example, enter this command to turn on a Boxlight projector: echo -en '\x43\x30\x30\x0D' > /dev/ttyUSB0 

6. If all works well, your projector will turn on (wait a minute for the lamp to warm up).

 

If the projector is not responding...

1. Make sure the projector is connected to power.

2. Make sure the projector is in "standby" mode (not completely off).

3. The serial cable may need a "null modem adapter" added to it.  This adapter reverses pins 2 & 3 for the receive & transmission lines; some projectors need this.  Add the null modem adapter to the serial cable, then play the playlist again.

 

Control the projector on a schedule

Your computer can turn on/off your projector on a schedule, such as several times a day, daily, weekly, etc.  This is accomplished through Cron feature.  

1. Create a script that turns on your projector:

a. Enter this command: sudo nano /usr/local/bin/projector-on.sh

b. In the editor that appears, enter:

#!/bin/bash

sudo chmod 666 /dev/ttyUSB0

echo -en '\x43\x30\x30\x0D' > /dev/ttyUSB0

c. Save the script by pressing [Ctrl-O], then [Ctrl-X].

d. Make the script executable by entering this command: chmod u+x projector-on.sh

2. To test the script, enter "projector-on.sh" at the shell prompt.  Your projector should turn on.

3. Configure Cron so that it runs this script daily/weekly/etc.  These webpages have helpful instructions for using Cron:

https://opensource.com/article/17/11/how-use-cron-linux

https://www.howtogeek.com/101288/how-to-schedule-tasks-on-linux-an-introduction-to-crontab-files

https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses

4. That's it!

A number of Christmas lights enthusiasts animate digital LED lights with a free program called xLights.  Starting with a photo of your house, you draw strings of lights on it that correspond to the lights actually hung on your house.  Strings of lights are connected to "controllers" that speak the protocol or languages of different kinds of strings.  When you create animations in xLights on your computer, these animations are sent via Ethernet to the controllers which then light-up your lights.  

Falcon Player is a program that allows your house lights to function without needing your computer to do the job.  You create animations with xLights, save them as "fseq" files, then load these files into Falcon Player.  The Player plays the fseq files to animate your lights.

Falcon Player can do a lot more than just animate lights.  It can control a projector, sending videos to it while animating lights at the same time.  Videos are saved in MP4 format and stored in Falcon Player.  Player can also create a "virtual matrix" with your projector, allowing animations to be created in xLights that will display on the projector.  Player can turn your projector on & off, change video sources, and do just about anything that your remote can do.  This can be done on a schedule, too.  So you can use Falcon Player to simply control your projector to play videos or coordinate this with animating lights, too.

 

 To control your projector with Falcon Player, you will need these things

1. Projector with an RS232 serial port.  This port can have a DB9 serial port (most common) or a round DIN serial port.  A DB serial port has five pins in one row, and four pins in the second row.  Projectors with only USB ports are not able to be used for control.

2. "Straight through" serial cable, DB9 to DB9.  Typically this is a female to female cable.

3. Null modem adapter like this.  This may be needed for some projectors.  If your projector does not respond to commands, add this to the "straight through" serial cable above.

4. USB to serial adapter cable, such as this.  This cable adapts the USB port on the Raspberry Pi to communicate to the DB9 serial port on the projector.

5. Raspberry Pi 3 single board computer.  Don't use a Raspberry Pi 1 or 2 as they may not be fast enough to play MP4 video and control lights at the same time.

6. 5V power adapter with micro USB connector, rated at 2.5A or higher.  This is to power the Raspberry Pi 3.

7. Eight gigabyte microsSD card.  Falcon Player will consume four gigabytes, leaving you with four gigabytes for your videos.  Buy a larger memory card if you intend to use more videos.

8. Long Ethernet cable to connect the Rapsberry Pi to your home network.

  

Basic Steps to Install Falcon Player

(detailed instructions can be found here and here)

1. Format the microSD memory card with SD Card Formatter or something similar.

2. Download the latest Falcon Player image file here.  These instructions work best with Falcon Player v4.6.1.  Falcon Player v5.x should work, but it has not been tested with these instructions and the web interface may not match these instructions perfectly.

3. Unzip the image file, revealing the .img file inside.

4. Use win32DiskImager or similar to write the image file to your microSD card.

5. Connect a monitor or TV to the HDMI port on the Raspberry.  Connect a USB mouse & keyboard.  Also connect an Ethernet cable from the Raspberry Pi to your home network's router.

6. Connect the micro USB power cable to the Raspberry Pi.  It will automatically power up.  You will see a black screen with white writing. 

7. Falcon Player is controlled with a web interface.  Open a web browser on your home computer, then go to http://fpp or http://fpp.local.  If that does not work, find the IP address that your router assigned to the Raspberry Pi, then go to this address in your web browser.

8. In the Status/Control > Network Configuration menu, enter "8.8.8.8" for DNS Server 1 and DNS Server 2, click [Update DNS], then reboot Falcon Player.  This is necessary to perform the next step.

9. Congratulations!  You now have Falcon Player installed and ready to use.

 

Finding hex control codes for your projector

Your projector listens for commands entering its serial port.  This allows you to turn the projector on, off, change video sources, etc., simply by sending commands to this port.  These commands are in the "hex" language, such as 00, AB, F1, B12, etc.

Different brands and models of projectors use different hex codes for these commands.  Your projector's manual should have an area that list these codes.  If you do not have the manual, search Google for "hex codes xxx projector" where "xxx" is the brand and model of your projector.  You can also find manuals for projectors by googling "xxx projector Clary Business Machines".  

Here is an example of hex control codes for a Boxlight Seattle WX25NU projector.  For example, hex command "43 30 30 0D" will turn on the projector and "43 30 31 0D" will turn it off.

This document should also indicate your projector's serial port communication settings (baud rate, data length, parity, stop bit, and flow control).  This information is important for Falcon Player to properly communicate with the projector's serial port, so write it down.

 

Connect your projector to the Raspberry Pi

1. Connect the USB serial adapter cable to the Raspberry Pi's USB port.

2. Connect the DB9 serial cable to the USB serial adapter cable.

3. Connect the other end of the DB9 serial cable to your projector.  

4. Make sure the projector has its power cable connected.  It does not need to be turned on yet, but it does need to be in "standby" mode.  Some projectors indicate standby with a flashing power light.

 

Installing projector control feature to Falcon Player

1. From the Falcon Player web interface, choose Content Setup > Plugins from the menu.

2. In the list of plugins provided, find "Projector Control" then click the button for installing (the "down arrow" icon).

3. The Input/Output Control menu should now have an entry called "Projector Control".  Choose this from the Input/Output Control menu.

4. Place a checkmark in the Enable Plugin field.

5. Choose "Serial" for "Connection type".

6. Choose your projector in the Projector field.  If it is not listed, you can manually add your own projector with these steps:

a. Click Help > SSH Shell from the menu.

b. Login with "fpp" for the username and "falcon" for the password.

c. At the shell prompt, type: sudo nano media/plugins/FPP-Plugin-Projector-Control/projectorCommands.inc

d. When you press [Enter], a list of information appears.  

e. Find the line "To add another projector..." line near the top. 

f. Remove the double slashes at the beginning of each line starting with "Array" and ending with "),".  

g. Enter your projector's hex codes for "ON", "OFF", and "VIDEO".  Each hex code precedes with "\x", so hex codes "43 30 30 0D" to turn on a Boxlight projector would be entered as "\x43\x30\x30\x0D".  "VIDEO" means the hex codes for the projector video input that want to use, such as HDMI or DVI.

h. Enter your projector's baud rate, data length / char bits, stop bit, and parity as specified.

i. To save your changes, press [Ctrl-O] then [Enter].  To exit the editor, press [Ctrl-X].  

j. To exit the shell, type "exit" then press [Enter].

k. Reboot Falcon Player.

m. After rebooting, choose Input/Output Control > Projector Control from the menu.

n. Choose your projector from the list in the Projector field.

7. Click [Save Config] to save your changes.

 

Upload video(s) into Falcon Player

Falcon Player can store and play videos for your projector to display.  These videos must be in MP4 format and the microSD card must have enough room for them.  You can check free space by clicking Help > About from the menu; free space is listed under the Disk Utilization section.

1. Click Content Setup > File Manager from the menu.

2. Click the [Video] tab, then click the blue [Select Files] button.

3. Browse your computer for the MP4 files that you wish to upload, then click the [Open] button.

4. That's it!

 

Create playlist to control your projector and play videos

1. Click Content Setup > Playlists from the top menu.

2. Give your playlist a name (no spaces) in the New Playlist field, then click the [Add] button.

3. In the Type field in the lower Playlist Details section, choose "Script".  In the Script field right below it, choose "PROJECTOR-ON.sh".  Then click the [Add] button below it.  This will tell the projector to turn on.

4. Let's add a delay to allow the projector to warm up.  In the Type field, choose "Pause".  In the Pause Time field, enter "60", then click the [Add] button.

5. To switch the projector video input to the desired input, in the Type field, choose "Script".  In the Script, choose "PROJECTOR-VIDEO.sh", then click the [Add] button.

6. To play a video, choose "Media only" in the Type field.  Click the drop-down arrow in the Media field to choose the video that you use to use, then click the [Add] button.

7. To turn off the projector after playing the video, choose "Script" in the Type field, choose "PROJECTOR-OFF.sh" in the Script field, then click the [Add] button.

8. To save the playlist, click the [Save] button in the middle of the screen.

 

Controlling the projector and playing a video

Now it's time to see if everything works!

1. Click Status/Control > Status Page from the menu.

2. Choose the playlist that you created in the Playlist field.

3. Click the [Play] button near the bottom of the screen.

4. If all works well, your projector will turn on, wait a minute for the lamp to warm up, play your video, then the projector will turn off.

 

If the projector is not responding...

1. Make sure the projector is connected to power.

2. Make sure the projector is in "standby" mode (not completely off).

3. The serial cable may need a "null modem adapter" added to it.  This adapter reverses pins 2 & 3 for the receive & transmission lines; some projectors need this.  Add the null modem adapter to the serial cable, then play the playlist again.

4. If the projector is still not responding, try manually controlling the projector using Linux or Windows.  Instructions are on this website.

5. To aid in troubleshooting, you could also create a playlist that only plays the video (no projector on/off control).  Manually turn on the projector, then play the playlist that you created.  If this works, at least you know that the video output from the Raspberry Pi to the projector is working.

 

Control the projector and video playback on a schedule

Falcon Player can turn on/off your projector and play videos on a schedule, such as several times a day, daily, weekly, etc.  This is accomplished through the Content Setup > Scheduler menu.  For instance, if you want the projector to turn on each evening at 6:00, play a video at 7:00, then turn off the projector at 8:00, do the following:

1. Set the current day & Time on the Raspberry Pi via the Status/Control > Config/Set Time menu, then click the [Submit] button.

2. Create three playlists: one to turn on the projector, another to play a video, and a third to turn off the projector.  

3. Click Content Setup > Scheduler from the menu, then click the [Add] button.

4. In the Playlist column, choose the "projector on" playlist that you created.  In the Start Time column, choose 18:00 (which is 6:00 p.m. in military time).

5. Click the [Add] button to create another scheduled entry.  Choose the "play video" playlist that you created, then choose "19:00" for the Start Time.

6. Click the [Add] button once more to create the third scheduled entry.  Choose the "projector off" playlist that you created, then choose "20:00" for the Start Time.

7. That's it!

Note that the Raspberry Pi does not have a built-in clock.  When it is turned off, it forgets the current time.  You can easily add a real-time clock with something like this.

Go to top
JSN Boot template designed by JoomlaShine.com