Saturday 13 October 2012

My first day using Android (as an iOS user)

I sort of impulse-bought a Nexus 7 tablet today. I'm a long time iOS user, going from iPod Touch, to iPhone & iPad. Don't get me wrong, I love my iPhone & iPad, but Apple are really starting to annoy me with some of their decisions recently (we need Steve back!)

Anyway, I thought I'd note a few things (mostly irritating) that I've discovered so far in using Android on this tablet. I really do like this device, and it does have some features I've thought "Wow, that's better than on my iPad", but as always, the good stuff gets forgotten, and people remember the bad stuff :)

So here goes (in no particular order really):
  • The power button is a little bit too far around the back of the unit in my opinion. It doesn't "click" as well as an iPad button either
  • Encrypting the device made it heat up to the temperature of thermite (well, maybe a little under, it got very warm at least) - guess that comes with it using 100% cpu for an hour or so
  • The button bar thing at the bottom (you know, with back, home, and the other one on it) - what a waste of valuable screen space. Even more so in landscape mode. Give me back my pixels dammit
  • Why is there no standard easy way to exit apps (fully)?
  • The Android eBay app (at a first glance) is AMAZINGLY better than the shitty iOS "Fisher Price" version they've just vomited out
  • Why allow apps in the marketplace that require root access, and then do not provide an official way to get root access? That's retarded.
  • Speaking of which, not providing an easy way to do a full backup of the device to a PC is also stupid. (apps that require rooting DO NOT COUNT)
  • Also, what kind of a stupid name is "Google Play"? Sounds as unprofessional as the OS names. "Hey I'm using Jelly Bean Magic Sandwich Icecream Pie edition"
  • PROTIP: when the Google man tells you the weather in Fahrenheit and you have no idea what that is in English - to change it to degrees C, you need to go into the Google Cards thingy rather than settings. Yeah, it took me an age to find as well.
  • Where is "Copy Address Location" on the 'right click' menu in firefox? It's not there. Fix your browser Mozilla!
  • Entering an IP address in (chrome at least) is like near impossible! Every key you press it seems to swap out the keyboard for a different one (letters --> numbers and back). When you're on the 2nd block of digits and you're just getting the hang of it swapping, it stops swapping! What?!
  • Connectbot (SSH client) is the best thing ever. Best clearest teeny tiny font. Way better than iSSH (iOS). I'd pay money for this app but it's free. Also note: You need to get Hacker's Keyboard to go with this (also free)
  • On a related note, if you don't want Hackers keyboard always on, but can't be arsed going all the way into settings to swap them over - the secret hidden way is in the notifications area once you've given focus to a text area.
  • Finally, Google's "Recommended for you" apps list sucks. It tried to tell me to buy football scores apps and stuff. Maybe it'll get better once I get a few hundred more apps or something. We'll see...
Despite this list of minor gripes, I really am starting to like Android & the Nexus 7. Buy one.

Monday 3 September 2012

Marksman Electronic Tester - Teardown

Here is a quick 'teardown' of the "Marksman Multi-Function Electronic Tester" available on eBay for a few quid. It promises to do pretty much everything! I bought it as a cheapo NC voltage detector - I don't really know why, it wasn't going to be an improvement on my Fluke. I did like the idea of its continuity testing feature though.

Here it is in its original packaging. Exciting stuff. Free batteries!
Here it is as a size comparison with a Fluke VoltAlert 1AC-E II. It's a little bit thinner, but squarer. The yellow cap on the Marksman is just a cover. It unclips to reveal a metal screwdriver tip for poking stuff.
Here's the "instructions". I especially like: "The perceptibility of the indication can be impaired......on wooden runged ladders etc"
Here's it disassembled. The board is soldered on to the screwdriver tip with a bit of uninsulated solid wire. The cover is glued on (you can see the blue bits of stuck plastic on the yellow top cover.
Now here's where it starts to get interesting; and the reason I took it apart in the first place. These are the legs of the PCB mounted slide switch to toggle the sensitivity. Red lines are showing solder/track joins, two circles for the switch casing solder tags.
I couldn't get it to be any more/less sensitive - it was either in contact mode, or non-contact mode. Red light, or green light. Anyway, I drew the schematic out to see exactly what was going on -->
As you can see, there is nothing at all variable, both of the switch positions for Non-contact mode connect the exact same pins!

For the rest of it, there's a darlington pair and a couple of resistors with the red LED, and a 4069 CMOS hex inverter for the Green. Two gates to detect, two as an oscillator to make the speaker go BEEEEEEEEEEP (a little under 4KHz with those component values if you were wondering)

Just to make it even more clear, here is the pinout config of the switch (but upside down compared to the photo above). Pos 1 = Contact RED led mode, Pos 2,3 GREEN led mode, soldered together on the PCB.







Maybe I got a fake one or something, maybe it is just typical Chinese crappy electronics that shouldn't be allowed to be sold.

Monday 27 August 2012

ASUS U36SG Review / Setup

After 2 years 11 months I decided it was time to upgrade my aging Macbook Pro to something a bit newer and less Appley (no ethernet port on a "pro" laptop - are they having a laugh?! Bring back Steve!). I bought the ASUS U36SG from Amazon. I had free money to spend on Amazon, and it was  £120 cheaper than ebuyer! The other reason I had to upgrade now was the fear of being shoved in the direction of the hideous monstrosity that is Windows 8. Yeah I'm a Linux user, but if I'm forced to buy a Windows COA you can be damn sure it aint going to be for Win8.



http://uk.asus.com/Notebooks/Superior_Mobility/U36SG/

This had everything I was looking for (except a backlit keyboard, but still...)

The packaging was shoddy, I guess I've been too spoilt by Apple. It came in a messy looking box, and inside was just some wonky brown cardboard holding it all together. Two things I noticed that I liked, and two that I didn't:

1. Hard drive LED! We buy Lenovo at work, and the lack of a HDD LED bugs me
2. You can make the "restore DVDs" straight to ISO, no need to waste real life discs (who uses them anymore?) - again, Lenny doesn't offer this feature. Before someone goes "Herp derp Y U make restore discs when you use linux LOL!!!!11111oneone" - in case I sell it in the future. in case it needs to be sent back under warranty.

And the bad stuff:

1. The damn stickers! stuck all over the thing. Protective plastic. spam stickers. ugh. Luckily they all came off OK. There were sneaky ones on the underside of the hinges I didn't spot first time round:



2. As with my last ASUS (EEEPC900A - a netbook, remember those?!) there's no indicator LED to say the battery is finished charging. You've actually got to start it up and check in the OS. I don't get why they would miss off something as simple as that. The manual says when its on green and solid, its at least nearly fully charged - well thats useful.... NOT


