• Announcements
     
     
    • Badgerbuckhunter

      CHRIS WARDEN MEMORIAL FUND   08/08/2017

      Thanks to all who contributed, we collected just under $500.00. I sent a check Monday (8-7-2017) to his wife for $500.00 along with a card expressing Forums condolences. 
     
mattpatt

Raspberry Pi Trailcam With Mms

26 posts in this topic

Here's a preview of something I've been working on. It consists of a Raspberry Pi single board computer with a PIR module and a Raspberry Pi 5mp camera. The RPi uses a Wifi dongle to connect to a Verizon Hot Spot running a script coded in Python to take a pic and send it via a gmail account. It's really not as complicated as it sounds. Fumbling around with Python (programming language) was the hardest part for me. Right now I have a working proof of concept as you can see from the attached photos. Still need to do a lot more testing before deploying with the biggest hurdle I see is figuring out the power requirements so that I can get at least a weeks run time out of it. The PIR module I'm using has too many false detects but I think Live2Hunt's PIR circuit that he designed along with a HPWA lens will fix that. The camera is only 5mp but seems more than adequate albeit a little slow in recovery time. I think I can speed that up with improvements in my code. This is a day time only setup for now but the next thing I'll be working on is either purchasing the Pinoir version of the camera which has the IR filter removed coupled with a IR array or trying to do color night pics with some high power LEDs. Haven't decided which way I want to go yet.

 

C749E472-B8AE-48D3-A3CD-6953E6595858_zpsl53ghtqx.jpg

 

B2B7AB8F-A1D2-40B8-B9CB-D7E3AC15CC8F_zps0dxq4dkr.png

 

A few things I would like to add are the ability to take a high res pic and store it on a USB flash drive as well as a low res pic for sending via e-mail\MMS. I think sensor data such as the outside temperature overlayed onto the pic would also be neat. I've also toyed with the idea of mounting the camera on a servo and having it follow the subject taking pics ever few seconds or a HD video.

 

 

Matt

Edited by mattpatt

Share this post


Link to post
Share on other sites
 

That's slick Matt. So it has to be within range of a hotspot to send I guess?? Can you build a hotspot into the unit?

Share this post


Link to post
Share on other sites
 
That's slick Matt. So it has to be within range of a hotspot to send I guess?? Can you build a hotspot into the unit?

 

Yes, it will be inside the case or it could be placed in case by itself so that multiple cams could use it. Up to five users can be connected to the hotspot at one time. With the built in antenna the range is okay but there are some hotspots you can purchase that will take a external antenna. You could also use a USB cell modem but those require use of a powered USB hub as they draw too much current than the USB ports on the RPi can supply.

 

Matt

Share this post


Link to post
Share on other sites
 

I'll be watching this Matt. I was very close to pulling the trigger on something like this myself. But I am not familiar with any of that programming. It probablly wolnt be until Monday until I'm around my PC and can Send you the gerber files for that Pir board.

Share this post


Link to post
Share on other sites
 

I like the idea of multiple cams all communicating back to one hotspot. We have a new Verizon tower a few miles away from where we hunt and get excellent 4g signal. I can add the hot spot to my Verizon account for $10 a month and share the data plan that my phone uses.

 

Matt

Share this post


Link to post
Share on other sites
 

What did you get the bootup time too? I think it's pretty slow. Or are you powering the PI all the time?

 

What are you doing for power? And are you leaving the hotspot powered on all the time also?

Share this post


Link to post
Share on other sites
 
What did you get the bootup time too? I think it's pretty slow. Or are you powering the PI all the time?

 

What are you doing for power? And are you leaving the hotspot powered on all the time also?

 

 

The original RPi was pretty slow. The new RPi 2 is about six times faster and double the onboard memory so boot time is not that bad. Even with this improved boot time you can't power it down completely because of you did the subject that triggered the cam would probably be long gone before it had time to boot up to take a pic. There is also no low power or sleep function so it has to stay on all the time which will eat up battery time. The way I want to have the cam work will require the hotspot to stay powered on all the time as well as I want instant notification of a picture being taken. The good news is that the hotspot itself will stay powered from the internal battery for around 8 hours or so. Couple that with a 12v sla and a 5w solar panel and it should be able to keep up. At least that's my hope. Like i said in my previous post I see the power requirements as being one of the bigger issues to try and sort through.

 

My idea is to have the hotspot in its own case mounted up on a pole with a external antenna, battery and solar panel. Getting it up as high as I can will maximize the range of the wifi signal. Then have two or three cams All talking to the hotspot each sending pics through their own gmail email account to my phone. im not smart enough to do this yet but you could also have the cams be a repeater that would take pics from other cams that weren't in rane of the hotspot but could talk to one of the other cams. That cam would then store and forward the pic to the internet. Basically a small mesh network.

 

Matt

Share this post


Link to post
Share on other sites
 

Yes I think solar panels will be a must.

Share this post


Link to post
Share on other sites
 
Yes I think solar panels will be a must.

 

Thanks for sending those gerbers for the PIR board. It really saved me a lot of time. I will upload them to OSH Park Monday and get a few made.

 

I just hope I can get away with 5w panels as they are a lot cheaper than 10w.

 

 

Matt

Share this post


Link to post
Share on other sites
 

Had a little time to play this morning. I'm waiting on a few parts to arrive so I decided to try and work out the power requirements to see how big of a solar panel I'll need to keep up with the power demands of the RPi. I was surprised to find out that it is quite the power hog. I have a Model B with 256mb RAM. According to my KILL A WATT the RPi pulls about 4.5 watts after boot up.

 

