Introduction: Dog Wearables (Live Streaming Dog Camera)

About: http://ewakarweta.com http://ewakarweta.tumblr.com http://ewa.jux.com

This is a project of a live streaming camera I made with my friend Jeff for our Physical Computing Class at the VCU Brandcenter. It was inspired by the relationship five little girls I used to babysit have with my dog Borealis. I wanted to give them a way to see his adventures online now that we live in two different cities.

You can easily make adjustments and put it on your own backpack or turn it into a security camera.

Here is what you will need

Materials:

  1. Raspberry Pi B+ (you can make adjustments and use a B)
  2. Raspi Cam
  3. USB Wifi dongle
  4. Solar Panel
  5. USB/DC/Solar Lithium Ion/Polymer Charger
  6. Power Boost (500 or 1000)
  7. JST 2-pin cables
  8. Lithium Ion Battery Pack
  9. DC Male connector
  10. USB to micro USB cable
  11. Dog Backpack
  12. USB Flash Drive (optional)

Alternatively you can use a Portable Travel Charger.

Tools:

  1. Needles and Thread
  2. Felt or other soft material
  3. Insta Morph Plastic
  4. Soldering Iron
  5. Solder
  6. Heat Shrink
  7. Electric Tape
  8. Iron on patch

Step 1: Putting Together the Solar Panel

If you don't want to adventure into Solar Energy you can substitute this step by getting a Portable USB Charger. The kind you can buy for your Phone.

  1. Solder wires to the Solar Panel. The adafruit's solar panel positive lead has a slight orange tint to it and the negative is just silver.
  2. Strip the DC connectors wires. Pull the heat shrink tubes high up on the wires.
  3. Solder the positive leads and negative leads together. Pull the heat shrink over the solder points and heat them up to seal the connection.
  4. Solder two of the JST 2-pin cables together in the same way. Don't forget the heat shrink. (you can use electric tape, but heat sharing works better)
  5. If your Lithium Ion Battery does not come with the JST 2-pin cables, solder one in.
  6. The Power Boost's USB needs to be soldered into place as well.
  7. Finally connect all the pieces together. The Solar Panel's DC connector plugs into the DC plug. The Lithium Ion battery connects to JST 1 and the Power Boost to JST 2 (as show in the picture)

Step 2: Setting Up Your Raspi Cam

If you have used a Raspberry Pi before, you will be familiar with many of these steps, but if you are new to it they will be very helpful.

  1. Plug in your Raspi Cam's Ribbon connector to the Raspberry Pi. The connector can be found right next to the Ethernet Plug. This video will help you locate it.
  2. If you are working with a Cana Starter Kit, your SD card will already have the Noobs needed for the Raspberry, so power it up, hook up a monitor and a keyboard and install the Raspian software. The Raspberry Pi Offcial Page has a very well written instructions on how to do it. If you have worked with the Raspberry Pi before, you can skip this step.
  3. Once you installed the software, the Raspberry Pi configuration screen should pop up. If not just type in: pi@raspberrypi~$sudoraspi-config
  4. Select the Enable Camera option, click Enter. Select Enable with the arrows and Click Enter. If you don't see the option, you might need to update your software by typing in:
    pi@raspberrypi~$sudo apt-get update
    pi@raspberrypi~$sudo apt-get upgrade
    Then Enable your camera.
  5. You might want to reboot your Pi just to make sure that all the configuration settings are saved.
    pi@raspberrypi~$sudo reboot

Step 3: Setting Up Streaming

There are many different ways to set up a stream from the Raspi Cam, but the one that requires the least amount of worry about devices and browsers from which people will watch your stream is the Mjpg-Streamer set-up.

Before you do anything. Make sure your wireless dongle is connected to your wifi. Now we need to make sure you are properly connected to the wifi.

Type the following to start GUI (Graphic User Interface):

pi@raspberrypi~$startx

Now you will have to launch the WifiConfig from your Desktop.

The Pi Hut will walk you though the next steps.

