Why I am sending back my Librem5

After paying 0.163 BTC for a pre-order, I patiently waited two and a half years for the Librem 5 to finally arrive. Now after half a year with the phone, I finally lost patience. For some more context, please read my former blog posts The Librem 5 phone is still at an early stage and One month with the Librem5.

A computer that looks like a phone

When the phone arrived it could do computer things, but no basic phone tasks. The browser worked very well from the start. So it was more like a small tablet. Phone calls didn’t work at all for the first month. And text messages started working after about a week, but only with weird workarounds.

An expensive hand warmer

When the phone arrived, there was no power management implemented, meaning it constantly ran at full speed. No wonder was the device always warm and the battery was flat after an hour on average. It didn’t make a difference whether I used it or not. After about one or two weeks of having the device I charged it over the night while it was switched on. When I grabbed it in the morning, it was so hot that I could not hold it in my hands. The plastic part between the cellular and the wifi cards started melting together with the back cover.

Hot freezes

One common occurrence was from early on that it it would no longer react to any inputs after a while, but still burn the battery down at the same speed. It also at the same moment stopped responding from SSH connections, so it was not just the display.
The first freeze happened five minutes after I switched the phone on for the first time. When the issue started, I had a freeze about every second day, then every day, then twice a day. For a while it never ran for more than 15 minutes without freezing. Since about the time I had the phone for a month, it rarely runs for more than five minutes before freezing.
The freezing is the issue that rendered the phone completely useless for me. It triggered me to move the SIM card back to my five years old UBPorts phone. For the next few months I switched the phone on about once a week to install the latest software upgrades. Every time I hoped the freezing issue would be solved. From the responses on the forum, it appeared like my device was the only one experiencing these difficulties, but still it appeared like they were working on resolving the issue through software updates.

Bricked for the first time

Instead of fixing the freezing, an upgrade around Easter made the phone not boot any more. It started to boot, but was stuck at the terminal that is usually only visible for a second. Apparently it was a known issue, but the remedy that was provided, didn’t work on my phone. So I was advised to re-flash it. But the flashing procedure also didn’t work. After a while and some experimentation, I found out that, out of a computer and two notebooks, only my XPS13 was able to flash the phone. I am still puzzled why it didn’t work with the Librem13 especially. But to my disappointment, the freezing issue persisted.

Dead battery

I kept installing the upgrades on a weekly basis. In between I usually removed the battery. When I tested the voltage, it was always between 3.6 and 4 Volts. Then one day I left it plugged in with the original charger for about a week or two. Since then It wouldn’t boot any more. Not only did it stop booting in the middle of the process like before. This time there was no sign of life whatsoever. When I tested the battery, now it read 0 Volts no matter how many times I tried to charge it. I tried with the original charger as well as with others. I read somewhere that the L5 has an issue with the charging, in that it starts discharging after the battery is full. After that it apparently doesn’t start charging again until it is re-plugged. But I didn’t expect this to result in a battery that appears to be totally dead. Even if I wanted to charge it with an universal LiPo charger, I wouldn’t even know which way to connect it. The phone doesn’t run with a dead battery, and it also doesn’t boot without a battery.

Sending it back

The only thing left for me left to do is sending it back. I didn’t sign up for a museum piece. I just want a phone that works. It is up to Purism now if they can repair my phone, send me one from the current batch, or one from the mass production batch later on. After being through all this, I would prefer to wait for the batch that is hopefully more reliable. But I will take whatever Purism sends me.

Friends asking

I am often asked about this open source phone that I told everyone when waiting for it. I would love to tell them how great it was, and convince them to order theirs as well. I still think it is very important to have a phone that you can trust. But unfortunately I have to tell them what a disaster it was so far. I tell them that it appears that I got an exceptionally bad sample, and that most others are probably fine, or at least usable. But I can see from their reactions, that my experience is enough of a deterrent for them not to consider buying one.

Update September 2020

Soon after sending back the phone, I received a replacement unit. Unfortunately it came with a US modem. So I waited for another month for the correct modem. It arrived yesterday, and it was easy to replace. Now I finally have a working phone. I switched the SIM to the Librem5 and use it as my main phone now. Some things have improved a lot since last year. Especially the power consumption. Others not so much, such as bluetooth in the car. Anyway, I plan to write another post after gaining some more experience with it.

Generating solar electricity at home

After I switched to an electric car, I started to care much more about where the energy we consume comes from. With petrol and diesel you don’t really have that option. We are in a comfortable situation that we have some small hydro electric dams nearby. Thus all the electricity we use at home and for driving around, comes from 100% renewable, local production. When you meet with other E.V. drivers, renewable energy production is always an interesting topic. Lots of these folks have their own solar panels on the roof. Solar is especially interesting as it has no moving parts, and can be employed by private people. It becomes more problematic however if you don’t own a house. We live in a rented apartment, thus we have no option to put our own solar panels on the roof. Not all is lost fortunately. Recently I learned about panels with an integrated micro inverter that can be plugged directly into a regular plug on your balcony. According to Swiss law, up to 600W can be installed by private individuals. They only have to notify their power provider.
So I ordered an ADE Geranium from Energiegenossenschaft that I could pay with Bitcoin. Last week it arrived, and I immediately installed it in our garden. It can feed up to 250W into the plug. I don’t expect to feed a lot of this into the grid. It is more to reduce the standby consumption by refrigerators and computers. 250W is peak anyway and not often reached. In the first week after installation, it only produced 3.5 kWh. So it will likely take 10 years for it to amortize. But it comes with a 25 year warranty.

Spending Bitcoin while charging the car

When I go some place new, I always check out what Bitcoin accepting venues there are. I usually try to prioritize shops that accept crypto currency.
When I drive some place far away, I have to charge the car on the way. No big deal, usually I can eat, drink or go to the toilet. All those activities, I prefer not to perform in the car while driving anyway. When I’m done, the battery is charged enough to continue the journey.
But how cool would it be to combine the two. If there was a restaurant that accepts BTC next to a supercharger, I would eat there for sure. Unfortunately finding this information manually is a hassle. That is how the idea was born to write a simple script to correlate charging stations and Bitcoin shops. I did it only quick and dirty. It could be improved a lot, but I’m not sure that is necessary.
You can visit a map with the correlated locations on ZeroNet: Bitcoin shops at car charging stations
If you want to have a look at the script that compiles the list or improve it, you can do so at: bitcoin_supercharger.py

The mother of all hackathons

I just returned from #hack4climate. Even if it was just my third hackathon, I can state with certainty that this one was unlike any other. None of the 100 hackers from 33  countries experienced anything remotely comparable before.

The topic of the event was to develop solutions how blockchain technology can help fighting climate change.

First let me explore how the event differentiated from other hackathons. The hacking session was 24 hours, but the whole event lasted four full days. There were pre-workshops around the world. 100 participants were selected and invited to Bonn. Travel expenses were covered. We stayed on a five star hotel ship. It was adjacent to the UN climate conference. We had balcony suites on the ship. The food was appropriate for a 5 star ship, complete with wine to every dinner. The days before and after the hacking session were filled with interesting talks, a guided city tour, interesting discussions and lots of networking. There were so many interesting people and so much to talk about. At the last day they wanted to make a photo of us on the boat in front of the UN building. Drones were forbidden in the security zone, so the photographer rented a crane to get the perfect shot.

I knew nobody from the event in advance. But I knew that out of the sub topics, I was most interested in “sustainable transportation”. At the team building session, I headed straight to the guy with the most interesting pitch that contained something about cars. Our team was formed soon after, and I had a good feeling from the start. Two were from Singapore who already knew each other. Two were from India one living in San Francisco and the other in China. And one was also from Switzerland, but we didn’t know each other before.

When the hack session started at Tuesday noon, we shaped our rough ideas into a project that we could realize in the short amount of time. Then everybody stated what he would like to do. It all seemed to fit together wonderfully. I wanted to implement the smart contract. I didn’t have much experience in that area, and was grateful that the others could help me and answer my questions. Rather than drawing large diagrams, we collaborated on the interfaces, and then worked towards these. We didn’t hit mayor roadblocks or problems, everything seemed to flow in place. Most of us agreed that we are not productive after 2AM and that is is better to get some hours of sleep. In the morning we went out to shoot a video of our product in action.  The guys from SBB (who was a sponsor of the event) were around us most of the time. They helped where they could, and were generally very interested and engaged. We had many great discussions with them.

Our project was about end to end transportation. On the mobile app, you select a destination, and it identifies legs to use different means of transportation. We focused on car sharing, but other options include trains, bikes or buses. Our smart contract abstracts a car that can be rented over the ethereum blockchain. The owner of the car registers it by creating an instance of the smart contract. A person who wants to rent it can do so by sending ether. The required amount is determined by the price per km the owner wants, times the number of km the renter wants. If he doesn’t use up the credit, the rest is reimbursed at the end of the trip. But if he drives too far, the cars performance is degraded by the smart contract. The car was represented by a RaspberryPi running an ethereum node and our backend running on nodejs. Initially opening the car was indicated by an LED attached to the RPI. But to make it more realistic, the RPI then called the Tesla API to open a real car. At the end of the trip the RPI collected information about the car such as odometer and battery level as well as firmware version, stored it on the IPFS and registered the IPFS address with the smart contract to form an unfalsifiable audit trail. Last but not least, one of our team members used data from moving cars and turned it into an appealing 3D animation that highlights the hot spots in a city.

We were thrilled all along, even more after all the positive reactions to our presentation. And hooray, we made it into the finalists! That meant, we could present our project at the COP. That’s the fair for NGO’s which is attached to the UN climate conference. The team that won the hackathon, did so deservedly. Their project was about incentivizing land owners not to cut their trees. They used blockchain and game theory for the monetary part. In addition they trained a neuronal network to predict areas which are endangered most of deforestation, and need special attention.

A first official video appeared here, and I’m sure others will follow on the official website.

Update Dec 16 2017

The official after movie of #hack4climate was released:
https://youtu.be/UOANny6i0QM

Hackthevalley Hackathon 2017 Baar

Motivation

After the good experience last year at the six fintech hackathon, I was trilled to go to hack the valley which is even closer geographically and whose subject is even closer to Bitcoin. My goal was to gain experience with ethereum. So far I only completed the tutorials. I found the technology very interesting, but in the past, I couldn’t come up with a good idea how to make use of it. Neither did I learn of a killer product that went live. This is in stark contrast to Bitcoin. When I first learned about Bitcoin, it was immediately clear to me that this was something very special, something that I waited for without knowing.

Team formation

In contrast to the hackathon last year, most people already showed up as teams. I estimate that only about three of the fourteen teams were formed on site. I joined three guys from a bank in Paris, along with another French guy and a South African who lives in Zurich. First we had to decide on a project. We went through a list with a couple of ideas. But it turned out that for a lot of them it was hard to justify what benefit a blockchain would bring compared to a more traditional approach. That is something I see a lot in the current blockchain hype. Showing up as a team with a formulated idea is a big advantage, as the technology and possible problem areas can be explored before. But In both occasions I enjoyed it to meet new and interesting people and see what we can achieve together in this limited time.

Our project

We settled on the challenge “fighting fraud in the supply chain” with a project that puts smart locks on containers. The devices log all open and close operation on a blockchain. Unlocking operations would have to be authorized by a smart contract. The locks communicate with bluetooth low energy with an app on a smart phone. This in turn communicates to a backend that talks to the blockchain.

Implementation