BEEDC79E-2A1F-4AEA-ABD0-BDD61FD7250C_zpsoziairps.jpg

 

This is a little higher than what's reported for this model of the RPi on the internet. It could be that it's because I'm also running a Wifi USB adapter in the RPi. So after doing a bit of research on the internet I found this off-grid calculator. This tells me I will need at least a 40w panel just to keep up with the RPi. That's not counting anything else that may eventually make it into the box such as LED array. Right now I'm just concentrating on a day only build.

 

So accounting for growth and to give myself room for error I'll need a 50w panel. I would like to get the power consumption down so I don't have to have such a big panel. One way is to remove the voltage regulator on the RPi itself and replace with a switching DC-DC step down converter power supply. Some reports suggest you can save as much as 25% on your power budget if you do this. I don't want to risk frying my RPi just yet so I found a RPi Model A+ which was designed for low power. Amazon has them for $20 with prime shipping so I have one on the way. Supposedly the A+ will pull about 2w which means I could get away with using a much cheaper 20w panel.

 

We shall see....

Share this post


Link to post
Share on other sites
 

Here's a graph showing the power comsumption for the various models of the Raspberry Pi. Apparently, I have the worst possible one to try and run from solar. The model B was the first RPi that I purchased back when they first came out which was a few years ago. I'm happy that I went ahead and purchased the A+ as I think it will give me the best chance of reaching my goals.

 

B2UL_FEIIAAWzI9%202.png-large_zpsoonyzsb0.png

 

 

Matt

Share this post


Link to post
Share on other sites
 

Okay, so my RPi A+ showed up over the weekend. Got everything transferred over and since I used a micro SD card in the model B with a SD adapter I was able to take the micro SD and use it in the new A+. They have the same hardware (the A+ is just a stripped down version of the B ) so everything booted right up with no issues and connected to the hotspot. I was then able to ssh into the RPi from my cell phone using a free SSH client.

 

AD10471B-6AE4-4F77-8571-27ABFCE88AB9_zpsgn8v49oq.jpg

 

 

I had the HDMI plugged in so I could see the output to the screen as it booted up for the first time. Here's a pic of the KILL A WATT showing how many watts the A+ draws compared to the B.

 

89D454BC-459B-4264-8D27-1B8C03BB882E_zpsxw1kmltw.jpg

 

Heck of a lot better compared to the B! But according to the solar calculator online I'll still be pushing trying to power the system with a 20 watt panel which is my goal. Then I got to thinking about things on the A+ that are powered on that I wouldn't "need" out in the field. The first thing that came to mind was the HDMI. I won't be connecting it to a monitor so there is no need for it to be powered on. After several searches on how to power off the HDMI port and not finding anything I decided to just unplug it and reboot to see if that made any difference. Boy did it ever! Here's a pic of how may watts the A+ draws WITHOUT the HDMI plugged in!

 

167FB1EA-CD8D-4382-9D97-E668A33E8506_zpsdimorex2.jpg

 

So apparently, unplugging it is the answer. Sometimes it's the simplest things! Running the numbers through the calculator again tells me I can get away with only a 10W panel now. I will probably go with at least a 15W panel to give me a little room plus account for CPU usage as the amount of power consumed spikes for a few seconds when motion is detected and a pic is sent.

 

Matt

Share this post


Link to post
Share on other sites
 

Update...

 

Pretty much have the code like I want it down. Installed Weaved (www.weaved.com) which allows you to have remote access to the RPi across pretty much internet connection. This means I'll be able to remote control the camera from command line while it's out in the field as long as it has a internet connection. I've tested it off and on up here and work and it has been working great so far. Once you register the device with Weaved and install the software on the RPi you can see it on the website. I set mine up for SSH access. Weaved also supports a few other protocols as well.

 

weaved_zpszjzkmtz7.jpg

 

All you do is click on the link to the camera and it will give you a temporary URL and port number that you then plug into your SSH terminal software to connect to the RPi.

 

Best of all its FREE for up to two devices. This service is still in Beta right now but once they go "live" there will be a paid subscription for $25/year and that will allow up to 5 devices to use the service.

 

 

Matt

Share this post


Link to post
Share on other sites
 

Looks like good progress Matt.

 

Are you going to leave the hotspot on all the time or program it to come on when motion is sensed?

If you want to control the cam I guess you want to leave it on all the time.

Have you figured out what the hotspot is going to draw?

Share this post


Link to post
Share on other sites
 
Looks like good progress Matt.

 

Are you going to leave the hotspot on all the time or program it to come on when motion is sensed?

If you want to control the cam I guess you want to leave it on all the time.

Have you figured out what the hotspot is going to draw?

 

I will put the kill a watt on the hotspot tomorrow. I did it the other day and can't remember what the reading was. If I remember correctly it was going to require at least a 15 watt panel too. I would like for the hotspot to stay on all the time as that leaves open the possibility for other things such as remote control. You could also activate relays remotely to turn different things off and on such as a led array or activate another camera. You could also trip a solenoid that would close the gate on a hog trap for example.

 

Here's a screenshot of me remoted into the pi from my house with the pi at work. They are on two different networks with the pi being on Verizon cell network.

 

6ef01b1cc950fde341cf18659fca012f_zpstpxzo1q4.jpg

 

Matt

Share this post


Link to post
Share on other sites
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now