You want to make sure that your wifi connection is stable. If your connection is unstable your Wifi Config application will show you continually connecting and disconnecting. Streaming requires you being connected at all times so make sure you are using the best network (I used the hotspot on my phone and it worked great)

The application should also show you your IP address. Take note of it. You will need it later. It should look like this: 192.168.1.116

We used the Instructions written up by Miguel Grinberg to get this portion working. They will lead you step by step.

It will be useful for you to know that you can play around with options for the raspistill command (taking still shots), and you can do the same for raspivid command.

Simply type the following into your terminal:

pi@raspberrypi~$raspistill

or

pi@raspberrypi~$raspivid

Step 4: Creating a Local Host Tunnel

Now you have your camera streaming to your local network. This is great if you just want to use your RaspiCam as a local security network, but it will not allow you to view the footage if you are at work or out for a walk with your dog. The quickest and easiest way to change that is to create a tunnel from the internet to your local network, it will also not cost you a dime.

To accomplish this we used ngrok.

  1. First type the following into your Pi terminal to start the GUI (the graphic interface on the Pi)
    pi@raspberrypi~$startx
  2. Once your interface loads, open up a webpage and go to ngrok.com, then click on downloads.
  3. From the list, select the fourth option. Linux/ARM
  4. Now open up your Terminal on the Pi (you should easily find it on your desktop) and type in
    pi@raspberrypi~$ unzip /path/to/ngrok.zip
    Here the /path/to/ stand for the location to which you downloaded your file. I downloaded it to /home/pi/, which allows me to just type
    pi@raspberrypi~$unzip ngrok.zip
  5. You are almost done. Do you recall the address you used to look at your stream in the local network? It should have been something like: 192.168.1.116:8080
    We will use this address to tell ngrok which local network it should be running the tunnel to. Type:
    pi@raspberrypi~$./ngrok 192.168.1.116:8080
    Make sure you use your local IP.
  6. If you can't remember your local IP you can check it really easily through the terminal. Type:
    pi@raspberrypi~$hostname -I
  7. The ngrok software will display a website address from which you can now watch your stream. It should look something like this: http://78a76497.ngrok.com
  8. You can now send this address to whomever you want to see the stream you created.

Step 5: Putting It All Together

So now you have a working Solar panel and a working RaspiCam. You need to make sure that all of your parts are safely protected from the weather. For that we used Insta Morph. It's is a plastic that melts in hot water and is very moldable, but when it cools down it becomes hard.

We had a case for the Raspberry Pi from the Cana Kit, but if you don't have one, Insta Morph is a great little tool to make one.

  1. Make a case for the RaspiCam. It is very gentle so make sure you use some felt of packing materials to protect the back of it in the case. It also helps in holding it tightly in it's case.
  2. The ribbon strip that connects the RaspiCam to the Raspberry is very gentle. Make sure you build a sturdy case for it as well. We wrapped the ribbon connector around the Raspberry Pi's case and build an Insta Morph Shell around it to protect it. Make sure you don't kink the ribbon. It can cut the connection between the camera and the Raspberry.
  3. It is a good idea to make a case for the PowerBoost and battery pack. We just used a simple small box and secured all the cables in place (that is especially important for a dog camera since they will be moving around, rolling in the grass and shaking their backpack).
  4. Saw the Solar panel onto the top of the backpack to make sure it is getting plenty of sun.
  5. If you chose to skip the Solar Panel, make sure to secure the Portable Charger. You want to make a pocket for it to, since you don't want it to fly around inside the pack and disconnect.

Now you are ready for some field testing.

Step 6: Field Testing

When it comes to working with dogs (and many humans too), make sure you field test before you publish. In my case, we run into a few kinks with how the parts were secured in the backpack and the solar panel not getting enough sun. So take it out a few times and see how it goes.

In the process of field testing, it might be helpful for you to create a command for your raspberry pi with all of the steps rather than having to type all of them into the terminal over and over again. If you want to learn how to do that, send me a message.

A quick and simple solution for all the typing... use the uparrow on your keyboard. It brings up the most recent commands you wrote out.

Hope you have fun with this one!

First Time Author Challenge

First Prize in the
First Time Author Challenge