Home > Articles > Hardware > Upgrading & Repairing

  • Print
  • + Share This
This chapter is from the book

Project: Bluetooth Doorbell

Now you can take what you learned about XBees and apply it to a slightly more robust project: a wireless doorbell. Figure 4.7 shows the doorbell button, and Figure 4.8 shows the buzzer unit that is tucked away on a shelf inside.

Figure 4.7

FIGURE 4.7 The doorbell awaits visitors!

Figure 4.8

FIGURE 4.8 The buzzer unit sits discreetly on a shelf.

Sure, you might say, they make these already! You can buy a wireless doorbell in any hardware store. However, this one you make yourself! Even better, as you get more confident with Arduino, you can modify it to make it uniquely yours. For instance, what if your Arduino triggers a music player instead of a buzzer to let you know that someone has pressed the button?

The Button

The button you use in the button unit, shown in Figure 4.9, is kind of intriguing because it has six connectors: two sets of positive and negative terminals that close when the button is pressed—so you could have two circuits, both of which trip when the button is activated. The last two leads—the white lugs in the photo—are for powering the LED. Be sure to attach a resistor on the power lead so you don’t fry your LED inadvertently. I use a 330-ohm resistor in this project.

Figure 4.9

FIGURE 4.9 The button you use in the project has six connectors.

icon_01.jpg LED Terminals

icon_02.jpg LED Button

icon_03.jpg Switch Connectors (Two Located on Other Side, Too)

Instructions for Wiring Up the Doorbell

The project consists of two Arduinos equipped with XBee modules and breakout boards. One Arduino has a button, and the other has a buzzer to sound out to let you know someone is at your door. Let’s get started!

Button Unit

Let’s begin with the button unit (see Figure 4.10), which consists of the following components:

Figure 4.10

FIGURE 4.10 The button unit before the acrylic is added.

icon_a.jpg 9V battery

icon_b.jpg XBee module

icon_c.jpg Mini breadboard

icon_d.jpg Arduino Uno

icon_e.jpg Button

icon_f.jpg Perfboard

Now, assemble these parts together as shown in Figure 4.11, and you can follow along with these steps:

Figure 4.11

FIGURE 4.11 The button unit consists primarily of a button, an Arduino, and the wireless module.

  1. Plug in the XBee and its breakout board to a mini breadboard.
  2. Plug the XBee’s 5V to the 5V on the Arduino, its TX into RX, its RX into TX, and its GND pin to any free GND on the Arduino.
  3. Connect one of the button’s leads to pin 8 and the other to GND. (I use the breadboard to accommodate the GND leads coming from the button.)
  4. Solder a 330-ohm resistor and a jumper to the button’s LED’s power terminal, and connect the other end to the 3V3 port of the Arduino. The other terminal of the LED goes to GND.

Buzzer Unit

Next, connect the components that make up the buzzer unit, seen in Figure 4.12. These consist of the following:

Figure 4.12

FIGURE 4.12 The buzzer unit waiting to be closed up. The outer holes are for wall mounting.

icon_a.jpg Arduino Uno

icon_b.jpg Mini breadboard

icon_c.jpg XBee wireless module

icon_d.jpg Buzzer

Next, use Figure 4.13 as a guide for connecting the various parts:

Figure 4.13

FIGURE 4.13 The buzzer unit consists of an Arduino, XBee, and buzzer.

  1. Plug in the XBee and its breakout board into a mini breadboard.
  2. Plug in the XBee’s 5V to the 5V on the Arduino, its TX into RX, its RX into TX, and its GND pin to any free GND on the Arduino.
  3. Connect the buzzer’s leads to the breadboard as well, as shown in Figure 4.13. You can connect them directly to the Arduino if you want—if you go this route, connect the red wire to pin 8 and the black wire to any free GND.
  4. To power the buzzer unit, use an Arduino-compatible wall wart or a 9V battery pack.

Building the Doorbell Enclosures

You next need to build the two enclosures for this project. The outside enclosure (see Figure 4.14) is designed to resist the elements—I hesitate to call it “weatherproof”—whereas the inside enclosure is designed to look good.

Figure 4.14

FIGURE 4.14 The outside enclosure is made out of bent acrylic on a wooden back.

Button Unit Enclosure

