Browse over 10,000 Electronics Projects

The Drink Maker: Open Sourcing your Cocktail!

The Drink Maker: Open Sourcing your Cocktail!

The software

Having ended with the hardware analysis, we may devote some time to the project’s software. Essentially, it takes into account the software to be loaded in RandA, and the actual software, that will take place and run in Raspberry Pi. This program consists of a database and a user interface, that is divided in two parts:

  • a front-end, built from the web-page that the user may see, by pointing Raspberry Pi’s IP address, and on which it operates so to make orders;
  • a back-end (admin), managed by the system administrator and invisible to the user.

 

In turn, the Admin part is divided in three parts:

  • one of them shows the cocktails being prepared, and the queue processing them (name and cocktail name, plus current state: for example it may be in the “making” phase –that is to say the cocktail making sequence has been started- or approved, that is to say the cocktail has been “approved”, since the ingredients are available);
  • ingredients; select which bottles are filled, which parts (each one being 2 cl) does it contain, the slot (dispenser) position and the possibility to add more ingredients;
  • cocktail composition (parts, name, possibly a picture to help the user when choosing, etc.).

 

The user selects the cocktail on the web interface, managed by Raspberry Pi. This last one processes the order and verifies if it is possible to make it (depending on the availability of the ingredients and also considering possible orders queued). Afterwards, if everything is ok, it will pass to Arduino the data concerning the cart’s position and the number of drink parts to be taken from each one. Arduino simply controls the stepper-motor, in order to move the cart; and the servo, in order to activate the dispenser.



Advertisement1


The LED bar, once the procedure is started, indicates with this sort of countdown bar that we have about 10 seconds to place the glass. After that, the machine goes on with the sequence.

As regards RandA, the firmware running on it simply serves the purpose to interface Raspberry Pi, and to convert its requests into orders destined to the servo control’s activation and to the stepper-motor’s movement.

As for the servo’s management, a dedicated integrated library (found within the sketch) is used. Similarly, for the strip management there is an Arduino library for the management of the Serial Peripheral Interface (SPI) interface, with or without Latch and Sync lines.

The LED ring’s management is also transferred to a specific library, made available by Adafruit, that is the ring’s manufacturer.

Pages: 1 2 3 4 5 6 7

 


Top