how do you program a DR4B to stay equal to the other side going up if its behind the other side?
Welcome to forum!
You could use encoders, but just moving at same time at same speed with a backup button(s) (in case one falls behind) are easier
If you have proper cross bracing, this also becomes less of a problem. Connecting the gear boxes with an axle across also helps, but isn’t really necessary most cases.
Instead of moving the motors up and down when pushing buttons, have them increase and decrease a variable instead. If the target variable goes outside of bounds of your lift, set it back. Then use PID to move the left side to that variable, and then do the same for the right side. Some pseudo code below. You’ll have to convert it to whatever language you are using.
int dTarget = 0;
while(true){
if(buttonUp.get()) {dTarget += 1;}
else if(buttonDown.get()) {dTarget -= 1;}
if(dTarget < 0) {dTarget = 0;}
if(dTarget > 100) {dTarget = 100;}
leftArm.moveTo(dTarget);
rightArm.moveTo(dTarget);
}
Do any of you guys know how to build a DR4B or a good step by step video?
https://www.google.com/imgres?imgurl=https%3A%2F%2Fi.pinimg.com%2Foriginals%2Fe6%2F75%2F58%2Fe67558248fe349a1a3fee6d7bc815e9f.jpg&imgrefurl=https%3A%2F%2Fwww.pinterest.com%2Fpin%2F504403227015648673%2F&docid=98d0hV3UsINvFM&tbnid=l_1hn4px8nOPYM%3A&vet=10ahUKEwiw6fWV6uzlAhXFmVkKHftRDjsQMwhcKBIwEg..i&w=1280&h=720&safe=active&bih=609&biw=1366&q=DR4B&ved=0ahUKEwiw6fWV6uzlAhXFmVkKHftRDjsQMwhcKBIwEg&iact=mrc&uact=8
This video is a good guide on how to make a dr4b
All these threads involve people fixing or improving their dr4b. I would recommend reading over them to gain helpful tips.
Kepler electronics video has very good explanations about workings of DR4B, however it features shaft based joints, which are not easy to build a stable lift with.
The best step-by-step building instructions for building a good DR4B lift is Team 333 tutorial:
I control both motors with one button like normal then I get there position and calculate the difference and make one of the motors move the distance. But if your using V5 and it’s way off you need to fix your hardware by moving motors or metal around to make it better. Good software can’t fix bad hardware.