After the power outage in Boston last month, Brough and I decided to provide battery backup to our new head-ends. A typical head-end includes several gigabit ports (3 x RB-1100 AH2’s or a bunch of RB-750’s), power injectors to the radios and a backhaul fiber connection. So far we have been using off-the-shelf UPSes (see the last unit in the blog Giving birth to a Rack with a View), but they do not last very long – just a couple of hours. The challenge is to power our head-ends for more than one day, preferably two days.
To do this, we have to fine tune our power budget. Using batteries, stepping them up to 120V (80% efficiency), then stepping them down to 24v for the radios using PoEs (78% efficiency), and using a WebSwitch wastes at least 50% of our available power. So, we quickly decided to run the entire system from batteries with the appropriate electronics. So far, we only have a block diagram of what we plan to do – the moment we converge to a good solution, I will write another blog for the WISPA community.
One of the challenges is monitoring the battery voltage remotely using an inexpensive way. There exist several commercial products measuring voltages which include their own server and interface with web browsers – unfortunately all solutions require extra hardware and many hundreds of dollars… Jim becomes very unhappy if we spend too much money for hardware.
So, here is the idea that struck me this morning
:
since the Mikrotik routers are able to measure their own power supply voltage and make it available via the Winbox (/system health print), there got to be a way to disconnect the resistor divider network from the power jack and make it available separately.
Minus a few details — such as, not having any schematics or PCB layout, no assembly drawings, NOTHING – just two RB-750UPs as arrived from the distributor. So, I got my hacking hat and started working…
Step 1: Prepare and Relax
Mikrotik uses 0402 components (i.e. 0.2mm) and you really need a good microscope to do this! The PCB features are 0.125mm apart – yes you are reading this right: a human hair is only 10 times thinner than the space between pins – the picture to the left shows this. ![]()
To make measurements by toughing various components, I replaced my voltmeter probe with the thinnest needle I could found in the house – even that was still too big and I was running the risk to short adjacent pins.
Most importantly, you have to relax ; no phone ringing, no kids (or wife) in the lab, and a good chamomile tea
– do not drink any coffee at least two hours prior to this!
Step 2: Orient to the unknown PCB
Starting with the Power Jack – tracing the (+) terminal was hopeless. Too may traces under components, too many vias. So, if the “left to right methodology” does not work, we need to make intelligent guesses:![]()
- If the processor measures voltage, there got to use an A/D either internally or externally
- Let’s start with the processor; after reading the Atheros chip specs, I could not find any A/Ds integrated – that’s a dead end
- Next, start looking for familiar I2C or serial converters (from Maxim or Linear Tech or TI) – I know the three product lines very well, but no luck; dead-end again
- But then, in the vicinity of the connector I noticed an AMTEL (Tiny 461A) processor – aha, Mikrotik uses a co-processor for all supervisory functions!
- Now I need to find which pin of the processor is used to take voltage measurements. The data sheet was helpful – there were only 11 pins which support A/D measurements. But which one?
Step 3: Search and Hack
The technique to find the pin was straight forward:
- pick a pin,
- fix the input voltage to the router, say Vin,
- measure the pin voltage Vs,
- change the input voltage Vin by 50%,
- measure the pin voltage Vs again – if 50% higher, you might be closer.
It only took two tries and voila, I got it
: pin 25, ADC1. As I changed the voltage from 9V to 18V, the ratio of Vin/Vs was constant. I also measured the Vcc of the ATMEL chip to 3.3V (as expected). In this case, if the ratio is 1:11 then the maximum reading should be about 36V.
Step 4: Find the resistor divider network
You would think that following the pin trace is easy; not that fast, especially since the natural sunlight in my lab has faded away. Keep looking with the microscope… The only “trick” you can use is
touch resistors at random
until you find the one with the same voltage as in pin 25!
After 20 min or so, I managed to find two resistors with the expected voltages. Time to snap another picture.
Step 5: Apply “the inverted bug” technique
The task was to unsolder the upper resistor (R1) and fit a connector with one pin to the ground and the other pin to the lifted leg of the resistor. This had it own challenges – my top of the line Weller soldering station was not good enough to unsolder a 0402 resistor with my 1/16” tip; not enough heat to melt the common horizontal power bus. It’s time to use the “big gun”: the Metcal de-soldering tweezers, which I had borrowed from my buddy Frank Smith.
After a couple of attempts and plenty of solder flux, I managed to lift one leg of the resistor up in the air. Doing so, allowed me to measure the resistance; what a surprise: R1=10k and R2=1k – designers think alike! This gives a ratio of 11 – which matches with the computed ratio from the spreadsheet.
Step 6: Complete packaging and test it
In comparison, this is a piece of cake. Tools used: Kapton (Polyimide) tape, drop of fast epoxy, and a file. It does not have to be pretty – it only needs to work.
Testing was done by connecting the Mikrotik to its power supply and using a lab supply to the external pins. Here is the Winbox screen:
Conclusion
Discovering the way to do this was interesting; luckily, I do not have to modify every router we deploy – just one at the head-end; I can do this again and again within 30min (minus the chamomile tea time). If you find this useful, do drop me a line
.
Enjoy!
Hey, How To Create A Good Blog Title Which Attracts Lots Of People?