Making Tray Speed Lower as it Goes Up

HI can anyone tell me how to make the velocity of my tray go slower as it comes up to make the stack better

Young man with a strange sounding user name, in the olden day we used to walk evryday to school barefoot, in snow, uphill both ways… jk.

To translate your pseudocode of “to make the velocity of my tray go slower as it comes up” into C++ code, you need to have some sort of sensor that could tell your program current inclination of the tray.

You can use either a potentiometer that will tell you absolute angular position of the tray, or a combination of limit switch and built-in V5 motor encoder.

In either case you need to divide full range of your tray movement into several segments and, based on which segment it is in, send different max velocity into your motor spin command.


Could you possibly send me the sample of code

Let’s just say for example your tray goes all the way to 400 degrees
if(Tray angle < 100) Tray spin at full speed
else if( Tray angle <200) tray spin at half speed
Else if (Tray angle<300) tray spin at quarter speed
Else if(tray angle <400) tray spin at eigth speed
Else tray stop

Of course this is just pseudocode and you would need to tune these values based on your own tray.


speed = 100*1-(tilterrotation/target)

As tilterrotation increases the speed decreases.


You could do it mechanically by making your tilter design similar to this:


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.