Tuesday, 27 October 2015

Chiromo Challenges

"If you are not feeling stupid,
then you are not doing research!"
                               Dr Justus Simiyu

It seems like an age ago now, our very first day of work here in Nairobi. The Chiromo Campus of the University of Nairobi has since then become like our second home to us. Meaning that we basically spend 90% of the hours not spent in our home in Kileleshwa there. This might otherwise sometimes be referred to as a “workplace”. So on the contrary to what a lot of people might think when reading the blog up to now, it’s not all fun and games for us here. We have actually discussed the fact that it is quite likely that we will spend more time and effort on this master thesis-project, than we have during the rest of the entire education. Not that it says a lot, considering that both me and Nils might just be the two biggest slackers that Engineering Physics in Uppsala has ever faced. The campus is a maze of buildings and roads, trees and trails, located just north-west of the city centre. One might even argue that it has its own jungle, due to the fact the there are two types of monkeys climbing around the trees inside the campus. Like most places in Nairobi it is a gated and sealed-off area, surrounded by almost prison-like walls and huge blast doors. And complete with armed guards. This was something that we struggled with in the beginning. Not only is it a very strange and unusual experience for a swede to be almost constantly confronted by guards as to where you are going and why, I myself have a specific problem with certain uniformed people staring at me. It automatically makes me feel guilty, even at the times when I am as innocent and law-abiding as Ned Flanders. Not then to mention the times when I have actually done something naughty…

So, as if we not only had to be nervous for the fact that it was our first day at work, in a new and exotic country, and where we were supposed to meet and be presentable to our future supervisors and colleagues for the project, we now also had to worry about even being let inside our workplace. Maybe it was the slightly nervous aura that we emitted, or the fact that they were certain that they had not seen us two pale-faces before. Nevertheless, the guards swarmed us like Matatu-drivers in the Westlands. The problem was that we did not really have anything very official to explain our presence at the university, apart from the generic documents that we had been given by the Swedish International Development Cooperation Agency (SIDA). This did little to impress them, despite all the stamps and signatures. “You need a letter of recommendation!” was their answer as they shook their heads. We started to feel rather desperate and tried to display our very best skills in articulation and persuasion. In a last attempt to be allowed to go to work, we said that we could phone our supervisor; Dr Simiyu, and have him explain the situation. That did the trick, or maybe they were simply tired of standing there arguing with two wazungi, because they waved us in. Off the hook. For this time. After this shaky start of the project what happened next was a true sign of the gods. In the parking lot just beside our walk-path to the physics department building, neither me nor Nils could believe the sight that was appearing before our eyes. Right there, in a condition as if it had just left the factory in Torslanda, stood a beautiful Volvo 244 GL. Most likely a 1986 model, and in the colour Volvo 213 “Middle-blue”. In other words the exact same car I myself bought as a naive 19-yearold and after a painstaking renovation still drive today! There is not quite words to describe my ecstasy. All I can say is that after that, the memory of the intermezzo with the guards was as blown away by the savannah wind.

The first week was primarily spent with trying to meet and establish a good contact with all of the people that we were going to work with during our time in Kenya. As if this was not a job enough in itself, we also had an initial meeting setting the outlines for the project. And as so many times before, it turned out that whatever we had sketched up as an engineering solution before arrival was completely scrapped and we were returned to square one. Well, not entirely scrapped. But we decided to change the methodology for the project and also the microprocessor that we are going to use and design the system around. Up to now we have only worked with the relatively old Atmel AVR-series microcontrollers, but since the team here in Nairobi usually work with ARM-powered microcontrollers that is what they opted for. And the ARM-architecture is a much better choice in almost any aspect. It boasts very good performance, excellent power-management and efficiency, and is also very versatile and complete. It has since its launch become almost an industry standard, and is being used in almost any smartphone and other “smart device” in the world. Nevertheless, for us it would mean that we would basically have to learn a bunch of new things to work with this more complex systems architecture. Then there is the academics. Because, since this is a Master Thesis for a Master in Science diploma, you cannot just do the project as you might do sitting at home in your basement, soldering away with your soldering-iron. No, it has to be done academically… What it means basically is that one is to follow a strict academic procedure of steps to justify and verify everything that one does. In our case it would mean first simulating the system, then building a prototype or somehow test all of the real components and the architecture, then designing a full product with a printed circuit board with the components, a proper casing and all of the documentation needed for basically going commercial with the product. Since we are aiming for an open-source product, meaning that anybody can access all of the schematics and program-code for free and be able to contribute to it, our standards are not quite as high as for a purely commercial product. But there is still a lot of things that needs to be done in just three months’ time, taking an idea through to a finished product.

The most beautiful car on campus, and what looks like a used-car dealer from Dallas

Chiromo campus foilage

Nils the janitor

Academic humour

I was put on the simulations, at the same time as Nils was starting to work on the actual components. We had to cut some corners to even have some chance of finishing in the scheduled time, so we needed to decide a lot of the sensors that we were going to use straight away, and also aim for a specific processor to interface them to. For Nils that meant using a so called “evaluation board”, basically a processor (in our case a Freescale K64 ARM-based microcontroller) connected with all of the gadgets that could possibly be used with that particular processor, and a lot of open connectors to connect all kinds of different things. A lot of swearwords has been escaping his mouth over the past weeks, as he (among a lot of other things) has been trying and eventually succeeded to measure temperature and humidity, call my telephone and communicate via wifi using the evaluation board. He has made some really amazing progress, even though we still have far to go. To do the simulations, the team here recommended that I learn the tool that they use, something called “SystemC”. SystemC is a library which is used with regular C++ code to simulate both hardware and software, from a first high-level design down to each individual transistor in the design, if that is what the user desires. It can be used to simulate both hardware and software and is designed to make it easy to deal with parallel processes, processor threads, interrupts, concurrency, and everything else which an electronics designer could ever desire. So far, so good; on the paper it all looks super swanky. But in reality it has not been a smooth ride. First of all, it is what I would like to call a real “hipster software”. It is not widely used, and all of the sources of information that is available usually says completely different and contradictory things. And then add to that, the fact that the actual documentation and user manual for the software has not been updated for the last three versions. Something which then means that a lot of things, including key syntaxes, are wrong even in the supplied documentation! I myself usually struggle with strange compilation errors and irritating bugs even when using well-documented languages, so using this one has sometimes been very frustrating. If it had not been for the help of our colleague David, who is a bit of an expert in SystemC, I would not have gotten far.

The first days we were pulled over by the guards every morning, and every morning we had to go through the same procedure as to who we were, “where is your letter of recommendation?”, “we will call our supervisor”, and so on and so forth. But one day at the beginning of the second week the head guard simply said “oh, it’s you people…” as we approached, and after that we never had to show anything. We were mighty startled when we found out during a lunch, that they were about to change the guard company that handled the security at the university. There was a rumour that there had been some scandal, or some might even call it a set-up, where the guards had missed to check the wife of the principal. She had then gotten furious, called her husband, and he had ordered that all of the guards be fired and exchanged to another security company. A security company closely tied to the business of him and his relatives… We anticipated problems, and like we expected we again had to go through the procedure of being cross-interrogated and held for a couple of minutes before they would let us in. That continued for about a week, after which they would simply just let us in. Since then we have established a very friendly basis, including hand-shakes, polite conversation, and if it is on a Friday the mandatory appeal that we “really should praise the Lord and go to church on Sunday”. The Nairobians sure are hard-workers, 10-12 hour workdays are almost standard at the university. A lot of Kenyans, including our friends in the guard and a lot of our colleagues, work on Saturdays as well. Me and Nils refuse to do this. We are tired enough anyway after our work-week, despite the fact that we arrive later and leave earlier than everyone else, and strictly do not work on Saturdays. Overall we think that most of our colleagues work way too hard. Sometimes, it ironically feels like we are the ones bringing “Hakuna Matata” to Nairobi. But despite that we might still be the laziest students on campus, we have now started with the real and final electrical schematics of the system. And, if all goes well, we should have a working prototype to test in 4 weeks from now. Hakuna Matata.

It might look like the middle of a tropical rainforest, but it is just someone burning trash at the Chiromo Campus

Brothers from different mothers

Kicking back

Post-apocalyptic Merc

Students heading home after a hard days work


No comments:

Post a Comment