Shortly after we had the rough concept, the other team members stated that they would feel more confident implementing the smart contract in java, rather than solidity. That’s why they voted for using hyperledger instead of ethereum. Setting it all up and getting the docker containers to work proved a lot more difficult than anybody anticipated. Not only had some team members Windows machines, but also on linux we faced a problem. Namely the docker containers were configured to use the google nameservers, while apparently all outside DNS was blocked by the Thomson Reuters network. The connectivity was generally very flaky.

Infrastructure

I enjoyed working with the team. But that we didn’t know the infrastructure we were working on, complicated our work considerably. The last time I programmed seriously with Java was probably 15 years ago. And we didn’t have good tool support within the environment. I’m sure it is possible to set everything up to work comfortably, but that would have cost us more time even than we lost with the complicated turnaround cycles. In the end, we couldn’t complete our prototype in time. Sure, that is is not a strict requirement of a hackathon. But it’s the pride and goal of every software developer to have the thing perform in a live demo.

Presentations and prize giving

As is common for events like this, the quality of the projects varies wildly. I think nobody in our team expected to be in the top ranks. Even though I must say the presentation looked better than my code.
The project that I liked the most was about subleasing parking spots while people don’t need them. I could imagine something like this generalized to become a decentralized form of AirBnB.
The winners were the same people that won the London HackEthon. During the presentation I thought it rather boring. It was about heart rate sensors publishing directly to ethereum. A smart contract would then take action if the data was out of order. Only after they received the price, I thought some more about it. In hindsight I can see the value in it, and that it was probably implemented better then most other projects.

Conclusion

Thanks to Thomson Reuters and all others involved for organizing this great event!
I hear a lot from Bitcoin maximalists that all other chains can’t compete with the one true blockchain. I’m also invested most in Bitcoin, but I want to be open to the possibilities of other blockchains and smart contract platforms in special. Although I must admit, I never saw a compelling reason for permissioned ledgers and private blockchains. A week before the event I learned about Bitcoin uncensored, and listened to a couple of the episodes. They essentially debunk most of the altcoins and blockchain projects. Calling them ponzi schemes and frauds. This made me skeptical of the blockchain boom, but all the more I was keen to discover good uses at and event full of blockchain hackers. I’m still positive that there are applications that can be improved with blockchains. But most of the ideas have to be descarded upon closer inspection. The only three practical uses for blockchain so far are monetary, timestamping and naming. I am looking forward to expand this list, but it’s not as easy as it seems at first.

Decentralized websites and more

“Cool idea, but to be of any use, it would need more functionality and more content” was my impression when I first looked into zeronet. Back then static web pages were all there was, and no UI support for any managing tasks. The next time I checked, probably more than half a year later, it had a blog engine, subscription on the welcome page, mail, chat, forums, wiki, boards and more. Blogs was what hooked me this time. The interesting feature was that you could subscribe, and have the news listed on the hello page. So I started to write new blog posts both on wordpress and on zeronet. True, wordpress has lots of more functionality than the zeronet blog engine. Some things are nice gimmicks, but none of it is really essential. ZeroBlog is really all you need.
Some people started to leave twister for zeronet, but I couldn’t quite understand why. For me, it filled another niche. They are both very nice in their own way.

How it works

To create a site, you can execute a python command on the commandline, or simply clone an existing zite. In both cases, a private key is generated that you need to later sign the content. Signing is really easy, but you better take good care for your private keys. Make sure not to share them, but do make backups for yourself. From the private key, a public key is derived and from that a BitCoin address. The BitCoin address serves as the unique identifier for your zite. If this identifier looks too complicated, you can register a shorter name on the NameCoin blockchain, and link it to your bitcoin address for the zite. Once you sign and publish your zite, you can give the address to your friends, or publish it where other people can pick it up. Whenever another zeronet user requests your address, he sends the query into the mesh. Whoever is closest, serves the files anonymously. Now the user who visited, becomes a seeder who also serves your content. No central server required. Now you can switch off all your computers, and your zite is available. Your zite stays online for as long as there is at least one other user seeding it.

Proxies

