The entire electronics takes place in the container printable 3D, to be fixed to the side of the frame and from which come the cables and connections of Raspberry Pi.
In particular, in the electronic section of the machine:
More exactly, in its firmware RandA has written the relationship between the advancement needed to reach each dispenser and the corresponding number of paces that the stepper-motor has to take. For example, in the machine we created for the tests the distance between a dispenser and the following one is 97,7 mm; and the distance from the beginning of the course to the first dispenser is zero. Translating this in terms of steps, it means that the first dispenser corresponds to the starting position (thus to draw the content of the bottle therein applied you just need to command the servo that activates the button, without ordering any advancement for the cart). On the other hand, to reach the second dispenser from the first, RandA has to send 6.300 impulses to the controller, corresponding to 6.300/16 steps (because the driver is set so to execute a complete step every 16 impulses) that the step-by-step motor will have to take. The distance between dispensers, that is to say 97,7 mm, thus corresponds to 6.300/16 paces of the stepper-motor (1 step enables to travel 0,248 mm).
Thus, when it receives the order to reach the first dispenser, it translates it into motor steps and sends the number of impulses corresponding to the control lines of the motor driver, so that it may activate the stepper-motor. Once the indicated number of paces has been completed, RandA will give the order for the activation of the servomotor, that presses the button of the dispenser under which the cart was brought. Once the sequence for the positioning and dispenser‘s opening has been completed, the cart is brought back to the beginning of the course to serve the cocktail. The stop happens when the limit switch is activated, as soon as the system ends the sequence and the execution of a new order is prepared.
That’s all as regards the activation; a part that we might call a “choreographic” one has also been taken into account, as well as one for the optic signalling, as assistance for the “bartender on duty”. A LED strip based on the Philips HL1606 controller, with the lights that can be managed by SPI serial bus, is commanded by means of the shield, so to create pseudorandom lights in order to embellish the machine. At the beginning of the cocktail’s preparation sequence, however, it will flash and show a light bar that shortens itself in 10 seconds, thus indicating the time left to put the empty glass on the cart, before the preparation starts. If the glass is not put there in time, unless the process is stopped by pressing the reset button on RandA, the machine will go on and pour the content drawn from the dispensers on the bottom of the machine… And this is not good, since the wiring or the stepper motor or the limit switch can get wet.
The strip of LEDs is provided with a connector to 2,54 mm pitch and takes power from a female jack wheel.