Positioning with stepper motors


I'm trying to build something like this

, but I'm not sure how the positioning is determined. The homing is probably done with an end-stop, but I'm not sure if they rely only on counting the number of steps to make sure they are aligned with every bottle or they use something else.

What would you use?


As long as the bottles are always in the same position counting steps should be very accurate.

There have been several other Forum Threads about drink dispensers. It may be worth Googling them.


It does appear that particular barbot is 100% open loop. There are not even endstops. More commonly, you would have at least one endstop and then return the carriage to that endstop to home before every drink is poured so that if any steps are missed, it will only effect that one operation and errors won’t accumulate. This is how it’s done even for 3D printers, which require much more precision than a barbot.

As long as you have your stepper motor and driver properly configured (enough torque for the application and not sending pulses to quickly) so you don’t miss steps, the counting steps approach works well enough.

This is how it's done even for 3D printers,

I have never noticed my 3D printer re-visiting the end stops during a print.


This looks like a job for an Arduino Uno running GRBL, and either a PC or another Arduino sending it commands.

I doubt if GRBL is necessary, though it could probably do the job.

It looks to me like the PC just needs to send a sequence of moves - something like "ACF" after the Arduino says that it has completed the present job. Or ACCF if it needs two shots of C


I have never noticed my 3D printer re-visiting the end stops during a print.

I suspect it does at the start of the print though. It seems like in the 3D printing world that people would prefer to let the occasional print fail rather than incur the significant slow down of homing between layers. Chances are that an event which caused the position misalignment ruined the print anyway.

In the case of a barbot, what I would do is shut off the stepper motor when the drink is finished to silence the stepper motor. Then there is (clueless and likely drunken) human interaction with the drink platform while the stepper is not holding the position. It seems much more likely that the position could be changed under these circumstances than in the case of a 3D printer, which will be running without human interference. I'd rather slow down the drink pouring process a little than incur the embarrassment of having my barbot make a fool of me while I'm proudly showing it off at a party. If you place the endstop near the drink serving position, the extra homing time should be insignificant.

I suspect it does at the start of the print though.

Of course - but just the once.

And I don't disagree with your suggestion that the barbot should re-initialize itself to be on the safe side. I avoid strong liquor when I am doing 3D prints.