22 Sep

Solar powered home

And breaking silence over here, last few months went quite busy. I travelled to Cambodia, Singapore, Taiwan and Hong Kong recently for various tasks from APNIC’s IXP workshop in Cambodia to SGNOG in Singapore, APNIC 44 in Taiwan and so on.
Apart from this, I went for solar power setup at home here in Haryana since grid has been quite unstable (specifically this year). I think the overall grid is OKish but it’s quite bad in my city due to the construction of an overhead road from where a high voltage line is crossing. That has lead to regular long outages in the area. I think in terms of formal load shedding things are getting better and I am certain Indian Govt. will be able to reach its target of 24 x 7 supply without any shedding before 2022. That would be the key part as we go for electric vehicles in India. But still, I think we won’t get a good stable grid for at least next 6-7 years. Checkout Vidyut Pravah website which gives an idea of load and demand across India. And here is data for Haryana.

Reasons for the poor grid (even when there won’t be any shortage in supply):

  1. High electricity stealing in rural areas which results in most of the local electric companies staying in the losses. Political issue and solution aren’t simple.
  2. Extremely poor or I would better say – zero planning when putting cables which results in untidy wiring and it is impacted by rains, small winds, tree branches and what not.
  3. Stupid rules like one have to pay extra deposit money to increase the capacity of the electric meter. While a large number of middle-class families have multiple air conditioners (each with at least 1.8KW), most of them have an official load of 2KW on paper. This requirement makes it hard for grid technicians to increase load in colonies resulting in overheating and failure of transformers.

So with that being said, I decided to go for solar system setup at home.
As I started exploring, I found there are two options:

  1. On-grid setup
  2. Off-grid setup


On-grid setup

As the name suggests, it’s a setup where system stays connected to the grid and such systems are without any battery. They are based on the logic that sun is in the daytime and hence max power is produced (as panels and radiation can support). Power is used to serve load, if power from panels is lower than load, the grid is used to serve remaining load. If there’s excess power, it is supplied back to the grid. Ideally one can go for a system where more energy is generated than it’s needed in the daytime so that meter can go in reverse and at night one can pull from the grid. If planned properly net usage can be close to zero effectively using the grid as storage battery (with no major cost of the battery as well as them wearing out).
One very important part (and deal breaker) for such setup is that it works in sync with grid and basically the on-grid device syncs the power produced by solar with the power coming from the grid. If the grid is down, solar cannot be used at all and hence it did not make any sense for my area where the grid is unstable and primary objective of the solar system was to have stable power. Such system can very well make sense in the developed world where power is stable.

Off-grid setup

Off-grid is where one has solar panels with batteries. One runs load on panels and also charge batteries in the daytime and use batteries at night. While that is the definition of off-grid systems outside India. In India, we went more creative and our manufacturers went for hybrid systems where they are off-grid but also connected to the grid (irony, huh?). Such systems can use a mix of solar+battery and grid power to serve load. These systems can be tweaked as per need i.e to have solar as priority or grid as a priority, when exactly to use grid and when not etc. Such systems are needed in India because the grid is unstable and one may be interested in having a solar system to also act as UPS during grid failure. These systems serve load either on solar+battery or live grid and not both of them together. Handover is graceful and in less than 40ms causing no outage on connected network & servers.

Setup specifications:

  1. Sukam 4 x 260W solar panels producing 1.04KW
  2. Sukam 2 x 150AH batteries for storing power for nigh as well as UPS use
  3. Sukam Brainy Eco 1600 solar inverter (which has solar charge controller as well UPS system – all in one unit)

Panels produce power at 24V and all panels are connected in parallel (current sums up, voltage stays same). Both batteries give output at 12V and hence connected in series making it 24V output. Thus DC side of system is 24V. On AC side it’s usual 220V output.


Some pictures from installation day

For now, the system is configured to run load as well as charge batteries in the daytime and from evening until late night, it serves load via batteries. The system has a cut voltage configured at 24.4V (which is around 50% battery level) hence once batteries are used till 50% level, the system stops using them and keeps remaining 50% as a reserve (for cloudy times with unstable grid). When batteries reach 24.4V level system gracefully bypasses and puts the load on the grid while staying online to take over in case of grid failure.

