Electric Vehicle C

Locked
User avatar
Bazinga+
Exalted Member
Exalted Member
Posts: 383
Joined: March 8th, 2014, 7:10 am
Division: C
State: NY
Has thanked: 0
Been thanked: 0

Re: Electric Vehicle C

Post by Bazinga+ »

iwonder wrote:
InfiniCuber wrote:My run time is 2.6 and i found a way to get it faster, although I have to admit it has been a long journey and a PAIN to do.
Finally someone does it... Did you have any issues hitting resonance points as you accelerate?
Not sure of this is the same, but I've had a similar problem with brushless motors. I have an encoder on the back and a brushless motor on the front, and sometimes the resonance frequency causes it to speed up and it won't slow down no matter what. I found a few fixes, but my car has already crashed into a wall at 50 mi/hr a few times. Not completely sure if its in resonance or if the interrupts for the encoder are messing with the encoder, or both.
Innovation =/= success
iwonder
Admin Emeritus
Admin Emeritus
Posts: 1115
Joined: May 10th, 2011, 8:25 pm
Division: Grad
State: TX
Has thanked: 0
Been thanked: 1 time

Re: Electric Vehicle C

Post by iwonder »

Bazinga+ wrote:
iwonder wrote:
InfiniCuber wrote:My run time is 2.6 and i found a way to get it faster, although I have to admit it has been a long journey and a PAIN to do.
Finally someone does it... Did you have any issues hitting resonance points as you accelerate?
Not sure of this is the same, but I've had a similar problem with brushless motors. I have an encoder on the back and a brushless motor on the front, and sometimes the resonance frequency causes it to speed up and it won't slow down no matter what. I found a few fixes, but my car has already crashed into a wall at 50 mi/hr a few times. Not completely sure if its in resonance or if the interrupts for the encoder are messing with the encoder, or both.
I think you're seeing a different problem, here's a page with a video of what resonance looks like.

https://phidgets.wordpress.com/2014/07/ ... er-motors/

It's almost exclusively a stepper issue, since it has to do with the step change creating a slight vibration on the shaft, causing the motor to oscillate back and forth between two steps. InfiniCuber likely has no issues because the momentum of the vehicle is carrying him through the low speed points, and as you speed up, the points spread out and are of less importance. Here's a video that's a but more technical but might help. Also it has a nice demo of a stepper taking individual revolutions at 1000 rpm that's pretty neat.

https://www.youtube.com/watch?v=Rv8NVF6ZLlQ

Brushless motors do 'cog' but the way they're driven (and due to the way they're designed) they turn smoothly and don't have these issues. I'd be surprised if it wasn't an issue with the encoder missing counts or another system issue. Either way, sounds like some pillows and more testing are in your future.
'If you're the smartest person in the room, you're in the wrong room' - Unknown
User avatar
Bazinga+
Exalted Member
Exalted Member
Posts: 383
Joined: March 8th, 2014, 7:10 am
Division: C
State: NY
Has thanked: 0
Been thanked: 0

Re: Electric Vehicle C

Post by Bazinga+ »

iwonder wrote:
Bazinga+ wrote:
iwonder wrote:
Finally someone does it... Did you have any issues hitting resonance points as you accelerate?
Not sure of this is the same, but I've had a similar problem with brushless motors. I have an encoder on the back and a brushless motor on the front, and sometimes the resonance frequency causes it to speed up and it won't slow down no matter what. I found a few fixes, but my car has already crashed into a wall at 50 mi/hr a few times. Not completely sure if its in resonance or if the interrupts for the encoder are messing with the encoder, or both.
I think you're seeing a different problem, here's a page with a video of what resonance looks like.

https://phidgets.wordpress.com/2014/07/ ... er-motors/

It's almost exclusively a stepper issue, since it has to do with the step change creating a slight vibration on the shaft, causing the motor to oscillate back and forth between two steps. InfiniCuber likely has no issues because the momentum of the vehicle is carrying him through the low speed points, and as you speed up, the points spread out and are of less importance. Here's a video that's a but more technical but might help. Also it has a nice demo of a stepper taking individual revolutions at 1000 rpm that's pretty neat.

https://www.youtube.com/watch?v=Rv8NVF6ZLlQ

Brushless motors do 'cog' but the way they're driven (and due to the way they're designed) they turn smoothly and don't have these issues. I'd be surprised if it wasn't an issue with the encoder missing counts or another system issue. Either way, sounds like some pillows and more testing are in your future.
Yep we've been using pillows hah. I am quite sure the problem is that when the arduino sends the signal to the esc, for example high signal then waits 1000 micro seconds, then low signal, the time between the high and low is actually higher because the interrupts ads time in between the signals. At a certain point this starts snowball so the faster the motor turns the more interrupts there are and the faster the signal tells it to go, so it speeds up without stop. Do you think a better processor would fix the problem? Currently I am using arduino uno, which is like 16 GHz 2kb ram and 16 bit, and I am switching to a Due which is like 96 GHz, 96kb ram and 32 bit. I think with the due the interrupts will be preformed much much faster and will have less of an effect on the motor.
Innovation =/= success
iwonder
Admin Emeritus
Admin Emeritus
Posts: 1115
Joined: May 10th, 2011, 8:25 pm
Division: Grad
State: TX
Has thanked: 0
Been thanked: 1 time

