Ok, a beer in Iceland maybe. But with no engine in the bike and virus induced isolation a dirtbike messiah needs something to do. You can control the zoom level in Locus Maps with the volume buttons on your headset. I had planned to just decapitate the earbuds from a regular Android headset to achieve that, but I could never find one with big enough buttons. Nor could I find a useful space on which to mount it to my handlebars., the controls for the rally kit take up too much space.
It was that last fact that sparked an idea. When the tablet is in place it’s stuck in front of the roadbook holder. So when the tablet is present the RB holder is useless. Maybe I could re-purpose the scroll switch for the roadbook holder into a zoom switch.
You don’t strictly need a roadbook zoom switch to do this; I just happened to already have one. The easiest way to do it would be with two single pole momentary switches, the kind of switches you might use for a horn or a doorbell. The best way to do it – the way I happened to do it – would be with with one double pole momentary switch. Just google these terms or ask at an electrical component supply place.
It’s worth mentioning at this point that this will only work with an android device. Apple use a different standard.
What is extremely cool is that when Locus is running the volume buttons on the wired headset – the buttons we are recreating in this project – do not affect the bluetooth volume level. If you’re using a headset like I do then zooming the map will not affect the volume of your music.
So what do we need?
- One double pole momentary switch or two single pole momentary switches.
- Three resistors. But buy more than you need, you’ll probably cock it up once or twice. I did.
- 660Ω
- 220Ω
- >1400Ω
- A four pole 3.5mm headphone jack. The regular three pole will not work.
- I got a premade cable from Amazon; this was a blessing in some ways and a curse in others, which I will explain later.
- I looked specifically for a 90-degree jack with as low a profile as possible; I didn’t want the jack to stick out too far. Catching a passing branch could break it or the socket.
- Soldering iron and solder.
- Wires.
- A digital multi-meter.
- Shrink wrap.
- Optional but useful – some level of electrical knowledge.
So how does it work?
I’m a long way from being any kind of expert on electrical stuff; but inquisitive minds with nothing better to do can achieve wonders. The Google standard for android headset buttons can be found here. But it’s technobabble for professionals. I found a nice, simple circuit diagram (below) which concisely explains what we’re trying to achieve. I worked from this diagram and had no problems, despite the values differing substantially from the Google standard but I only found this out after finishing the project. If any of you give it a try with the Google spec please let me know.
I’ll break it down for anyone not particular familiar with circuit diagrams.
- The bottom two poles on the 3.5mm jack serve no purpose for us; they are the speakers/earbuds/whatever.
- The top pole is a supplied voltage from your phone/tablet.
- The second from the top pole is ground, returning that voltage to your tablet.
- With no buttons pressed the resistance across the circuit is the resistance of the microphone; 1.4Ω or more.
- Electricity is lazy, it will always take the easiest path back to earth.
- With the “fwd” switch closed the resistance of the circuit drops to 660Ω. This corresponds to volume plus, or zoom in.
- With the “rev” switch closed the resistance of the circuit drops to 220Ω. This corresponds to volume minus, or zoom out.
- With the “play/pause” switch closed the resistance drops to near 0Ω, as there is no resistor in that circuit. I did not use this switch in my implementation, you could by adding a third switch.
- Your device is constantly measuring this resistance. When you close either of the switches it notices the change in resistance and does something – normally volume up/down. If locus is running it zooms in or out.
So how is it built?
I’ll share the way I approached it; I’ll assume – dear reader – that if you’re trying a project like this you posses the logical faculties to apply my method to your situation. My switch was already present on my handlebars and connects into the rally nav kit with a screw lock connector. I was lucky enough to have a spare of the other side of the screw connector, so could build a cable that simply screws on to my roadbook switch connector. When I want to go back to roadbook mode then I just plug that connector into the rally nav junction box. Functionally it’s exactly the same as connecting the switch/switches directly into the cable.
In my case I needed to establish which cable on the RB switch was ground and which were the two switched lines. This is easy enough to find out with a voltmeter set to ohms. If you’re building it yourself you won’t need to find it out as you’ll know which side of your switches you have as ground.
In my case the next step was to cut my headphone cable and find out which of the four wires inside corresponded to which pole on the connector. This was much harder to do than I expected. The wires are incredibly thin. Plus they are coated. Apparently most premade headphone cables are like this. I struggled to even see which colour they were, let alone work with them properly. Stripping that insulating coating from them proved to be impossible; either the wire snapped or I failed to get enough of the coating off. It doesn’t seem to be a plastic sleeve in the usual sense; it’s like paint.
If I was to do this project again I would buy a connector and wire it up myself with some two-line speaker cable. Still thin, but the kind of thing normal human beings can actually work with.
I forged ahead and through the wonders of Google found a viable solution. One of my favourite solutions to any problem. Fire. I stripped off the outer layer of insulation from the cable, separated out the four tiny cables and exposed each one in turn to the flame of a cigarette lighter. You need to be careful though; this shit is flammable. The briefest exposure creates a substantial flame that races up the cable; you need to be ready to blow it out once it gets to where you want the insulation stripped from. Practice was needed. Once you’ve done the first burn on a specific wire do it again. Then do it a third time. Ultimately you’ll get to the point where rather than getting a sudden burst of flame the cable just glows; at this point you’ll be able to work with it.
Use your voltmeter, again set to ohms, to measure the resistance across the top two poles of the connector and the exposed wires. This will tell you which two cables you are interested in.
Now you are in a position to turn the circuit diagram into reality. The way I approached it was to take my three resistors and twist the legs of one side of each resistor together, creating a “bunch” of resistors. I left one of the two cables from the 3.5mm jack long and cut the other one short. I then wrapped the short wire of the 3.5mm jack around the combined legs of the resistors.
The long wire of the 3.5mm jack I cut to an appropriate length and soldered to the other leg of the 2kΩ resistor. This completed the “mic” circuit from the diagram. It looked a little bit like this very crude MS paint picture…
Next you need to complete the switched sections of the circuit. The ground side of your switch (or switches) needs to be soldered to the combined resistor leg / ground circuit. At this point you can solder this connection in place.
The other sides of your two switches need to be connected to the other two resistors. If you are using a double pole momentary switch then it’s functionally the same, except the two switches have a shared earth.
I strongly recommend you prototype this a little; as it took me a couple of attempts to get a layout I was happy with. You need to ensure you can put shrink wrap in the right places or you run the risk of a short circuit when you pack it all into a neat cable. I hope that this diagram gives some idea of how you need to lay it out.
My final result looked fairly neat, I have included a photo below. I then wrapped the whole thing in panzertape to give it some strength and to protect it against the elements. The goal really was to make it look like a regular cable and I think I succeeded.
Here’s some video evidence that the whole thing works.
I hope this project proves useful to at least one other human being on the planet, although I suspect it’s pretty niche. There are ready made versions out this out there; although all I have seen use bluetooth – something I wanted to avoid. Some, like Carpe Iter, have vastly more functions than my basic little zoom switch. Still, good luck to anyone who gives it a go – please let me know how it pans out for you.
Got all my gadgets assembled for this today and quickly put it together. Didn’t work…until I ranscked the settings in LocusPro:
Settings>Controlling>Map Screen>Use Hardware Controllers>Enabled.
Thanks for the great tip – I used Highway Dirt Bikes rally buttons and a 90° 3.5mm jack cord from Amazon.
Nice, I’m glad it’s proven useful to someone!
I’ll add the Locus setting in tomorrow, important info and it’s appreciated.
this is a brilliant idea and explanation! This will make life a lot easier and more comfortable. one question, what setting do I need to change to use volume + or – as zoom function? Im using a samsung active tab 2, zoom does not react on my volume buttons.
Gilles, it will depend on what you are using as a navigation app. In Locus it’s Settings > Controlling > Map Screen > Use Hardware Controllers, which you need to set to Enable. I think that it’s only available in Locus Pro. Other mapping apps vary, for example Drive Mode Dashboard supports my method with no settings changes.
Thank you for your reply Tim! I’ll give it a try soon and make the switch. Thanks for sharing your idea and knowledge ?
My pleasure man. Good luck!
Seems like my double pole momentary switch is not working on the current coming of my tablet! I think the current is too low so too much resistance. I did manage to zoom in/out with the ground wire touching the 660 and 220 resistors. So, it works! But not with the switch… Do you know how much volt your double pole momentary switch is working on? i bought one that can take upto 15A / 125v. So far havent managed to find one that works on max 12v unfortunately.
I don’t know off the top of my head as it was a switch I already had, the one for my roadbook holder.
Does your switch itself have some degree of resistance that’s throwing it of somehow? Sounds like a pretty hefty switch.
I think you are right. All though I cant find anything on a minimum current or a level of resistance about the switch, I think the 2.7v coming from the tablet through the jack is too little for the switch. Ill try to get another switch but searched the web on a 12v one but so far I cant find one unfortunately. Lowest ive found is 28v and 48v.
Take a look for spare parts for an F2R roadbook holder. Find the little toggle switch used to scroll up and down the roadbook. Not sure how much it is for a replacement, but it will come with mounting hardware so it’s a pretty convenient option.
Hi Tim, I was wrong after all. I didn’t connect the ground wire right. now it works! Just have to find a way to make it all look a bit tidier, waterproof and find a good wat to mount it on the handlebar. Again, thank you for your article! I enjoy reading your other articles too btw!! Keep it up 🙂
Glad it’s working for you, and that the site is useful. Happy trails!
Thanks for another awesome idea and explanation Tim.
In watching your demo vid I was curious as to what type of tablet/phablet you’re running and the what that magnetic charging cable is called and where you bought it?
Thanks.
The tablet is a Galaxy Tab Active T365, which is the first version of the Tab Active. It’s pretty damn slow by modern standards, struggles with maps and doesn’t charge more quickly than it discharges unless it’s rooted. So it’s pretty crap, but it was cheap and I’ve got it working the way I want it. I’d suggest the second or third generation version though, much better specs.
The cable you can find on Amazon, it’s a “Llama Magnetic USB” and I use it to charge pretty much everything I have, means one easy cable for everything. Although for my next trip with the tablet I’ll get trying out the Brodit pogo pin holder, simply because I managed to pick one up cheap. The mag cables are pretty stable on the bike, even with bumps and vibration. But they come off easy enough that a strike from a tree branch won’t kill your USB port.
Hi Tim,
Apologies for side tracking your excellent thread with this questions. I hope this can help some of the other readers, even if in directly…
I’ve looked up the specs on the Active Tab 3 SM-T575, and it lists the GPS features as:
GPS: Yes, with A-GPS, GLONASS, GALILEO, BDS
This means that out in the bush you have no GPS functionality (on the Active Tab3)
Does your 375 has the same A-GPS limitation, and if yes have you had any issues with GPS functionality relying on just the GLONASS, GALILEO, BDS services?
No need to apologise, these kind of discussions are why the blog exists.
My 375 gets an accurate GPS position with no radio services enabled. I’m pretty sure that the spec list you’re seeing there is just that – a list. It works with A-GPS when that’s the best choice, but also works with the pure GPS services as well – when they’re the right choice. I would be utterly shocked if the Tab 3 can’t acquire and accurate position with the radio off, both of it’s predecessors certainly can and every 100 euro budget smartphone can.
A-GPS means it can pick up ‘assistance data’ from a mobile or wifi network to help it find GPS (or Galileo, etc) more quickly. GPS will still work without the mobile or wifi data, it just takes longer to download that needed information from the GPS (or Galileo, etc) satellites themselves. Once the data has been downloaded and you’ve got a position fix, usually a few minutes direct from GPS or seconds from a network, there’s essentially no difference between non-assisted and A-GPS modes.(FYI I used to be the Galileo signal manager).
Dominic, that’s the kind of proper info the world needs! Much appreciated.