element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Blog Arduino XBee Project: Silent Laser Tripwire Doorbell
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: DaveYoung
  • Date Created: 6 Jun 2014 3:01 PM Date Created
  • Views 3187 views
  • Likes 8 likes
  • Comments 11 comments
  • sensors
  • projects
  • xbee
  • dyoung
  • arduino
Related
Recommended

Arduino XBee Project: Silent Laser Tripwire Doorbell

DaveYoung
DaveYoung
6 Jun 2014

Doorbells are the 20th century version of today's perpetually-interrupting cell phone. There you are, cooking a delicious dinner or reading a nice book when the doorbell rudely goes off in your ear. Sure, you're glad to see whoever is at the door, but interruptions that chime can be so obnoxious. Needless to say, I do not have a doorbell.image

 

The problem with the knocking system is that I usually can't hear when someone knocks from my lab. I depend on Penny the Dog to alert me when someone is at the door. Except Penny sleeps most of the day. And then there are the delivery people (UPS/FEDEX) who can't be bothered to knock, even if it is a next-day-early-AM shipment of parts from element14 that I am eagerly waiting for.

 

I decided that I'd create a project that solves all of my problems: a silent LED that flashes whenever someone approaches my door. It is based on a laser tripwire and will be able to run day or night, even in the bright Denver sun. And if the blinking LED is annoying, a simple button press disables the alert and resets the trigger.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Tripwire Design:

The laser tripwire is set up to be as simple as possible. A laser is reflected off of a mirror and back to a photoresistor which is one leg of a voltage divider. The complete schematic is attached below. The varying light intensity changes the output of the voltage divider, which can be read by an A/D. To make the 'target' for the laser easier to hit, a Fresnel lens is used in front of the light sensor like one would see with a PIR sensor.

 

imageWireless Link Design:

With the sensor defined, the rest of the wireless link must be considered. The XBee series 1 by Digi is a great solution to this problem, and there is a wonderful starter kit to get going. It is a wireless communication system that has an integrated A/D that can transmit the detected light level digitally. It is also a commonly used device and is one of the easiest ways to create a wireless link. Unfortunately, in order to use the standard XBee interface, the digital value is only presented on the receiving end by a PWM signal. This PWM signal is filtered which produces a DC amplitude level that can be read by an Arduino's A/D. While having to do an A/D conversion at the transmitter and again at the receiver is not ideal, it was a sacrifice made to prevent a custom implementation on the XBee.

To setup the XBee radios, I used their bloated-yet-functional (113MB) XCTU XBee setup utility and the XBee USB Adapter board that was included in the starter kit. Note that you may need to install some FTDI Virtual Com Port (VCP) drivers.

I followed two of Digi's examples in order to get the settings correct:

http://examples.digi.com/sensors/sensing-light-levels-with-a-photocell/

http://examples.digi.com/lights-motors-more/wireless-panel-meter/

The transmitter settings that I used were:

ATRE N/A

ATID 3001

ATMY 1

ATDH 0

ATDL 2

ATDo 2

ATIR 64

The receiver settings that I used were:

ATRE N/A

ATID 3001

ATMY 2

ATPo 2

ATIA 1

ATWR N/A

 

Arduino Design:image

Shields are possibly the biggest time saver that exists in the Arduino ecosystem. The XBee board is on 2mm pitch headers, and having some extra perf board to put the low pass filter and button on is super helpful. Arduino's wireless shield worked great for both challenges.

The filtered output from the receiving XBee is fed into an Arduino Leonardo for processing. The code is attached below, but the basic pseudo-code operation is:

Save the last sensor value

Read a new sensor value

If the new sensor value is greater than the past value by at least a threshold, detect a trip

Blink the LED and wait for a timer to expire or a button press

Loop back to the start

In order to make the tripwire system work at any light level, a simple comparator action wouldn't work. The threshold at night would need to be different from a daytime threshold. It would be possible to take an ambient light reading with a separate sensor and base the threshold on that, but a more elegant solution for this application would be to pay attention to the rate of light change. If the light changes by X amount within a very short period of time, a trip is registered. However if the light changes over a few seconds or minutes, it will not register a trip. Testing has shown this to work in pitch black as well as on a sunny day (although in the shade).

 

Mechanical Design:

With the electronics designed and code written, I had to put the transmitter in a project box to shield it from the elements. I found a simple enclosure, although I needed to remove the included metal plate. According to Digi's layout suggestions on page 9 of their manual, there are limitations on where metal can surround the area near the antenna. A hole for the lens, the laser, and the power supply were the only mechanical modifications required.

 

Problems that I encountered:

No project goes exactly to plan, so here are a few snags that I hope you'll be able to avoid:

  • The XBee software was more obnoxious than I expected for an entry level wireless protocol setup.
  • The power supply that I bought was so crappy and noisy that is was causing bad data to be sent. I had to add a 470uF electrolytic cap at the power input. A higher quality supply should be used.
  • I tried a getting started guide from parallax to try and verify that the hardware at least worked, but I found that the Arduino sketch didn't compile. I could have been missing something silly, but I don't have much patience for getting started guides that require dissection. So I decided to go to the source and follow Digi's getting started guide which isn't too far from what I needed for this project anyway. That worked great.
  • When uploading new firmware to the Arduino, the switch on the wireless XBee shield MUST be in 'USB' mode for it to work. Otherwise you'll get the following error: avrdude: stk500_getsync(): not in sync: resp=0x00
  • The unit only works in the shade, since direct sunlight washes out whatever the laser can produce.

 

And that's it! I now have a silent method of knowing when someone approaches my door. The next step will be to connect it to the cloud so I can set alerts to my phone when I'm away. Stay tuned!

 

Documentation Attached In .Zip File:

Laser Doorbell.sch: Schematic in EAGLE format

Laser Doorbell Schematic.pdf: Schematic in .pdf

Laser Doorbell BOM.xks: Bill of Materials

DY_Doorbell_Code.ino:  Source code for use with Arduino IDE

Attachments:
Laser Doorbell Design Files.zip
  • Sign in to reply

Top Comments

  • Robert Peter Oakes
    Robert Peter Oakes over 11 years ago in reply to DaveYoung +1
    And we like Lasers, I wish they were not so expensive on E14 though, hundreds of $$$ for a laser to go with this http://canada.newark.com/banner-engineering/qs186leq8/laser-sensor/dp/21H6111 , cant find…
  • DAB
    DAB over 11 years ago in reply to Robert Peter Oakes +1
    Hi Peter, Look for an old barcode scanner, preferably a base unit, like they have in the supermarkets. The one I picked up for one USD has a 5 mW red laser in it. At that power, you could easily illuminate…
  • modeduck
    modeduck over 7 years ago

    What an amazing detailed video-clip. Thank you for expanding my knowledge base. I really love it.

    David
    Writer of Best Doorbell

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 11 years ago in reply to Robert Peter Oakes

    Hi Peter,

     

    Look for an old barcode scanner, preferably a base  unit, like they have in the supermarkets.

    The one I picked up for one USD has a 5 mW red laser in it.  At that power, you could easily illuminate something at twenty meters.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • terrydark
    terrydark over 11 years ago

    Cheapest at Newark, as far as I can tell, is approx $59.  Adafruit stock one at $5.95, at https://www.adafruit.com/product/1054, but I am sure you could it cheaper if you looked at other sites.

     

    Terry

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DaveYoung
    DaveYoung over 11 years ago in reply to Robert Peter Oakes

    Yeah, I prefer Newark as well but I couldn't find reasonable lasers either. If you're defined to one supplier, then I can't imagine that the person writing the checks can complain about price...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Robert Peter Oakes
    Robert Peter Oakes over 11 years ago in reply to DaveYoung

    Meters, I'm constrained to what is available on Newark so hence the comment, some of the items do not make good reading so difficult to discern emitters from Sensors

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube