Raspberry Pi usb power bank ups pass through

I use my Pi B in my car to do timelapse photos powered off a cigarette to usb plug however I found that sometimes the plug would fall out and thus power down the pi. I also had the problem that even if I wanted to stop for 5 minutes which meant turning the engine off again the pi would be powered down. TO overcome this I thought I would look into using a usb power bank as a mini ups and here are the results of my testing.

I tested for both pass-through charging i.e. a power bank which allows to be charged while powering a device AND ‘UPS’ which is a usb bank which supports pass-through charging with the added feature of power to the connected device (pi) being uninteruppted when the mains charger was switched off/on.

1, AUKEY Mini 5000mAh
I puchased the Aukey on the back of the pcadvisor reviews

I liked the fact that it was fully automatic i/e no buttons to press to begin charging and that it allowed for 2A in put and output meaning even if my pi drawed 1A when using the power bank in conjunction with a 2A plug/power supply it would mean it would always charge faster than the pi could run it down.

Alas after putting it into my test setup I found that it DOES NOT support pass-through charging.

2, Xiaomi Portable 10000mAh Mi
Like the Aukey the Xiaomi boasts a 2A input current and is double the capacity of the Aukey but has a physical button which needs pressing to begin charging a connected device. I’m please to report that this model DOES support pass-through charging however failed my ‘ups’ test in the fact that when mains power was switched off it briefly did so as well for a few seconds before coming back on, the same was seen when mains power was restored.

3, Eachine Y5 6000mAh

Although purchsed for a different project I thought I would feedback on this power bank. I bought it due to it’s relatively high capacity and small form factor as well as having a LCD power display. Unfortunately I found it did not support pass-through or ups.

4, Anker® Astro Mini 3200mAh
This was one of the first power banks I purchased and was happy to find it DOES support pass-through charging contrary to the pcadvisor review.


However it was noted that although it managed to power on the pi it did not completely boot due the power bank only giving out 4.6-4.8v thus made it unsuitable for my specific application.

When I checked my original amaon purchase link it now goes to the Anker PowerCore+ mini (3350mAh Premium Aluminum Portable Charger) which is a newer version and I don’t know whether it supports pass-through. A quick google showed Maplin are still advertising the 3200mah version but this might be a typo or failure to update the spec.


5, Anker Astro 5600mah (1st Gen)


I purchased this some years ago but thought I would test it anyway and found it DOESN’T support pass-through.


Test Results Matrix
Device Pass-Through UPS
AUKEY Mini 5000mAh
Xiaomi Portable 10000mAh Mi X
Eachine Y5 6000mAh
Anker Astro Mini 3200mAh X X
Anker Astro 5600mAh

My Location

Felixstowe, Suffolk N 51°57’08.52″, E 1°20’21.33″ http://maps.google.com/maps?q=loc:51.95237%2C01.33926

Viewing progress of dd in linux

To view the progress of dd we can use the pv (pipeviewer) program. [code]apt-get install pv[/code] I saw a usage example on other sites but they didn’t work from me [code]dd if=test.img | pv | of=/dev/sdx bs=4M[/code] This just returned [code]0B 0:00:00 [ 0B/s] [<=>[/code] This is what worked for me (note the use of dd again after the pv pipe) [code]dd if=test.img | pv | dd of=/dev/sdx bs=4M 3921920+0 records inMB/s] [ <=> ] 3921920+0 records out 2008023040 bytes (2.0 GB) copied, 234.248 s, 8.6 MB/s 1.87GB 0:03:54 [8.17MB/s] [ <=> ] 0+16458 records in 0+16458 records out 2008023040 bytes (2.0 GB) copied, 283.842 s, 7.1 MB/s [/code]

Xen HP ML115 G5 1 Dell Poweredge R220 0

So I did a xen install on a dell PE R220 and then tried to do a simple Debian install from a cd. In the first instance it took about 10 minutes for the initial Debian splash screen then when it couldn’t connect to an apt mirror it froze, I tried shutting down the vm via XenCenter and it just got stuck and wouldn’t shutdown properly. I tied an external cd drive and had the same problems. After some cursing I dug out one of my trusty ML115 G5′s that was waiting patiently on a shelf. Installed Xen and Debian via CD with no issues at all!.

Finding CPU temperature on Raspberry Pi

Here are a few ways to find out your cpu temperature on a pi running raspian.

/opt/vc/bin/vcgencmd measure_temp temp=49.8'C

cat /sys/class/thermal/thermal_zone0/temp 49768