Re: Electric Vehicle C

Post by iwonder »

(Mhz, but that's just me being pedantic)

The arduino is actually using interrupts to send the servo pulses as well, it uses a timer in the processor to count up the time, which then triggers an internal interrupt, does it's deal with the pulse, and resets.

It's entirely possible that there's an issue with interrupts. I believe what you're encountering is a type of race condition (in this case it's more literal, I guess :lol ). Make sure your encoder interrupt code is as absolutely bare-bones as possible, i.e. just incrementing a number. Let the loop function handle the comparisons and distance calculations. If you've stripped down your interrupt code (the Servo.h function's interrupt handler should be as minimal as possible already), then it's definitely worth it to try the faster processor.
'If you're the smartest person in the room, you're in the wrong room' - Unknown
HandsFreeCookieDunk
Member
Member
Posts: 81
Joined: January 14th, 2016, 4:53 pm
Division: C
State: PA
Has thanked: 0
Been thanked: 1 time

Re: Electric Vehicle C

Post by HandsFreeCookieDunk »

Out of curiosity, how is everyone connecting their motors to the drive axle? I'm considering a sprocket and chain system, but most sprockets seem to be press-fit rather than using a set screw, and I'm worried that they might slip.
User avatar
Bazinga+
Exalted Member
Exalted Member
Posts: 383
Joined: March 8th, 2014, 7:10 am
Division: C
State: NY
Has thanked: 0
Been thanked: 0

Re: Electric Vehicle C

Post by Bazinga+ »

HandsFreeCookieDunk wrote:Out of curiosity, how is everyone connecting their motors to the drive axle? I'm considering a sprocket and chain system, but most sprockets seem to be press-fit rather than using a set screw, and I'm worried that they might slip.
D-axles+gears.
Innovation =/= success
HandsFreeCookieDunk
Member
Member
Posts: 81
Joined: January 14th, 2016, 4:53 pm
Division: C
State: PA
Has thanked: 0
Been thanked: 1 time

Re: Electric Vehicle C

Post by HandsFreeCookieDunk »

Bazinga+ wrote:
HandsFreeCookieDunk wrote:Out of curiosity, how is everyone connecting their motors to the drive axle? I'm considering a sprocket and chain system, but most sprockets seem to be press-fit rather than using a set screw, and I'm worried that they might slip.
D-axles+gears.
How big is your motor may I ask? That would have been my first choice, but the diameter of my motor was very large compared to the gears that would fit on the shaft. (35mm diameter and 3.17 mm shaft)
iwonder
Admin Emeritus
Admin Emeritus
Posts: 1115
Joined: May 10th, 2011, 8:25 pm
Division: Grad
State: TX
Has thanked: 0
Been thanked: 1 time

Re: Electric Vehicle C

Post by iwonder »

Have you looked at timing belts? sprockets sounds heavy (lots of inertia) and like they have a lot of backlash in them.
'If you're the smartest person in the room, you're in the wrong room' - Unknown
User avatar
Bazinga+
Exalted Member
Exalted Member
Posts: 383
Joined: March 8th, 2014, 7:10 am
Division: C
State: NY
Has thanked: 0
Been thanked: 0

Re: Electric Vehicle C

Post by Bazinga+ »

iwonder wrote:Have you looked at timing belts? sprockets sounds heavy (lots of inertia) and like they have a lot of backlash in them.
I've been thinking about that, but after searching for a few hours I couldn't find the right ratio and bore diameter I needed. If someone plans to use timing belts I recommend building the whole car around it (starting with a timing belt/sprocket set and then buying the right size motor and axle to fit). I just found that gears can be found in many more sizes, and worst case scenario if the motor is too big, you can have more than 2 gears (1 gear in the middle).
Innovation =/= success
Private Wang Fire
Member
Member
Posts: 100
Joined: June 1st, 2015, 3:43 pm
Division: Grad
State: OH
Has thanked: 0
Been thanked: 0

Re: Electric Vehicle C

Post by Private Wang Fire »

How much of an advantage is it using an ESC over something like a simple transistor circuit? Seems like a pain with all the calibration and stuff, what's the benefit?
MASON HIGH SCHOOL '18
Locked

Return to “Electric Vehicle C”

Who is online

Users browsing this forum: No registered users and 9 guests