10 May 2015

Arduino sending mobile Push notifications about front door

I wanted to be notified about people entering my house. This could be my neighbor to pick up the mail while being on a holiday, our cleaning lady when being at work or my spouse so I would know it was time to go home ;)

Why monitor entrance to your house?

My two main reasons for this project were:
  1. Security and control, when somebody would enter unexpectedly, I could ask somebody to go and take a look.
  2. Because I can. >:)

Two Arduino’s

I really like all the posibilties with Arduino’s. For this project I used two Arduino’s.

Monitoring the door

One to be monitoring my door with a reed contact sensor.

Reed contact sensor



When the door is opened, the input pin goes HIGH, so my Arduino 'knows' the door is open. When closing the input goes LOW again. Let’s call this one the “Front-door Arduino”.

Connection to the internet

Because I don’t have a wired internet connection at my door, I used a second (Ethernet-)Arduino that was connected to my router. Let’s call this one the “Internet Arduino”.
The Internet Arduino sends API calls to Pushover. Pushover makes it easy to send push notifications to your Android phone or iPhone.

RF-Link for wireless data communication

The front-door Arduino communicates with the Internet Arduino about the door status.
For this connection I used two DFRobot APC220 Radio Communication Modules. They make a perfectly stable serial connection between both ends.



APC220 Radio Communication Modules

Because of this separated setup, it also enhances security. When the ’intruder’ would tamper with the Front-door Arduino, the (hidden) Internet Arduino would notice and send me a push notification to tell me that there is something wrong with the setup.

Schematic

My Setup looks like this:

Pushover

As you can see, the Internet Arduino sends a message to Pushover. You can make a free account there that allows you to send and receive push notifications on your mobile phone.

In your Pushover account, you’ll find a userkey. Also register an ‘Application’, this will be your Arduino sending stuff. Pushover will give you an Application API token/key as well. You need those two values (userkey and API token).

Video

This works like a charm:

Source code

Do you want to build your own setup? Please let me help you with my source code:


Disadvantages

Right now, my Front door Arduino is consuming some power and I need a wire to an outlet to power my Arduino. There must be a smarter way to handle the ‘detecting’-part of this solution. I am working on this now. :)

09 August 2013

Arduino Pomodoro Timer

Do you want to work on something, fully focused? Maybe The Pomodoro Technique can help you. It dictates that you work in blocks of 25-minutes.

Timer

Inspired by this concept, I made my own Pomodoro Timer, with an Arduino of course ;) I made a prototype, with a breadboarded Arduino and only a Lego casing around the display, but it could also be built into a proper case of course.


When connecting to power, it will automatically start counting down 25 minutes (default). When your time is up, you will hear a beep and the timer shuts its display down. With one press on the button and you can start a new session. When pressing the button multiple times, you can switch the count-down period.

One button

The timer had to be super-easy to operate, so it only has one button. This button will make the timer:
  • Reset the current session when already counting down;
  • Switch to a different count-down period (25 (default), 45, 5 or 15 minutes);
  • Start a new session when stopped.

Display

The display I used is a 3-Wire LED Module from DFRobot.

Demonstration

Source code

22 May 2013

How to fix boot problems with Hynix Raspberry Pi

I fixed a way to make the new 512MB Model B Raspberry Pi with Hynix RAM work with images based on an older boot loader.


Just a Red LED

Many users just have a "Red LED" and no further activity when using some images on their 512MB Raspberry Pi. When the Red LED lits and the green flashes briefly, there could be a problem with the version of the boot loader you are using.

512MB model with Hynix RAM needs latest boot loader

Supposedly there are multiple versions of the 512MB Model B Raspberry Pi. I am having the lastest edition, with the new Hynix RAM. This might have advantages (newer is better?) but older boot loaders won't work on this one. Please also look at: http://www.raspberrypi.org/archives/3534

Because many 3rd party images are not based on the latest version of Raspbian (with the new boot loader), they won't work on these newer Raspberry Pi boards.

Is your Raspberry Pi working?

To determine whether your Pi is working in general, just make a "regular" latest version (2013-02-09-wheezy-raspbian in my case) SD card. See if your Pi starts as supposed to.

Yes? Let's migrate the boot loader

If your Raspberry Pi is working with the latest Raspbian, try the following steps:

Backup the Boot loader

If your Raspberry Pi is working OK with the above image, mount the SD card on your computer and backup the "bootcode.bin" and "start.elf" files.

Create your image

Make the image you want (I was working on a Ninjablocks SD card, with the image from http://wiki.ninjablocks.com/images#raspberry-pi).

Replace the boot loader

After creating the new image (that doesn't work, because of the wrong boot loader) replace the "bootcode.bin" and "start.elf" files with the ones from the Raspbian Wheezy backup.

That's it!

Now insert your SD Card in your Raspberry Pi, and it should work! At least, it did in my case :)