Saturday, December 19, 2015

GSM Motion Sensor: A 25% Success Rate

When I decided to make a GSM alarm, I set out a number of goals for myself: to secure my storage unit; to learn more about microcontrollers; to learn more about digital hardware; and to learn about embedded GSM devices.  The only deadline I set for myself was to complete it by December 19 so that I could install it in my storage unit when I went home for the holidays.  The only requirement the alarm needed to satisfy was that when someone opened my storage unit I’d get a text message.

A number of setbacks have made this impossible.  I only completed one of those goals, and that was not the important one.  Some of the setbacks were my fault.  Some were not.  The primary cause was my lack of understanding of how digital hardware works, which is especially frustrating because that’s what I set out to learn.  How could I in two months fail to make any real progress on the main objective?  The truth is that I do not possess the basic knowledge required to bootstrap my learning, and I don’t know how to find it.

I set my goal for the alarm high so that if I met setbacks I could scale back and still meet the basic requirement.  At first it would have an infrared sensor.  Then I could scale back to using a simple switch to complete a circuit and reacting via an interrupt.  Then I could scale back to simply connecting the power to the microcontroller when the door was opened and have it send a text on startup.  At first it would call my phone with a prerecorded message.  Then I could scale back to just sending a text.

I didn’t build an alarm system for my storage unit.  I didn’t learn (much) about microcontrollers.  And I didn’t learn (much) about digital hardware.

From the very beginning I had trouble.  I wasted $20 on a device I couldn’t program without a $60 adapter.  I spoke with some friends and old coworkers and decided to get an Armstrap – an easy-to-program low power microcontroller.  I’d base my alarm off of that instead.  This delay cost me weeks since I had to wait until mid-November to get it from the US.

After I received the microcontroller, it took me almost two weeks to figure out why it was behaving erratically.   I couldn’t get it to reliably detect a circuit opening or closing.  And I couldn’t figure out why the serial port was spewing junk data.  Days went by when posts on forums were unanswered.  Days turned into weeks.  Then suddenly it was December 5 and I had to travelling to Wales for a week then search for an apartment for a week.  And now I’m writing this post on a plane back to Houston, sans alarm.  I didn’t (and still don’t) know where to turn for help.  I know the microcontroller must be capable of doing what I want, I just don’t know how to make it do that.

I think I found a circuit design online that will do what I want.  But after this many failures – this many times thinking “this satisfies my needs exactly” and being utterly wrong – I’m not sure I should be optimistic.  It works for Raspberry Pi.  Why won't it work for my microcontroller?

I was able to connect a GSM chip to my laptop and send and receive basic SMS messages, so I consider that to be the one success.  My one success in four – a 25% success rate.

I’ve taught myself a lot of things.  Via experimentation I taught myself different programming languages and system administration.  Via observation and experience I taught myself about home construction and the basics of spoken languages.  Maybe my mistake was thinking that what I wanted to learn was possible to learn via experimentation alone.

I’ll continue trying to build an alarm.  Maybe I can find someone in Houston willing to spend an hour or two getting it set up just right.  Or maybe it’ll need to wait 8 or 12 months until we go back.

For now, to secure my storage unit I bought a much better lock.  I started watching some lock-picking videos on YouTube and discovered the lock on our unit is pathetically insecure.  The new lock has a thicker shackle, and a much more complex key.  Most advanced lock-pickers can’t pick this lock.  In this case, brute strength won out over technology because I can buy a secure lock on Amazon and have it delivered next-day.


No comments:

Post a Comment