Motion Enabled Clock

I am coming back to blogging after more than 2 years. In the meantime, I have acquired a taste for electronics hardware with Arduino and Raspberry pi. The advantage with open source hardware is that we can think up and create crazy products like Motion enabled clocks at home.

Why does one need a motion enabled clock? In my case, we do not like the tick tock sound of regular clocks and neither do we like the light from the digital clocks. But we do want to see the time when we wake up. Also, we try not to use alarm clocks and so it is all the more important to check the time when we wake up. How cool will it be to have a clock that lights up and shows the time when we wake up? This is the inspiration for this clock.

Parts needed:

Arduino – Uno, Adafruit 0.56 4 digit LED display, DS1307 Real Time Clock (RTC), PIR Motion sensor, button cell battery, Jumper cables, Breadboard


The connections are very simple in this case. The power (+ or VCC and – or GND) from the LED, RTC and the motion sensor go to the 5V and the GND pins respectively on the Arduino.

The analog pins on the Arduino A4 and A5 go to the SDA (data) and SDC (clock) pins on the RTC and the LED respectively. The motion sensor sends its motion data on its data line which can be connected to any of the digital input pins on the Arduino (I chose 7). This pin will be referred to in the code.


When I connected all the parts, it looked like this.


Upload the code into the Arduino, power it up and see if it works.



Some of the challenges I faced in building the clock were:

1. The motion sensor is very sensitive and needs to be in a place where there is no motion during calibration. I had to power it on and immediately leave the room for about a minute or two for it to accurately detect motion. I have left some of my comments in the code which helped in debugging the motion sensing.

2. The PIR specs say that it operates between 3-12V and I connected it to the 3.3V pin of the Arduino and it just would not work. Changing the power to 5V did the trick.

Even though the clock is very cool, there are still some problems which I will be working on in the coming days.

1. It is still on the breadboard and I will solder it to a more permanent stripboard.

2. The bigger problem is the power consumption. Any typical clock will run for months on a button cell battery while an Arduino powered clock will drain a 9V 450mAH battery in a matter of hours. I will be working on a more power miser setup too.


I referred to these posts in order to create my clock:

1. Dr. Monk guide to build an Arduino clock

2. Arduino playground sample on motion sensing

3. The specification document for the motion sensor shows how it works and is a useful guide to debug problems with the sensor.

Do we need yet another manual health tracking app?

With the advent of smartphones, we have been hearing about availability of health at your fingertips. One of the aspects of this is that we can easily keep track of our health using mHealth apps. If you look in the app stores, there are hundreds if not thousands of health tracker apps – some which are general, some which are condition specific (like my Diabetes app Lifely). All of them claim to help the user easily manage their health by entering the health data manually into the app.

The apps use many features to get the users to use them. Some of them are extremely feature rich. These apps are like the complicated TV and DVD remotes that we have in our homes. They have so many features that we do not know or care about all of them. I use just the on, off and channel change features. This problem applies to apps also. There is a minority of users who use all the many features and the developers have to support their needs by building more and more complex features.

Other apps use awesome looking design and UI to get the user’s interest. These tend to be very simple and easy to use. They also use fancy colors and new UI which makes the app very fresh and interesting to the users. Based on their fresh look, they get many users in the beginning. But as with all apps, the usage of these apps also falls as soon as the novelty of the design becomes stale (in about a week or so).

Apart from design and features, some apps use gamification and pointification to get users to keep using the apps. Yes, been there and done that. But gamification can only help to a certain extent. From what I have seen, after a while the game becomes stale and the users  stop using the app. You just have to see the struggles that Foursquare has in going beyond the early adopters.

So I feel that the only way a health tracking app can be useful is if it can track passively without making the user manually enter everything into the app. I recently came across a fabulous implementation of passive activity tracking in an app called Moves. You do not have to do anything to track your walks and runs in Moves. Since you carry your phone with you, it tracks your movements automatically. At the end of the day, you get a report on how many steps you walked and how many minutes you ran. I feel that all health tracking apps should be like this. If the user is expected to do anything more than install the app, you can expect them to stop doing it at some point and your app usage will drop.

So, if you are working on yet another manual health tracking app, please stop now and conserve your time and energy. A new design, gamification or even rewards is not going to motivate your users to keep using the app. If you are working on a passive health tracking app, let me know about it! I would love to test it out.

Ban Science Books for Kids

No, No! I am not a book hater or a science hater. I just do not like a certain type of science books for kids. These are the books with glossy pictures which claim to explain science to kids. They have lots of pictures and talk about everything from space to robots and animal kingdom. These are typically aimed at kids in the age range 3-10.

Whenever I am in a book store, I am tempted to buy these books since they are so attractive. As a parent, you feel good buying them since it feels like you are getting something fun and interesting for your child. But after I started tinkering with the Raspberry Pi (and now Arduino) with my son, I have been feeling that science books are a waste of time. I did not realize why until this realization hit me. I decided to write up this post with what I learnt.

When one reads science books, it feels like someone is telling you how the world works and you have to take them at their words. How different is this from reading about history, news or philosophy? Yes, these books have flashy pictures and diagrams and so do the books on history! Essentially, by making the kids read them, we are giving them a message that we adults know best and they should understand the world with the books we give them.

I feel that science has to be experienced and cannot be “read” or “explained”. I have noticed that kids who read these books seem to know it “all” since they have read about science in “books”. Aren’t we killing the natural curiosity that kids are born with by giving them a book to “read” and “understand” science? Reading a science book is equivalent to someone leaking the ending of a thriller.

I feel that the best way to teach science to kids is to let them do experiments and create hypothesis about why something works the way it does. They will make mistakes in their hypothesis. I feel that they should be making mistakes. We parents aren’t doing well if they aren’t making mistakes! They can hone their hypothesis by performing more experiments to understand better. This way, they will feel motivated to test their hypothesis and own the conclusions they come to.

The other impact of just “reading” science books is felt much later in adulthood. Take a look at folks who take issue with darwin’s theory, climate change etc. It is no wonder that they feel that science is just another class of fiction!

This is why I have stopped buying science books which have glossy pictures with “explanations”. You should too! Don’t forget to post your thoughts in the comments if you disagree.

Fun, History, Records and Politics in our day at London Olympics 2012

Ever since I saw Olympics on TV when I was growing up, I wanted to see an Olympics in person. When tickets for the London Olympics went up for sale last year, I submitted my bid on the very first day! I was even more thrilled when they allocated tickets to us in the first round of random selection. After waiting for more than one year, I was at the Olympics in London last week. Here is how it went.


The Train Stations were decked up

We noticed the festive atmosphere as soon as we got out of the Eurostar. There were smiling volunteers everywhere who were ready to help us with any of our questions about the event. Since we wanted to know where the nearest ticket office was, one volunteer went to the extent of using her own cell phone and laptop to hunt this information down. This was the level of enthusiasm from the volunteers everywhere.


On the day of the event, we were told to reach the gates of the event at least 90 minutes prior to the start of the event since there would be airport style screening. We were also told to expect huge delays since the public transport system would be over whelmed. But we found the whole process very smooth and without delays. There were signs everywhere and so one could not get lost.


Even though it was airport style screening, the checkin process did not take more than 10 minutes. They were very efficient about it. The longest lines were for toilets and gift shops once we were inside the venue!


They had also informed us not to bring filled water bottles and to get empty ones. We got filled ones with the expectation to use it before we got into the check in process. We planned to empty them if they asked us to. But they took away our filled water bottles and gave us brand new ones! This was a very pleasant surprise. This was very thoughtful of them (even though not very environmentally friendly). This process was not repeated at our second event. There, they allowed us to take our filled water bottles with us as long as we took a sip in front of them!


Rain Soaked Volleyball

First event – Beach Volleyball.  Who does not want to watch beach volleyball?! We saw Italy and Russian (ladies prelimnary match) which Italy won. The second one was  a men’s match between Spain and Czech Republic. Spain won this game very easily.

The announcer was getting the crowd pumped by saying “Who is for Russian Federation? Who is for Italy? Now who is for Great Britain?!”. Obviously the last one got the maximum noise.


Our next event was ladies’ weightlifting. If you want your child to get over their feelings of “my dad is the strongest in the world”, this is the event to get it done!


Directions were everywhere

Directions Inside the Train

We had to make our way across town to the Excel center. The Olympics spectator guide talked about giving extra time to reach our venues and so we left the previous venue before all the events were complete. We noticed that the traffic was very well managed and we reached our destination more than 90 minutes to spare.


When we took our seats, we noticed that we had got some really good seats. We were seated 4-5 rows in and on the left side of the stage which gave us a very good view. This allowed us to be fully immersed in the emotions of the game.


The scheduled event was Women’s 53 kg weightlifting. There were 10 contestants and we were able to get into supporting everyone since we could see the effort they were putting in. Here there were no cheering squads or cheering commentators but the game was a lot more engaging. Was it because we were so close to the action? I think so.


Yay! A New World Record

Shu-Ching Hsu from Taiwan demolished the competition by lifting her weights with ease. She was announced as a Shu-Ching from “Chinese Taipei”. I know that Taipei is the capital of Taiwan and have never heard of this country (more on this later). She made it look extremely easy. This was until Zulfiya Chiunshanlo of Kazakhstan came along and broke the world record. She was quite an unlikely candidate for breaking the world record since she looked so small in size.

Notice the Taiwan flag – it has Olympic rings on it

Then came the award ceremony which was quite a surprise for us. Take a look at the image above. The flag of “Chinese Taipei” has the Olympics rings on it! The citizens of this country must love Olympics a LOT! Actually, there is no country by that name. It is obviously a way for IOC to appease the country that wins the most medals in modern Olympics. You can read more about it and see the real flag of Taiwan here. So if a Taiwenese sportsperson wins the gold, they cannot see their flag being raised and neither will their anthem be played at the Olympics! For all the talk about peace, friendship and sportsmanship advocated by the Olympics, I think this is a big blow to that claim. I am not sure if I have the same warm feelings towards the Olympics anymore. (Update #1: I saw this coverage in Guardian newspaper about this flag controversy. Check out the comments under the article which are very interesting. Update #2: The flag swap has to extend to a commercial establishment in London too. Update #3: Olympic security snatches the official Taiwan flag from one of the spectators at the Taekwondo event)


Check out some more images from the Olympics below:


The controversy of empty seats is very true

Visa got a whole lot more card holders with this promotion?

The organizers included all day public transport passes with every ticket

A good reminder of who is the real boss!

Lot of Veggie Options



Le Tour De France Viewer’s Guide

We got to see the Tour De France this year since it passed by very close to where we live in France. When I came to know that we can watch the Tour De France in person, I did not know what to expect and how to plan. Internet searches did not yield much information and so here is my post which might help people who are looking for this information in future.


As you know, the Tour De France is the annual endurance bike race which takes place in France and surrounding countries (understatement much?). If you want to check it out in person, the first thing to do is to check the route on the official website. Next thing is to decide if you want to see only the riders or to see the caravan also.


The caravan is a circus like atmosphere of publicity cars, trucks and bikes which come bearing interesting acts and goodies (junk?) to the waiting public. Check out the gallery above to see the pictures of what we saw. From what I noticed, they seem to give out key chains, hats, grocery bags and snacks. There was a mad rush for all the goodies being thrown at the crowd. So if you are interested in maximizing your loot intake, find a place close to the policemen who are controlling the traffic. They seem to attract the most goodies aimed directly at their faces.

The other thing to note is that the caravan passes very close to the people standing on the side walk. It can be dangerous if anyone steps in front of a passing car by mistake. The Wikipedia entry for Tour De France has a list of people who died in collisions with the caravan. We noticed that the people throwing the goodies were making sure that they landed near the crowd’s feet (unless it happened to be a policeman!). Still we noticed many things flying off and landing in the path of the fast driving cars.

These caravans arrive at least 2 to 2.5 hours before the arrival of the bikers. The timings for the caravan will be announced on the website and they kept to their time. The 2012 caravan lasted for about 45 minutes. Since we had a lot of kids in our group, these 45 minutes went by really quick since we all enjoyed watching the show.

After the caravans pass, there will be around 1-1.5 hours before the riders arrive. As estimate of  this time will also be announced on the tour website. This year, the riders arrived about 30-40 minutes later than the time announced on the website.

Watching the riders is obviously a big thrill. It is a lot of fun watching the different jersey winners go by. The only sad part is that if you are in the last stage, like we were, the peloton can pass by really quickly. For us, it went by in 20 seconds!

This is why one of my friends advised me to watch the last stage at the Champs-Elysee in Paris. Here the riders have to take 8 rounds in the same route. So you get to see them well. Also, if you are into goodies, this is where it all ends and the caravans will be unloading all on the crowd.

I hope this post helped. The next goal is to figure out how to guest ride with the Tour De France to hone our fitness to their elite level!