Project

# Title Team Members TA Documents Sponsor
19 Distributed Bike Locking System
Cameron Obrecht
Praneeth Mekapati
Rohan Sreerama
Hanyin Shao design_document1.pdf
design_document2.pdf
final_paper4.pdf
photo1.png
photo2.png
photo3.png
photo4.png
presentation1.pdf
proposal1.pdf
video1.mp4
video
# Distributed Bike Locking System #

**General Description**

A bicycle is stolen every 30 seconds and the problem has exacerbated to such an extent that nearly two million bikes are stolen every year, amounting to over $350M. As such, we propose a distributed bike locking system that remotely controls pre-installed bike locks and significantly enhances the security of the bikes being temporarily locked. More specifically, our solution is to program and retrofit a durable computer-controlled locking box onto an existing bike rack, which would automatically facilitate the locking, unlocking, and payment method for the service.


**Unique Value Proposition**

We are going to create a public automated, passcode-driven lock that is designed to deter theft. There will be detectors and buttons embedded to sound a very loud and high-pitched alarm when a thief tries to physically break the lock.
- Don’t need your own lock, so users can carry less on their persons or bikes
- Bicycle rack manufacturers do not need to alter their manufacturing process, because they can simply retrofit our solution
- Cheap and convenient, and users must pay with coins to use the appliance
- Passcode-driven security
- Keeps the bike safe and locked for a specific amount of time based on the user input
- Keeps the bike locked even if user goes over time (and further charges the user later)
- Could be purchased by bicycle rack buyers as an accessory for the racks, or by bicycle rack manufacturers and sold alongside the racks

The Distributed Bike Locking System (DBLS) presents a number of advantages over contemporary solutions of securing a bicycle. Some of the core unique value propositions involve the fact that it allows users to lock their bike safely to any DBLS-enabled bike rack, and ensures a high degree of security. We utilize a passcode-driven security system so that users can lock and unlock the bicycle at any time with a simple 4-digit PIN, which each user can set for that parking session. For bike rack manufacturers, DBLS is an easy solution that can be retrofitted onto virtually any bike rack and customized a variety of ways according to the physical structure of the bike rack. Moreover, we offer this solution to the end user at an affordable price that makes more sense than purchasing an individual bike lock.


**Alternatives**

- Buying a lock and wrapping it around a standard wave-shaped bike rack or tree
- Public bike storage (can be expensive)
- Renting a veoride or electric bike temporarily
- Citi bike racks - https://citibikenyc.com/how-it-works. This a bicycle sharing service where you temporarily rent a bicycle from Citi and return it to a Citi bike station when you are done.
- https://linkafleets.com/products/original-linka-smart-bike-lock-fleets?variant=31954112086080 - Individual smart lock, designed for mounting on a bicycle

There are alternatives to distributed bike locking systems. Those would include buying a separate lock and wrapping the lock around a standard wave-shaped bike rack or a tree. This would require the bicycle owner to carry some sort of chain or purchased bike lock, which costs at least $10, and quite a bit more for better-quality locks. There is often the possibility of destruction of the lock by a thief, however. The public bike storages in the cities have lockers to store the bikes temporarily. However, lockers can be expensive to rent out up to $48 plus other fees. Another alternative would be to rent a Veoride or an electric bike. However, there will be people using their own bikes to get around and they won’t have much use of renting a Veoride or an electric bike. There is also the option of purchasing a personal Linka smart lock that mounts to the bicycle, but that is at the cost of $135 to the bicycle owner, and even then, our locking device is quite different.




**Pricing Model**

The Distributed bike locking system will utilize a microcomputer that will run the algorithms for the User Input, the Bike lock, and the detectors to sound the alarm when strange activity is being detected such as with the motion of the bike lock. The general price for the user will be $0.50 per hour for the automated lock. However, the price will increase to $1.00 per hour when the user overstays their number of inputted hours.







**Technical Overview**


