element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Going Green
  • Challenges & Projects
  • Project14
  • Going Green
  • More
  • Cancel
Going Green
Blog Chicken Coop Livestream
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Going Green requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fvan
  • Date Created: 30 Jul 2017 8:17 PM Date Created
  • Views 2884 views
  • Likes 15 likes
  • Comments 17 comments
  • rpiintermediate
  • going green
  • gogreench
  • iot_projects
  • pi noir
  • solar power
  • chicken coop
  • solarpwrdevicesch
  • pi zero
Related
Recommended

Chicken Coop Livestream

fvan
fvan
30 Jul 2017

I'd hate to let the Going Green  theme go to waste without multiple entries, so I created a (solar powered) video streamer for my chicken coop as a little weekend project image

 

  • Hardware
  • Software
  • Testing
    • Power Saving
    • Infrared

 

Hardware

 

The idea is to use a Pi Zero with Pi NoIR and a set of IR LEDs which can be enabled/disabled on demand. An external wifi dongle ensures better connectivity from the back of the garden. Using a solar panel and battery pack, the circuit can remain powered and automatically charge during the day.

 

The hardware required for this project is:

 

* Solar panel with charging circuit and battery

* Raspberry Pi Zero

* Wifi dongle for extra range

* Raspberry Pi NoIR Camera v2Raspberry Pi NoIR Camera v2

* Official Pi Zero case with camera lid

* Pi-Supply Bright Pi

 

The gallery below serves as a build log for this project image

 

{gallery} My Gallery Title

image

image

image

image

image

image

image

image

image
image

 

Software

 

On the software side of the project, I went for the all-in solution provided by MotionEyeOS, a streaming OS compatible with the Raspberry Pi.

 

After downloading the software image for my device, I flashed it onto an SD card using Etcher. I copied my "wpa_supplicant.conf" file to the SD card, before ejecting and inserting it in the Pi.

Upon first boot, the Pi automatically connected to the wireless network and set up the camera. I honestly didn't expect it to be this easy image

 

Browsing to the web interface, various options are available to configure frame rate, resolution, camera name, etc ...

image

 

MotionEye also allows the creation of "action buttons". Just what I need in order to enable/disable the BrightPi's IR LEDs.

 

In the "/data/etc" folder, I created two files called "light_on_1" and "light_off_1".

 

[root@meye-1d01a2ec etc]# pwd
/data/etc

 

[root@meye-1d01a2ec etc]# ls -l light_o*
-rwxrwxrwx    1 root     root            83 Jul 29 20:02 light_off_1*
-rwxrwxrwx    1 root     root            83 Jul 29 20:02 light_on_1*

 

Inside those files, a short bit of code to control the Bright Pi via I2C.

 

[root@meye-1d01a2ec etc]# cat light_off_1
#!/usr/bin/env python

from os import system

system("i2cset -y 1 0x70 0x00 0x00")

 

[root@meye-1d01a2ec etc]# cat light_on_1
#!/usr/bin/env python

from os import system

system("i2cset -y 1 0x70 0x00 0xa5")

 

MotionEye detects these scripts, and adds the button overlays to the video streams.

image

 

Testing

 

Long duration testing will have to determine if the 10W solar panel is sufficient to keep the battery charged, but some measures to lower the power consumption can already be taken.

 

Power Saving

 

Every bit helps when using battery powered applications. And though the Pi Zero isn't the most efficient choice, some tricks can be applied to lower its power consumption.

 

The first easy change, is to disable the onboard LED by editing the "/boot/config.txt" file and appending the following:

 

# Disable the ACT LED on the Pi Zero.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=on

 

The same can be done for the camera's LED, though that option exists within MotionEye, making it even easier:

image

 

As the Pi is running without monitor attached, the HDMI output can be disabled. This is done by adding a cronjob using "crontab -e" to execute the command upon reboot:

 

# Disable HDMI
@reboot /usr/bin/tvservice -o

 

Disabling any services that are not used may help as well. By default, MotionEye, enables things like Samba and FTP. These can be disabled via the GUI:

image

It's worth going through all options and disabling anything you don't require. The streaming settings can be adapted as well, as the camera doesn't necessarily need to stream all the time, or at full resolution.

 

Infrared

 

I also performed a test in total darkness, with the IR LEDs. They aren't super powerful, but it's enough to keep an eye on the chickens image

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • fvan
    fvan over 7 years ago in reply to fvan +2
    I've been working on the maths for this, but could use some assistance with the theoretical side until I get actual measurements. I'm working with the components I have at hand, trying to determine if…
  • e14phil
    e14phil over 7 years ago +1
    fvan , What great timing! I was JUST about to begin build of a solar powered IR motion cam. My parents have a hedgehog house in their back garden and were looking to monitor it. You have done all the leg…
  • DAB
    DAB over 7 years ago +1
    You could use this same setup in a number of nocturnal animal monitoring projects. Well done. DAB
Parents
  • e14phil
    e14phil over 7 years ago

    Can you advise on power consumption, what is your solar set up and what is the overall draw of the pi?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 7 years ago in reply to e14phil

    I'm setting up some measurements, should come back with results soon! image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 7 years ago in reply to fvan

    I've been working on the maths for this, but could use some assistance with the theoretical side until I get actual measurements. I'm working with the components I have at hand, trying to determine if this is feasible.

     

     

    The power consumption of the Pi is 140mA while idle, 250mA while streaming. At 5V, this means 1.25W or 30W/day.

    My first batterypack had a capacity of 5200mAh, but as the cells are 3.7V boosted to 5V, this results (ideally) in 19Wh. How much conversion loss should be counted? 10% extreme worst case?

     

    In any case, even in ideal conditions, this pack wouldn't last 15h.

     

    The second pack, is a 20000mAh one, or about 74Wh ideally, though a similar conversion loss would apply. Good for a bit more than 2 days of operation without charge.

     

    I have a 10W solar panel to charge the batterypack. Assuming an average of 6h of sun during summer, in perfect conditions, that would generate 60W of charge? What kind of conversion/charging loss should be counted?

    Winter would be a completely different story, assuming an average of 1h of sunlight per day, or a 10W charge (minus losses).

     


    Does this make sense? Or am I missing something?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 7 years ago in reply to fvan

    Unless you really need live streaming, I would go to snap shot every couple of seconds and then use PWM on the LED's so you can use just enough light to get the detail you need.

     

    There are a number of these lighting/exposure tricks you can use to get longer battery life.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 7 years ago in reply to DAB

    The streaming can be turned on or off on demand, so that's not a big issue. But I think it's interesting to make the calculations with the worst case scenario.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • fvan
    fvan over 7 years ago in reply to DAB

    The streaming can be turned on or off on demand, so that's not a big issue. But I think it's interesting to make the calculations with the worst case scenario.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube