solar powered security cams

belmont

Getting the hang of it
Joined
May 31, 2016
Messages
103
Reaction score
12
is there anyone who operates a wifi camera by solar power? I would like to know the size of the panel and size of the battery. Please mention your location (state or country) too, so I can check and compare the number of sunny hours.
 

CaliGirl

Getting comfortable
Joined
Aug 14, 2016
Messages
659
Reaction score
252
Location
California
You need to know what your camera power load will be. Then design it backwards from there.

Once you know it will take for example 20watts 24 hrs. a day you can convert that to amps/hours. Which in store will tell you how large of a battery you need to run 48 hrs with no sun. Then add a panel that can fully charge the battery in 24-48 hrs. measured in watts or amp/hrs.

It takes quite a larger pv panel then most people every estimate to produce adequate solar power.

I have a system setup with an under powered panel. I connected a digital timer that only powers the object 4 times a day for 10 mins. Works for my use. But you need a system that can power it rain or shine for 1-2 days of cloudy skies in the winter (depending on where you live). Make sure you use deep cycle batteries.
 

belmont

Getting the hang of it
Joined
May 31, 2016
Messages
103
Reaction score
12
Thanks, do you live in Southern California? I live in Southern Spain which has pretty much the same all day sunny climate, almost never rains and almost never cloudy. I would be interested to know the specs of your panel, battery, cam. Many thanks
 

yeme

Young grasshopper
Joined
Apr 21, 2015
Messages
30
Reaction score
12
I have an offgrid solar setup in North Georgia (USA) with the following:

Single Huisun v1 PTZ ip camera
Raspberry Pi
Single 5-port LAN switch
Ubiquiti Nano M2 (1/2 mile connection to internet source)
2 - micro relay boards to switch a LED flood I occasionally use

My power consumption (load) is 700 mA daytime and 1.1 amps at night. If I turn on the 20W LED flood light the amperage increases by 2.

The solar panel is a Poly 100W Renogy 12V connected to a Tracer 10 amp MPPT charge controller charging two 35 AH deep cycle SLA batteries.

I have attached a customized graph showing setup performance detail for today.

SolarGraphing_20161031.png
 

belmont

Getting the hang of it
Joined
May 31, 2016
Messages
103
Reaction score
12
thanks a lot, funny thing is, I also have a Ubiquiti Nano M2 and also a tracer MPPT charge controller. I will use a 80watt mono panel, not decided on the PTZ yet. Dahua seems to be the King of PTZs, but never owned one, so I will think about it.
 

yeme

Young grasshopper
Joined
Apr 21, 2015
Messages
30
Reaction score
12
My calculations on the solar panel production were based on 40% output of the panel as recommended on the Solarpaneltalk forum....good luck!
 

Masejoer

Getting the hang of it
Joined
Mar 28, 2016
Messages
148
Reaction score
26
For one general IP camera, you will need around 100 Watt-Hours of energy for just the camera itself. You need to store at least 100Wh of energy each day for the one camera, and likely 150Wh to deal with inefficiencies and other variables. My cameras consume 2.4-3.9W each without infrared, depending on the camera.

For a cloudy/rainy day, you may need a 2m x 2m solar array to power one camera for 24-hours. On a clear sunny day with no shading, a 200mm x 200mm solar panel may give you all the energy you need for 24-hours+. Perfect weather and placement could allow you to get by with a solar array 100x smaller. Solar isn't cost effective for most, but if you have the need, or want to play with it, you should start with roughly a 1.2m x 0.5m 100W panel and adjust from there.

If you have as much sun as you say you do, and NO shading (shading on one cell of a single panel could kill the output of the entire panel), the 80W would be more than sufficient. Just store all the extra energy in more batteries, to make up for the lower-intensity days.
 

belmont

Getting the hang of it
Joined
May 31, 2016
Messages
103
Reaction score
12
do you think a 75-80Ah solar battery should be enough?
 

gmaster1

Pulling my weight
Joined
May 8, 2015
Messages
132
Reaction score
110
I have an offgrid solar setup in North Georgia (USA) with the following:

Single Huisun v1 PTZ ip camera
Raspberry Pi
Single 5-port LAN switch
Ubiquiti Nano M2 (1/2 mile connection to internet source)
2 - micro relay boards to switch a LED flood I occasionally use

My power consumption (load) is 700 mA daytime and 1.1 amps at night. If I turn on the 20W LED flood light the amperage increases by 2.

The solar panel is a Poly 100W Renogy 12V connected to a Tracer 10 amp MPPT charge controller charging two 35 AH deep cycle SLA batteries.

I have attached a customized graph showing setup performance detail for today.

View attachment 14436
I can think of a few long ways to write this, but am curious if you grabbed this graphing/logging from a software distribution or packaged Pi img? It looks fairly intuitive and easy to work with so I have to ask :-D Also did you buy a specific sensor tailored to solar measurements for the Pi or did you sensor them up individually?
 

belmont

Getting the hang of it
Joined
May 31, 2016
Messages
103
Reaction score
12
I can think of a few long ways to write this, but am curious if you grabbed this graphing/logging from a software distribution or packaged Pi img? It looks fairly intuitive and easy to work with so I have to ask :-D Also did you buy a specific sensor tailored to solar measurements for the Pi or did you sensor them up individually?
there are many website in the IoT world that offer free cloud service for your gadgets, I have been using this https://www.xively.com/ all you need to find is a IoT device that can work with this cloud. I use a voltage, current meter from http://www.yoctopuce.com/ and these are able to feed the measurement data into xively cloud where I can see the graphs. But there are other ways too, it is just one, maybe not the best, but works fine.
 

Masejoer

Getting the hang of it
Joined
Mar 28, 2016
Messages
148
Reaction score
26
do you think a 75-80Ah solar battery should be enough?
12v? That would be enough storage for at least a week with one camera, without being recharged during that time.

If you only need the cameras powered certain times of day, you can save a lot of energy by shutting them off. Maybe an aggressive external sensor could get you more than enough advance-notice for the camera to power back up in time to catch the event, and power down after the sensor's output is idle for some time? For example - you could have at least one sensor or camera at an entry point, and if triggered, a dozen other cameras power up.

If this was my project and I lived in a sunny area, I'd personally try using a smaller panel and a lipo pack for storage.
 

gmaster1

Pulling my weight
Joined
May 8, 2015
Messages
132
Reaction score
110
there are many website in the IoT world that offer free cloud service for your gadgets, I have been using this https://www.xively.com/ all you need to find is a IoT device that can work with this cloud. I use a voltage, current meter from http://www.yoctopuce.com/ and these are able to feed the measurement data into xively cloud where I can see the graphs. But there are other ways too, it is just one, maybe not the best, but works fine.

Yeah I'm one of those guys who still likes direct IP and controlled data so cloud services are completely out for me. My thermostat is even under my own web control and denies any WAN in/out activity. :) That said, it certainly does make life easy having those options available. I'd for sure consider and use sites like xively, thingspeak, etc if I was doing an uncontrolled or client install that I didn't want to mess around with a ton.
 

yeme

Young grasshopper
Joined
Apr 21, 2015
Messages
30
Reaction score
12
I can think of a few long ways to write this, but am curious if you grabbed this graphing/logging from a software distribution or packaged Pi img? It looks fairly intuitive and easy to work with so I have to ask :-D Also did you buy a specific sensor tailored to solar measurements for the Pi or did you sensor them up individually?
My sensor is a serial connection from the Pi's GPIO pins via a customized cat5, with an RJ45 connection to the Tracer MPPT charge controller. The controller provides the measurements and offers more categories to monitor, but I focused on these four for my setup.

http://www.instructables.com/id/Raspberry-pi-Tracer-interface/
(use caution if you try this, I found some of the mentioned pin connections incorrect. Just test them for power, if power is needed and ground, if ground is needed)

The values are read via a python script and uploaded to ThingSpeak. I just started using ThingSpeak to try to get better performance as the data pool grows larger. I initially used Sparkfun's Phant server for storage but could not get the graphing like I wanted it, so the transition. I currently only have 3 days of info via ThingSpeak as of today. I believe the retrieval of IOT data overtime will again be a slow process as it grows but I love the graph as it looks and performs right now. The charting evolved from using Google charts, then eventually finding HighCharts when I was using Sparkfun. The Sparkfun setup offers a charting link to Analog.io and their embedded chart uses HighCharts.

I then searched and modified another ThingSpeak user's chart html to get to the charting you see. My talent is to bake and I am not much of a recipe creator. All my work has been in conjunction with a fellow solar friend who can modify and adapt python scripts and html.

I also see where you may like to collect your data locally and I have done that prior to getting internet access on my setup. I installed the phant server on the RPi and it collected every request. The only downside for me was I wanted the off-site, cloud repository.

Finally, my RPi is running PiCore which loads/runs everything in RAM and therefore no corruption and a nice performing B+ Pi! If you would like more detail, let me know.
 

gmaster1

Pulling my weight
Joined
May 8, 2015
Messages
132
Reaction score
110
Your detailed response is perfect--thank you! I totally forgot some charge controllers have that interface. Brilliant!
 

yeme

Young grasshopper
Joined
Apr 21, 2015
Messages
30
Reaction score
12
I have this type of tracer: http://www.giantpower.com.au/10a-tracer-mppt-solar-charge-controller-regulator It has TTL232 / 8pin RJ45. I am not a software developer, so Dear Yeme can you please give more details how to get measurement data from it, I have raspberry pi too, it would be great to know which GPIO PIN connect to where on Tracer, and how to install the app on the PI.
Here is how I made my connection cable to the MPPT:


Cut one of the RJ45 connectors off of a ethernet cat5 cable (T568B standard - normal configuration for ethernet cabling), remove several inches of insulation to expose the individual wires. Cut off all the wires except the solid green, solid blue and the blue/white. These three wires will connect to the RPi GPIO pins for serial transmission.

T568B.jpg


Solid Blue connects to GPIO pin #6 - GROUND
Solid Green connects to GPIO pin #8 - TXD (transmit data)
Blue/White connects to GPIO pin #10 - RXD (receive data)


**CAUTION** after plugging this cable into the Tracer (and prior to connecting to the RPI GPIO pins) verify there is no voltage higher than 3.2v on the blue/white and solid green wires. You can test the voltage by using the solid blue wire as ground and then touching the other wires one at a time to check the voltage.

!! If this wiring is setup incorrectly and has 12 volts, it can destroy the RPi board !!

Raspberry-Pi-GPIO-Layout-Revision-1.png


To prep the RPI:

By Default Raspberry PI Raspbian OS is using serial port as console terminal port and it needs to be disabled.

SSH into the RPi and enter $ sudo raspi-config
Go to “8.Advance Function menu” , then “A8.Serial” and select “No” to disable shell terminal on the serial port.
Reboot...if using Jessie it may already be disabled.

*****************

Here is the python script for uploading the data to ThingSpeak below. You will need to set up an account and channel on ThingSpeak, then you will be assigned a unique API write key that must be entered into this script.

Code:
#!/usr/bin/env python

import csv
import time
import json
import serial
import sys
from tracer import Tracer, TracerSerial, QueryCommand
import httplib, urllib   # http and url libs used for HTTP POSTs
import socket            # socket used to get host name/IP




def queryTracer():
    ser = serial.Serial('/dev/ttyAMA0', 9600, timeout = 1)


    tracer = Tracer(0x16)
    t_ser = TracerSerial(tracer, ser)
    query = QueryCommand()
    t_ser.send_command(query)
    result = t_ser.receive_result()
    
    current_time = time.localtime()
    


    print time.strftime('%Y-%m-%dT%H:%M:%S',current_time)
    print "Battery V\t %02.02f" % result.batt_voltage
    print "Panel V  \t %02.02f" % result.pv_voltage
    print "Load A   \t %02.02f" % result.load_amps
    print "Charge A \t %02.02f" % result.charge_current


    with open('tracer.csv', 'a') as csvfile:
        csvwriter = csv.writer(csvfile, delimiter=';', quotechar='"', quoting=csv.QUOTE_MINIMAL)
        csvwriter.writerow([time.strftime('%d.%m.%Y %H:%M:%S',current_time)] + 
                [result.batt_voltage] + 
                [result.pv_voltage] +
                [result.load_amps] +
                [result.charge_current]
                )


    # ThingSpeak stuff:
    writeKey = "insert your TS channel's API write key here"
    
    params = urllib.urlencode({'field1': result.batt_voltage, 'field2': result.pv_voltage, 'field3' : result.load_amps, 'field4' : result.charge_current, 'key': writeKey})
    headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
    conn = httplib.HTTPConnection("api.thingspeak.com:80")
    
    try:
        conn.request("POST", "/update", params, headers)
        response = conn.getresponse()
        print response.status, response.reason
        data = response.read()
        conn.close()
    except:
        print "connection failed"




while True:
        queryTracer()
        time.sleep(30)
Now, get to work!
 
Last edited by a moderator:
Top