Introduction: Smart Medicine Dispenser
The older people generally takes a lot of medicines in a day. Their life becomes even more difficult when they forget to take the medicines in their prescribed time. The Smart Medicine Dispenser aids in eliminating this issue. It has some slots in which where a person can place medicines. There are separate dispensers for each medicine. The medicine dispenser is linked with a mobile application. The user has to type in the time interval at which the medicine has to be dispensed for each dispenser. The dispenser will automatically dispense the medicine at the correct time by rotating a servo motor. It will also sound a buzzer after dispensing the medicine, so that the patient knows that his medicines are dispensed. Also, when only 2 medicines are left, a Red LED will glow indicating that only two medicines are left and the patient needs to order more medicines.
Step 1: Components Required
- Intel Galileo Gen 1 Board x 1
- Power Cord x 1
- USB cable x 1
- 180 Degrees Servo Motor x 2
- HC-05 Bluetooth Module x 1
- Breadboard x 1
- LED Red x 1
- 470Ω Resistor x 1
- Buzzer x 1
- Connecting Wires (Male to Male) x 20
- Connecting Wires (Male to Female) x 20
Step 2: Interfacing Servo Motor With Intel Galileo
A servo motor is a rotary actuator that allows for precise control of angular position. It consists of a motor coupled to a sensor for position feedback. By varying the pulse width of the output voltage to a servo, you can move a servo to a specific position.
Servo motor has three Terminals
- Connect the signal wire (orange) of the Servo Motor 1 to Digital PWM Pin 3.
- Connect the signal wire (orange) of the Servo Motor 2 to Digital PWM Pin 5.
- Connect the GND wire (brown ) of the Servo Motors to GND of the Intel Galileo.
- Connect the VCC wire (red) of the Servo Motors to the 5V pin of the Intel Galileo.
- The connections of the Servo Motors are be done using Male to Male connecting wires.
Step 3: Interfacing Bluetooth With Intel Galileo
HC-05 Bluetooth Module:
It is a wireless communication module that transmits data serially. Out of the six pins that comes with general break out board, only 4 pins are used. VCC pin of HC-05 is connected to +5V while GND pin is connected to GND of the microcontroller. RX pin refers to receiver and TX pin refers to transmitter. These pins are used for communication between the Bluetooth and the microcontroller.
Note: HC-06 Bluetooth modules can also be used for this project instead of HC-05.
- Connect an M-F jumper wire from the VCC pin of the HC-05 to the row where +5V is supplied.
- Connect an M-F jumper wire from the GND pin of the HC-05 to the row where GND is supplied.
- Connect an M-F jumper wire from the TX pin of the HC-05 to pin 0 of the Intel Galileo.
- Connect an M-F jumper wire from the RX pin of the HC-05 to pin 1 of the Intel Galileo.
Step 4: Interfacing Buzzer With Intel Galileo
For interfacing buzzer with Intel Galileo, we will use something known as tone(). The tone function generates a square wave of the specified frequency on a pin during the time of duration field (optional).
The syntax of tone function is: tone (pin, frequency, duration);
The parameters are:
1. pin: the pin on which to generate the tone
2. frequency: the frequency of the tone in hertz - unsigned int
3. duration: the duration of the tone in milliseconds (optional) - unsigned long
- Connect the negative terminal of the buzzer to the row where GND is supplied.
- Connect the Positive terminal of the buzzer to the PWM Pin 6 of the Intel Galileo Board.
Step 5: Interfacing the LED With Intel Galileo
LED is Light emitting diode. The main function of diode is that it allows the current to flow in one direction only.
The LED has two terminals: Positive Terminal: The longer leg of the LED is positive Negative Terminal: The shorter leg of the LED is negative
- Take one LED and place it anywhere on the breadboard as shown in the circuit above.
- Take one Male to Male connecting wire and connect one end of the wire to the Positive terminal of the LED.
- Connect the other terminal of the Male to Male connecting wire to the Digital Pin 5 of the Intel Galileo Board.
- Take one 470Ω resistor and connect its one terminal to the negative terminal of the LED.
- Connect the other terminal of the 470Ω resistor to any hole on the breadboard.
- Take one Male to Male connecting wire and connect one end of the wire to the GND Pin on the Breadboard.
- Connect the other terminal of the wire to the other terminal of the resistor.
Step 6: Upload the Arduino Sketch
Step 7: Install the Android App
Step 8: Reference Images for Construction
We have a be nice policy.
Please be positive and constructive.