The “Lolis for Loot Machine” is a locked candy basket that will open when the user inserts  a quarters

Lolis for Loot Machine Composition

Element Composition

Infared Transmissive Sensors located across the Quarter Insertion slot.

The Reset Lock Button located in the back of the mechanism.

Typical wire wrapping procedure performed to hold components to the wire box.

Functionality

Metal Eye-Hooks screwed to the lid are used to lock the lid to a solenoid  at the base

External view of a solenoid tied into the box and attached to an eye hook ( locked position).

Quarter insertion slot of the lid

Mechanical Result of Quarter Insertion

Process

During construction of the  Loli’s for Loot Machine minor discoveries had altered the original design.

Quarter Insertion

Infared Functionality

The original infared sensor detected ANY  object that interfered with transmission.  To ensure the insertion of only a quarter  would trigger the system, 2 infared sensors were installed  at a quarter diameter apart. If a coin smaller than quarter size is inserted, both sensor emissions will not be disrupted and the basket will not unlock.

Quarter Insertion Slot

Basket Design

Box Design Process

The external design of the basket was an essential aspect to ensure its use and functionality on a kitchen counter.  Brown radiator tin enforced  with ornate metal wire was used to form the box. All essential lock components were wrapped with metal wire so they could be easily adjusted to their precise position. The user can also see through the box and know its contents without opening it.

(Top Left) Button Glued to Box

While the exterior of the design was improved. The metal components of the tin would occasionally conduct electricity through the external Reset Button and trigger the solenoids to lock. The Reset Button was glued to the box to form a non-conductive barrier and ensure proper functionality.

Discussion

Self-Critique

Overall, the design of the project had functioned as intended.  Although the exterior display was very detailed and ornate, the interior design should have received equal attention. Quarters after being inserted into the box are easy to take back by simply removing  the compartment. Another wire tie mechanism  could easily fix the issue. In addition, The electrical components are located in the same compartment in which the candy is expected to be held. A “false bottom” should be made and wire tied to hide the electric components and create space for the candy.

Surprises

Surprisingly, the decision to wire wrap all components of the box(instead of glue) enforced difficulties to break open the box.  A user must pull the ends of the wires located inside the box through the pinsized holes of the radiator metal repeatedly to remove the solenoids and hinges. The resting position of the solenoids is locked when it is not powered by an external power supply.

Lesson’s Learned

From the production of the Loli’s for Loot machine, I have learned how to properly use a transistor on items that require large voltages while protecting the arduino. Through trial,error, and sense of smell, I have successfully used one output to control numerous 9 volt mechanisms across a transistor. This set-up can be used with other motor accessories and will be extremely useful in future designs.

Next-Step

As previously discussed, the Loli for Loot Machine intentions will be successful with minor changes. The radiator material of the box should be replaced with a non-conductive material to ensure proper function of the elctronics. An internal quarter locking mechanism will need to be installed, so that inserted quarters can’t be removed. A false bottom should be installed to separate the electronic components and the candy. The metal eye hooks should be enforced with metal wire to prevent slippage.

Code

int solenoidPin = 6;
int IRPin1=A1;
int IRPin2=A2;
int reset=4;
void setup() {
pinMode(solenoidPin, OUTPUT);
pinMode(IRPin1, INPUT);
pinMode(IRPin2, INPUT);
Serial.begin(9600);
}
void loop() {
int read1= analogRead(IRPin1);
int read2= analogRead(IRPin2);
int pushbutton= analogRead(reset);
Serial.print(read1);
Serial.println(read2); // print the sensor value to the serial monitor
if ( read1==0 and read2==0){
digitalWrite(solenoidPin, HIGH); //Switch Solenoid ON
}
if(pushbutton==HIGH){
digitalWrite(solenoidPin, LOW);
}
}

Schematic