Sure, we’re all carrying around more computing power in our pockets than all of America had throughout the 1980s—but what does it really matter? Are we any happier? The answer was no, until very recently, when a Swedish guy made a smartphone app to remotely control his Miata’s pop-up headlights.


The Swede in question is named Bill Ervik, and he got the idea to try this because a friend of his told him about a little WiFi relay controlling device. Bill didn’t know exactly what he was going to do with it, but he had his friend order one for him anyway, because sometimes that’s the right thing to do.

Bill explained his thought process to me in a little more detail:


Then I started to think what i actually could do with it. Should I use it to control the TV at home or maybe the lights in the apartment. It wasn’t until I actually got the relay I started to think about connecting it to the Miata.

Once Bill started thinking about how he could use the remotely-triggered relays on his nicely-modded NA Miata, his mind immediately turned to the headlights. Those motors used to open and close the Miata’s headlights are likely the most dramatic of all the electric motors in the car (what other ones are there? Wipers, starter, fan... maybe fuel pump?) so it seems a pretty logical choice.

I asked Bill if he’d ever written a smartphone app or done anything like this before:



No, I have never ever coded an app before this. However I’ve been coding on and off since I was 10-11ish. And I work as an industrial robot programmer. So I got a programming background so to speak.

But Java that is the android language I had no experience with. So I basically knew what i needed to write, I just needed to learn how to write it.

I just thought it would be a great way to experiment and learn more about electronics and a new programming language at the same time.

This is sort of the ideal DIY attitude, I think. Never done something? Picking a project that forces you to learn something new to make it happen is a fantastic way to learn.

The app Bill ended up writing allows for three main functions, accessed from an interface that he readily admits he designed with elements ‘borrowed’ from Blipshift shirt designs.

It does look good. The three functions are, as you probably guessed, open headlights, close headlights, and a fun one that lets the lights open halfway, in case you want your Miata to approximate that Fry ‘not sure if...’ meme. There’s also controls to turn the brights on and off, and the ability to determine if the car’s engine is running or not.

While Bill has no real plans to sell the app or make this into any sort of kit, he is happy to share technical details about how he did it, so in case anyone wants to give it a go themselves on their own pop-up headlight vehicle of choice (it’d take some installing of electric motors, but an Opel GT would be great) here’s some tips that may help:


Well the wifi relay board I am using is from TinyOs and widely available so no secret. However the board itself is “stupid”, all it can do is open or close a circuit. The reference I am using is basically time. The app tells the board “open port1" and then the app calculates x-time and then tells the board to “close port1" and that gives you either fully open or “lazy eyes.”

This was my biggest concern, will it be stable enough to actually get the headlights to the same position every time. Since weather, voltage, lag, friction, will affect the motor speed. But after a couple of tests I could see that it actually worked just fine, I mean it might differ +/- 2mm from one run to another, but nothing you actually can notice with your eye if you don’t bring a tape measure.

The second problem is that with the engine running you get more voltage, so I basically programmed a multiplier and a switch for me to select if the engine is running or not. Tried that solution with different engine loads, different other stuff turned on and off in the car. But it worked as well. No noticeable differences in position.

Sure, this isn’t exactly the most useful app in the world, but if you have an NA Miata and installed something like this, I’m pretty sure it’d bring you just that right amount of ridiculous joy.


If I had one, I could easily see myself running my battery flat just opening and closing lights as people as they pass by in a parking lot. But I’m an idiot. A happy idiot.