To visit zeronet sites, or simply zites as they are called, you should run the zeronet client. The software is written in python with few dependencies. So it is really easy to run. You can either run it locally, or on a personal server. Then just visit the entry page with the browser and navigate from there. But if you want to visit a zite without installing any software, there are also public proxies. There are many reasons why running the software is better than using these proxies, but I won’t go into the details now. And I don’t list the proxies here.

ZeroMe

Then came merger zites. I read about the concept before the release, and was really curious. Some things are not as easy to accomplish with a decentralized anonymous system as with a centralized architecture. But when I had my first play with ZeroMe, my reaction was “Wow this is what I have been waiting for”. I don’t use most social media because of the centralized architecture, and because they own all the data of the users and can make with it whatever they please. There have been decentralized social platforms before, but they were usually a hassle to install and maintain or not so great from a usability standpoint. Now with ZeroMe you choose a hub to store your data, an identity provider, and a presentation. So you have three orthogonal aspects to your experience.

Data Hub

You can subscribe to as many hubs as you wish, but store your data to only one of them per identity. They can be organized by region, language or interests. The more you subscribe to, the more data will be stored on your harddrive, and the more bandwidth will be consumed. You can also run your own hub, and use it only with your friends.

Identity

The identities existed for a while. You needed an identity to write a blog, to comment on other people’s blogs, to write and receive ZeroMail, to write to boards and chats and talks and wikis. Again different identity providers have different requirements. For ZeroId you have to register your handle on the namecoin blockchain. For Zeroverse you had to send a bitmessage. For KaffieId no external proof is required. You can maintain as many identities as you like. Some can be more credible, others totally anonymous.

Presentation

The official frontend is Me.ZeroNetwork.bit. But as it is all opensource. The first forks or clones started to appear. There is the darker themed Dark ZeroMe. There is ZeroMe Plus which adds some nice features.

Game modding with pen and paper

I have lots of good memories from youth camps. Some involve playing Donkey Kong and Mario Brothers while sitting on trees. Another classic video game was Asteroids. When I recently read an article in a German magazine about building an Asteroids clone with an Arduino and an OLED, lots of old memories resurfaced. The source code was provided, and the build was simple. As the control was used as digital, I didn’t use an analog joystick. When I gave it to the kids to play, they didn’t share the same enthusiasm that I had back then. But that’s probably because they grow up with lots more tiny computers than we had. So I wanted to involve them some more, and give them a sense of how this thing works. I don’t know how well they understood, when I explained them the concept of a pixel.
So I grabbed pen and paper, read the source code and drew the pixel art. Next, I told them they could modify the images to their liking, but still preserve the mechanics of the game. It was essentially the spaceship with one frame, the asteroid with three frames and the explosion with four frames. Seven year old Levin understood immediately, and painted his versions. For five year old Noah it might be a bit early, but he also participated enthusiastically.
All I had to do was transform their paintings back into source code and load it onto the AtMega chip. Now they were hooked a lot more to the game than before.

Why I still have no new notebook

It has been more than 14 months since my XPS 13DE notebook was stolen. Ever since, I was on the hunt for a replacement. I have just some simple requirements that seem so difficult to meet:

  • Linux pre-installed
  • Payment in BitCoin
  • Swiss German Keyboard with back light
  • Ultrabook (slim and powerful)

The natural choice would be to go with the successor of the model that I was so fond of. Dell does accept BitCoin, but only in the US, UK and Canada. Unfortunately they don’t sell Swiss keyboards in those markets, and I don’t know where to get a keyboard to retro fit.

There are a few vendors selling devices that fulfill some of the requirements, but I found only one so far that can achieve them all.

The best choice at the moment seems to be a Librem13 or Librem15 from purism. The 13inch model has only an i5 processor, and no backlit keyboard. So I would opt for the 15inch model. They have difficulties getting the display panels. And lots of the devices they shipped internationally didn’t reach their destination. This an unfortunate situation, but they seem very friendly and responsive. From what I can observe, they give their best to resolve the situation as good as they can. At the moment It looks like I have to wait two more months to get a Librem15.

