# Title Team Members TA Documents Sponsor
42 Medical Dispenser
Dylan Hartato
Josh Leeman
Matthew Chung
Qingyu Li design_document1.pdf
Team Members:
- Josh Leeman (jleeman2)
- Dylan Edbert Hartato (hartato2)
- Matthew Mitchell Chung (mmchung3)

# Problem
There have been instances during which medical necessities have been in need but are inaccessible, either due to how far the closest drug store is or the time of day during which such necessities are needed. For example, cold medicine is something that you often do not have at home and will only need when you are having a severe case of the sniffles––but circumstances are that you likely would not get such drugs if they are not relatively immediately available. Another scenario is when sometimes, the straps in our mask would snap off. Most people do not carry around a spare mask in their bag, which requires them to get another one from a store. In the era that we are currently in, addressing our illnesses and the safety of others as soon and as effectively as possible is out of everybody’s best interest.

# Solution
What we would like to do to address such issues is to build a modular vending machine that is targeted towards UIUC students and can be placed around campus. Our implementation of this machine is unlike any other vending machine that you can find either at ECEB or anywhere else for that matter. We would like to make it modular so that it can be as small (so that it can be placed in low-traffic areas) or as large (conversely, in high traffic areas) as it needs to be. A consequence of the modular design is that the trays that store inventory can be expanded vertically or horizontally to accommodate for every product size––a feature that is not found in any vending machine.
In addition, as this product is intended to serve the user more than to benefit the owner, the design of such device will be focused on ensuring that the user is able to obtain whatever product it is that they have ordered through a series of motion detectors. The vending machine is intended to provide goods that current students are able to obtain for free, either from McKinley or otherwise; however, such goods are often distributed to students on a quota. That is, students are able to dispense certain goods after some time period has elapsed. The software related to this device will thus serve two purposes: to track the user’s past transactions to ensure that they are eligible to vend a certain product, and to track inventory of the machine. Due to the required internet connection, an Arduino or Raspberry Pi will be used to make implementing the database-to-machine connection feasible for this project; however, the implementation of the actual machinery and any failsafe system will require at least 2 PCB boards; one to unify the BUS that connects to all the dispensing trays, the motion sensor, and the arduino so that the machine functions as intended, and the other to ensure that the individual trays dispenses an item when commanded.
Due to the modularity of the design and the implementation of the software, this machine can also serve as an all-in-one distribution center for goods that are often handed over to students as needed. While this machine is initially intended for distributing necessities, it can also be stocked with other items depending on where they are. For example, a machine at the ARC can also be used to vend sanitation wipes or some injury-related remedies.
# Solution Components
## Subsystem 1: Control Module
Relevant Parts:
- Arduino / Raspberry Pi
- RFID Module; DigiKey ID: 1528-4701-ND ($4) [link]
- RTL 8818eu USB WiFi Module Adafruit 2282 [link] ($11) or ESP32 WiFi-BT-BLE MCU Module [link] ($9)
- Metal Pushbutton (Adafruit ID 481) x4 ($20) [link]
- Redline Motion Sensor (SEN-11769) x3 ($3) [link]
- LCD Screen (Product 181) x2 ($10) [link]

- maybe a voltage regulator for the dispensing module

The purpose of this subsystem is to ensure that the user is able to dispense the product of their choosing, provided that they are eligible to obtain such an item. An Arduino will be implemented to allow the machine to communicate with the inventory and user database, and to ensure that the signal corresponding to the selected product is relayed to the dispensing module. As multiple dispensing modules can store the same item, and the dispensing modules may be swapped for one with a different ID at any given time, the Arduino ensures that the correct signal is transmitted to the PCB and across to the BUS.

PCB Implementation: A PCB board will be required for three purposes––to relay the dispensing signal of a product from the Arduino to the motors on the dispensing module, to ensure that another attempt at dispensing the product is made if no motion is detected, and to signal to the Arduino that a product in a certain dispensing module is out of stock after several attempts. This will require implementing a clock that keeps track of the response time and memory to keep track of the specific dispensing module in a microcontroller or otherwise. The signal from this PCB board to the target dispensing module will be implemented via a universal BUS.

## Subsystem 2: Dispensing Module
Relevant Parts:
- DC Motor + Stepper; Adafruit product ID 2927 ($20)

The purpose of this subsystem is to dispense the actual product that is relayed by the control module. There will be a DC motor attached to coils just like any vending machine, but the timing of how long the motors should be active for is controlled by a local PCB board as different coils or different products may require the motors to be activated for different periods of time.
As the final product is intended to be modular, each module will be connected to a BUS that transmits the ID of the target dispensing module. If the signal on the BUS is the same as the ID of the specific dispensing module, then the clock to time how long the motors should be active for will start. To prevent any activation errors associated with either the BUS being active for too long or otherwise, the system is to activate only during a rising edge of the correct signal.

PCB Implementation: A PCB board is required in every dispensing module for two purposes––to determine if the specific motor is signaled to activate, and to provide the accurate timing to ensure that the motor is active for only the amount of time required to dispense one product.

## Subsystem 3: Inventory and User Database

The purpose of this subsystem is to keep track of the inventory stored in the vending machine and also the items that each student can dispense during any given time of the day. Since the vending machine is to dispense of items each student has a quota of each month, a user database will be implemented to keep track of what items each student will be able to dispense during the month and what items users are not allowed to dispense of due to them already using their quota.
The implementation of this subsystem will be through the use of the arduino. On the arduino will be programmed a software that will internally keep track of the items in the vending machine during any time of the day, which will be used to determine if an item has stock so that it may be dispensed. Furthermore, the arduino will also be programmed to communicate with an online user database that will obtain information about items students may dispense of and update the system based on the RFID sensor about the items that students have dispensed.
To give added flexibility to the operator of such a device, the inventory in each dispenser can be updated online instead of through the machine. The inventory database can be updated by both the user and the machine. The machine will decrement inventory whenever an item is dispensed, and will null the inventory if an item cannot be or is not dispensed.

# Criterion for Success
Being able to swap in and out the individual dispenser module / trays with relative ease
The motion sensor should be able to detect if an item is dispensed, and should send a signal to the control module PCB correspondingly.
The correct dispenser / motor is activated as prompted by the PCB in the control module, as tested by probing the BUS.
Database updates inventory and user information whenever an item is dispensed, and nulls the stock if the item cannot be dispensed or is empty.
Only dispenses a product if the user is eligible, which involves having the RFID module and the wifi module working with the Arduino.

Autonomous Sailboat

Riley Baker, Arthur Liang, Lorenzo Rodriguez Perez

Autonomous Sailboat

Featured Project

# Autonomous Sailboat

Team Members:

- Riley Baker (rileymb3)

- Lorenzo Pérez (lr12)

- Arthur Liang (chianl2)

# Problem

WRSC (World Robotic Sailing Championship) is an autonomous sailing competition that aims at stimulating the development of autonomous marine robotics. In order to make autonomous sailing more accessible, some scholars have created a generic educational design. However, these models utilize expensive and scarce autopilot systems such as the Pixhawk Flight controller.

# Solution

The goal of this project is to make an affordable, user- friendly RC sailboat that can be used as a means of learning autonomous sailing on a smaller scale. The Autonomous Sailboat will have dual mode capability, allowing the operator to switch from manual to autonomous mode where the boat will maintain its current compass heading. The boat will transmit its sensor data back to base where the operator can use it to better the autonomous mode capability and keep track of the boat’s position in the water. Amateur sailors will benefit from the “return to base” functionality provided by the autonomous system.

# Solution Components

## On-board

### Sensors

Pixhawk - Connect GPS and compass sensors to microcontroller that allows for a stable state system within the autonomous mode. A shaft decoder that serves as a wind vane sensor that we plan to attach to the head of the mast to detect wind direction and speed. A compass/accelerometer sensor and GPS to detect the position of the boat and direction of travel.

### Actuators

2 servos - one winch servo that controls the orientation of the mainsail and one that controls that orientation of the rudder

### Communication devices

5 channel 2.4 GHz receiver - A receiver that will be used to select autonomous or manual mode and will trigger orders when in manual mode.

5 channel 2.4 GHz transmitter - A transmitter that will have the ability to switch between autonomous and manual mode. It will also transfer servos movements when in manual mode.

### Power

LiPo battery

## Ground control

Microcontroller - A microcontroller that records sensor output and servo settings for radio control and autonomous modes. Software on microcontroller processes the sensor input and determines the optimum rudder and sail winch servo settings needed to maintain a prescribed course for the given wind direction.

# Criterion For Success

1. Implement dual mode capability

2. Boat can maintain a given compass heading after being switched to autonomous mode and incorporates a “return to base” feature that returns the sailboat back to its starting position

3. Boat can record and transmit servo, sensor, and position data back to base

Project Videos