The Distributed Bike Locking System is a network of several identical appliances, welded or heavily bolted to existing bike racks so as to become essentially integrated into the racks, and connected by wire to a central Raspberry Pi computer somewhere within several yards, perhaps buried a foot underground inside a waterproof box. This computer will be programmed in Python and powered either by mains or a large rechargeable battery, with an algorithm to control all of the appliances connected to it in the way that they should operate. This reduces the cost of each individual appliance, because a central computer for 15 or 20 “dumb” appliances removes the necessity to have a Raspberry Pi or other computing device onboard every appliance. However, if a hidden central computer with wires running everywhere is impractical to install, then the design could easily be modified to include a computer board inside every appliance, making them fully independent devices.
A single appliance will be a durable rectangular metal box, about twice the dimensions of a box just big enough to accommodate a typical bicycle seat, maybe around half the volume of a small desk printer. The face of the box that is longest in proportion to its other dimension will have two U-shaped brackets for attachment to the rack, bolted from the inside of the mostly hollow appliance. The brackets may be larger than the thickness of the rack, in which case the appliance would hang loose and be able to slide and rotate on the rack, but that poses no issue as long as it does not make severe impact with the ground or become separated from the rack, the latter of which would be impossible without a cutting wheel or some dedicated power tool. This also has the advantage of permitting user adjustment of the lock position to suit the shape of the bicycle. The face directly opposite that with the brackets will feature a servo-controlled sliding steel bar, about an inch in diameter, which will lock around the bicycle frame. There will also be an internal solenoid-controlled latch to keep the bar immobile in a closed position when locked.
The upward- or outward-facing face of the box, which is also the one with the most area, will have a three-digit seven-segment LED display (for showing the parking duration), a ten-digit keypad for passcode entry, a number of single LEDs with various status messages written next to them on the exterior, and a coin slot for payment by the user, leading to the mostly hollow interior and with optical coin size sensors embedded in the side of the slot. Inside the appliance will be a pair of smoke detector alarms (for a doubly loud sound in case of attempted theft), a few buttons or pressure sensors touching the side of the steel latch as force sensors to sound the alarm in case of attempted bicycle theft, and an accelerometer or shock sensor for the same purpose, in case a thief tries to smash the device with a hammer. The sensors could be wired directly in parallel series arrangements with the smoke detector alarms, without the need for intelligent activation of the alarm, so that a continuous ear-splitting beep is heard as long as there is enough force applied. If the thief abandons his mission, the alarm will stop. There will also be a servo and a solenoid-actuated latch for locking the bicycle, some relays to forward computer signals to these higher-powered components, a central board to consolidate all signals to and from the components and forward them to a port on the exterior, and a set of standard C or D batteries to power the appliance. Power will then be local to each appliance in the network, rather than supplied by wire, so that anti-theft alarms are functional even if the wire to the computer is severed. A wired approach is simpler than a wireless one, and immune to radio interference or jamming; and if the wire is severed by a malicious actor, the appliance will lose computer control and remain in its locked or unlocked state, providing no incentive to cut the wire if theft of the bicycle or the appliance is the intention. The wires may be buried a few inches in the ground, or run along the ground inside metal guards.
The face opposite that with the controls and lights will have a small hinged door in one of the corners, made of thick sheet metal like the rest of the appliance, for replacing batteries and emptying coins. It will have a mechanical key lock, accessible only by a custodian under the party that owns the racks and appliances. The little door is located in the corner in case a thief or other person with ill intentions is able to breach it, with some powerful crowbar or otherwise special tool for breaking through tough metal. The coins can unfortunately be emptied (which risk may be mostly averted by ensuring that coins are collected every day or so), but if that person wanted additionally to try to destroy the internal electronics with some screwdriver or sharp durable probe, it would be easiest if the door were in the center of the face, because then nothing inside is very far from the opening. A door located in the corner, particularly the corner furthest from the most sensitive electronics or from all electronics, would be a simple measure to minimize the ability of someone to inflict internal damage. This door could also be alarm-protected, with a button or force sensor on the lock if someone tries to pry it open, and it would also have to be sealed from rain with a rubber gasket.
Alternatively, instead of having access to the entire interior via the door, a special compartment could be made inside that corner of the appliance, to which the coin slot leads and where the batteries are mounted. This may be a superior design, because damage to electronics is not possible, and it is easier for the custodian to remove all of the coins, and change the batteries. If normal C or D batteries are used, they would last at least several months in an outdoor application requiring occasional small amounts of power for the servo and lights; although the purchaser of the appliances might do better to invest in rechargeable C or D batteries, which would last years with recharging every few months. These typically are rated at 1.2 volts rather than the 1.5 for standard single-use batteries, so the design would have to take that possibility into account. Perhaps these rechargeable batteries could be sold with the appliance.


**Scenario of Operation**

The user walks up to the bike rack. If it is not in use, a green LED will be on, and a seven-segment LED display will show 0:00, indicating that it is ready for use. If it is in use, and there is a bike locked there, a red LED will be on. The first thing the user does after approaching an available rack is to press the up-arrow and down-arrow buttons to increase or decrease the desired parking duration by half hour increments. The seven-segment display changes to 0:30, then 1:00, etc., with each press of the up arrow. When the desired duration is shown, the user presses an “enter” button, and a light comes on next to text that says “Enter new passcode.” The user can enter a 4-digit PIN via the keypad, and then press “enter.” Another light comes on saying “Confirm passcode.” The user enters the same PIN, and presses “enter.” It is the responsibility of the user to remember this PIN. The light turns off, and another comes on, saying “Insert coins.” The appliance will charge 50 cents per half hour of bicycle parking, which will be stated on a decal or other inscription on the outside of the device. The user inserts coins into the coin slot, and when at least the proper amount has been inserted (according to computer interpretation of data from the optical coin slot sensors), another light will come on, saying “Position bicycle and press enter to lock.” The user positions the bike properly, with one tube of the frame placed inside the deep rectangular recess in the appliance, and presses “enter.” The servo slowly slides the metal bar out of the side of the recess, over the bicycle frame tube, and into a hole in the other side of the recess, and resets the seven-segment display to 0:00. The user can now walk away knowing that the bicycle is secure.
If the user wishes to cancel parking and unlock the bike early, the user can walk up and enter their unique passcode, without a refund. The user has ten attempts to get the passcode correct, after which the appliance will keep the bike locked for the next 24 hours (free of additional charge), as a theft deterrent. If the number of tries were any less, then there is a greater risk of a prankster coming by and deliberately entering incorrect passcodes to keep all the bicycles locked there, which would deter people from using the appliances in the future. If the number of tries were greater than 10, there would be a greater chance of correct guesses by potential thieves. If the user does enter their passcode correctly, the appliance will unlock, and the appliance will await the next user.
If the user has not entered their passcode to unlock their bicycle after their duration has expired, a light will illuminate next to a message saying “Parking reservation exceeded,” and the appliance will keep the bike locked indefinitely and require additional payment of $1 per half hour past the initially specified duration in order to unlock it. The first dollar will be incurred at the very second of expiry, and the second dollar at one second after the first half hour has passed, etc. A clever user will always make a point to redeem their bicycle a little early, to avoid these charges, or deliberately to overestimate the time they will need when specifying the parking duration. The user must enter their passcode, after which the “Insert coins” light will come on. As soon as the last coin is inserted totaling at least the amount due, the locking bar will slide back into its hole in the side of the recess, releasing the bicycle, and the “Parking reservation exceeded” light will turn off. There will be no coin return or change.


**Specific Components**

