Hacker News new | past | comments | ask | show | jobs | submit login
Solar Powered Raspberry Pi Camera (kaspars.net)
143 points by ingve on Aug 9, 2019 | hide | past | favorite | 68 comments



Reading this has reminded me of something I wanted to explore in the past. Most of my applications/requirements for a Pi include GSM, but I've found GSM modules to be very expensive, often being more expensive than the Pi itself.

The author mentions a mobile USB modem, and it's just dawned on me that older 3G/HSDPA dongles are often very cheap. Does anyone have experience using them, especially what power implications they bring?

They do bring a bit of bulkiness on the Pi, and are easy to steal, but then if one can access the modem, the whole Pi might be at risk too.


SIM800L costs $2. It supports GSM (AT commands - dialing, SMSs etc.) and GPRS (both PPP and a direct TCP connection to a hostname and port).

Regarding USB dongles, I've been running Huawei E3131 with RPi. I needed to put +5V directly onto the pin header, but maybe now with the USB-C RPi4 the power should be stable out-of-the-box. I have heard rumors that the modem freezes after a while, but I've never ran it for longer than a few days. I'd recommend either investigating whether you can hard-reset the modem with software (cycling the USB power) or even putting a watchdog that will cut power to the entire RPi.

Regarding power consumption, SIM800L is fine in idle, a few mA. However, USB dongles AFAIK do not support power save and they will eat ~100 mA all the time, which might be a significant portion of your power budget.


Keep in mind that most networks in the US are sunsetting GSM/GPRS within the next two years if they haven't already. Building anything dependent on this is a tricky proposition.


Wow! Thanks, I saw SIM800L but thought that it's maybe some add-on, because the Pi/Arduino GSM components I normally see do cost more than a Pi 3. The prices that I'm seeing are an equivalent of US$10, but that's good enough.

I'll buy one and try it out. I see it only supports GPRS though, are there other cheap devices that support faster connections like EDGE/3+G? If one wants to send things like images from a camera, a faster connection would be more reliable.


With 3+G you will need more power.. and a faster connection would not be more reliable ... just faster. So if you want to have a real-time video-stream, than you need that. But for a security cam, gprs and low resolution images should be fine.


I believe the Narrowband stuff that Twilio's starting to roll out it's meant to address this.


This isn't an answer to your question, but can you tell me more about how you source your sims/data plans?


You probably want to look into M2M(machine to machine) plans if you don't plan on using standard telephone features with your device and just want data.

A lot of companies offer this service these days. For example(random googling first result): https://hologram.io/pricing/

is offering M2M sims for $1 per SIM per month + 40 cents per mb.


Yeah Hologram is cool but super expensive...

https://communityphone.org/

These guys can beat their prices. and are YC alum.


It looks like they don't offer M2M plans, and their cheapest plan appears to be ~$20/month(I guess? I don't see a recurring billing option). Maybe it's the cheapest if you are sending 500+MB of data per month but it seems hologram(or some other M2M sim provider) would be cheaper.


Wow, this is super cool. Thanks!


I investigated this a year or so ago for a hobby project. The best cheap option I found for non-trivial amounts of data in the US was T-Mobile's $10/month plan, which comes with 2GB/mo of high-speed data, and throttles down to roughly 64kbit/sec after that.


I thought about something similar. T-Mobile based MVNOs have pretty good pricing, too, so maybe I'll do that.


Project fi might be interesting too.


Yeah, that would be an option. But IMO the biggest downside would be that they charge for overages instead of throttling.

If I'm working on a hobby project that involves uploading data, and something gets into an unexpected state, it's easy to imagine it transferring tens of GB in a matter of hours. In that event, I'd rather have it restricted to dialup speed (which is still enough to transfer 20GB/month) than get hit with hundreds of dollars in bandwidth charges overnight.


Project fi caps the bill at some number.


I've used Ting successfully before: https://ting.com/


I haven't done anything practical yet, but in our country (South Africa), we've had a law recently that forces the cell network providers to allow consumers to transfer data around. For basic use (maybe 10 devices), I would be able to share my phone's data plan. I'm on a generous contract that gives me more data than I need (fiber at home).

For larger volumes, most providers will either allow you to pool a number of SIM cards' usage into a single account, especially if you restrict them to only connect to a private network. We have this at my workplace on most SIM cards in laptops.

There are also companies that supply SIMs to merchants and IoT folk on behalf of network providers. I'd also look into that. In most cases you end up with each SIM having its own data plan. I did some freelance work for one of these companies last year, if you have enough volume, you can negotiate pooling of data.


Talk to @james at https://communityphone.org/

They are YC alum.


Author of the blog post here. I've used [this SIM800 Raspberry Pi hat](https://www.itead.cc/wiki/RPI_SIM800_GSM/GPRS_ADD-ON_V2.0) and it requires some additional GPIO toggling to enable the modem after a power loss. [Here are the scripts](https://github.com/kasparsd/remote-pine) for doing that and creating the PPP network interface.

The USB modems are nice because you get full control over the modem with the AT commands. I've used the Huawei E173 modem which can be easily unlocked and works great out of the box.



