Category Archives: hacks

Cheap power banks and why don’t they charge my Samsung S4 Active

Yesterday I bought cheap iWalk branded power bank to make my Ingress (read – working out) sessions last longer and to my dismay this power bank did not charge my phone while I played Ingress. Since not so long ago I developed this universal USB charger, I am well aware that at large charging currents (1A and more) there is quite a bit of a voltage drop in USB cable and at least modern Samsung phones sense this drop and reduce charging current. I cracked open iWalk and no surprise there, output at USB connector on bank side was 5.06V. Solution to this problem is to bring up output voltage to about 5.2V, which is still within USB specifications, but compensates for the voltage drop caused by thin USB cables.
Luckily iWalk used two easily identifiable adjustable switching step-up converters with resistor voltage divider feedback network, so all it takes to fix the issue, is to replace those resistors with new ones and see if that helps.
Stay tuned while Farnell delivers my resistors, once that happens, I promise to write a new blog post with some images.

Update – apparently that post I promised is not going to happen because there is something fishy going on with that power bank and I do not have time and/or will to figure what exactly.

AS3935 Franklin Lightning Sensor™ + Arduino

Just a short post.
1) AMS made a nice lightning sensor chip AS3935
2) Jayson Tautic from TAUTIC ELECTRONICS LLC made even nicer breakout board
3) I made Arduino library to make use of AS3935 easy on this ever so popular platform
4) and tested it on Arduino Mega 2560 and chipKIT MAX32

The code (hopefully) works with most of original boards and clones.

Here is the link again, just in case you missed it –

cheap signal generator? yes please!

Who does not want a VNA and/or Spectrum Analyzer? I do, but those are a bit out of my budget right now. But I still want to play with some loop antennas for the project that is in the works, so I need a way to measure loop antenna parameters. How is it done? Well, you put known signal into loop and measure response, that’s what VNAs and SAs do, but those are expensive…

Cheap AD9850 breakout to the rescue. China made AD9850 breakout boards are available on eBay for ~6USD shipped (I wonder how they do that if chip itself costs ~15USD in 1000 quantities from DigiKey). Those things are capable of putting out 0-40MHz in sub-Hz steps of quite nice and clean sine wave, but you need a way to control them. And so “somewhat useful” Arduino sketch was born. It uses AD9850 library from ELECFreaks, one can set specific frequency with it, make AD9850 sweep through frequencies tracking generator style or sweep through frequencies in oscillating manner – back and forth.

It is probably good for testing AD9850 breakouts too, enjoy – somewhat useful AD9850 Arduino sketch.

A bit of background info. Serial control is used, see the datasheet what pins need to be pulled up and what pin needs to be pulled down to enable that and since there is no information on module available, some nice guy called Andrew Quinn has documented pinout of these little neat boards on his blog.

GSM/UMTS broadband discone antenna

At country house where we usually spend weekends gsm/umts network coverage is very poor, even voice jumps on and off, leave alone data. So in a course of trying to get my dose of internet while in this operator forsaken place I built a discone antenna that is known for it’s broadband properties. First tests while in good coverage area show that antenna works and works better than built in thingie of Huawei E1752, real tests will be conducted on weekend. As a backup, I purchased professionally made 9dBi log periodic that covers all frequencies in question.

Link to online discone antenna design tool
and image of antenna I built –

Antenna is built from 0.3mm brass sheet for cone and regular single sided PCB material, held together with hot glue 🙂

tests in very poor coverage conditions prove that antenna works and works good, while my HTC Desire barely has connection at all and even making voice calls is almost impossible, internet connection using Huawei E1752 usb modem and discone antenna has stable 3G/HSDPA connection.

got return loss plot back from friend at

what this plot essentially means – my antenna has VSWR under 1.5:1 in gsm/umts range and is absolutely suitable for transmission.

Kannel 1.4.3 vs PORTech MV-372 (or MV-37x for that matter)

If you got to reading this, you most likely know what is Kannel and what PORTech MV-37x is.
As you know MV lets you use it’s modems over telnet, just provide username, password, give some extra command and voila, you are controlling modem directly. So I wanted to befriend Kannel with MV. After quick glance over Kannel docs it seemed that there should be no problem. Nevertheless there is a problem, the “give some extra command” problem, Kannel does not know how to do that. In ten minutes this patch was born. It lets you use MV-37x device as GSM modem SMSC in Kannel. I do not know how useful it is for anyone, especially taking in account that voice calls are effectively disabled if modem is in use by Kannel (it just ATH0’s every RING it sees), but if you still think it is worth it, take the patch, apply it to sources, compile your Kannel, add following lines to your kannel.conf
group = smsc
smsc = at
modemtype = portechm
device = rawtcp
speed = 115200
host = ""
port = 23
smsc-username = voip
smsc-password = 1234
login-prompt = username:
password-prompt = password:
extra-login = module1
extra-login-prompt = "command: logout, module, module1, module2, state1, state2."
extra-login-ok = "got!! press 'ctrl-x' to release module 1."
keepalive = 20

group = modems
id = portechm
name = "Portech"
no-pin = true

and shoot away.

Disclaimer – I take no responsibility whatsoever for this patch and you are downloading and applying it on your own risk.
Another disclaimer – your extra-login, extra-login-prompt and extra-login-ok will most likely be different, you have to figure those out yourself