buzzer_clicker
Cover
29 Steps
0 I Made It!
1

This "How To" is a way for anyone who is visually impaired and who cannot read brail to tell the difference between their medications. The first step would be to download the Arduino software, so that you can program the Arduino UNO micro-controller to the specifications. Link: https://www.arduino.cc/en/Main/Software

2

From there you need to input the code onto a sketch in the Arduino system. This is the code: #include "pitches.h" const int threshold = 10; // minimum reading of the sensors that generates a note // notes to play, corresponding to the 3 sensors: int notes[] = { NOTE_A4, NOTE_B4, NOTE_C3 }; void setup() { Serial.begin(9600); pinMode(2, INPUT_PULLUP); Serial.begin(9600); pinMode(3, INPUT_PULLUP); Serial.begin(9600); pinMode(4, INPUT_PULLUP); } void loop() { // get a sensor reading: int sensorReading = digitalRead(2); // if the sensor is pressed hard enough: if (sensorReading == 0) { // play the note corresponding to this sensor: tone(8, NOTE_B4, 20); } sensorReading = digitalRead(3); if (sensorReading == 0) { tone(8, NOTE_A4, 20); } sensorReading = digitalRead(4); if (sensorReading == 0) { tone(8, NOTE_C3, 20); } } You'll also need an accompanying file called "pitches.h"this is it: /************************************************* * Public Constants *************************************************/ #define NOTE_B0 31 #define NOTE_C1 33 #define NOTE_CS1 35 #define NOTE_D1 37 #define NOTE_DS1 39 #define NOTE_E1 41 #define NOTE_F1 44 #define NOTE_FS1 46 #define NOTE_G1 49 #define NOTE_GS1 52 #define NOTE_A1 55 #define NOTE_AS1 58 #define NOTE_B1 62 #define NOTE_C2 65 #define NOTE_CS2 69 #define NOTE_D2 73 #define NOTE_DS2 78 #define NOTE_E2 82 #define NOTE_F2 87 #define NOTE_FS2 93 #define NOTE_G2 98 #define NOTE_GS2 104 #define NOTE_A2 110 #define NOTE_AS2 117 #define NOTE_B2 123 #define NOTE_C3 131 #define NOTE_CS3 139 #define NOTE_D3 147 #define NOTE_DS3 156 #define NOTE_E3 165 #define NOTE_F3 175 #define NOTE_FS3 185 #define NOTE_G3 196 #define NOTE_GS3 208 #define NOTE_A3 220 #define NOTE_AS3 233 #define NOTE_B3 247 #define NOTE_C4 262 #define NOTE_CS4 277 #define NOTE_D4 294 #define NOTE_DS4 311 #define NOTE_E4 330 #define NOTE_F4 349 #define NOTE_FS4 370 #define NOTE_G4 392 #define NOTE_GS4 415 #define NOTE_A4 440 #define NOTE_AS4 466 #define NOTE_B4 494 #define NOTE_C5 523 #define NOTE_CS5 554 #define NOTE_D5 587 #define NOTE_DS5 622 #define NOTE_E5 659 #define NOTE_F5 698 #define NOTE_FS5 740 #define NOTE_G5 784 #define NOTE_GS5 831 #define NOTE_A5 880 #define NOTE_AS5 932 #define NOTE_B5 988 #define NOTE_C6 1047 #define NOTE_CS6 1109 #define NOTE_D6 1175 #define NOTE_DS6 1245 #define NOTE_E6 1319 #define NOTE_F6 1397 #define NOTE_FS6 1480 #define NOTE_G6 1568 #define NOTE_GS6 1661 #define NOTE_A6 1760 #define NOTE_AS6 1865 #define NOTE_B6 1976 #define NOTE_C7 2093 #define NOTE_CS7 2217 #define NOTE_D7 2349 #define NOTE_DS7 2489 #define NOTE_E7 2637 #define NOTE_F7 2794 #define NOTE_FS7 2960 #define NOTE_G7 3136 #define NOTE_GS7 3322 #define NOTE_A7 3520 #define NOTE_AS7 3729 #define NOTE_B7 3951 #define NOTE_C8 4186 #define NOTE_CS8 4435 #define NOTE_D8 4699 #define NOTE_DS8 4978

