Skip to main content

ARDUINO BASED BLUETOOTH DOOR BELL

Bluetooth doorbell is an advance doorbell which shows your image to the person standing at another side of this bell. This doorbell is made 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. This is very useful devices for home use. Left side of figure 1 shows the doorbell button, and right side of figure 1 shows the buzzer unit that is tucked away on a shelf inside.
Figure 1(a) The doorbell awaits visitors! (b) The buzzer unit sits discreetly on a shelf.

Parts Required:


In this project, one Arduino waits for a button press, while the other one sets off a buzzer when it detects that the button has been pressed. 
  • 2 Arduino Unos
  • 2 XBee wireless modules (Adafruit P/N 128)
  • 2 Adafruit XBee breakout boards (Adafruit P/N 126)
  • 2 mini breadboards (these are really small breadboards the sign of a postage stamp, Adafruit P/N 65)
  • Button (SparkFun P/N COM-10443)
  • A 330-ohm resistor
  • Buzzer (Jameco P/N 1956776)
  • Jumpers
  • 9v battery clip (Jameco P/N 105794)
  • 9v connector with barrel plug (Adafruit P/N 80)
  • 1/4-inch MDF for enclosure backing and sides
  • 5mm acrylic for enclosure front
  • 1-inch #4-40 bolts
  • Hot glue gunThe
1)   The Button 

The first part of this project is button. The button you use in the button unit, shown in Figure 2, 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 2: The button you use in the project has six connectors.
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.

Button Unit


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

A. 9V battery
B. XBee module
C. Mini breadboard
D. Arduino Uno
E. Button
F. Perfboard
Figure 3: The button unit before the acrylic is added.
Now, assemble these parts together as shown in Figure 4, and you can follow along with these steps:
Figure 4: 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. 

1) Buzzer Unit 


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

A. Arduino Uno
B. Mini breadboard
C. XBee wireless module
D. Buzzer
Figure 5: The buzzer unit waiting to be closed up. The outer holes are for wall mounting.
Next, use Figure 6 as a guide for connecting the various parts:
1. Plug in the XBee and its breakout board into a mini breadboard.
Figure 6: The buzzer unit consists of an Arduino, XBee, and buzzer.
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 6. 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 7) is designed to resist the elements.
Figure 7: 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) 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. 
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. 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 8) to form a casing. This task is easy to learn because you don’t really need anything unusual or uncommon.
Figure 8: 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. 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 9) 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 9: 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 10, 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 10: 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 10. 

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 11, after changing my mind on how to proceed.)
Figure 11: 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!

Wireless Doorbell Code

Upload the following code to your Arduinos.

Button Unit Code

The Button Unit sketch consists of a loop that waits for the button to be pressed, then transmits a wireless alert.

#include <Wire.h>
const int buttonPin = 8;
int buttonState = 0;
void setup()
{
Serial.begin(9600);
pinMode(buttonPin, INPUT_PULLUP);
}
void loop() {
if (Serial.available() >= 2)
{
char start = Serial.read();
if (start != ‘*’)
{
return;
}
char cmd = Serial.read();
}
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
Serial.write(‘*’);
Serial.write(1);
}
else {
Serial.write(‘*’);
Serial.write(0);
}
delay(50); //limit how fast we update
}

Buzzer Unit Code

The Buzzer Unit code is similarly plain. The loop monitors serial traffic, then sounds the buzzer when it detects the command from the Button Unit.

#include <Wire.h>
const int buzzerPin = 13;
void setup()
{
Serial.begin(9600);
pinMode(buzzerPin, OUTPUT);
}
void process_incoming_command(char cmd)
{
int speed = 0;
switch (cmd)
{
case 1:
digitalWrite(buzzerPin, LOW);
break;
case 0:
digitalWrite(buzzerPin, HIGH);
break;
}
}
void loop() {
if (Serial.available() >= 2)
{
char start = Serial.read();
if (start != ‘*’)
{
return;
}
char cmd = Serial.read();
process_incoming_command(cmd);
}
delay(50); //limit how fast we update
}

Download Project Code Click Here

Comments

Popular posts from this blog

PRIMARY SECONDARY AND TERTIARY FREQUENCY CONTROL IN POWER SYSTEMS