Some numbers

Panels are rated for 260W each and hence in ideal times can produce 1KW of total power. The system is entirely 24V and hence panels produce at 24V (I have seen 28V on voltmeter during the afternoon on a sunny day). The system is expected to produce 5-6KW hr of energy in the daytime which is good enough for running load (excluding air conditioner & certain other things) for 70-75% time of the day. Batteries store 150AH and are rated at 12V and hence each battery stores 150 x 12 = 1800W each. Thus the system has 3.6KW hr worth of energy when fully charged out of which I am using 1800W to serve load and another 1800W as reserve power for grid failures.
With the system, I am able to run the load on solar power (not batteries) from 8 am to 6 pm presently and on solar charged batteries till around 12 am to 1 am. This includes 2 fans, 4-5 LED bulbs, 30-40W worth of network gear (core router, a couple of switches, point to point radio for fixed wireless, DOCSIS cable modem etc), ADS-B receiver to keep eye on the sky, my laptop, cell phone (for charging), Raspberry Pi, two RIPE atlas probes, pump and light for fishes, etc. What is not included but I plan to include is TV and likely fridge as well once I finish tweaking system.
The system offers 3 levels till which we can use batteries (before it falls back to the grid):

  1. 70% level
  2. 50% level
  3. 30% level

One can pick 30% level but that can cause issues when the grid is unstable on a non-cloudly day besides that one also needs to be sure that batteries are actually being charged in the daytime. In terms of power needed for charging, batteries take around 180 x 2 = 360W of power for charging and time depending on their level.

Some of the things which are not good about the system:

  1. It took Sukam over a month to fix the initial unit I purchased as auto-cut off was not happening at all. Support was friendly overall but took extremely long time with an escalated request.
  2. The system is not designed well around the logic of cut off and grid charging. So for instance, if I select cut-off voltage at 50% levels i.e system should run load via battery at night till they reach 50% level and after that just use the grid. And if grid charging is enabled in this case, the system ends up using batteries till midnight and after that starts using grid and charging batteries from the grid! which is quite stupid. Running 7-8hrs on battery and then charging the battery via grid is very inefficient. I expected the system to use the grid below 50% levels. Thus I ended up in disabling grid charging which probably should work fine but will be an issue during long cloudy days and power cuts.
  3. The option to tweak UPS system is by so-called “dip switch” which is a combination of 8 switches. Except for tweaking cut-off voltage, rest is fine. Tweaking cut-off levels via those switches is a horrible experience. I wish Sukam added a simple LCD display with a couple of buttons to digitally configure it.

That’s all about the solar setup at home!

12 Sep

Three days without laptop / Repair of damaged Macbook Pro screen