The button unit is the module that is on the outside of the door—press the button to make the buzzer buzz! To make an enclosure, all you need is a box with a hole for the button, but I’ll show you how you can make one of your own. The one I made consists of a sheet of acrylic that I bent by heating it up, and then laying the flexible acrylic over a metal pipe to form a half-circle. I added the acrylic to a wooden back (refer to Figure 4.11) to finish the enclosure. Here are the steps:

  1. Laser-cut the top, bottom, and back out of quarter-inch medium-density fiberboard (MDF). If you don’t have access to a laser cutter, you can create a box out of pieces of wood, repurpose another container as an enclosure, or buy a commercial project enclosure.
  2. Laser-cut the front from 5mm acrylic. (If you want the design files I used to output the wooden backing as well as the acrylic front, you can find them at https://github.com/n1/Arduino-For-Beginners.)
  3. Glue the top and bottom wood pieces to the back wood piece. You might want to paint the wood!
  4. Attach the completed electronics as shown earlier in Figures 4.10 and 4.12. Use the #4-40 bolts for the Arduinos and hot glue for the buzzer, battery pack, and mini breadboards.

    If you aren’t using a laser cutter, you’ll need to drill mounting holes in the acrylic. You might want to mock it up using a sheet of paper first.

  5. Bend the acrylic front plate as described in the next section, “Bending Acrylic.”
  6. Attach the acrylic plate to the front so that the button can be pressed through the hole in the plastic.
  7. Install the unit outside your door of choice, and eagerly await your first visitor!

Bending Acrylic

For the outside button unit enclosure, you heat-bend acrylic (see Figure 4.15) to form a casing. This task is easy to learn because you don’t really need anything unusual or uncommon.

Figure 4.15

FIGURE 4.15 Bending acrylic is easy and gives a nice effect!

Acrylic (also known as Plexiglas) is also easy to heat and re-form. After it gets to the right temperature—not too hot or cool—the acrylic starts to bow and flex. When it gets a little hotter, it softens. That’s when you bend it how you want it, and let it cool into an awesome new shape!

You need three things to get started:

  • The acrylic to be bent—I suggest 1/8 inch, though you might have luck with the thicker stuff.
  • A form—This is the surface over which the hot acrylic will cool and harden. You want this close to the actual curve you want the plastic to hold. The easiest form of all is the edge of a table. I used a rounded form—a pipe—to form the acrylic face seen in Figure 4.7. If you go this route, you’ll need to find a form that matches the curve of the shape you’re looking for.
  • A source of heat—Heat guns (see Figure 4.16) and propane torches are common tools, though you can purchase commercial acrylic-heating strips (TAP Plastics has one for $80, P/N 169). Finally, you could heat up the plastic in an oven. This last technique is not for the faint of heart and you should definitely monitor the plastic closely so it doesn’t bubble or scorch.

    Figure 4.16

    FIGURE 4.16 Using a heat gun to soften acrylic.

    Although you could conceivably use any heat-resistant surface to form your acrylic—or even build your own out of pieces of wood—in some respects, using the edge of the table is an easy choice because it bends the plastic perfectly, using gravity and the table’s surface to make a fairly perfect 90-degree bend. To bend plastic using the “edge of the table” technique, follow these steps:

  1. As shown in Figure 4.17, position the acrylic so the edge of the table is right where you want the plastic to bend. You’ll definitely want to weigh it down so it doesn’t move.

    Figure 4.17

    FIGURE 4.17 As the acrylic heats up, it starts to bend.

    When it gets hot enough, gravity starts pulling the soft acrylic down, as shown in Figure 4.17.

  2. Position the acrylic how you want it to look—and work quickly because after it cools, it becomes just as brittle as it was before. Don’t try to re-bend it without applying more heat!

Buzzer Unit Enclosure

The buzzer unit doesn’t use plastic, because who wants plastic in their home? Instead, you can use a simple arrangement of wooden panels separated by bolts. I laser-cut two pieces of wood, one bigger than the other. (I ended up hand-drilling four additional holes, as shown in Figure 4.18, after changing my mind on how to proceed.)

Figure 4.18

FIGURE 4.18 I used laser-cut wood for the buzzer unit’s enclosure.

To connect the two pieces I used brass bolts, #10-24 and 2.5" long, with brass washers and nuts. This enclosure is considerably easier to do than the other enclosure and it looks great!

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020