Thanks for the link. I haven't explored AliExpress as we have a cap on how many items we can buy before we're deemed to be "importers" for customs purposes. I'll take the plunge and apply to be an "importer", so I can start buying from there.


The solar panel at $132, accounted for 60% of the total cost (of $220). For a 100W panel, $132 is actually a good price, since it comes out to $1.32 per watt. Regardless, as nanomonkey mentioned, a lower-panel panel (perhaps a 50W one) would likely have sufficed. But even a 50W panel, at $1.32 per watt, would have cost $66.

I'm hoping for the day where we can print solar panels as cheaply as we print paper.


Panels are ~30 cents per watt, wholesale. But that's for the larger panels generating 250+ watts that are commonly used for solar farms and distributed generation. 50 and 100 watt panels are manufactured in much smaller quantities and will cost more.


And this was a thin RV panel. Easier to mount on a pole than the “I care about $/watt, not weight” panels.


100W solar panel seems like overkill. I'm curious what the minimal size panel one would need for 24 hour usage. Assuming 5 hours of usable sun, it would seem like a 20 W panel would be sufficient.


It's not like overkill in the solar panel department is harmful, especially if you're getting cheap chinesium stuff off ebay.

Nothing helps functioning in low-light situations, like overcast and cloudy days, better than excess panel area.

I have a minimally-sized panel I use for powering a laptop and it's rather annoying to have it underpowered in the slightest deviation from ideal circumstances. That same panel for charging smaller devices over USB like phones and tablets is an absolute dream thanks to the overkill, even overcast and cloudy days it never quits charging.


What circuit do you use to power the laptop?


It's an Allpowers 80W portable panel, which includes power circuits for two USB ports and an 18VDC output.

My laptop accepts the 18VDC input directly. It works fine when the sun is high and sky is clear, as long as I'm not doing anything particularly CPU/GPU heavy.


100Wp is probably a bit of an overkill but it does help during the winter season when there are multiple days with almost no sun. Also, there is plenty of shading from the nearby trees so I wanted to be on the safe side.

It would be nice to log the power consumption and the battery voltage but I didn't do it for this project.


you don't get a cookie for installing less panel. you just get headaches on low-sun days. and your battery won't last as long, as it has to discharge deeper and more often.


"$8 Raspberry Pi that supports the camera module. $29 Raspberry Pi Camera module. $18 any 12V battery capable of delivering 1.5W x 24h = 36Wh, such as this 7Ah Pb battery (80Wh). $8 dummy security camera. $132 100Wp solar panel. $10 12V charge controller. $15 cabling and connectors. Total: $220"

Since the solarpanel is more than half of the budget, I would think, you can actually buy a cookie for ordering a cheaper one.

I think it depends where you live and if the setup should also run in the winter.


100 Wp is $60-$80 if you look around


~30-40 W would be my guess, given both Camera, and WiFi are active. (PiZero-W is rated 1.2A max)


FWIW, idle draw on my Pi4 4GB is 0.6A with one HDMI display connected and one wireless keyboard USB transceiver.


It might be easier for the reader, if we all used watts (W) when referring to power usage. Amperes (A) are useless without knowing the voltage (V). In the case of the Pi, since it runs on 5 V USB power, it was easy to calculate the wattage. But for devices of unknown voltage, amperes tell you nothing about power consumption. (For reference: a Pi at 1.2 A is using 6 W, and a Pi at 0.6 A is using 3 W.)


Batterie advertisement sometimes uses that to mislead..


Good point. This was indeed at 5V.


I would absolutely love a kit to do solar + battery for a pi.. this has been one of my dream projects but I know too little about electricity to figure out all the components I need to do solar power, store in a battery, and power a device like a Pi.


Just bought exactly that last week.

https://uk.pi-supply.com/products/pijuice-solar



Nice, wouldn't mind trying something like that myself. I'm not sure if we get enough sun though ;)

I put a PiZeroW in our garden as a wildlife camera in an IP68 case with a waterproof USB connector for power, but alas sometimes it possibly overheats or becomes unresponsive and requires switching it off/on again. (It hit around 90C once, I have since added a little heat sink, but not sure how much that helps in a closed case).

I also found I had to slightly overvolt the PiZero in the config to get the camera to function correctly.

I've been trying to see if there's any interesting serial output when it becomes unresponsive by adding an ESP32 to it. But I haven't quite got the hang of programming that yet.


Immerse it in mineral oil?

(Not the camera of course!)

Or some kind of external watchdog timer circuit that resets the power if it doesn’t get any input for 5 minutes?


I hadn't thought of using mineral oil before.

I did actually try the hardware watchdog on the pi for a little bit, I might have to have another look at that again.


I guess one purpose of a mobile camera you can implement like that could be perimeter pen testing / red teaming. What did the author use their camera for?

Does the Raspberry Pi Camera have an IR? How is the quality? Why didn't the author bother to hide the Pi and the camera better in the case?

