---
# System prepended metadata

title: Bed Transportation Assistance Device

---

# Bed Transportation Assistance Device
## Brief Introduction
NTUH faces high patient transport needs, prompting the hospital to authorize a company to recruit dozens of disadvantaged individuals as transport crew. These porters might have to maneuver hospital beds and equipment weighing over 300 kilograms in total, a task that's notably burdensome and challenging.

In response, the company tasks NTU with designing a system to support the transport team in their duties.

## Primary challenges involved in patient transportation
1. Significant physical exertion due to the weight involved
2. Lengthy distances required for transportation across buildings
3. Inclines and slopes posing added difficulty
4. High energy expenditure and repetition
5. Increasing labor salary.

## Existing Example
[Arjo IndiGo](https://www.arjo.com/int/products/medical-beds/hospital-beds/indigo/)
![](https://i.imgur.com/xtMners.jpg)



---
## Working Environment
1. Indoor
2. Long distance transporting between buildings, up to 500-meter walk one way
![](https://i.imgur.com/WWZ0Y1V.jpg)
3. Moving up and down slopes up to 15 degrees
![](https://i.imgur.com/QhbnzOb.png)

## Features

**Simple operation**
* Can be pushed or pulled from anywhere around the bed.
* Easy or even automatic assemble to and dismount from bed.
* Simply activate and deactivate by lifting and pushing the pedal.

**Automatic slope detection**
* Provide extra power assistance on inclines.
* Provide extra brake assistance on declines.

**Universal application**
* Fits multiple models of hospital beds.

**Convenience**
* Lightweight for carrying.
* Rechargeable.

**Safety**
* Maximum speed of average human walking pace of 5 km/h. (Conditionally increase thee limit to 8 km/s)
* Emergency stop switches on the side of control panel
* Grip detection
* Trap and contact detection
* Water ingress protection for regular wet cleaning.
* Clear on/off light indicator.

**Fast and seamless integration**
* Minimum requirement of training.

**Adjustable**
* Electrical fixture height
* Manual fixture width
* Speed limit

## Specifications
### Required
|               Spec               | Description |
|:--------------------------------:|:-----------:|
|          Li-ion battery          |             |
| Full battery achievable distance |   >5000m    |
|          Maximum speed           |    5km/h    |
|     Maximum incline degrees      | 10 degrees  |
|     Maximum decline degrees      | 10 degrees  |
|    Maximum transporting loads    |    500kg    |
|     Water ingress protection     |    IPX4     |


---
## Software
The ROS2 package can be downloaded [HERE](https://github.com/Wwilson-Chen/Drive-Assistance-Robot).
or git clone with the following command
> `gh repo clone Wwilson-Chen/Drive-Assistance-Robot`

### ROS2
ROS2 (Robot Operating System 2) is a collection of open source software libraries and tools that provide a flexible framework for the development and implementation of robotic applications.
The massive community provides numerous open source tools for robotic system development, also for this project.

### Control System
Circles present nodes, and rectangles present topics
* Overall Control Structure
![](https://hackmd.io/_uploads/HkiWou6a2.png)

* Human Control
Control inputs from human are handled by input_pub.cpp, signals from four pressure snesors are futher processed to determined the movement of robot.
* Safety Control
Safety is always the priority. As soon as the emergency button are pressed down, the power supply will be physically disconnected immediately.
* Main Controller
The Motor_Control.cpp is in charge of decision making, it will integrate the informations from the topics to decide the PWM of motor.


---
## Hardware
### MCU
* Raspberry Pi 4 Model B
A tiny portable computer
[RPi Pin out](https://pinout.xyz/)

### Sensor
* Hall sensor
The original hall sensors on the AGV
* IMU
[Grove - 9-Axis Accelerometer&amp;Gyroscope](https://wiki.seeedstudio.com/Grove-IMU_9DOF_v2.0/)
The IMU is used for measure the tilting angle of the bed, in order to adjust the breaking force when moving or stopping on inclines. 
* Pressure Sensor
[FlexiForce Standard Force & Load Sensors Model # A401](http://cdn.sparkfun.com/datasheets/Sensors/Pressure/A401-force-sensor.pdf)
The sensor is capable of measuring pressure from 0 to 25 lbs, approximately equal to 11 kgw. What's better is the measurement range can be easily adjusted by switching the feedback resistor.
Four pressure sensors are placed at the front and the back of the left and the right of the handle. 
![](https://hackmd.io/_uploads/Hy9CDc7D2.png)
* Shutdown button
Placed at the diagonal of bed.
* Joystick
MH Joystick
[Demo](https://tutorials-raspberrypi.com/raspberry-pi-joystick-with-mcp3008/)

### IC
* ADC
MCP3008 for anolog input, pressure sensors or joystick.
[MCP3008 Data Sheet](blob:https://octopart.com/9363950d-daeb-4729-8049-87091b7ced57)

### Other
* Shutdown button
[buy here](https://jin-hua.com.tw/webc/html/product/show.aspx?num=32394&kw=急停&kind=3117)
* Fuse
2A Fuse, determined by the power of motors
[buy here](https://www.sconline.com.tw/tw/product/show.php?num=15256&page=1&kind3=171)

### Wiring
| Raspberry Pi 4     | 12V Power | MCP3008          | L298N | DC Motor left | DC Motor Right |   IMU    | Joystick |
|:------------------ |:---------:|:---------------- |:-----:|:-------------:|:--------------:|:--------:|:--------:|
| Pin  1 (3V3)       |           | Pin 15 (VREF)    |       |               |                |          |   +5V    |
| Pin  1 (3V3)       |           | Pin 16 (VDD)     |       |               |                |          |          |
| Pin  9 (GND)       |    GND    | Pin  9 (AGND)    |  GND  |               |                |          |   GND    |
| Pin  9 (GND)       |           | Pin 14 (AGND)    |       |               |                |          |          |
| Pin 19 (SPI0 MOSI) |           | Pin 11 (DIN)     |       |               |                |          |          |
| Pin 21 (SPI0 MISO) |           | Pin 12 (DOUT)    |       |               |                |          |          |
| Pin 23 (SPI0 SCLK) |           | Pin 13 (CLK)     |       |               |                |          |          |
| Pin 24 (SPI0 CE0)  |           | Pin 10 (CS/SHDN) |       |               |                |          |          |
|                    |           | Pin  1 (CH0)     |       |               |                |          |   VRX    |
|                    |           | Pin  2 (CH1)     |       |               |                |          |   VRY    |
|                    |           | Pin  3 (CH2)     |       |               |                |          |    SW    |
| Pin  8 (GPIO14)    |           |                  |  ENB  |               |                |          |          |
| Pin 10 (GPIO15)    |           |                  |  IN4  |               |                |          |          |
| Pin 12 (GPIO18)    |           |                  |  IN3  |               |                |          |          |
| Pin 16 (GPIO23)    |           |                  |  IN2  |               |                |          |          |
| Pin 18 (GPIO24)    |           |                  |  IN1  |               |                |          |          |
| Pin 22 (GPIO25)    |           |                  |  ENA  |               |                |          |          |
|                    |           |                  | OUT1  |   Positive    |                |          |          |
|                    |           |                  | OUT2  |   Negative    |                |          |          |
|                    |           |                  | OUT3  |               |    Negative    |          |          |
|                    |           |                  | OUT4  |               |    Positive    |          |          |
| Pin 38 (SPI1 MOSI) |           |                  |       |               |                | SPI MOSI |          |
| Pin 35 (SPI1 MISO) |           |                  |       |               |                | SPI MISO |          |
| Pin 40 (SPI1 SCLK) |           |                  |       |               |                | SPI SCLK |          |
| Pin 16 (SPI1 CE2)  |           |                  |       |               |                |  SPI CS  |          |

---
## Design
[Design Draft](https://hackmd.io/yfHxyO4aTKepq2e2aLajsQ)

---
## Reference
[1] [Arjo IndiGo: Intuitive drive assist for lighter transport](https://www.arjo.com/int/products/medical-beds/hospital-beds/indigo/#:~:text=IndiGo%20is%20the%20breakthrough%20intuitive,of%20separate%20controls%20or%20handles.)

[2] [ROS2 Documentation: Humble](https://docs.ros.org/en/humble/index.html)
