|
Thonny |
|
|
Microcontroller-RP2040 |
|
|
L298N Motor Driver |
|
|
DC Motor |
|
|
Wheel |
|
|
4 Wheel chassis kits |
|
|
Ultrasonic Sensor |
|
|
Jumper Wires |
|
|
Breadboard |
Medibot: A Medicine Delivery Robot for Healthcare Facilities
My project is on robotic system, MediBot, designed to transport medicines from one place to another in hospitals. As a biomedical engineering student, I am always passionate to work in the field of health sector. So I have decided to make this project which enhance the transport of medicine in more effective way. MediBot helps in timely transport of medicine which helps to reduce the workload of health workers and patients also get their medicines on scheduled time.
MediBot contains wheels which helps in movement and a compartment to store the medicines and transported from one place to another. It contains the ultrasonic sensor which helps to detect and avoid obstacles, ensuring smooth navigation. This features make the MediBot a reliable and efficient solution for improving medicine delivery process.
Theory of operation
1. Microcontroller RP2040: It controls how the MediBot operates,uses sensor data to safely move the robot through patient rooms or hospital hallways.
2. DC Motors & L298N Motor Driver: It provides controlled, smooth Medibot movement for delivering medical equipment or supplies,it also helps to change direction to avoid obstacles and ensure safe passage in busy or small areas.
3. Ultrasonic sensor: Helps to identify obstacles such as walls, people, or hospital furnishings.Avoid collisions while moving through changing locations.
4. Wheels and Chassis: Trays, equipment, or even small monitoring devices can be put on this platform,stable and long-lasting to avoid accidents and errors.
5. Power Supply: Powers the MediBot to operate autonomously for extended periods, suitable for tasks like supply delivery in large hospitals.
import machine import time from machine import Pin, PWM import utime # GPIO pins for motor driver MOTOR1_PIN1 = machine.Pin(2, machine.Pin.OUT) MOTOR1_PIN2 = machine.Pin(3, machine.Pin.OUT) MOTOR2_PIN1 = machine.Pin(14, machine.Pin.OUT) MOTOR2_PIN2 = machine.Pin(15, machine.Pin.OUT) # Ultrasonic sensor pins TRIG_PIN = machine.Pin(26, machine.Pin.OUT) # Trigger pin ECHO_PIN = machine.Pin(27, machine.Pin.IN) # Echo pin # Servo motor pin and PWM initialization SERVO_PIN = machine.Pin(13) # Use GPIO 13 for the servo motor pwm = PWM(SERVO_PIN) pwm.freq(50) # Servo motors usually use a frequency of 50Hz # Servo movement limits MID = 1500000 MIN = 1000000 MAX = 2000000 # Motor movement functions def move_forward(): MOTOR1_PIN1.high() MOTOR1_PIN2.low() MOTOR2_PIN1.high() MOTOR2_PIN2.low() def move_backward(): MOTOR1_PIN1.low() MOTOR1_PIN2.high() MOTOR2_PIN1.low() MOTOR2_PIN2.high() def turn_left(): MOTOR1_PIN1.low() MOTOR1_PIN2.high() MOTOR2_PIN1.high() MOTOR2_PIN2.low() def turn_right(): MOTOR1_PIN1.high() MOTOR1_PIN2.low() MOTOR2_PIN1.low() MOTOR2_PIN2.high() def stop_car(): MOTOR1_PIN1.low() MOTOR1_PIN2.low() MOTOR2_PIN1.low() MOTOR2_PIN2.low() # Function to measure distance using the ultrasonic sensor def measure_distance(): TRIG_PIN.low() time.sleep_us(2) TRIG_PIN.high() time.sleep_us(10) TRIG_PIN.low() # Measure the pulse duration duration = machine.time_pulse_us(ECHO_PIN, 1) # Calculate distance in cm distance = (duration / 2) / 29.1 # Using the speed of sound in air return distance # Function to set the servo position (angle) def set_servo_angle(angle): if angle == 0: pwm.duty_ns(MIN) # Servo at 0° position elif angle == 180: pwm.duty_ns(MAX) # Servo at 180° position else: # Mapping angle between 0 and 180 degrees to duty cycle duty = MIN + (angle / 180) * (MAX - MIN) pwm.duty_ns(int(duty)) # Function to scan the environment by rotating the ultrasonic sensor def scan_environment(): min_distance = 999 # Initialize with a large value # Scan the environment from 0° to 180° with SCAN_ANGLE increment for angle in range(0, 181, 30): set_servo_angle(angle) # Rotate the servo to the current angle time.sleep(0.3) # Wait for the sensor to stabilize distance = measure_distance() if distance < min_distance: min_distance = distance # Keep track of the minimum distance return min_distance # Main program while True: # Scan the environment and measure the closest distance distance = scan_environment() print("Minimum Distance:", distance, "cm") if distance < 10: # If the object is too close, stop stop_car() print("Too close! Stopping.") elif distance > 30: # If the object is far away, move forward move_forward() print("Following... Moving forward.") else: # If the object is within the follow range, stop stop_car() print("Ideal distance. Stopping.") # Small delay for stability time.sleep(0.2) # Adjusted for smoother operation

Medibot: A Medicine Delivery Robot for Healthcare Facilities
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.

Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW
ESP32-S3 4.3inch Capacitive Touch Display Development Board, 800×480, 5-point Touch, 32-bit LX7 Dual-core Processor
BUY NOW
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Rohit Sah
-
-
-
Modifying a Hotplate to a Reflow Solder Station
615 1 5 -
MPL3115A2 Barometric Pressure, Altitude, and Temperature Sensor
348 0 1 -
-
Nintendo 64DD Replacement Shell
318 0 1 -
V2 Commodore AMIGA USB-C Power Sink Delivery High Efficiency Supply Triple Output 5V ±12V OLED display ATARI compatible shark 100W
831 4 2 -
How to measure weight with Load Cell and HX711
587 0 3
Thanks for your feedback.
Done..