- Main microcomputer (Raspberry Pi)
- Detectors and sensors (alarm buttons, ultrasonic sensors, PIR motion sensor)
- LEDs (display signals to help with the user input and to display messages for the lock)
- Buttons (for user input)
- Batteries (for everything)
- Wires (to create the circuit with the Raspberry Pi)
- A hollow box to hold the Raspberry Pi along with the components mentioned above
- A locking mechanism with a bar, servo, latch, and solenoid (example of what the lock could look like: https://linkafleets.com/products/original-linka-smart-bike-lock-fleets?variant=31954112086080)



**Criteria for Success**

The bike is successfully locked and stored for the amount of time input by the user. The system will have to sound an alarm if suspicious activity is detected by the sensors embedded in the appliance. A specific example would be when the lock is forcibly moved when locked for the specified user inputted time, there would be a beeping noise and this would be similar to a smoke detector. The only difference would be that the sensor is going to detect unexpected motion of the latch. This would be achieved with either an ultrasonic sensor which detects the distance the latch has moved, or a PIR motion sensor which can help detect an intruder with unusual movement with the use of infrared light. This is a way to signal a warning. This is also a passcode generated lock so the system has to make sure it has the user passcode stored in memory so when the user tries to unlock it, the program will refer back to the stored passcode and be able to unlock the latch when the user correctly enters it. However, the bike should stay locked unless the user is able to enter the correct passcode to unlock it. The program should successfully take in the right amount of money based on the coins and set the time also based on the money inputted and charge the user an extra $1.00 per half hour if the person keeps the bike for a longer period of time.

Healthy Chair

Ryan Chen, Alan Tokarsky, Tod Wang

Healthy Chair

Featured Project

Team Members:

- Wang Qiuyu (qiuyuw2)

- Ryan Chen (ryanc6)

- Alan Torkarsky(alanmt2)

## Problem

The majority of the population sits for most of the day, whether it’s students doing homework or

employees working at a desk. In particular, during the Covid era where many people are either

working at home or quarantining for long periods of time, they tend to work out less and sit

longer, making it more likely for people to result in obesity, hemorrhoids, and even heart

diseases. In addition, sitting too long is detrimental to one’s bottom and urinary tract, and can

result in urinary urgency, and poor sitting posture can lead to reduced blood circulation, joint

and muscle pain, and other health-related issues.

## Solution

Our team is proposing a project to develop a healthy chair that aims at addressing the problems

mentioned above by reminding people if they have been sitting for too long, using a fan to cool

off the chair, and making people aware of their unhealthy leaning posture.

1. It uses thin film pressure sensors under the chair’s seat to detect the presence of a user,

and pressure sensors on the chair’s back to detect the leaning posture of the user.

2. It uses a temperature sensor under the chair’s seat, and if the seat’s temperature goes

beyond a set temperature threshold, a fan below will be turned on by the microcontroller.

3. It utilizes an LCD display with programmable user interface. The user is able to input the

duration of time the chair will alert the user.

4. It uses a voice module to remind the user if he or she has been sitting for too long. The

sitting time is inputted by the user and tracked by the microcontroller.

5. Utilize only a voice chip instead of the existing speech module to construct our own

voice module.

6. The "smart" chair is able to analyze the situation that the chair surface temperature

exceeds a certain temperature within 24 hours and warns the user about it.

## Solution Components

## Signal Acquisition Subsystem

The signal acquisition subsystem is composed of multiple pressure sensors and a temperature

sensor. This subsystem provides all the input signals (pressure exerted on the bottom and the

back of the chair, as well as the chair’s temperature) that go into the microcontroller. We will be

using RP-C18.3-ST thin film pressure sensors and MLX90614-DCC non-contact IR temperature

sensor.

## Microcontroller Subsystem

In order to achieve seamless data transfer and have enough IO for all the sensors we will use

two ATMEGA88A-PU microcontrollers. One microcontroller is used to take the inputs and

serves as the master, and the second one controls the outputs and acts as the slave. We will

use I2C communication to let the two microcontrollers talk to each other. The microcontrollers

will also be programmed with the ch340g usb to ttl converter. They will be programmed outside

the board and placed into it to avoid over cluttering the PCB with extra circuits.

The microcontroller will be in charge of processing the data that it receives from all input

sensors: pressure and temperature. Once it determines that there is a person sitting on it we

can use the internal clock to begin tracking how long they have been sitting. The clock will also

be used to determine if the person has stood up for a break. The microcontroller will also use

the readings from the temperature sensor to determine if the chair has been overheating to turn

on the fans if necessary. A speaker will tell the user to get up and stretch for a while when they

have been sitting for too long. We will use the speech module to create speech through the

speaker to inform the user of their lengthy sitting duration.

The microcontroller will also be able to relay data about the posture to the led screen for the

user. When it’s detected that the user is leaning against the chair improperly for too long from

the thin film pressure sensors on the chair back, we will flash the corresponding LEDs to notify

the user of their unhealthy sitting posture.

## Implementation Subsystem

The implementation subsystem can be further broken down into three modules: the fan module,

the speech module, and the LCD module. This subsystem includes all the outputs controlled by

the microcontroller. We will be using a MF40100V2-1000U-A99 fan for the fan module,

ISD4002-240PY voice record chip for the speech module, and Adafruit 1.54" 240x240 Wide

Angle TFT LCD Display with MicroSD - ST7789 LCD display for the OLED.

## Power Subsystem

The power subsystem converts 120V AC voltage to a lower DC voltage. Since most of the input

and output sensors, as well as the ATMEGA88A-PU microcontroller operate under a DC voltage

of around or less than 5V, we will be implementing the power subsystem that can switch

between a battery and normal power from the wall.

## Criteria for Success

-The thin film pressure sensors on the bottom of the chair are able to detect the pressure of a

human sitting on the chair

-The temperature sensor is able to detect an increase in temperature and turns the fan as

temperature goes beyond our set threshold temperature. After the temperature decreases

below the threshold, the fan is able to be turned off by the microcontroller

-The thin film pressure sensors on the back of the chair are able to detect unhealthy sitting

posture

-The outputs of the implementation subsystem including the speech, fan, and LCD modules are

able to function as described above and inform the user correctly

## Envision of Final Demo

Our final demo of the healthy chair project is an office chair with grids. The office chair’s back

holds several other pressure sensors to detect the person’s leaning posture. The pressure and

temperature sensors are located under the office chair. After receiving input time from the user,

the healthy chair is able to warn the user if he has been sitting for too long by alerting him from

the speech module. The fan below the chair’s seat is able to turn on after the chair seat’s

temperature goes beyond a set threshold temperature. The LCD displays which sensors are

activated and it also receives the user’s time input.

Project Videos