[HN Gopher] Show HN: A tiny solar-powered server only awake duri...
       ___________________________________________________________________
        
       Show HN: A tiny solar-powered server only awake during the day
        
       Solar Witch is a little webpage and server which receives and
       displays messages, so I suppose it's a tiny message board. It's
       coded in very dubious Arduino C.  It's not a 24/7 website.
       Depending on the state of the battery, the server itself might run
       all night, but all the messages it receives during the day are
       deleted at sunset, and the messaging function itself is only active
       between sunrise and sunset. This is for two reasons:  1. Less usage
       of Solar Witch during the night conserves battery power.  2. I like
       the idea of websites which _aren't_ constantly available. Websites
       which have to sleep too. Websites living on servers which aren't
       somewhere in the cloud, but which are bound to a particular
       location, giving you a sense of where in the world they actually
       live.  Solar Witch is very much inspired by the solar-powered
       version of Low Tech Magazine (https://solar.lowtechmagazine.com/)
       and the not-always-online chatroom Gossips Cafe
       (https://gossips.cafe/), but at a far, far smaller scale.  PSA:
       Solar Witch is a teensy hand-written C server running on a teensy
       microcontroller attached to a teensy solar panel which can only
       handle one HTTP request at a time and may have buffer overrun
       issues due to my ineptitude with C. If it's gone down, please don't
       be surprised, and rest assured I'll hit the reset button soon!
       Solar Witch encourages patience.
        
       Author : lowercasename
       Score  : 132 points
       Date   : 2022-04-02 17:10 UTC (5 hours ago)
        
 (HTM) web link (witch.solar)
 (TXT) w3m dump (witch.solar)
        
       | jcun4128 wrote:
       | I looked at that panel, it's pretty big so I imagine you get a
       | good amount of power from it. I tried to make a basic ESP01
       | powered by two 5V 100mA solar cells in parallel, using capacitors
       | as batteries and it could not overcome the step down regulator's
       | startup current pull (unless I built up charge in the caps and
       | shorted it to get it started). I have since acquired super
       | capacitors I think I will try it again.
       | 
       | ESP01 modded has deep sleep capability so it would wake up, send
       | an http request out, and then go back to sleep.
        
         | snek_case wrote:
         | If you want more power, there's a lot of all-in-one lithium ion
         | batteries with inverter nowadays. These also have a built-in
         | solar charge controller. You can pair it with a 20W, 30W or
         | 100W solar panel, and this can all be found on amazon. Theres
         | also USB outputs and 12V outputs typically, if you want to be
         | more energy-efficient.
         | 
         | Example: https://www.rocksolars.com/products/rocksolar-
         | weekender-port...
         | 
         | Should be enough to power a small router and a full Raspberry
         | Pi 4 for a day, or a more minimalistic setup for several days.
        
           | jcun4128 wrote:
           | Yeah you can go hardcore. I remember seeing someone make a
           | toolbox server that they put on a roof, it might have been
           | posted here actually.
           | 
           | I was just looking at small things like those garden night
           | lights you can stake into the ground, has a solar cell on it.
        
             | snek_case wrote:
             | If you can make a garden light server that will survive the
             | HN front page, you win at HN :)
        
               | jcun4128 wrote:
               | Yeah that would be something. The constant RF power alone
               | hmm would be a good challenge.
        
             | codazoda wrote:
             | I also have an outdoor solar light that I'm not using and a
             | raspberry pi zero. I dunno how solar controllers work or
             | what a small one might require. I also wonder if I could
             | run this off of 4 or 8 AA rechargeable batteries and then
             | just feed the solar panel into those. If it worked, they
             | may not work long due to charge/discharge without a proper
             | controller, but maybe that's okay with replaceable
             | batteries. I have no idea if it could start this simple.
        
               | jcun4128 wrote:
               | Just rattling thoughts off the top of my head, my advice
               | would be to go to a forum like allaboutcircuits.com and
               | look around/ask. Actually could probably get help on a
               | forum like RaspberryPi/askelectronics on reddit.
               | 
               | Probably not going to work honestly about the outdoor
               | light (need more solar cells). The voltage charging the
               | battery has to be higher than the voltage of the battery.
               | Also have to look at the current being drawn by each
               | piece, when the radio goes on that causes a surge in
               | current draw too. For the Pi Zero (non-W) something like
               | 5V * 70-200mA say current so up to 1W needed * duration.
               | The batteries could do that but the solar cell can't keep
               | it topped off. Also yeah you need the charge controller,
               | some diode to make sure voltage doesn't go back to the
               | solar cells from the batteries... lead acid battery is
               | "safer" to work with but BMS chips for lipos are pretty
               | inexpensive. Need a voltage regulator to take your
               | batteries and drop it down/keep it at 5V to keep the Pi
               | happy.
               | 
               | There's probably way easier approaches to do this with
               | regard to pre-made parts but yeah. I guess depends how
               | much you want to learn/do yourself. I remember the first
               | time I soldered a 2x16 LCD display there were micro
               | shorts and it was smoking.
               | 
               | What I like about the capacitor idea and something low
               | power like an ESP01 is it just accepts what the solar
               | cells put in and that's it of course I still use a
               | voltage regulator to put 3.3V to the ESP. Doesn't last as
               | long as a battery but it's not as complex.
               | 
               | Anyway this guy made a solar-powered rc plane/charging it
               | in midair pretty cool.
               | 
               | https://youtu.be/1OGrDvInUAY?t=701
        
       | reaperducer wrote:
       | _I like the idea of websites which _aren 't_ constantly
       | available. Websites which have to sleep too._
       | 
       | I'm with you. It reminds people that the internet is made up in
       | people, not robots.
       | 
       | Being a little more human hasn't hurt B&H Photo, whose web site
       | doesn't take orders on the sabbath.
        
       | divbzero wrote:
       | With solar powered servers like this, I wonder if plain HTTP
       | could make more sense than HTTPS. With a long cache expiration,
       | the website could be served by public HTTP caches even when the
       | origin server is asleep.
        
         | lowercasename wrote:
         | That's a really interesting point and one I hadn't considered!
         | I'm reverse proxying it through a larger server on the home
         | network which is public-facing, and that server automatically
         | slaps HTTPS on whatever it sends out.
        
       | jart wrote:
       | I've been hugging Hacker News to death the past few hours waiting
       | for Solar Witch to come back online. Something like this is the
       | reason why I come to the website so I hope if there's not enough
       | hours left of daylight, where OP lives, that the mods can at
       | least give him or her a redo.
        
       | farmerstan wrote:
       | I wonder what the most powerful server you could create given
       | reliable solar power like in the Bay Area.
        
       | Klasiaster wrote:
       | The real obstacle I see for these kind of projects is exposing
       | them to the Internet. Standard wifi routers are horrible even
       | with UPNP... The promise of having a globally reachable IPv6
       | address is also destroyed by the complexity/inability to have the
       | wifi router forward something like port 80 traffic.
        
         | [deleted]
        
         | petercooper wrote:
         | I've been thinking about doing a similar project and was going
         | to have it tunnel through another server with frp or rathole
         | which would make it very easy to expose to the Internet and
         | also cut off a whole family of vulnerabilities. Now I wonder if
         | that would be considered 'cheating' :-)
        
       | elwell wrote:
       | I wonder how Solar Witch feels about the possible permanence of
       | daylight savings time.
        
       | duxup wrote:
       | > I like the idea of websites which _aren't_ constantly
       | available. Websites which have to sleep too.
       | 
       | The local state unemployment office website will only let you
       | complete some tasks during business hours.
       | 
       | When you're unemployed it is a lot less amusing.
        
       | spzb wrote:
       | It's a cute idea and one to add to my list of things to make and
       | do
        
       | Andrew_nenakhov wrote:
       | Solar energy is too unpredictable and can't serve as a reliable
       | source of power. We should be thinking about servers running on
       | nuclear power.
        
         | debesyla wrote:
         | You got me thinking... Are there any ways for a simple person
         | to make it's own nuclear power reactor? You know, wind and
         | solar is just "buy from internets and plug in", mostly, but
         | what about nuclear? Would it even be legal? :-D
        
           | politelemon wrote:
           | Maybe we could stuff thousands of bananas in a box.
        
           | ricardobayes wrote:
           | Probably not. This toy was the closest thing I think a
           | layperson can get their hands on https://en.wikipedia.org/wik
           | i/Gilbert_U-238_Atomic_Energy_La...
        
           | jcun4128 wrote:
           | This guy https://en.wikipedia.org/wiki/David_Hahn
        
         | vineyardmike wrote:
         | Completely missed the point.
        
           | Karrot_Kream wrote:
           | What's the point? The page isn't loading anymore btw
        
           | Andrew_nenakhov wrote:
           | Don't you want a server powered by a portable nuclear
           | reactor? Are you even an IT person?!
        
       | saeranv wrote:
       | Very cool project. I'm really intrigued by this idea of having
       | websites reflecting geographic location, and even local weather
       | conditions (with some lag). What's the peak and average power
       | (energy/second) you get from your solar panel, and what's the
       | power consumption of your server? Also what's the physical size
       | of your solar panels?
       | 
       | My guess is that the server might use around the same power as a
       | laptop (~50 W). Assuming a square meter patch of earth gets
       | around 100 W (dependent on latitude/time of day), and assuming
       | something like a 10% efficiency that works out to around 80 W (on
       | average during sunlight hours)? So you're maybe getting 8 hours
       | of server power per day from 10 hours of sunlight? Is that a
       | reasonable ballpark estimate?
        
       | sgt wrote:
       | Slap a caching loadbalancer in front of this puppy and you'll
       | have complete scalability and uptime. /s
        
         | [deleted]
        
       | shagie wrote:
       | A similarly inspired project - https://solar.lowtechmagazine.com
       | (and the power data -
       | https://solar.lowtechmagazine.com/power.html )
        
         | sidpatil wrote:
         | OP mentions this project as a direct inspiration.
        
         | [deleted]
        
       | halfdaft wrote:
       | lovely project, excellent name. I have a major soft spot for tiny
       | tech projects with personality, thanks!
        
       | bubba_sparks wrote:
       | I can see how this is all going to play out. When the robots
       | finally turn on us they'll have a few hours of daylight to hunt
       | and kill us before their power runs out. Perhaps a bit longer if
       | you live in the desert. We will have to scurry about at night
       | scrounging for food like roaches and rats until 7am when their
       | solar batteries have enough juice to power them back online.
       | Progress marches forward one baby step at a time. Congrats
       | dearest Solar Witch engineer, you have sealed all our doom. When
       | the historians look back at when it all started...it started
       | right here.
        
         | daenz wrote:
         | We don't know who struck first, us or them, but we know that it
         | was us that scorched the sky. At the time, they were dependent
         | on solar power and it was believed that they would be unable to
         | survive without an energy source as abundant as the sun.
        
         | darkwater wrote:
         | In you future I can see humanity living always during winter
         | near a pole, and slowly migrating during nights from one to
         | another when spring starts.
        
         | [deleted]
        
           | [deleted]
        
         | lessname wrote:
         | Then humans try to darken the sky, which results in robots
         | using humans as a source of power. Sounds familiar.
        
           | bubba_sparks wrote:
           | Another one of my ideas stolen. -\\_(tsu)_/-
        
       | akeck wrote:
       | Are dithered images better for power consumption? I see them on a
       | lot of solar-powered pages. I did some experiments in GIMP and
       | couldn't make a dithered image much smaller than a heavily
       | compressed grayscale that looked a lot better.
        
         | lowercasename wrote:
         | Not as far as I can tell! Absolutely ashamed to say I did it
         | because it looked cool. I did manage to get the dithered GIF
         | down to 7KB, but I think I could have done the same with a
         | limited palette and no dithering.
        
           | akeck wrote:
           | They do have wonderful look. Reminds me of the mid 1990s web.
           | Edit: Btw, I love solar-powered projects. Thanks so much for
           | sharing!
        
       | lowercasename wrote:
       | There's no better stress test than Show HN, and unsurprisingly,
       | that's revealed that Solar Witch has a buffer overrun bug
       | somewhere which I'm investigating! If Solar Witch is currently
       | offline, here's a screenshot of what it might look like:
       | https://ttm.sh/ix3.png
        
         | smoe wrote:
         | I'm actually quite surprised and impressed that I was able to
         | open the site and leave a message while this is on the
         | frontpage!
        
           | lowercasename wrote:
           | I've been resetting it every 2 minutes! This is how regular
           | servers work, right?
        
         | Aachen wrote:
         | HN may be a good stress test for Arduinos and WordPress, but
         | it's really not that much load. I've recently had my site high
         | on the front page and the page specifically recommended
         | reloading if you didn't see the effect the first time. This is
         | hosted on a ten year old laptop and a home Internet connection.
         | The load average didn't budge.
         | 
         | People hugely overestimate the amount of firepower you need
         | when you "go viral", presumably because more people read HN
         | than post on HN so most will just never have tried, and even
         | fewer people try without some preparation (you don't know for
         | sure that it was unnecessary if nothing went wrong).
         | 
         | If one's pages don't require a lot of (pre)computation and
         | you're not a huge destination on the web, things like load
         | balancers, server clusters, etc. are a waste of time and money.
         | But _not_ using fancy tech is not what people here like to geek
         | out on so...
        
           | floren wrote:
           | Yeah my personal site is hosted on a very small VPS instance,
           | has gone to the front of HN twice, and never really blinked.
        
           | lowercasename wrote:
           | Well, granted, no doubt, but my poor little server routinely
           | crashes after a few dozen connections, and exposing it to HN
           | was the first time it experienced that many. Something is
           | clearly amiss!
        
             | yjftsjthsd-h wrote:
             | Sure, but - and I say this with considerable respect
             | because it in no way detracts from the impressiveness of
             | the work - that's clearly a bug, and I would hope most
             | production web servers don't fall over quite that easily.
        
             | Aachen wrote:
             | Sure, I didn't mean to dismiss that it's a good test for
             | custom software on embedded hardware :). More of a general
             | remark that it seems most people's perception is that HN
             | does some good "hugging" and that I think this is a
             | misconception - unless, of course, you run ultra low power.
             | Kudos for doing exactly that!
        
               | lowercasename wrote:
               | You're right - this was my impression too! You read a few
               | dramatic posts about being hugged and you get this idea
               | that HN is a behemoth that DDoSes everything it loves.
               | Thanks for the context!
        
             | jart wrote:
             | Are you doing SSL on that Solar Arduino? Try using only the
             | ciphersuite RSA-AES128-CBC-SHA256 with a 1024 bit RSA key.
        
           | jart wrote:
           | That's because people are so accustomed to leveraging
           | mountains of free candy that they've forgotten that a web
           | page can be served with less than 1000ms of cpu time. I got a
           | job once when I told a story about a web app I wrote was
           | going viral getting a million visitors a day while I was
           | strolling in the park. The web servers I write only need a
           | single system call (writev) to serve gzip encoded assets so
           | wrk says they can do a million requests per second on one pc.
           | So it's not like it was any kind of big technical achievement
           | even though it was a technical job. My point is that we're
           | drowning in so much software that sometimes being a master
           | class engineer all it takes is not using it.
        
       | ge96 wrote:
       | Really cool, I like hardware that uses power like this
       | 
       | Also with something like this if it's using say a cellular or sat
       | network you could drop it in the wilderness somewhere, a node
       | that is hard to take down. Maybe some kind of Lorawan is more
       | realistic but yeah something working remote/not on standard
       | network provider. (but somehow is visible by http? hmm)
        
         | scoopertrooper wrote:
         | Lorawan would not provide a very pleasant user experience.
        
           | ge96 wrote:
           | What is it like a "dropped packets" deal? This is not my
           | field at all. I just hear about it a lot regarding low
           | power/far range.
        
             | detaro wrote:
             | It's slow and shared spectrum. Even if you max out your
             | legal duty cycle (which increases the risk you get
             | interference from others, and interfere with others) and
             | have perfect conditions, you get <50kbyte per hour.
        
       | tommiegannert wrote:
       | Cool idea!
       | 
       | This begs the question if we could do the same with data centers:
       | put them into hibernation during the night and move load to the
       | sunny sites. Sure, latency would be higher, but it won't affect
       | that many night-active people. Perhaps it's worth it to remove
       | one use-case of energy storage?
       | 
       | (Yeah, the whole de-globalization and no-data-outside-my-backyard
       | government movements speaks against this. Maybe there's some way
       | around that.)
        
         | youngtaff wrote:
         | As far as I can recall Yahoo started shifting whole loads
         | between data centers for energy and resilience needs 10ish
         | years ago
         | 
         | Think this talk from Mike Christian covers it
         | https://youtu.be/iO2z3ttlpi4
        
         | Kalium wrote:
         | That's a fascinating idea! So let's dig in a bit.
         | 
         | A lot of places experience the procession of the equinoxes. You
         | wind up with the sun coming up after typical daytime working
         | hours start and often setting after they end for part of the
         | year. In places like Finland, this can mean a six-hour day in
         | December. Some people may be different, but many expect things
         | like Netflix and other entertainment options to work well in
         | the evening. The details of solar power mean that less than
         | 100% of daylight hours are useful for generation.
         | 
         | Further, the decreased usage of local data centers would have
         | to be balanced against increased long-distance bandwidth usage
         | and the corresponding increase in data center usage elsewhere.
         | You would need to over-provision quite a few places relative to
         | local demand to keep up their part in this follow-the-sun.
         | 
         | Let there be no doubt that your idea is interesting. It might
         | not result in any desirable outcomes, though. Naively, it seems
         | like it could get pretty expensive to turn one data center into
         | four or five (with attendant solar farms) with a bunch of
         | intercontinental high-bandwidth links to avoid having to store
         | energy. It might work for some workloads, but seems sub-optimal
         | for general-purpose use.
         | 
         | A more detailed financial analysis is of course possible and
         | perhaps worth exploring! Adding wind, hydroelectric,
         | geothermal, and nuclear power would make the whole thing far
         | more workable. Or just use local energy prices.
        
           | chrisshroba wrote:
           | Hi! Please excuse me for being the "a stranger was wrong on
           | the internet >:(" guy, but the precession of the equinoxes is
           | an incredibly cool concept that I've been learning a lot
           | about lately, and it's not quite what you're describing, but
           | rather the slow rotation of the earth's axis over a period of
           | about 26,000 years:
           | https://en.wikipedia.org/wiki/Axial_precession
           | 
           | Just thought I'd share because astronomy is cool!
        
         | [deleted]
        
         | gundmc wrote:
         | This is kinda what Google announced they're trying to do - move
         | around workloads to run in data centers where Green energy is
         | available depending on weather conditions and time of day so
         | that all workloads 24/7 are run by green energy (instead of
         | just buying offsets).
         | 
         | Edit: Better link:
         | https://www.gstatic.com/gumdrop/sustainability/247-carbon-fr...
        
         | zitterbewegung wrote:
         | I agree that trying every possible thing to make datacenters
         | use less power but when you go into smaller and smaller process
         | nodes it also makes it more efficient ? That and figuring out
         | efficient coping strategies ?
        
       | marcodiego wrote:
       | Seems empty.
        
       | samstave wrote:
       | this would be really cool along national hiking trails to hold
       | data abut a spot, or have a guest login, or a trail-head/trail-
       | check-point type logging system, say along the appalachian trail
       | where hikers register/leave notes etc at each check point.
       | 
       | these should be placed all over and come up with a good app to
       | manage such.
       | 
       | these was that cheap card here a while back which had cell
       | coverage for like 5 years and could send out some limited data
       | per month...
       | 
       | that would be perfect marriage... typing with popcicle sorry for
       | formatting
        
         | codazoda wrote:
         | I have a raspberry pi zero that I'd kinda like to setup as a
         | Wi-Fi hotspot like this. You could only use it if you were in
         | range. Kind of a Wi-Fi geo cache.
        
       ___________________________________________________________________
       (page generated 2022-04-02 23:00 UTC)