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.
- 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.
- 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.