# Title Team Members TA Documents Sponsor
19 Distributed Bike Locking System
Cameron Obrecht
Praneeth Mekapati
Rohan Sreerama
Hanyin Shao design_document1.pdf
# 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.


- 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 - 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.
- - 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:

**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.

Low Cost Distributed Battery Management System

Logan Rosenmayer, Daksh Saraf

Low Cost Distributed Battery Management System

Featured Project

Web Board Link:

Block Diagram:

Members: Logan Rosenmayer (Rosenma2), Anthony Chemaly(chemaly2)

The goal of this project is to design a low cost BMS (Battery Management System) system that is flexible and modular. The BMS must ensure safe operation of lithium ion batteries by protecting the batteries from: Over temperature, overcharge, overdischarge, and overcurrent all at the cell level. Additionally, the should provide cell balancing to maintain overall pack capacity. Last a BMS should be track SOC(state of charge) and SOH (state of health) of the overall pack.

To meet these goals, we plan to integrate a MCU into each module that will handle measurements and report to the module below it. This allows for reconfiguration of battery’s, module replacements. Currently major companies that offer stackable BMSs don’t offer single cell modularity, require software adjustments and require sense wires to be ran back to the centralized IC. Our proposed solution will be able to remain in the same price range as other centralized solutions by utilizing mass produced general purpose microcontrollers and opto-isolators. This project carries a mix of hardware and software challenges. The software side will consist of communication protocol design, interrupt/sleep cycles, and power management. Hardware will consist of communication level shifting, MCU selection, battery voltage and current monitoring circuits, DC/DC converter all with low power draws and cost. (uAs and ~$2.50 without mounting)