Skip to content

Swing Lid Mechanism

jonlee48 edited this page Aug 25, 2020 · 5 revisions

Overview

Sparcfire uses a swing lid design to sort recyclable and waste items. Both flaps sit above their corresponding receptacle and can either 1) lock in place or 2) swing to allow the item to fall through. Each flap are controlled by a set of solenoids and servo. The solenoids provide the locking mechanism while the servo assists in opening and closing the lid.

Sparcfire waits in standby for an item to be placed inside with both its flaps in locked position. When an item is detected via one of the sensors, Sparcfire determines which of the receptacles the item goes into via the overhead camera. Then solenoids retract, and the item is free to fall through. The flap is balanced on a hinge, allowing heavy enough items to flip the lid unimpeded. However. lighter items (ie. paper) may need assistance from the servo motor to fall through. The servo is not directly coupled to the flap, rather attached via a ribbon. This allows Sparcfire to save power by only actuating the servo when necessary.

The solenoid lock

solenoid

Solenoids are electrically powered linear actuators. They are often used in door latches and other "push-pull" applications. When power is applied to the coil, the core retracts. When power is removed, the core returns to its extended state. The solenoid is driven by the circuit detailed below.

schematic

Two solenoids are used to lock each flap, one on each side. The solenoids are wired in parallel and therefore can be powered by a 12V DC source. A GPIO pin is used to drive a mosfet and actuate the solenoid. While the IRFZ44N mosfet can be controlled by the Raspberry Pi's 3.3V output directly, it won't allow the maximum current to flow through the mosfet. An "octocoupler" is needed as an intermediate between the GPIO pin and mosfet to step up the voltage and completely open the mosfet.

The cirucit also uses a diode in parallel with the solenoids to prevent flyback voltage from damaging circuit components. Flyback voltage occurs when there is a sudden change in current through an inductive component (ie. when the solenoid turns on/off) and the solenoid creates a high voltage spike. This is avoided by adding a diode in parallel to the solenoid, which gives the voltage potential a path to dissipate. This schematic uses two 1N4007 diodes to handle the current from both solenoids.

Clone this wiki locally