Model 8: Candy machine

Give me candy!

Grade
6-8
Time required
2 Double lessons
Difficulty level
Modell: medium, Programming: hard
Model type
Vending machine: a stationary device, individually fillable for dispensing various small items (candies, pills, dietary supplements)

MODEL DESCRIPTION / TASK

Students plan and implement a vending machine for storing and dispensing small items, such as candies. The selection of the desired product on a motorized turntable is done using a button. The product is visible but not yet accessible. Only through an access system using a magnetic switch (Reed contact) can the product be retrieved. This opens a motorized access security mechanism.

To expand the system, an alert lamp (LED) can be integrated to indicate when the product can be safely retrieved. Before closing the security mechanism, this lamp blinks as a warning.

EVERYDAY RELEVANCE

The automatic operation of a machine and the dispensing of an (edible) item have a strong motivational effect on students. Many comparable solutions are known from everyday life (gum vending machine, beverage dispenser, bumper cars, etc.). However, the incentive to manipulate a professional system to one's advantage is also recognized. This leads to considerations on designing their own solution to be transparent yet also as tamper-proof as possible.

Key questions

  • What functions need to be fulfilled for the encoded triggering of an operation? (Communication and collaboration)

  • How can the goods contained in the machine be selected by the user? (Communication and collaboration)

  • How can the goods in the machine be protected from access or how can access be granted? (Creativity and critical thinking)

  • What aspects of the design need to be considered to protect the machine from manipulation and ensure robustness? (Creativity and critical thinking)

Fächerbezug

Informatics
Basics of programming, switches, sensors, time loops
Mathematics
Angle of a circle
Economics
Sales strategies
Physics
Capturing physical quantities (rotational angle, end stop)

Lesson progression

Introduction phase
Planning phase
Construction phase
Programming phase
Experimenation and test phase
Final phase

 

Information and notes

Methodical and didactic tips

Differentiation options

The system can be supplemented with a green LED and programmed to provide visual clearance (green LED) when the product can be removed. A blinking function can also be programmed to indicate the closing of the access lock.

Motivationale Aspekte

Sweets themselves have a certain effect on students. However, the automated dispensing of tangible items (as opposed to just information) also holds an allure. The associated topic of manipulating information (in this case, input information) is familiar to students and relevant in many other aspects of life. Both factors contribute to fostering intrinsic motivation.

Additional material

  • Optional: Drawing media (paper, whiteboard, or projection surface)

Functions of the model and their technical solutions

 

Functions of the Actuators/Sensors

Technical solutions


Detecting a signal for the rotation of the goods warehouse


Analyzing the input button signal


Rotation of the goods storage


Control of the motor of the rotating carousel


Stopping position of the merchandise storage


Evaluating the cam-operated signal from the position switch


Verification of the legitimacy of the dispensing


Triggering the reed contact


Opening the access protection


Controlling the barrier motor using a time loop


Waiting time of the motor control for the product retrieval


Time loop


Closing of the access guard


Actuation of the barrier's motor via a time loop


Turning off the motor of the access barrier


Evaluating the signal from the limit switch


Differentiation 1: Visual indication that goods can be removed


Green LED blinking


Differentiation 2: Optical indication that access protection is about to close


Green LED blinking

Material list

Material list basic circuit vendor machine

Sensors

Functions


1 Push button


Signal for gearbox motor 1


Push button


Limit switch for gearbox motor 1

 
Push button


Limit switch for gearbox motor 2


1 Reedswitch


Signal for gearbox motor 1

 


Actuators

Functions


1 Gearbox motor 1


Rotation of the storage unit


1 Gearbox motor 2


Opening of the access guard

 

 

Material list Differentiationtask vendor machine

 

Actuators

Function


1 LED, green

 


Visual inspection lamp


cd-green-78ddcfbddb-fh7cs