In Hong Kong and right on the day when I was leaving for Hong Kong – I noticed a bug in my Macbook Pro’s screen. A real insect yes!
This was irritating. Hard to know how it actually got inside but may be from bottom side of laptop which was missing two screws for a while which I recently bought from UK and added. Apple support couldn’t answer on how it got there. Furthermore I was facing a problem of screen showing pink/green lines after turning on for almost 1.8 years now. They used to show up when laptop was turned on and used to go away after 15-20mins. Over time the issue increased and now it was taking as much as 40-50mins for lines to go away. Since I was visiting Hong Kong for HKNOG 3.0, I booked an appointment with Apple store. Fixing time went quick (over phone call with Apple support) and I was at Apple store in HK right on next day after an overnight flight to Hong Kong.
They dropped bill bomb by quoting me $5600 HKD / $720 USD / 48k INR !!!
While they told me of the amount they kept on running built in diagnostic tests to see if something else had any issue. I was there trying to count whether it makes sense to spend $720 USD on repair or rather just buy a new one. New one was 3x price of that and in current config I quite existing one. There wasn’t any other major reason to buy new one except screen issue. Furthermore re-sell value would be just zero for a laptop with insect inside screen. This is my three years old laptop and I used it almost for 12-16hrs every day on each day in last 3 years.
In meantime Apple store advisor told me (as part of regular diagnostic) they would check my screen for any issues with top coating and if they found any issue they would replace screen for free as Apple covers screen replacement for damaged coating even for devices outside warranty program and I was lucky it was. 🙂
So the good news for me was free replacement of screen and that would get me rid of bug inside screen beside green/pink lines but sad part was 3-5 days time they quoted for replacement. In real it took just 3 days and they were read with device by 3rd evening (a few hours ago – when I got my device back). You can read more about free screen replacement / Apple screen coating issues in this post and I can very much confirm that this is applicable. That saved me a hell lot of money and the hard choice of putting $720 on three year old device Vs new one.
Also I realised this was first time in three years when I was without laptop.
Day 0 – This was day when I deposited laptop. This day just went as I was deadly sleepy after a 9hrs non-sleepy flight and bit of travel inside HK.
Day 1 – This was HKNOG 3.0 conference day. I was on way in HK MTR (metro rail) to conference venue. I checked and edited my slides on my Nexus 5 smartphone in Google Sheets. It was OKish experience. Worked but definitely not fun. I very much missed laptop at that time. Did not miss laptop in daytime as was busy with conference. I could surely have worked during event and email replies could have been bit faster! But not much beyond that. Conference day usually goes busy in meeting people, and discussing about various things.
Day 2 – This was day when I checked out of hotel and checkin to hostel and terribly missed laptop. I did strained my eyes a bit while waiting for rain to stop outside by watching Suits Season 3 on my Android phone on Netflix. I even thought to download wordpress app on Android and post on my blog but realised I have done bit of fencing on blog to make it hard to connect! I did roamed around nearby in electronics market and even explored option of cheap laptop to run Linux and have it as backup laptop but I usually prefer single device and that stays very well customised and personalised.
Day 3 – It was Sunday and I roamed around a bit and had some serious plans while I cancelled as soon as I read email from Apple store with subject: “Your product is ready for pickup” and I just rushed to Apple store (which happens to be open on Sunday as well here). Collected laptop and started working on restoring OS (an hour of task via Time Machine backup).
For now laptop seems fixed and has got a new screen.
Here’s what bill says:
With that being said time to look at BGP routing table 🙂

11 Apr

Creating a cable for fast USB charging

When I was in US last time, I picked a nice charger with it’s own backup from Amazon. It’s PowerGen charger with a storage capacity of 8400mAh with two USB ports for output (one with 2Amps output and other with 600mA with 5V standard USB).


This is a amazing product since 8400mAh is really huge amount power. My phone’s battery has a capacity of 1750mAh and theoretically speaking this can charge battery from 0 to full around 4 times. In practical experience I have tried for around 3 times during long flights. Never really needed to go beyond that point.
The charging cable which came with this charger has something special – It’s a “charging only” cable without any data connection capability. The charging only cable carries only “electrical connectivity” via + and – wires without any data pins (D+ and D- shorted). The advantage is that charging speed with this cable was really fast and I really enjoyed using it with external charger as well as my iPad’s charger which has a 2A output (which brings 2A x 5V = 10W power).
In theory these charging only cables give very fast charging because they don’t put USB data connection. A standard USB port on computer has power limits and device is signaled to pull more power via “shorted data pins”. Usually device is connected to 600mA or even less in data+charging mode, while such shorting brings power to max of port which is usually 1A for most of ports (and 2Amps for iPad charger).
Unfortunately connector of cable which came with my powergen charger went pretty loose.
Tonight I decided to make an extra data cable which was lying around into “charging only” cable by shorting it’s D+ and D- mins. It was pretty easy except that actual wires are really thin and I had slightly hard time in removing insulation without breaking them off.

Steps for creating a “charging only” cable

Step 1 – Pick a standard USB data cable

Cable before starting:


Step 2 – Cut it right from middle and peal off outer insulation

It will have 4 wires – Red & black (for electrical current flow), white & green (for data connection)


Step 3 – Now idea is to short the data pins (green and white) going towards phone while just leave white and green going towards USB port/charger side disconnected. Red and black should be connected as normal for electrical connectivity.


Step 4– That’s pretty much it. Just insulate final red and black connection in a way to make sure they never short.

This is how cable looks like in my case after shorting data pins and insulting it back.


That’s about it.

Back to work for now! 🙂