Primary, Secondary and Tertiary Frequency Control in Power Systems Author: Engr. Aneel Kumar Keywords: frequency control, primary frequency control, automatic generation control (AGC), tertiary control, load-frequency control, grid stability. Frequency control keeps the power grid stable by balancing generation and load. When generation and demand drift apart, system frequency moves away from its nominal value (50 or 60 Hz). Grids rely on three hierarchical control layers — Primary , Secondary (AGC), and Tertiary — to arrest frequency deviation, restore the set-point and optimize generation dispatch. Related: Power System Stability — causes & mitigation Overview of primary, secondary and tertiary frequency control in power systems. ⚡ Primary Frequency Control (Droop Control) Primary control is a fast, local response implemented by generator governors (dro...

Breaker Schemes in Substations

Breaker Schemes in Substations — Types, Design, Advantages, Disadvantages, and Comparison Author: Engr. Aneel Kumar Figure 1: Infographic overview of breaker schemes commonly used in substations. Introduction The breaker scheme or busbar arrangement in a substation defines how incoming feeders, outgoing feeders, and power transformers are connected to the bus. The choice of scheme has a direct impact on system reliability, maintainability, safety, and cost . A simple bus scheme is economical but vulnerable to outages, while advanced schemes such as breaker-and-a-half or double-bus/double-breaker provide very high reliability but at much higher cost and design complexity. Engineers select breaker schemes considering fault tolerance, maintenance needs, space requirements, expansion possibilities, protection coordination, and capital investment . Below, we explain eac...

SYMMETRICAL COMPONENT ANALYSIS

Unbalanced three phase systems can be split into three balanced components, namely Positive Sequence (balanced and having the same phase sequence as the unbalanced supply), Negative Sequence (balanced and having the opposite phase sequence to the unbalanced supply) and Zero Sequence (balanced but having the same phase and hence no phase sequence). These are known as the Symmetrical Components or the Sequence Components and are shown in figure 2.10. The phase components are the addition of the symmetrical components and can be written as follows.  a = a 1 + a 2 + a 0 b = b 1 + b 2 + b 0 c = c 1 + c 2 + c 0 The unknown unbalanced system has three unknown magnitudes and three unknown angles with respect to the reference direction. Similarly, the combination of the 3 sequence components will also have three unknown magnitudes and three unknown angles with respect to the reference direction. Thus the original unbalanced system effectively has 3 complex unknown quan...

TYPES OF ELECTRIC LOADS

Devices that are connected to the power system are referred to as electrical loads. Toasters, refrigerators, bug zappers, and so on are considered electrical loads. There are three types of electrical loads. They vary according to their leading or lagging time relationship between voltage and current. The three load types are resistive, inductive, and capacitive. Each type has specific characteristics that make them unique. Understanding the differences between these load types will help explain how power systems can operate efficiently. Power system engineers, system operators, maintenance personnel, and others try to maximize system efficiency on a continuous basis by having a good understanding of the three types of loads. They understand how having them work together can minimize system losses, provide additional equipment capacity, and maximize system reliability. The three different types of load are summarized below. 1) RESISTIVE LOAD: The resistance in a wire (i.e., cond...

SOLIDLY GROUNDED NEUTRAL SYSTEMS

Solidly grounded systems are usually used in low voltage applications at 600 volts or less. In solidly grounded system, the neutral point is connected to earth. Solidly Neutral Grounding slightly reduces the problem of transient over voltages found on the ungrounded system and provided path for the ground fault current is in the range of 25 to 100% of the system three phase fault current.. However, if the reactance of the generator or transformer is too great, the problem of transient over voltages will not be solved. While solidly grounded systems are an improvement over ungrounded systems, and speed up the location of faults, they lack the current limiting ability of resistance grounding and the extra protection this provides. To maintain systems health and safe, Transformer neutral is grounded and grounding conductor must be extend from the source to the furthest point of the system within the same raceway or conduit. Its purpose is to maintain very low impedance to ground faults so...

ESSENTIAL ELEMENTS OF DIESEL POWER PLANT

FUEL SUPPLY SYSTEM OF DIESEL POWER PLANT It consists of storage tank, strainers, fuel transfer pump and all day fuel tanks. The fuel oil is supplied at the plant site by rail or road. The oil is stored in the storage tank. From the storage tank, oil is pumped to smaller all day tank at daily or short intervals. From this tank, fuel oil is passed through strainers to remove suspended impurities. The clean oil is injected into the engine by fuel injection pump. AIR INTAKE SYSTEM OF DIESEL POWER PLANT This system supplies necessary air to the engine for fuel combustion. It consists of pipes for the supply of fresh air to the engine manifold. Filters are provided to remove dust particles from air which may act as abrasive in the engine cylinder. Because a diesel engine requires close tolerances to achieve its compression ratio, and because most diesel engines are either turbocharged or supercharged, the air entering the engine must be clean, free of debris, and as cool as possible. ...

ADVANTAGES AND DISADVANTAGES OF CORONA EFFECT IN TRANSMISSION LINES | ELECTRICAL ENGINEERING GUIDE

Advantages and Disadvantages of Corona Effect in Power Systems In high-voltage overhead transmission lines , the corona effect plays a critical role in system performance. Corona occurs when the air around a conductor becomes ionized due to high electric stress. While often seen as a drawback because of power losses and interference , it also provides certain engineering benefits . This article explains the advantages and disadvantages of corona effect in detail, with examples relevant to modern electrical power systems. ✅ Advantages of Corona Effect Increase in Virtual Conductor Diameter Due to corona formation, the surrounding air becomes partially conductive, increasing the virtual diameter of the conductor. This reduces electrostatic stress between conductors and minimizes insulation breakdown risks. Related Reading: Electrostatic Fields in High Voltage Engineering Reduction of Transient Surges Corona acts like a natural cushion for sudden ...