Here are some devices that I considered:

Model Linux BitCoin Keyboard Ultrabook Remarks
Dell XPS13 Developer Edition yes no yes yes Very nice device
Purism Librem15 yes yes yes yes Waiting for display, and shipping problems
Tuxedo yes unknown no yes Only German Keyboards
Why yes no yes yes Out of stock

If you know of a device that fulfills my requirements, and is not listed here, please tell me.

SIX fintech hackathon

I learned of hackathons before. It sounded interesting, but either they were too far away, the topic was not interesting enough, or the date was already booked. This time was different. The topic is really what made it interesting enough. FinTech is about new technology in finance. I’m sure there was innovation in the financial industry in the last 50 years, but it was not very visible, and not as fast as in other industries. Recently I read about an employee in a bank that was asked upon his retirement, what was the biggest change in the last 40 years in his job. His answer was : “air conditioning”.

With the advent of BitCoin, the financial sector started feeling some pressure to innovate. I don’t really know how the term FinTech was born, but this all might have contributed. So one thing was clear for me about the hackathon from the beginning: The project had to be about BitCoin.

SIX is probably one of (if not the) biggest service providers in Swiss finance. They run the Swiss stock exchange, most card terminals in brick and mortar shops and PayNet where people can receive electronic invoices in their online banking. These are only the most visible products. They organized the hackathon for the first time a year ago. This time it was in two locations: Zürich and London. Watching last years videos I realized that the event would be organized much better than I expected. And the actual event was even better than the videos promised.

So I went to the Schiffbau which is a former ship building factory turned into theater. Everything was prepared, and we were welcomed with a dinner. The opening ceremony included a very entertaining speech from an editor of the Wired magazine. Next were presentations for the four workshops. I watched “Blockchain, Smart Contracts and Beyond” and “Cognitive Computing in Fintech”. Both were interesting, but not exactly what I expected.
Some teams were already formed, the others went to the match making session. Everybody who had an idea for a project could present it in a few sentences. Then the teams were formed. The Idea I presented to implement a bridge between PayNet and BitPay didn’t spark a lot of interest, so I helped implementing another endeavor.

Our team set out to implement a bridge between PayMit and BitCoin, thus we named it BitMit. I knew the name was familiar, but it took me a while to remember that BitMit was also the long defunct Marketplace that worked like eBay, but with BitCoin. The responsibilities were quickly found: Iwan would implement the IOS app, Mark would implement the management dashboard, Roger was responsible for the Presentation of our project and I implemented the backend.

IOS App
We received an API for PayMit that came with an example app. The app had buttons for buying certain products. So Iwan replaced the buttons for different denominations of popular crypto currencies. When a button was clicked, the app would first execute the payment using the PayMit API and then communicate with our BitMit backend. Finally it displays a receipt including the BitCoin transaction ID. Apparently working with Apple’s XCode is a very special experience that is far from intuitive.

Back-end
The back-end was responsible for providing a simple API for the IOS app, interacting with the BitCoin blockchain and managing a BitCoin hot wallet. We chose python and flask to do the task. Most members in our team were familiar with python and flask. I only implemented a very small project with flask a few years ago, but that knowledge was almost enough for the task at hand. I wanted to make use of electrum servers to have it lite weight. But Friday and Satturday we wanted to use the BitCoin testnet, and unfortunately there are no electrum servers for testnet. So I went with BitCoinCore.
At first we were not so sure where the backend would run. My notebook would be good enough for the time being. But then the guy from IBM offered to have it running on their cloud. He helped me setting everything up. When connecting with ssh to the ubuntu machine, I didn’t even realize that it ran inside a docker container. And the beast was fast! With the 48 cores and a fast internet connection, the BitCoin blockchain was synchronized in less than six hours.

Management Console
Compliance and auditing is very important for Banks. Thus our Service has to have a means of keeping track what is going on. Mark implemented the front-end using React. I certainly heard this buzzword before, but never saw actual code. It’s quite cool how simple the code looks when the task fits the framework.

Pitch
The presentation or pitch was allowed two minutes max. And a gong would terminate it abruptly on stage. The first iterations were roughly twice that long. It was hard to cut it down to the right duration. Too valuable all the information we wanted to communicate. Roger had a very good opening, which I don’t even know if it was still part of the final pitch.
Before entering the final, we gave the pitch a couple of times. Most important was the presentation to the jury. After the pitch the judges could ask us questions. One guy obviously had no clue about how BitCoin works. When this guy was later presented as member of the board and announced the winners, I felt our chances dramatically dwindling.
I took a video of the pitch Roger and Iwan gave for the final on the main stage. It is streaming from the ipfs.

Our project might be not the most novel idea, but it fills a need. Other projects that were presented sound very funny at first but after thinking it through you don’t think anybody would use it. Still others had only fancy slides but nothing functional to show. But there were also projects that made a really good impression. That is probably the expected outcome from a hackathlon.
For me it was a fun and entertaining experience. I will surely participate in other hackathlons. A big thanks to SIX for organizing the event and for all the good food and drinks we enjoyed.

An interesting fact that I observed was the computers used by the participants. About 90% of them were from apple. Most of the remaining computers ran some kind of flavor of linux. And I saw a single one running Windows.

an exact clock for a vintage car

Since I drive my vintage XJS not too often, I disconnect the battery. This is to prevent if from going flat before I want to use it the next time. Of course it would be better to install a special charger for classic cars. But there is no outlet in the underground car park. The car starts when I want to use it, so one could say: mission accomplished. If only there was no clock in the dashboard.  It doesn’t run when the battery is disconnected. Having to adjust the clock every time is not the solution I was looking for.

My first idea was to get a DFC77 radio clock with hands, and put it inside the case of the original dash clock. All the clocks that had hands were too big to fit into the case. So I ordered a small module with an LCD. The problem was that it had good reception at home, but not inside the car. The long waves seem to have a hard time penetrating the Faraday cage of the car body.

The next option that delivers exact time over the air is GPS. So I ordered a cheap GPS receiver from China, and built a prototype with an AtMega microcontroller and a small OLED. The prototype kind of worked, but after the first drive, the GPS module failed completely. So I ordered a better one from an AdaFruit reseller in Switzerland. This module still works very well, but I found out the hard way that it needs a very clean power source. The next problem were random failures and reboots of the micro controller. This turned out to be caused by memory overruns. They are harder to detect on a micro controller  than on a regular computer. The display needs a framebuffer in RAM, and for the GPS I need enough space to store and parse the full NMEA sentences. I tried to reuse and re-initialize the same memory for every reading, but that didn’t work out. Neither didn’t I find a similar controller with more RAM. If I was going to produce a number of devices I would for sure use a better controller, but as it is a one off prototype, I just used two AtMegas. One for the display, and one for the GPS.

GPS has no reception in tunnels and underground parking garages. So I planned to implement a simple counter that just increases the time when GPS reception was lost. But then I decided it was not important enough. Instead I wanted to proceed, and have the device ready in the car. But I couldn’t resist to display a leaper for when there is not reception.

In a classic car, everything should be in original condition, so I didn’t want to destroy the original clock. Instead I was looking to buy a used clock that didn’t have to be in working condition. The ones I found in Switzerland were too pricey for only the case. So I found one on ebay for £22 that was shipped from the UK.

The problem that remains is that the OLED sometimes initializes with a random dot pattern and stays that way until the next power cycle. It happened more when I had it connected directly to the main battery. But since I connected it the the dash back light, it never happened again. So maybe it is important how fast the voltage increases when power is switched on.

As usual, the code is on github.

image20150625_202655132 image20150625_201613328 IMG_2636 IMG_2638