Introduction: Getting George's Attention

George

For better quality images of every picture included in this document go here ( http://tinyurl.com/orrwbc9 ).

Not too long ago our friend George asked us for some help with running his hotel. It seems many of his guests don’t ring the desk bell whenever they need George and this causes the guests to get frustrated. The challenge would come from where George lives; that being an island not in the U.S. Transportation of materials can be rather slow. Cost in both material and power to keep it running would have to also be considered as George runs his hotel from a generator. Then there’s also the problem that George isn’t always near the front desk; he may be helping another guest in a completely different floor. So our team of tech-savvy individuals had the idea to build George a rudimentary beeper. This beeper would light up if and when a guest stands in anywhere near the front desk. It would be small enough to carry and require a small amount of electricity from a disposable or rechargeable battery; something George seems to have an abundance on his island. The device is simple enough to build but can be rather difficult when it comes to programming (see Pic# 1 for the prototype of the device).

Getting into detail about the device we decided to build a pressure plate connected to an Arduino. When a guest steps onto the plate, disguised as a welcome mat of some sorts, they will complete a circuit and allow the Arduino to send a small message to another Arduino carried by George. If George’s Arduino receives a message a bright LED will begin to shine(see pic#2). If you’ve ever worked with Arduinos you might know that these specific models don’t come with wireless capabilities from the get-go. That’s where a radio frequency, or rf, transmitter and receiver come to play (see pic# 3 for rf receiver). To build this device you’ll need a few things.

Bill of Materials

(For an extended Bill of Materials in Excel and info on where to buy and cost, click here: http://tinyurl.com/lmaryk9 )

2x Arduino Uno’s (Pic# 4. These will be the devices that communicate with the RF transmitter and receiver)

1x dance pad or any old pad that registers pressure (Pic# 5. We built a simple pad out of cardboard and aluminum foil so if you’re in a pinch)

1x LED of any color (Pic# 6. Preferably any easily noticeable color such as red or blue)

1x spool of 22 AWG wire (Pic# 7. You won’t be needing much so if you find some strands of wire odds are that’ll be enough)

1x 10k Ohm resistor (Pic# 8. This was used in the device as a pull-down resistor to make sure we received an accurate signal from the pressure pad)

1x 250~350 Ohm resistor (Pic#9. This will protect the LED from blowing up)

1~2x Arduino enclosures (Pic# 10. Or simply any box that might fit an Arduino. A regular Altoids tin will work just fine although you will have to drill holes into either option)

1x pair of RF transmitter and receiver (Refer to Pic# 3. This is what’s going to allow us to communicate with both Arduinos wirelessly)

Optional--- 1x Perforated board

(Pic# 11. This is only used in case you are planning to reuse the components at any time. Soldering the leads to the perf board makes for an easier removal process)

You will of course need a few tools such as (pictures of tools can be found at the top):

(Pics# 12-16 in order)

a soldering iron

solder

wire strippers

a multimeter

some copper tape

The Schematics

Pic# 18 is for connecting the first Arduino to the pressure plate and rf transmitter. For a bigger and better quality picture go here ( http://tinyurl.com/n48xoe5 ).

Pic# 17 illustrates the connections needed to be made with the second Arduino board and the rf receiver. Again, for a bigger and better quality picture go here (http://tinyurl.com/pa9jrvl).

The Steps

Let's make the Arduino receiver first, just to get into the groove of things before tackling the big stuff. If you’re using a perf board then the first step to connecting the rf receiver to the first Arduino will be easy. It would look something like Pic# 19.

To increase the range of the receiver you will need to solder a small spool of wire onto the on-board antenna(Pic# 20). On the side with the copper coil will be a small opening, this is where that wire spool will go. Refer to Pic# 3 for pin layout. Solder either data pin to the Arduino’s A0 slot. Make sure it’s the A0 slot as working with small components can result in accidental wiring up of leads that shouldn’t be together. Connect the VCC, or simply voltage in, pin of the receiver to the 3.3v out slot of the Arduino and not the 5v out slot. Make sure to take your time soldering as to not drip solder onto any other parts. Lastly, for the receiver, solder the ground lead, labeled as GND, to any of the arduino’s ground slots.

The next step is to connect the LED you will be using and the 250~350 Ohm resistor to any open slot labeled a digital pin. With this model of the Arduino the digital pins are all on the right side. Do keep track of which pin you hooked up the resistor to as that will become very important in coding the Arduino; if you are unsure which slot to use just go with digital pin 8. Afterwards, connect the battery supply to the Arduino at Voltage in and to the LED. We recommend using a 9v battery but anything above 5v will do. Next comes programming the Arduino board to read any signal the receiver catches. Plug the Arduino into a computer using the cable that came with it and download the Arduino IDE software from here ( http://www.arduino.cc/en/main/Software ). Then open the software, install it by following the on-screen instructions and starting up the now installed program. Go to file on the left hand corner and select new. Anything after 2 "//" is unnecessary code that you can erase. Its only purpose is to elaborate on what the code is actually doing. Copy and paste this code into the program:(picture for this is Pic# 21.)

#define readPin A0

#define ledPin 8 //change this 8 to any number you used to connect the LED

int data = 0;

const int numReadings = 10;

int readings[numReadings];

int index = 0;

int total = 0;

int average = 0;

void setup(){

Serial.begin(9600);

pinMode(ledPin, OUTPUT);

pinMode(readPin, INPUT);

pinMode(9, OUTPUT);

for (int thisReading = 0; thisReading < numReadings; thisReading++)

readings[thisReading] = 0;

}

void loop () {

// subtract the last reading:

total= total - readings[index];

// read from the sensor:

readings[index] = analogRead(readPin);

// add the reading to the total:

total= total + readings[index];

// advance to the next position in the array:

index = index + 1;

// if we're at the end of the array...

if (index >= numReadings)

// ...wrap around to the beginning:

index = 0;

// calculate the average:

average = total / numReadings;

// send it to the computer as ASCII digits

Serial.println(average);

if (average < 375 ){

digitalWrite(ledPin, HIGH);

digitalWrite(9,HIGH);

}

else{

digitalWrite(ledPin, LOW);

digitalWrite(9,LOW);

}

delay(100);

}

Then click the upload button and wait for the Arduino to be programmed (Pic# 22). You can download a finished file and simply choose to upload that to the Arduino here ( http://tinyurl.com/kv6shpf ) or at GitHub here ( https://github.com/jreed2/Getting-George-s-Attention/tree/master ). Check that every solder point is making a connection by using a multimeter in the continuity setting. If all solder joints pass current proceed to the next step, if not solder the connection again. Next, place the Arduino board, now connected to a receiver and LED, with a battery hooked up in the Voltage in, seen as Vin, and one of the ground slots of the Arduino, into a small box or enclosure. Make sure to drill two small holes for the antenna to pop out of and for the LED.

Now comes the last part of building the beeper. To begin, follow the schematic for the transmitter, the one that includes the pressure pad (Pic# 18). Solder the data pin to the digital 9 slot of the Arduino (Pic# 23). Make sure to check that solder hasn’t fallen to any other pins, this might interfere with the sending of signals. Connect the rest of the pins according to the schematic, leaving enough length of wire to be able to place the pressure pad under a mat while still being able to connect to the Arduino board behind the front desk. For the pressure pad we used it was simple enough to connect the leads of the dance pad to the Arduino . We soldered the pad lead to the Arduino by way of a wire (Pic# 16). We then programmed the Arduino with this code:(Pic# 24)

const int digitalInPin = 8;

const int digitalOutPin = 9;

int sensorValue = 0;

int outputValue = 0;

void setup (){

Serial.begin(9600);

pinMode(digitalInPin,INPUT);

pinMode(digitalOutPin, OUTPUT);

pinMode(13,OUTPUT);

}

void loop (){

sensorValue=digitalRead(digitalInPin);

Serial.println(sensorValue);

if(sensorValue==HIGH){

digitalWrite(digitalOutPin, HIGH);

Serial.println("sending High");

pinMode(13,LOW);

}

else{

digitalWrite(digitalOutPin, LOW);

Serial.println("sending Low");

pinMode(13,HIGH);

}

delay(100);

}

You can download and upload this code from here ( http://tinyurl.com/prxuda5 ) or here ( https://github.com/jreed2/Getting-George-s-Attention/tree/master ). This code makes it possible for the Arduino to read if anyone is standing on the pressure pad. Make sure to supply power either in the form of a battery or having the Arduino connected to a computer. After this step you’re done. Place the pressure pad under a welcome mat and carry the other Arduino with you to be notified if anyone needs assistance.

Closing Thought

Finishing this project gave us insight in what it takes to transmit data wirelessly. The rf transmitter and receiver proved difficult to program as the group had very little knowledge in programming languages. New concepts and modifications to the overall projects such as ever changing schematics to allow for more additions proved a very high wall to overcome. If you consider creating a simple beeper, such as was instructed in this project, take the time to fully understand radio frequency and its advantages alongside its disadvantages. When building our own pressure pad we also encountered some minor complications when it came to receiving a stable signal. But don't let that stop you; if you can imagine you can probably build it.

Comments

author
seamster (author)2015-05-04

Nice!

About This Instructable

92views

1favorite

License:

More by jreed28:Getting George's Attention
Add instructable to: