How to Program a Motor Acceleration MyBlock in EV3-G

  Рет қаралды 35,768

Builderdude35

Builderdude35

Күн бұрын

This EV3 programming tutorial will teach you how to program a motor acceleration MyBlock in EV3-G. This will make your motors gradually increase in power from 0 to 100 percent. As an added bonus, you even have the ability to adjust how long it takes for the robot to get to power. This is particularly useful in FLL, where it can help improve the stability of your robot.
My Patreon supporter(s) for more than $5 for the month of October were: Albert Bricker and Turnabout Akamia. Thank you so much!
My supporters on Patreon contribute additional funding that allow me to build up and improve this channel and to make more videos. If you would like to help, you can support me here: / builderdude35
My Website: builderdude35.com/
Builderdude35 KZbin: / @builderdude35
Acceleration MyBlock EV3-G: • How to Program a Motor...

Пікірлер: 58
@quadguy1470
@quadguy1470 7 жыл бұрын
Excellent video, as a relatively new FLL coach with virtually 0 engineering experience I find your videos extremely helpful and I plan on having a programming session in the very near future with my students. We managed to get the champion's award at our regional event and placed high enough in our district event to move on to state in Ohio but if we have any hope of making it to Worlds we know we have to step up our game. Thank you!
@Builderdude35
@Builderdude35 7 жыл бұрын
Awesome! I'm glad to hear I've helped and I wish you the best of luck going forward!
@IainHendry
@IainHendry 8 жыл бұрын
This is great - thanks very much. It's frustrating that LEGO removed the ramp-up/ramp-down functionality for EV3 (they had it in NXT), and you have to do all this yourself!
@Builderdude35
@Builderdude35 8 жыл бұрын
+Iain Hendry Thanks! Glad you found it helpful!
@toby2120
@toby2120 4 жыл бұрын
bro thx for ur videos so helpful
@DeltaTeamIroniHeyRobotics
@DeltaTeamIroniHeyRobotics 4 жыл бұрын
The legend
@PogHacking
@PogHacking 6 жыл бұрын
this is really cool =-)
@geneworxoughtamation372
@geneworxoughtamation372 6 жыл бұрын
Hi Builderdude35 we have taken your advice and incorporated your ideas into our programs and robots
@Builderdude35
@Builderdude35 6 жыл бұрын
That's awesome, I'm glad to hear I've helped!
@theclueless11212
@theclueless11212 7 жыл бұрын
I am also trying to implement a gyro correction to your acceleration block. I can't really figure out a way . . . I tried using the move steering block, but ended with little success. Thanks so much!
@preyassinha0414
@preyassinha0414 6 жыл бұрын
I was trying this too. I was thinking of adding another start block and make the regular gyro code there. Both codes would run at same time.
@adamholden4202
@adamholden4202 7 жыл бұрын
Have you thought about writing an algorithm so that it exponentially accelerates, instead of gradually in a linear fashion? If you were to use a formula it might be better, that is assuming you know linear algebra and or have basic knowledge of algebra which I'm sure you do. I am currently working on a program the accelerates slow at the start but increases at a faster rate. Which I believe is better for shorter distances, so that you can get there quicker, but the initial kick of the robot starting or stopping isn't something you have to worry about but can still get to max speed quickly after that. Just something to think about. Personally, I am also connecting the algorithm to a my-block that allows you to input distance, and then will transfer that to rotations. Which adds a bit more difficulty to the algorithm. But anyhow, still a good video for people who don't already know this.
@Builderdude35
@Builderdude35 7 жыл бұрын
I definitely agree with you in the sense that exponential acceleration may be a little better. I can modify the program to be exponential as opposed to linear. But I kept it linear because I felt it's a little easier to understand for my viewers, many of whom are totally new to the concept. But thank you very much for sharing your ideas!
@bethlehemengineer6123
@bethlehemengineer6123 6 жыл бұрын
Great information. I'm trying to include acceleration and deceleration in a loop with a number of revolutions to control the distance of travel. When I use revolutions in place of the "move tank" command, the program loops indefinitely. Is there a way to do this effectively? Thanks.
@Builderdude35
@Builderdude35 6 жыл бұрын
Program a loop exit to count the number of degrees. If that fails, use an external sensor (Color, US, etc.). And if THAT fails, set it to loop for a certain time.
@ethanmaljaars1244
@ethanmaljaars1244 7 жыл бұрын
Hi, I like your video it was so helpful but i'm having problems decelerating it how do you
@Builderdude35
@Builderdude35 7 жыл бұрын
It's the same exact program, just in reverse. Set your starting speed, and then instead of adding 1 each time, subtract 1.
@theclueless11212
@theclueless11212 7 жыл бұрын
I am trying to make an acceleration/decceleration block for fll, where the robot accelerates to full speed, where it drives a certain distance, then deccelerates back to zero spd. I am trying to use your method of acceleration, and combining it with a gyro forward program similar to yours. The gyro forward block works alone, but for some reason, when I combine it with your acceleration block, it doesnt work. Strangly, every time I test it I come out with a different result. Sometimes, the robot starts spinning in circles, sometimes the robot simply drives off in a random direction. Occasionally, it will accelerate, then move forwrd using the gyro, but this happens rarely. Some help?
@theclueless11212
@theclueless11212 7 жыл бұрын
You probably wont know why, but if you could try to make it work yourself, then share your method with me, that would be amazing!
@Builderdude35
@Builderdude35 7 жыл бұрын
Possibly the integration was done incorrectly... I recommend using the encoders to drive straight in an acceleration as opposed to the gyro, because that will likely be easier.
@theclueless11212
@theclueless11212 7 жыл бұрын
Builderdude35 - ok, thanks! I will try that!
@GuyEvron
@GuyEvron 6 жыл бұрын
Hi. great voideo. My problem is when trying to set the end expression, to the number of degrees, a wheel have passed, lets say i want to accelerate for 4 whell rounds -> 360*4 degrees. it stop after 1600-1700, instead 1440. this sleepness happnes all the time. i assume it has to do withthe timer. for lower speeds (1 / 100), with no acceleration (0 as acceleration sum), the resluts are the same and i have a drift. might be problematic for FLL contest as the distnace it goes, is not accurate enough. any idea ?
@Builderdude35
@Builderdude35 6 жыл бұрын
My advice would be to bypass the degree counter altogether and use another sensor to stop the robot with a Loop exit case. The color sensor or ultrasonic senor would be best for this. Check out how to program it here: kzbin.info/www/bejne/lYq1qH5-hZmpbqM
@HeosforoAttack
@HeosforoAttack 6 жыл бұрын
Actually, you dont need any variable to do this, just use the Loop counter and connect it to the motor power value from the steering/tank block
@Builderdude35
@Builderdude35 6 жыл бұрын
Yes, you are correct. But the C programmer in me likes to use a variable out of habit. :)
@3rdchan
@3rdchan 7 жыл бұрын
nice job builderdude35. I'm wondering how I can incorporate this program in a linefollower algorithm (proportional). Let's say I start line following at a slower speed and accelerate to my target speed, let's say 30 power. Got any idea? (i'm using your proportional line follower program). cheers
@Builderdude35
@Builderdude35 7 жыл бұрын
You can use this to control the Power input on the "Move Steering" block, with the line follower controlling the steering like normal.
@3rdchan
@3rdchan 7 жыл бұрын
I get what you mean now. Thanks much. I will try it for WRO :)
@RoelArevalo
@RoelArevalo 5 жыл бұрын
If I wanted to start slow and have the robot go to full power in 1/2 second and then put a motor block to have the robot stop at 2000 degrees, will the actual distance travelled be 2000 degrees, or will it be 2000 degrees, plus whatever distance the robot took to reach 100% power?
@Builderdude35
@Builderdude35 5 жыл бұрын
As long as it is all contained within a loop with an exit case set to > 2000 degrees, the total distance traveled will be 2000 degrees, including acceleration.
@RoelArevalo
@RoelArevalo 5 жыл бұрын
Awesome, thanks for your reply
@realtigeronline
@realtigeronline 6 жыл бұрын
If my motors are inversed would I subtract to accelerate?
@Builderdude35
@Builderdude35 6 жыл бұрын
Yes, if the motors are inverted, subtracting will result in a negative number of larger magnitude, making the robot accelerate forward.
@thiagotoranza0496
@thiagotoranza0496 6 жыл бұрын
How i can make a des-acceleration please?
@Builderdude35
@Builderdude35 6 жыл бұрын
You would use the same MyBlock, but subtract 1 instead of adding.
@PogHacking
@PogHacking 6 жыл бұрын
make the first var into 100 then the math block to subtract
@NickTelles
@NickTelles 7 жыл бұрын
What do i do if my motors are inverted and i want to go forward?
@Builderdude35
@Builderdude35 7 жыл бұрын
Physically inverted? Use an Invert Motor block (I have a video on the topic).
@NickTelles
@NickTelles 7 жыл бұрын
Okay thanks.
@vp7852
@vp7852 6 жыл бұрын
how do you get it in a my block
@Builderdude35
@Builderdude35 6 жыл бұрын
Check out this video: kzbin.info/www/bejne/mH6un3qja66AbM0
@vp7852
@vp7852 6 жыл бұрын
thanks
@eeDeron81
@eeDeron81 8 жыл бұрын
hi im wondering how to decelerate
@Builderdude35
@Builderdude35 8 жыл бұрын
+Evaristo Esguerra It's going to be the same thing in reverse; start at 100, then subtract 1 each time.
@greensheepgamingezdomoman7327
@greensheepgamingezdomoman7327 5 жыл бұрын
to decelerate you need to make the whole thing over again but in negative numbers
@yisongzheng4264
@yisongzheng4264 4 жыл бұрын
I could not get mine to work
@bethlehemengineer6123
@bethlehemengineer6123 6 жыл бұрын
Robotics Club OLP
@theclueless11212
@theclueless11212 7 жыл бұрын
How do you make thew motor stay at 100 speed for a long time?
@Builderdude35
@Builderdude35 7 жыл бұрын
Put the motor block (set to "On") inside of a loop block.
@theclueless11212
@theclueless11212 7 жыл бұрын
Thanks!
@RahulBasu2001
@RahulBasu2001 8 жыл бұрын
REQUEST: PLEASE CHANGE YOUR INTRO TUNE :P
@Builderdude35
@Builderdude35 8 жыл бұрын
+Rahul Basu No way! I love my intro jingle! :)
@zerogaming4379
@zerogaming4379 8 жыл бұрын
+Builderdude35 Bwahahahahaha
@rishithanand9504
@rishithanand9504 8 жыл бұрын
i want chicken
@greensheepgamingezdomoman7327
@greensheepgamingezdomoman7327 5 жыл бұрын
horrible video quality but great explanation now a now that you recorded it with screencastomatic
@shabs5549
@shabs5549 6 жыл бұрын
bob
@rishithanand9504
@rishithanand9504 8 жыл бұрын
plz
FIRST LEGO League (FLL) - the Unofficial Introductory Guide
11:06
Builderdude35
Рет қаралды 17 М.
Stop Making THIS MISTAKE With Your LEGO Gyro Sensor
10:18
Builderdude35
Рет қаралды 17 М.
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 25 МЛН
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 85 МЛН
This Car Travels Farther Than You Push It
13:42
Tom Stanton
Рет қаралды 2,6 МЛН
How To Make Robots Move Smoothly | Arduino Tutorial
12:28
James Bruton
Рет қаралды 720 М.
Program your FLL Robot to Acquire the Line for Line Following
7:31
Builderdude35
Рет қаралды 14 М.
DC motor PID speed control
15:29
Curio Res
Рет қаралды 221 М.
I built my own computer. by hand.
13:03
jdh
Рет қаралды 1,1 МЛН
Program Accurate 90 Degree Gyro Turns With LEGO MINDSTORMS 51515
9:06
Our concept for WRO 2024 senior
2:01
mechanical handsome
Рет қаралды 8 М.
EV3 colour sensor stops at a line
4:31
Robo_Builder
Рет қаралды 412
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 8 МЛН
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН