DISCLAIMER: If you build this device, I take no responsibility for any outcome. Make sure you are sighted-in well enough to be hitting the target everytime and place the equipment in a position to avoided being hit. Lithium batteries are particularly dangerous and hitting one with a bullet will have a nasty outcome such as this: https://www.youtube.com/watch?v=j2mYsBue_30
A friend and I were looking at a very cool commercial WiFi target spotting scope. It lets you see easily see a shooting target from your phone / tablet and software tracks each shot. Cool but at $350, we weren’t really interested. We bounced around some ideas and found someone using a WiFi router and IP camera to do the same thing. Genius!
That guy’s rig was just a 20 second YouTube clip with no setup instructions. I’ve duplicated his effort, but documented exactly what you need to make this happen.
I’m using a D-Link DCS-920 WiFi camera because that is what I have laying around. It is very old and the video part doesn’t work with Java any longer; however, it will take still pictures fine which is all I really need (I just press refresh to update the picture). If you are a shooter and not a computer person, you should be able to find one of these used on eBay if you want to follow my instructions to the letter. As of writing, the going used price is $20-$50.
I’m also using a TP-Link TL-WR802N because that was just laying around as well. If I were trying to create a serious spotting scope, I’d go with a router that has external antennas so it has the maximum possible range. Since this project is expected to be used outdoors with no obstructions, the TL-WR802N is acceptable, at least as far as I am capable of hitting a target. As of writing, this is a current device that can be had on amazon for about $25.
- Laptop and RJ45 Cable (for setup). Laptop needs both a WiFi connection and an Ethernet connection.
- 5V WiFi Router (TP-Link TL-WR802N) and USB Type A to Micro USB power cord
- 5V WiFi Video Camera (D-Link DCS-920)
- USB Type A to 2.1mm Barrel Jack Power cord (Adafruit model 2697)
- USB Lithium Phone charger to provide 5V power to router and camera.
- Paperclip to reset devices
Configure the WiFi Router
The WiFi Router will be configured to be a wireless router which will allow your phone/tablet/PC to access the WiFi Camera via WiFi (note that android doesn’t support adhoc access, so a WiFi router is required).
These instructions are specific to configuring the TL-WR802N, but the same general configuration will apply to other routers.
- Reset router to factory defaults. For TL-WR802N, press reset button and hold for 10 secs. Green light will go to fast blinking.
- Wait for the light to flash slow again – then it is fully rebooted.
- Using the laptop, find the router’s WiFi network which is called TP-LINK_090A and establish a connection to it. The WiFi password is on the back of the router.
- Start your browser and go to http://tplinkwifi.net:
- Login to the router. For the TP-Link, the user / pass is admin / admin.
- This takes you to the Quick Setup starting screen. Click on Next.
- Operational Mode: Select wireless router and click on Next. Don’t use Access Point – it will not assign DHCP addresses properly.
- WAN connection type. Select Dynamic IP and click on next.
- MAC Clone: Select No and click on next.
- Wireless Setup. Enter the SSID and password you wish to use then click on next.
- In the review settings screen, verify all settings and click on finish.
- The router will now reboot. You will need to reconnect to it using the new SSID, wifiscope:
- You may notice an exclamation point for your wifi connection. This just means there is no connection to the internet, which is correct.
- The router is now configured to use IP address 192.168.0.1. Ping it to verify you can still get to it.
Configure the IP Camera
Next, the DCS-920 will be configured to use the WiFi router.
This camera can be a bit confusing. Although it has both an ethernet and wifi connection, they BOTH are assigned to the same IP address. Remember that as you go thru the configuration.
- Provide power to the camera.
- Reset camera to factory defaults. For DCS-920, press reset button and hold for 10 secs.
- Set up laptop’s ethernet port to the same default subnet as the WiFi IP camera. For the DCS-920, this is 192.168.0.0, so my laptop is given the address 192.168.0.2/255.255.255.0
- Connect camera to laptop via RJ45 cable.
- Laptop’s ethernet port should now be in connected state.
- Determine IP address of the camera.
- By default, DCS-920 is assigned IP address of 192.168.0.20.
- I determined this by running a TCP port scanner on the laptop against the 192.168.0.0 network.
- Typically the default address will be on the label of the device or in the manual.
- From the laptop, ping the camera (192.168.0.20) to verify you can reach it.
- Now connect to the camera via your web browser using the IP address:
- You will be asked for the camera’s user/password. for the DCS-920 this is admin and the password is blank.
- Once logged in, the main screen is displayed:
- Click on the Setup Tab, then on Network Setup on the Left tabs. Assign the camera a static IP address. I will use the default of 192.168.0.20 here. Then click on Save Settings.
- Now go to the Wireless Setup tab. Enable wireless, and specify SSID, security mode, and the password. Then click on save settings.
- Go to status screen and keep pressing refresh until you see the link come up:
- For the DCS-920, I left the image settings as defaults. I went into the video setup and changed resolution from 320×240 to 640×480 and quality to high.
- Now I can see a reasonable image in the browser.
Test WiFi Access to Spotting Scope from Laptop
Now let’s make sure everything works properly.
- Disconnect the Ethernet cable from the camera.
- Make sure the laptop is connected to the wifiscope SSID.
- From the laptop, ping 192.168.0.20, the camera.
- From the laptop’s browser, connect to http://192.168.0.20, the camera.
Test Phone / Tablet
If the laptop is working, time to connect using your phone.
- Connect to the WiFi SSID wifiscope and enter the appropriate password. For my version of android, I got a warning there is no internet connectivity which is correct.
- While in the list of networks, click on the 3 dots (submenu) and then on advanced. Verify you have an IP address assigned to your phone.
- Note: I’ve had some issues getting the phone to receive DHCP (the router says it sends it). If this is a problem for you, you can configure your phone to use a static IP address on this network (say 192.168.0.19).
- In the phone browser go to http://192.168.0.20.
- Enter the user / password for the camera (still admin / nothing for my DCS-920).
- You will now see the camera website.
Create a link to just the Picture
I’m using firefox on my phone, so this is how to create a link to just the picture.
- Long press the picture on the website until you get a menu.
- From the menu select view image.
- You will now see just the picture, not the entire web page.
- Bookmark this page and call it something like wifiscope.
- Because this is NOT a video, it will only update if you press the browser refresh button.
Setting the camera up in the field is pretty straight forward. Plug everything in, and go to the bookmark you saved above with your phone/tablet. Using the phone, you can position the camera as you need it.
Obviously, position the camera where it can’t get hurt. More importantly, make sure the battery pack CANNOT get hit. As already pointed out, hitting the lithium battery would result in a fire.
When I’m ready to use this, I will use a barrel jack extension cord to separate the camera from the router and battery pack so both can be position well out of the line of fire.
Note that the DCS-920 has a manual focus ring.
Here is my test setup (done inside because it is miserable out today):
Don’t forget to reconfigure your laptop’s Ethernet interface back to it’s original settings.