You are viewing an older revision! See the latest version
Locker
The locker team is tasked with securing the locker, following the instructions of the user via the interface, setting the battery to charge and relaying information between the battery and the interface.
Overview The locker is secured by a solenoid controlled latch. There is also an alarm system which can be armed or disarmed. The armed alarm sounds off if a metal contact is disconnected while the alarm is armed. The locking mechanism and the alarm only unlocks when instructed to by the interface. <battery systems have yet to be implemented>
Securing the locker The locker is secured via a solenoid controlled latch. When an unlock pulse is sent from the interface, the mbed turns off the alarm(sets alarmflag = 0), then activates the solenoid to pull the latch to unlock the door(function unlock() ). To prevent overheating, the solenoid only activates for a limited time, within which the user must open the door.
There is a electrical contact surface where contact is established when the door is locked and disconnected if the door is opened. This allows the locker system to know if the door is open(via setting flag doorclosed=0). If the door is opened while the alarm is activated(alarmflag==1&&doorclosed==0), the loss of electrical contact sets off the alarm. This contact also allows the locker system to inform the interface system if the door is opened.