D
D
DrunikTime2017-05-25 18:46:45
Arduino
DrunikTime, 2017-05-25 18:46:45

How to make a vending machine?

How to make a Raspberry Vending Machine? Is it even possible to do this on raspberry?
If so, then you don’t need to write about Arduino.
The bottom line is that you need your own vending machine, for example, take a coffee machine. What platform is it on? I figured out the case, there was a code for the machine itself, and for remote control. I hope for a constructive answer without any sarcasm.
-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -
PS: Better on a raspberry. And also, in what language to write software for raspberries.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
devalone, 2017-05-25
@devalone

Why do you need a raspberry pi? From a cannon to sparrows, and not for that it is intended, make it on at mega (arduino) or any other suitable microcontroller. And if you really need it so much that it is remotely controlled, then you can separately hang the same raspberry, which will not control the motors, but will receive your commands via the Internet and send them to the arduino.

D
dinegnet, 2017-05-25
@dinegnet

It doesn't matter what.
At least on a full-fledged Intel i7 with a real motherboard - that is, on a regular computer.
Though on "Malinka"
Though on Arduino.
At least on a custom board, solder a TI MSP microcontroller or even simpler.
There is absolutely no need for any computing power.
Everything depends on what you can use on the one hand (what you know how to work with, what you can buy at a reasonable price, what has the right interfaces, etc. considerations)
And what else is profitable to use on the other (the price of competitors and the price you need profit so that the project does not die due to underfunding).
For example, in large circulations it is much more profitable- have your own specialized board with some kind of primitive controller. The cost of the board will be 100 rubles, which will always be cheaper than any "Malinka", and it will be more reliable to work due to simplicity and narrow specialization.

How to make a Raspberry Vending Machine? Is it even possible to do this on raspberry?
If so, then you don’t need to write about Arduino.

From the point of view of your task - they are completely identical.
Except that it will be easier to program remote control on Malinka.
And IMHO, it is not the program code that is difficult,
but the choice of devices that your board will control - well, there are all sorts of coffee grinders and boilers that can work autonomously.
As well as devices for ensuring work - sensors for lack of water, etc., etc.
And thinking through the algorithms of work (this is not even programming yet - it's about thinking through algorithms of work even before their software implementation, here even a programmer is not needed).
Do not forget that the device should work unattended for days on end.
Therefore, all the nuances of autonomous existence should be calculated.

For example, what happens if a person does not take a glass full of coffee.
And he will order another coffee to pour a second glass.
And what happens if the machine takes the money,
but it runs out of water at the most crucial moment.
And what happens if the operating system freezes after turning on the boiler?
etc.
In the programming language that you know best.
A coffee machine is an extremely insignificant load on the Malinka processor.
Therefore, some programming languages ​​\u200b\u200bwill be "optimal or not optimal" - there is absolutely no value.
I would write in Go.
Just because I know him better.
Let’s say I know C and Pascal and Python and JS, but I wouldn’t choose C because of the more cumbersome compilation and debugging - in principle, it’s possible in C, but there are fewer gestures with Go.
My familiar programmer would write in PHP (yes, yes, yes, not only websites can be made on it) - and the final vending machine would turn out no worse and no better. At least not better or worse for me because of the programming language.

A
Armenian Radio, 2017-05-25
@gbg

The problem here is that you need a controller that works in real time. Rpi is not.
Rationale - it is desirable to click the valves when making coffee with a resolution of 0.1 s, otherwise, instead of coffee, the client will drink an obscure substance with a taste of coffee, and rpi with its general-purpose OS will not give you such delays. Well, it’s better to catch all sorts of bad situations like lack of water and a pump thrashing idle, on hardware with predictable behavior, to which a modern computer, with its DMA and other things, does not apply.
The language for solving this problem - the more oaky, the better. That is - C.
The machine can also be assembled from improvised means by wrapping the control controller with tape and putting it in a shoe box. But when glitches come up, it will be easier to catch them from the AVR (with its completely banal assembler and the ability to simulate the entire controller by cycles in at least three packages) than to debug a python program running on rPi.

L
lehha, 2017-06-01
@lehha

I do not recommend Arduino because of the small size of RAM - a large sketch with text strings simply will not fit, it is not convenient to update the firmware.
From experience, Arduino can work in a machine for years without problems:
https://geektimes.ru/post/255724/
and a slightly different project in another machine:
https://habrahabr.ru/post/143756/
4 years - normal flight, even when taking into account the entry in the EEPROM each time the buttons are pressed. Inside the machine there is an increased temperature (about 35 degrees), dry and dusty air. There were no problems with soldering or stability.
It is necessary to establish work with payment protocols. For example, MDB. But he is very capricious to delays in responses, a delay of 0.1 seconds and he is cut down. It is impossible to get such speed on Adruino. I solved the issue with the interface module, which itself communicates with payments, and has COM at the output.
Payments are important for issuing change, for accounting for banknotes and their face value. It is also worth considering 54 Federal Laws on cash desks, which will be mandatory for vending from July 2018.
Now I would take RaspberryPI and a module for payments. On RPI, you can manage outputs (relays), the Internet, apache + mysql, and everything will be convenient and beautiful (it will be possible to update the software for the machine remotely via ssh).
As for non Realtime OS delays for making coffee - don't listen, it doesn't matter. Delays from 0.1 sec do not play any role for any machine mechanism. Water flows by gravity (about 7 seconds per glass), turn the motor for about 10 seconds to stir, so there is no need to rush.

C
CHolfield, 2019-01-12
@CHolfield

Check out https://github.com/perdidor/RaspberryVending

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question