The pricing is dishonest. It first says "$8 Raspberry Pi that supports the camera module." and then later on it mentions Raspberry Pi 3. AFAIK that does not cost $8, and furthermore its missing on the other necessary components such as a microSD card.

I'm using Xiaomi Dafang Hacks [1] right now, as I found that a cheap solution. Approx 25 EUR for the Dafang camera. Its a MIPS machine.

[1] https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks


There are many different kinds of cameras for the RasPi - some have IR illumination and/or filters removed, others don't. Some allow interchangeable lens, others are "fixed".

Quality can vary depending on the camera. I have a RasPi Zero W camera at my home (monitoring my front door and patio) that runs MotionEyeOS:

https://github.com/ccrisan/motioneyeos

The camera is a tiny thing but 5 MP and color; quality has been very good in my opinion. Better than anything I could have bought at that price point (and certainly less intrusive - so many IP cameras require "cloud services" or something like that to work). Total cost for everything I used was well under $50.00 USD.

A cheaper option, which I am considering playing around with - but not as easy to set up - is this nice little module based around the ESP32:

https://www.aliexpress.com/item/32964004777.html

There are a few IP camera projects and github repos out there, but nothing anywhere near as polished as MotionEyeOS, yet.


I don't see any reason you couldn't use a Pi Zero but you would need the wireless flavour for what's described. I'd guess that's slightly more than $9.


I see a house, why not use the Pi's Wifi instead of a modem?


Says it’s their countryside house, so may not have wifi at home.

User is somewhere in EU, and data plans can be cheaper than fixed-line connections if you use under 100gb/month.

Sometimes faster too.


It does use the built-in WiFi to connect to a WiFi network created by the mobile modem I placed at the neighbours house which has a permanent power supply.

I considered using a mobile USB modem attached directly to the Pi but that requires extra effort keeping it connected with something like a cron task that pings 8.8.8.8 and restarts the connection if there is no response.


ok, that makes sense. I thought it connects to a 3G/LTE network for internet connection. There are a few Raspberry HAT that offers this -- although that would be extremely costly for a live video feed


Lithium ion is so cheap these days I'm stunned this project resorted to using inefficient and out-dated lead acid batteries.


Even if you can manage to find li-ion cheaper, you would need to build a pack of 6+ 18650 cells for comparative capacity. A single Pb is much simpler. Bam, $18, done, a single unit, 80Wh ready to go, super simple to charge too.

It's not like the size or weight matters to him, and it seems his panel is big enough to avoid deep cycling it too often.


Exactly. And I haven't found cheap charge controllers that support the voltage range of Li-ion packs (like 12.6V for a 3S pack or 16.8V for a 4S pack).


There are actually quite a few well-developed IC's specifically intended for this application. They act both as buck converters for the output device, BMS for the lithium cell / cells, and a charge controller for the cells.

Andreas Spies has a great video on comparing some modern IC's for this -> https://www.youtube.com/watch?v=KaiQDS9jObY


This is a great start but $220 seems expensive for this type of project. Isn't there a less expensive setup possible?


A lot of the cost comes from the solar panel. I wonder if it might be possible to use a smaller panel with a battery storage device.


And they seemed to use a more expensive thin and flexible panel.

It does make mounting easier and wind load less of an issue.


I don't understand the RPi camera. It is lower quality than a webcam of the same price, and it has an awkward connector, so you can't really use it more than a few inches away from the RPi. Why not use a simple USB camera instead?


The csi interface doesn't take up as many CPU cycles, so if frame rate and performance is important, or even power consumption, it's better.


Wow. This just answered a big question I’ve been having. I’m starting a farm this year on my parents property. I’d like to remotely monitor it in the most scalable way. With resiliency being key. This is going to do great!


Wow surprised at the 100W solar panel. Is that overkill?

Still, very cool project.


Fwiw, afaik, cameras are relatively poor measures preventing burglary. By far the most important factor is reinforced windows and doors.


That’s an expensive way to build a crappy IP cam


I'd love a link to a commercial solar powered, weatherproofed, cellular IP Cam with an embedded computer that costs less then 200$

;)


And where you know(almost for sure), it has no backdoors ...


the camera portion of this is comparable in price to the cheapest IP camera you can get out of china, and probably works better.

even with the solar, it's cheaper than a nice IP camera from Axis.


Given what is shown, minus the solar panel part, you can create such an IP camera using a RasPi Zero W, one of the small 5 MP camera modules for the Pi, and a copy of MotionEyeOS - and do it all for under $50.00 USD.

I have such a camera monitoring a part of my house. That price figure is also using Amazon prices - I'm certain you could do it even cheaper through other sources.

Another option (which I posted in another comment to this) is this neat little module that I've been thinking of playing with sometime:

https://www.aliexpress.com/item/32964004777.html

Even via Amazon, you can get a pair of these for around $30.00 USD. Add some cheap enclosures, and a bit of codework (there's a few projects and github repos, but nothing polished) - and those would be some cheap, but nice, IP cameras.

No idea how well these (or even my RasPi system - my camera is indoors looking outside thru a window) would fair in the elements over a long period.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: