Electronics by the pool

Summer really started when André and Gil came to Madrid. We got to spend a couple of weeks together, before we drove to Portugal, to join the rest of the family for our summer holidays.

One perk of spending summer with me was that André and Gil had the building’s excellent swimming pool at their disposal, so their morning routine became to play console games, read or watch movies, and in the afternoons, after I came home from work, for us all to go to the swimming pool and then work the rest of the day on our project.

André worked on his Python programming skills
André enhanced his Python Kung-fu

During summer André decided to improve his programming skills, so he spent most of the summer reading a book on Python and replicating it’s many examples. Although André had written programs in Python before, he had learned from examples and lacked basic programming  knowledge, so he decided to acquire it during the summer holidays.

While André improved his Python Kung-fu, Gil started the infrared distance ranger’s proof of concept (POC). During the rover’s design we had decided to use the Xbee’s analogue to digital converter (ADC) to read the analog infrared distance ranger, but as I explored the Xbees further I realized that that wasn’t an option and so we found ourselves in need of an ADC that we hadn’t bought. Luckily (or so we thought at the time) we had an ADC in one of the electronics kits we had bought before we started the project and Gil started trying to get it working. Unfortunately for him, after two weeks Gil realized that the ADC was inadequately documented and since Gil had no previous experience with I2C devices he couldn’t get it to work no matter how hard he tried.

After spending two weeks in Madrid, and a weekend in Barcelona, we headed to Lisbon, and then further south, to Algarve, for the well deserved family vacations. Three weeks and many family memories later the family’s holidays came to an end and the three of us drove back to Madrid, where bought a brand new ADC, properly documented and with an SPI bus, which Gil got working in just a couple of hours, but only to find that the ranger’s readings made no sense.

Gil and André visited Barcelona
Gil (left) and André (right) in Barcelona

Gil started taking distance/voltage measurements, to plot the ranger’s behavior, but before he could complete it I found  online the graph he was creating, and we realized that the ranger’s response was not linear, but rather a negative exponential. Looking at that graph the readings suddenly made sense, but also made us realize that the ranger wasn’t any good at measuring distances as we intended. We concluded that the IR ranger’s usefulness actually lied in detecting the presence of nearby objects, so Gil used the ranger to stop forward movement if the ranger detects an object in front of the RPy-Rover.

When the ranger POC was done, Gil and André turned their attention to the GPS, and André’s newly acquired programming skills came in handy to create the code that extracts the latitude and longitude from the alphanumerical NMEA strings outputted by the GPS.

At the same time André started the blog. He interviewed Gil and I to identify the key points of the project’s backstory and then wrote three pilot posts, to try out different writing styles. He then wrote a set of stories for the blog, so we could have a set of posts scheduled by the time the blog was made public. Meanwhile Gil and I started producing the how-to articles, explaining how each of us had done our assigned modules, so the main contents for the blog were in the pipeline.

Time flies when you’re having fun, and we had great fun during the summer, coding and wiring (almost) by the pool.

When summer came to an end we were closer to building the rover, but nevertheless all we had were separate modules, and the radios still didn’t work. To finish the project by the year’s end we would have to pick up the pace. Time was running out and we still hadn’t any idea how we were going to package all the components inside an appealing rover body.

Previous story: The first module is ready!

First story: Meet the Raspberry Pi


One thought on “Electronics by the pool

Leave a comment