Electric Vehicle C

User avatar
Bazinga+
Exalted Member
Exalted Member
Posts: 380
Joined: Sat Mar 08, 2014 3:10 pm
Division: C
State: NY
Location: Ward Melville HD
Contact:

Re: Electric Vehicle C

Postby Bazinga+ » Mon Feb 01, 2016 2:36 am

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: 1106
Joined: Wed May 11, 2011 3:25 am
Division: Grad
State: TX
Contact:

Re: Electric Vehicle C

Postby iwonder » Mon Feb 01, 2016 2:48 am

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/28/how-to-avoid-resonance-issues-in-stepper-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: 380
Joined: Sat Mar 08, 2014 3:10 pm
Division: C
State: NY
Location: Ward Melville HD
Contact:

Re: Electric Vehicle C

Postby Bazinga+ » Mon Feb 01, 2016 3:27 am

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/28/how-to-avoid-resonance-issues-in-stepper-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: 1106
Joined: Wed May 11, 2011 3:25 am
Division: Grad
State: TX
Contact:

Re: Electric Vehicle C

Postby iwonder » Mon Feb 01, 2016 3:45 am

(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: Fri Jan 15, 2016 12:53 am
Division: C
State: PA
Contact:

Re: Electric Vehicle C

Postby HandsFreeCookieDunk » Fri Feb 05, 2016 3:29 am

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: 380
Joined: Sat Mar 08, 2014 3:10 pm
Division: C
State: NY
Location: Ward Melville HD
Contact:

Re: Electric Vehicle C

Postby Bazinga+ » Fri Feb 05, 2016 4:26 am

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: Fri Jan 15, 2016 12:53 am
Division: C
State: PA
Contact:

Re: Electric Vehicle C

Postby HandsFreeCookieDunk » Fri Feb 05, 2016 11:47 am

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: 1106
Joined: Wed May 11, 2011 3:25 am
Division: Grad
State: TX
Contact:

Re: Electric Vehicle C

Postby iwonder » Fri Feb 05, 2016 12:35 pm

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: 380
Joined: Sat Mar 08, 2014 3:10 pm
Division: C
State: NY
Location: Ward Melville HD
Contact:

Re: Electric Vehicle C

Postby Bazinga+ » Fri Feb 05, 2016 6:12 pm

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: 99
Joined: Mon Jun 01, 2015 10:43 pm
Division: C
State: OH
Contact:

Re: Electric Vehicle C

Postby Private Wang Fire » Wed Feb 10, 2016 1:06 am

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

User avatar
Bazinga+
Exalted Member
Exalted Member
Posts: 380
Joined: Sat Mar 08, 2014 3:10 pm
Division: C
State: NY
Location: Ward Melville HD
Contact:

Re: Electric Vehicle C

Postby Bazinga+ » Wed Feb 10, 2016 2:39 am

Private Wang Fire wrote: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?

Not sure how you would control a brushless motor with a transistor circuit. ESC is definitely necissary, and it works by sending pulses to the brushless motor at the correct frequency.
Innovation =/= success

Private Wang Fire
Member
Member
Posts: 99
Joined: Mon Jun 01, 2015 10:43 pm
Division: C
State: OH
Contact:

Re: Electric Vehicle C

Postby Private Wang Fire » Wed Feb 10, 2016 2:45 am

Bazinga+ wrote:
Private Wang Fire wrote: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?

Not sure how you would control a brushless motor with a transistor circuit. ESC is definitely necissary, and it works by sending pulses to the brushless motor at the correct frequency.


With the transistor you can do the same with PWM on the arduino, just wondering what the specific advantage of an ESC was.
MASON HIGH SCHOOL

iwonder
Admin Emeritus
Admin Emeritus
Posts: 1106
Joined: Wed May 11, 2011 3:25 am
Division: Grad
State: TX
Contact:

Re: Electric Vehicle C

Postby iwonder » Wed Feb 10, 2016 2:50 am

Brushless motors require three different 'PWM' signals all 120 degrees out of phase from the other. To get a reliable speed control you need to worry about correctly commutating the motor and some sort of speed detection (via sensor or back-emf measurement). I'm not even sure if the arduino uno has the power to do this properly, it's not just a matter of sending PWM.

Now, brushed motors are a different story. The major benefit of an ESC with a brushed motor is probably just having all the hard part done up in a nice box, no concerns about heat dissipation or switching issues. For smaller motors, designing your own h-bridge circuit is probably cheaper and quite simple. Great learning experience to boot.
'If you're the smartest person in the room, you're in the wrong room' - Unknown

User avatar
Bazinga+
Exalted Member
Exalted Member
Posts: 380
Joined: Sat Mar 08, 2014 3:10 pm
Division: C
State: NY
Location: Ward Melville HD
Contact:

Re: Electric Vehicle C

Postby Bazinga+ » Wed Feb 10, 2016 2:58 am

Private Wang Fire wrote:
Bazinga+ wrote:
Private Wang Fire wrote: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?

Not sure how you would control a brushless motor with a transistor circuit. ESC is definitely necissary, and it works by sending pulses to the brushless motor at the correct frequency.


With the transistor you can do the same with PWM on the arduino, just wondering what the specific advantage of an ESC was.

For many ESCs you can adjust settings like punch and obreak strength which is pretty useful. I'm still not sure how you can control a brushless motor right from an arduino. I think you are thinking of brushed motors which can be controlled in that fashion, but brushless motors have 3 wires(3 phases) and each sends pseudo-AC current, which can't come directly from the arduino. So the advantage of an esc is that you can control brushless motors which are much stronger and faster than brushed or regular DC motors.
Innovation =/= success

Private Wang Fire
Member
Member
Posts: 99
Joined: Mon Jun 01, 2015 10:43 pm
Division: C
State: OH
Contact:

Re: Electric Vehicle C

Postby Private Wang Fire » Wed Feb 10, 2016 3:07 am

Bazinga+ wrote:
Private Wang Fire wrote:
Bazinga+ wrote:Not sure how you would control a brushless motor with a transistor circuit. ESC is definitely necissary, and it works by sending pulses to the brushless motor at the correct frequency.


With the transistor you can do the same with PWM on the arduino, just wondering what the specific advantage of an ESC was.

For many ESCs you can adjust settings like punch and obreak strength which is pretty useful. I'm still not sure how you can control a brushless motor right from an arduino. I think you are thinking of brushed motors which can be controlled in that fashion, but brushless motors have 3 wires(3 phases) and each sends pseudo-AC current, which can't come directly from the arduino. So the advantage of an esc is that you can control brushless motors which are much stronger and faster than brushed or regular DC motors.


Hmm, my brushed motor must be pretty op then... probably not going to switch this far into the season. Thanks for the info!
MASON HIGH SCHOOL


Return to “Electric Vehicle C”

Who is online

Users browsing this forum: No registered users and 1 guest