Anyway, after making the restore discs (5 DVD ISOs - yep, that's (compressed) 17GB of crap they pile on to these things), it got flattened and a clean Windows 7 x64 installed. Seemed daft not to dual boot, in case there's a game I want to play that WINE doesn't like or something.

I like the ASUS driver page, they give the downloads meaningful names (*cough* TAKE NOTE DELL *cough*)

After taking a disk image, it was time for Linux. Arch went on without issue. Notes below. The only thing that took a little set up was the dual graphics card nvidia Optimus thingy using 'Bumblebee'. It worked first time though.

Arch installation:
loadkeys uk
cfdisk /dev/sda
mkfs.ext3 /dev/sda2
mount /dev/sda2 /mnt
pacstrap /mnt base base-devel
pacstrap /mnt grub-bios
genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt
    nano /etc/hostname
    nano /etc/hosts
    nano /etc/vconsole.conf
        KEYMAP=uk
        FONT=
        FONT_MAP=
    nano /etc/locale.gen
    locale-gen
    nano /etc/locale.conf
        LANG=en_GB.UTF-8
    mkinitcpio -p linux
    grub-install --recheck /dev/sda
    pacman -S os-prober
    grub-mkconfig -o /boot/grub/grub.cfg
    passwd root
    exit
umount /mnt
reboot
Installed:
vim
cpupower lm_sensors wireless_tools yajl
alsa-utils alsa-oss alsa-plugins
netcat mpg123 wget
wicd
    gpasswd -a USERNAME network
    /etc/rc.conf    DAEMONS= dbus wicd
dhclient
(I had to install dhclient - wicd seemed unhappy with the Arch default of dhcpcd)

Fix the grub error message:
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
Installed Xorg and stuff:
xorg-server xorg-xinit xorg-server-utils mesa mesa-demos xf86-input-synaptics xf86-video-intel openbox rxvt-unicode feh
~/.xinitrc
    exec openbox-session
Installed yaourt to get bumblebee:
$ wget http://aur.archlinux.org/packages/package-query/package-query.tar.gz
$ wget http://aur.archlinux.org/packages/yaourt/yaourt.tar.gz
$ tar xvzf package-query.tar.gz
$ tar xvzf yaourt.tar.gz
$ cd package-query
$ makepkg
# pacman -U package-query-1.0.1-x86-64......
$ cd yaourt
$ makepkg
# pacman -U yaourt-blahblah......
Installed bumblebee and stuff, tested with glxgears:
yaourt -S bumblebee
yaourt -S nvidia-utils-bumblebee nvidia-bumblebee
    /etc/rc.conf   DAEMONS=bumblebeed

glxgears
optirun glxgears
Installed bbswitch to save power and turn off the nvidia card when not in use:
yaourt -S bbswitch

/etc/bumblebee/bumblebee.conf

    [bumblebeed]
    KeepUnusedXServer=false
    TurnCardOffAtExit=false
    ...
    [driver-nvidia]
    PMMethod=bbswitch
    ...
    [driver-nouveau]
    PMMethod=bbswitch
    ...

/etc/modprobe.d/bbswitch.conf
    options bbswitch load_state=0 unload_state=0

# rc.d restart bumblebeed


/etc/rc.d/functions.d/nvidia-card-enable
#############################
nvidia_card_enable() {
  BBSWITCH=/proc/acpi/bbswitch

  stat_busy "Enabling NVIDIA GPU"

  if [ -w ${BBSWITCH} ]; then
    echo ON > ${BBSWITCH}
    stat_done
  else
    stat_fail
  fi
}

add_hook shutdown_poweroff nvidia_card_enable
#############################

chmod +x /etc/rc.d/functions.d/nvidia-card-enable
Rebooted, and tested the power saving (it's off when it shows rev as FF)
lspci|grep VGA
    (rev ff)
optirun glxgears
lspci|grep VGA
    (rev a1)
Installed laptop-mode-tools to stop the drive from using whatever power saving settings it has as default (which makes it click every few seconds as it's too aggressive):
laptop-mode-tools
    /etc/rc.conf    DAEMONS= laptop-mode
    /etc/laptop-mode/laptop-mode.conf
        #
        # Power management for HD (hdparm -B values)
        #
        BATT_HD_POWERMGMT=128
        LM_AC_HD_POWERMGMT=254
        NOLM_AC_HD_POWERMGMT=254
...and that was it really. I'm yet to test suspend and bluetooth, but they should just work.

Friday 27 July 2012

Review: Skytronics / Mercury 600.219 Multimeter

I needed a new cheapo multimeter, and bought this off of eBay for a grand total of £18.90 delivered. That's about "30 bucks" to everyone else. I couldn't find a review, or even a decent photo beforehand - so I thought I'd put this here for any future people looking for info on the "Skytronics" (mine arrived branded as Mercury, so who knows) model 600.219 "professional" digital multimeter. Here's the official website: http://avslgroup.com/en/product/600.219UK
Here's the packaging. Nothing fancy, but looks alright:


The case - hmmm, looks and feels cheap. Plus they put an extra space in "Digital", so it looks like DIGIT AL MULTIMETER. Keeps everything tidy though. Press stud fastening.
Inside the case - everything very nicely shrinkwrapped. Manual printed on toilet paper, but in English rather than Chinglish.
Test leads/probes - Brilliant! Really! They feel nice, have a decent quality cable on them, came with protective end caps that fit well over the nicely sharp tips. Leads are properly rated and marked. Strain relief where the probe meets the cable. Can't fault them.
The meter itself - Good points: measures almost anything, a lot more than most cheap meters. Seperate sockets for A/mA/V to prevent oopsies. The screen is great, very clear. The stand is good. Meter could do with some little rubber feet to stop it sliding around on a flat surface.

Bad points: the dial! Ugh, it has the worst click in the world, very springy. Unfused 10A range - assuming some idiot decided to try and measure "how many amps are in the mains", rather than blowing the non-existant fuse, the meter would likely just explode and blow your arm off.

The yellow protector case thing is a bit useless. It makes it a lot bulkier, and a lot harder to get the stand out of its slot in the back.
Interesting point 1 - internal temperature sensor. Plugging the thermocouple in (via the included mini-K to banana adapter) auto switches to using that rather than the internal sensor.
Inside the meter - 2 boards. Smaller one backs on to the dial it seems. Soldering is neat. No bodge wires or loose components. 2 small glass fuses for the V/mA ranges, no other input protection. The battery is a pain to get in and out, there is a seperate door for it behind 2 screws, but its slightly too narrow to get a PP3 and the plastic clip through without a firm push. I didn't bother unscrewing the rest of it, I thought the springy click wheel might fall apart or something.
Interesting point 2 - the manual on/off switch is a proper switch that the battery goes directly to. This means the current draw when off is zero. Current when on is around 4.9mA, so you could hope for around 100 hours runtime on one battery.











In conclusion, a good cheap meter with a lot more features than one costing a tenner. Worth the little bit extra in my opinion. Great value for money.

I wouldn't recommend it to any "real" electronics professional, or anyone working on mains electrics - but then again, I'd hope those kinds of people already have high quality gear, and not Chinese crap from eBay!

Friday 13 July 2012

Raspberry Pi PS2 - Part 2

So I eventually ordered another hub after finding out the Pi has issues with lots of 'powered' hubs. My selection process was eBay, sort by Price (lowest first) and then choosing the one with sockets on cables for ease of desoldering. This cost me about £2. You can also drink this apparently as it is "easily potable"
Apart from the Chinglish, the description on the back is also completely wrong - it states that it includes a mini usb cable and user manual, and can provide 500mA/port - yeah right.
Whoa, smallest hub ever! I was expecting to have to unscrew it, but it literally fell apart in my hands.











I thought I better test it before I went any further
 This one worked first time...
Wires came off easily enough. I labelled the board afterwards, to save confusion when re-soldering it











Testing with an externally powered hard disk through the hub













Picked it up OK after I realised unlike every other USB device in the world, whoever designed this hub chose to cable it in the order VCC, USB+, USB-, GND
Glueing the usb ports in to the case. I had to shave a tiny bit of plastic from the connector to get it to fit next to the screw hole












That bit of PCB was getting in my way, so I cut it off. It didn't look important.
 Sockets and LAN mount glue drying. Exciting stuff...
 Wouldn't know it had changed :)
Same with the ethernet socket. That's an 8mm spacer underneath it by the way











All parts in place. I'm still waiting on a panel mount power socket, which is why that is still hanging out of the back











Lid back on, and final testing. Still no idea what I'm going to do with it though...

Saturday 7 July 2012

Raspberry Pi PS2 - Part 1


After not being imaginative enough to think of anything useful to do with my Raspberry Pi, I decided to put it in a case with a few other bits to make a semi-useful mini PC. The target? Slimline PS2 I got off eBay for 7 quid (faulty laser). I've always liked the slim PS2 case. I'd have bought a brand new housing kit instead, but I couldn't find one in black. DX were (and still are) out of stock (item 29213). Anyway, it was a bit scuffed but would do the job.




I wanted rid of the disgusting sticker on the back, but as it turns out, Sony do a better job of making stickers than they do lasers. It wouldn't peel off.










The trick seems to be a syringe of isopropanol and careful scraping with something softer than the PS2 plastics - I used an iTunes giftcard.

The isopropanol didn't instantly dissolve the glue like it does with other stuff, so who knows, maybe water or soap or something would have worked instead. Who cares.



 

The finished result I was happy with though, no nasty sticky marks left at all.
Opening it up, I was quite surprised that the entire innards come out in one chunk. There's a screw tucked away between the controller ports that's easily missed *ahem*.














I bought a drive enclosure to tear apart, the rest of the stuff I had lying around











One thing I did notice when mentally planning this, was that none of the microusb cables (even my genuine Nokia one that came with a phone) would power the R-Pi properly. Testing between TP1 and TP2 I was lucky to get 4.25v! I ripped the end off of one of them and unsuprisingly, they're made from pretty much a few atoms of metal twisted together. That's a 3mm LED for size comparison. Plan B - ignore the microusb and go for power through GPIO.










The drive enclosure I bought cost about £2.50 delivered. It's the cheapest one I could find, which presumably was designed by a 5 year old as they used USB A on the device *sigh*. That "illegal" cable went straight in the bin. I should have sold it on, see if I could have got some idiot to try and network 3 computers together with it or something.

I lied before, I did buy one more thing. This useless adapter! I mean really, what purpose does this thing serve? I know, I bought one intentionally, but surely nobody else buys them. It's a HDMI male to female adapter for anybody that didn't guess. Read that again; yep, male to female adapter... as in socket on one side, plug on the other. It makes as much sense to me as the USB A to A cable above. Well anyway, I'm glad they do exist, as I needed one for this.



Cheapo unbranded USB hub. Check out the wonky diodes! I figured it'd be a lot easier deconstructing one with sockets on wires rather than PCB mounted sockets. I was right.
This has to be the most shoddy product I've ever taken apart. It really looks like it was soldered together by some 6 year old kid using a Bic lighter. I'm amazed it works...
I want to keep my R-Pi mod-free for now (waited for years for this one, don't want to destroy it!) - so I left the A plug on the hub, to go straight into the Pi
They "helpfully" labelled the connector on the hard drive enclosure board just in case I wasn't too sure. That board was just glued in to the enclosure. The USB A socket was easy enough to desolder - they hadn't even bothered soldering the casing down, it was just held by the 4 pins.
This made my job easier - I found that the PS2's usb holes were a perfect match for the sockets I salvaged from the hub!
See - exact fit! The thickness of the plastic USB port cover is a perfect spacer to line up with the hole in the case.
Deciding where to put stuff. See what I needed that M-F HDMI adapter for now? I'll dremel a hole for it and glue it in later. Same for the SD card... er... without the glue.
Removing a PCB mounted ethernet jack cleanly was a bit of a pain tbh. Best technique I found was add solder in a big blob covering all 8 pins, then heat the lot and pry it loose. I'm open to suggestions for better methods. I tried solder braid and it just wouldnt remove every spot.
Can you guess what that 8mm thick square of plastic is for? Anyway, 10/100 only needs 2 pairs. Green and Orange.
O/W - 1
O - 2
G/W - 3
G - 6
Well there's one part that works fine!
For the USB (data) cabling I went with 0.25mm Kynar in blue and red (it's all I had).

For power, I used scraps of cable from an ATX PSU. Overkill, but again, best I could find laying around.
Time for a quick test. Here's where things start to go downhill...

Firstly, the bunch of cable you see top left I guess is too thin internally - 4.4 or so between TP1 and 2. I'll deal with that later, so I croc clipped directly on in the mean time.
Everything looked happy enough IRL
But then... sadface.jpg
The Pi didn't like the USB drive. Had I destroyed something? Broken the USB Hub? Hmmm...
For the record, this is currently drawing 0.83A idle. It seemed about right.
I quickly desoldered the USB data lines from the hard disk, and it seemed OK with just the hub.
OK, maybe its the drive controller. After all, it must have cost about $0.05 to manufacture. I soldered one of the original USB sockets back on to try a flash drive in. Plug the drive in, the Pi reboots! Fail again. Got to be a faulty hub, right?

I should add, although the pic doesn't show here, I did try and power the hub though the DC jack in case the R-Pi couldn't handle it on its own - made no difference at all.
I had a spare hub the same as the previous one. Check out the wonky diodes again! They've got a little solder slug trail this time.
What a mess. But still, I tested it in a real PC and it does function properly...
...but not on the Pi. That's with zero hardware mods, just the Pi and the hub with a drive plugged in.
 Targus hub from my laptop bag...
 ...works straight away. Two dodgy hubs, right?
 First hub, in a real PC...

...WTF?!

Well, I guess I'll have to buy some more USB hubs and hope the Pi "likes" them.










...to be continued.