3

The Arduino sketch will have the following on the page; "void setup" and "void loop", following with "{ }". All of that can be deleted and be replaced by the code given before. The "pitches.h" file needs to be pasted on a new tab within your sketch. In the top right hand corner of the screen you will see what looks like an arrow pointing downward. Click on it and select "new tab". Within this new tab you can copy and paste the "pitches.h" file onto that new tab.

4

Once the coding has been set you can leave it there until the wiring is done.

5

This step uses 2 jumper cables. On the Arduino UNO board there are 2 pins called GND and 5V. One of the ends of the first jumper cable would placed in the pin called GND. Next to that place one end of the second jumper cable in pin 5V. Connect the remaining end of the GND jumper cable to the blue negative power side and the 5V cable to the red positive power side on the breadboard.

6
step

Add one jumper cable to GND and another to 5V.

7
8

For this step you’ll need another jumper cable. Now that you have established GND on the blue negative power side, you’ll need to replicate this on the opposite side of the breadboard so the power is mirrored. Take one end of the cable and insert it into a pin on the same side of the blue negative power. Then place the other end of the cable to the opposite side of the breadboard. Repeat this same process with 5V. Take another cable insert it at the end of the breadboard on the red positive power side and attach the other end to the mirroring

9
10

Using another jumper cable, place one end of it to digital 8 pin on the Arduino UNO board and then connect the other end to the breadboard.

11
12
13

Now you can attach your buzzer. Your buzzer should have two wires. One of these wires should be place on the red positive power side of the breadboard. The other should be placed above and in the same column as the digital 8 pin.

14
15

Next you need clickers and/or switches. You also need an EXTECH instrument multimeter. You will need to test your switches to know how they must be wired so they sound when they are pressed.

16
step

This is the setting you'll need to test your switches

17
step

Essentially, you want the switch to sound only when pressed. If you touch the needles of the multimeter to the leads of the switch and it sounds without it being triggered, you need to change the mix of leads being used together so they only sound when being stimulated.

18

Once you test your switches and record which combinations work you can start to attach wire on the leads.

19

Before you attach your hook up wires you must cut them to a desired length; approximately an inch to an inch and a half. Once the wire is cut you need the wire stripper to remove the casing on the tips of the wire to expose the stranded wire.

20
step

With the tips exposed, wrap them around the leads of the switches.

21

To make your switches work, link them to a jumper wire which is then also tied to the Arduino UNO board.

22
step

The jumper wires in the picture are attached to digital 2, 3, and 4. They are then also linked to the breadboard.

23
step

This is what it should look like so far.

24
step

Each switch will have 2 wires that branch out from it. One wire connects to the blue negative side of the breadboard while the other wire connects to a pin underneath the jumper wire. As seen in the picture, each switch has it's own jumper wire to connect to.

25

Once the wires from the switches are attached you can now be creative and construct a box to contain the breadboard, the Arduino UNO, and the jumper and hook up wires.

26
step

A cardboard box can be used to contain the wiring inside while the switches and pill container can be on the outside. Using a razor blade can be helpful to be more precise in cutting out slots in which to fit the switches and pill organizer.

27
28
step

To power your device you need to connect it to your computer. Use a USB type A cord that ends with a USB type B. If the Arduino UNO would be kept inside the box you would need to make a cutout so the cord can be connected the Arduino on the inside and be hooked up to your computer on the outside.

29

Now that the wiring is complete and your box is constructed, you can upload the code onto the Arduino UNO micro-controller using the USB type A cord. (The upload button is located at the top left hand corner. It should look like an arrow pointing to the right)