cat /sys/devices/virtual/thermal/thermal_zone0/temp 49768

perl -e 'm/(d+)/; $x=$1; s/d+//; printf ("%.1f", ( $x / 1000))' -p /sys/class/thermal/thermal_zone0/temp 49.8

gawk '{print $1/1000,"degrees C"}' /sys/class/thermal/thermal_zone0/temp 49.768 degrees C

Cineworld Ipswich Subtitles Fail

On the rare occasion I feel like venturing to the cinema (last film I saw was ‘The Fighter’) generally subtitled showings are at some ridiculous hour of the night. Today I thought I would see what is on, the entire choice was Inside Out Rated U Paper Towns Rated 12A Pixels Rated 12A I looked at other Cineworld venues and although marginally better choice single showings were only available on weekdays during the afternoon. So from what I can work out Cineworld have done some sort of profiling at come to the conclusion that deaf people are either nocturnal and only venture out after 10pm and don’t have jobs and that we are all aged under 12 OR we can only handle children’s films and that we require adult supervision. I’ve looked into this and apparently subtitles at the cinema can be switched on and off just like you would with a DVD so why are we treated as outcasts?

My Location

HP27 9NU, United Kingdom N 51°41’03.58″, W 0°49’48.28″ http://maps.google.com/maps?q=loc:51.68433%2C-00.83008

My Location

7, The Suttons N 50°55’52.55″, E 0°48’13.97″ http://maps.google.com/maps?q=loc:50.93126%2C00.80388

Fleetwood Garland 165/5 Caravan Damper

So had a problem with my 1993 Garland since I bought it 2 years ago, when braking the caravan seems to over run and and there’s a clunk and a thud. The same goes for when pulling away from stationary. I narrowed it down to a knackered damper. I tried to push the hitch in to test it but it wasn’t budging at all.

I took the A-Frame cover off but couldn’t find any reference to the damper part number which is apparently stamped on some caravan chassis. I found two plates one that was on the A-Frame

And one that was on the hitch.

I googled 48.24.571.002 and all I could find was an old ebay ad stating (Ref;275E) BPW Damper 02.3722.08.00.0 for BPW coupling  48.24.571.002 P92535 Genuine BPW Hitch Damper 02.3722.08.00.0 BPW coupling  48.24.571.002 P92535 and then hit a dead end.

However I had identified that the hitch/chassis was made by BPW. I dropped BPW an email and they told me that that I needed part 02.3722.07.00 the cheapest I could find this was £81.16 plus postage which was a little high for my liking so I decided to do some digging. After matching up lengths/operating weights etc I found that part number 87000709 for the Avonride/Knott chassis was a match, I found this for £41.96 plus postage which is half the cost of the BPW one from the same supplier.

Due to the bargain hunter I am I pursured my search on ebay and found item number 201166665608 described as KNOTT AVONRIDE TRAILER DAMPER 750-1300KG 576000 87000709 FITS IFOR WILLIAMS for £39.25 with free postage.

Surely I should have been happy? but wait a minute I don’t buy manufacturer parts for my cars unless I can’t avoid it so why should I for my caravan? after a bit more searching I found item number 201322048394 described as REPLACEMENT TRAILER DAMPER FOR KNOTT 87000709 750-1300kg KFG13 & IFOR WILLIAMS for £27.25 posted!

So for a bit of investigating and perserverance I managed to save £65!. I ordered today and will hopefully be fitting it at the weekend.,

So for reference the BPW damper is

545mm with damper
Body length 330mm
Rated upto 1300kg

There is also a Ifor Williams matching part number which is P00937

I hope this post saves someone some effort/money let me know if it has!

Installing golang under Linux Debian Wheezy

Now I had a headache installing golang as using via apt-get in wheezy installed an old version which wasn’t compatible with the software I wanted to install. Luckily I manged to stumble upon a tool called Go Version Manager (gvm) installed under the root user so modify to meet your needs

apt-get install bison

bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer )

Edit bash rc and add some varibles (these were autmatically added to mine)

nano /root/.bashrc

add [[ -s "/root/.gvm/scripts/gvm" ]] && source "/root/.gvm/scripts/gvm"

save and exit

reload .bashrc
source ~/.bashrc

gvm version
Go Version Manager v1.0.22 installed at /root/.gvm

gvm listall
gvm gos (available)

gvm install go1.4
Downloading Go source… Installing go1.4… * Compiling… gvm

use go1.4

Now using version go1.4

go version
go version go1.4 linux/amd64