How to Program a Motor Acceleration MyBlock in EV3-G

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 58

  • @quadguy1470
    @quadguy1470 8 ปีที่แล้ว +1

    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  8 ปีที่แล้ว

      Awesome! I'm glad to hear I've helped and I wish you the best of luck going forward!

  • @IainHendry
    @IainHendry 9 ปีที่แล้ว +2

    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  9 ปีที่แล้ว

      +Iain Hendry Thanks! Glad you found it helpful!

  • @theclueless11212
    @theclueless11212 7 ปีที่แล้ว +1

    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!

  • @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.

  • @geneworxoughtamation372
    @geneworxoughtamation372 7 ปีที่แล้ว

    Hi Builderdude35 we have taken your advice and incorporated your ideas into our programs and robots

    • @Builderdude35
      @Builderdude35  7 ปีที่แล้ว

      That's awesome, I'm glad to hear I've helped!

  • @adamholden4202
    @adamholden4202 8 ปีที่แล้ว +4

    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  8 ปีที่แล้ว

      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 7 ปีที่แล้ว

    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  7 ปีที่แล้ว

      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 8 ปีที่แล้ว +1

    Hi, I like your video it was so helpful but i'm having problems decelerating it how do you

    • @Builderdude35
      @Builderdude35  8 ปีที่แล้ว +1

      It's the same exact program, just in reverse. Set your starting speed, and then instead of adding 1 each time, subtract 1.

  • @GuyEvron
    @GuyEvron 7 ปีที่แล้ว

    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  7 ปีที่แล้ว

      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: th-cam.com/video/_YRwKHP4v8A/w-d-xo.html

  • @toby2120
    @toby2120 5 ปีที่แล้ว

    bro thx for ur videos so helpful

  • @SaddyTrue
    @SaddyTrue 6 ปีที่แล้ว

    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  6 ปีที่แล้ว

      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.

    • @SaddyTrue
      @SaddyTrue 6 ปีที่แล้ว

      Awesome, thanks for your reply

  • @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 :)

  • @thiagotoranza0496
    @thiagotoranza0496 7 ปีที่แล้ว +1

    How i can make a des-acceleration please?

    • @Builderdude35
      @Builderdude35  7 ปีที่แล้ว

      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 8 ปีที่แล้ว

    What do i do if my motors are inverted and i want to go forward?

    • @Builderdude35
      @Builderdude35  8 ปีที่แล้ว

      Physically inverted? Use an Invert Motor block (I have a video on the topic).

    • @NickTelles
      @NickTelles 8 ปีที่แล้ว

      Okay thanks.

  • @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.

  • @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 6 ปีที่แล้ว

      to decelerate you need to
      make the whole thing over again but in negative numbers

  • @yisongzheng4264
    @yisongzheng4264 5 ปีที่แล้ว

    I could not get mine to work

  • @vp7852
    @vp7852 7 ปีที่แล้ว

    how do you get it in a my block

    • @Builderdude35
      @Builderdude35  7 ปีที่แล้ว

      Check out this video: th-cam.com/video/bMKnGm6IM6k/w-d-xo.html

    • @vp7852
      @vp7852 7 ปีที่แล้ว

      thanks

  • @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!

  • @DeltaTeamIroniHeyRobotics
    @DeltaTeamIroniHeyRobotics 4 ปีที่แล้ว

    The legend

  • @HeosforoAttack
    @HeosforoAttack 7 ปีที่แล้ว +1

    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  7 ปีที่แล้ว

      Yes, you are correct. But the C programmer in me likes to use a variable out of habit. :)

  • @RahulBasu2001
    @RahulBasu2001 9 ปีที่แล้ว

    REQUEST: PLEASE CHANGE YOUR INTRO TUNE :P

    • @Builderdude35
      @Builderdude35  9 ปีที่แล้ว

      +Rahul Basu No way! I love my intro jingle! :)

    • @zerogaming4379
      @zerogaming4379 9 ปีที่แล้ว

      +Builderdude35 Bwahahahahaha

  • @PogHacking
    @PogHacking 6 ปีที่แล้ว

    this is really cool =-)

  • @bethlehemengineer6123
    @bethlehemengineer6123 7 ปีที่แล้ว

    Robotics Club OLP

  • @greensheepgamingezdomoman7327
    @greensheepgamingezdomoman7327 6 ปีที่แล้ว

    horrible video quality but great explanation now a now that you recorded it with screencastomatic

  • @rishithanand9504
    @rishithanand9504 9 ปีที่แล้ว

    i want chicken

  • @rishithanand9504
    @rishithanand9504 9 ปีที่แล้ว

    plz

  • @shabs5549
    @shabs5549 7 ปีที่แล้ว

    bob