Go to Post All I can say is - we are such geeks! - Raul [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-08-2010, 16:53
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Speed Controller Design

I've been looking at designs for speed controllers (mostly Jaguars, because I can get my hands on those schematics). Frankly, they're overpriced, and if I want to build my own robot (outside of FIRST), I'd much rather design my own (or at least make a hearty attempt).

Attached is the schematic to the Jaguar Speed Controller. The majority of the actual motor controlling portion of the design is on the 2nd page on the right. Basically, it's an H-Bridge, controlled by two MOSFET drivers (one for each side) and each leg of the H-Bridge is made up of 3 MOSFETs.

My issue is this: By looking at the design and not knowing what signals CTRLA, CTRLB, PWMA, and PWMB are (since they're coming out of the microcontroller, I don't know what they are unless I were to have the uncompiled firmware for the Jaguar), I can't see this thing working in theory. After carefully studying the datasheet for the MOSFET driver, I learned that if the signal coming into PWM is high, HDRV is high (opening the MOSFETs it controls) and LDRV is low (closing the MOSFETs it controls).

Knowing this, given the following situation (set up the same as a Jaguar, only simplified for understanding)


Assuming the PWM square waves are aligned, when the PWM signal is HIGH, both Q1 and Q2 are on, but since Q3 and Q4 are not, there is no current flow. Similarly, when the PWM signal is LOW, Q3 and Q4 are on and Q1 and Q2 are not, and there is still no current flow.

If the PWM square waves are inverse of each other (or any other alignment), when one is high and the other is low, current will flow (e.g. when the left side is high and the right is low, current will flow from Q1 to Q4). However, since the wave then inverts, it would then switch which MOSFETs are open, thus switching the motor direction, which doesn't sound like it would work out too well...



There is one other possibility still: What if they aren't putting a PWM input into the PWM pin, but rather the OD (Output Disable) and a HIGH or LOW into PWM, depending on motor direction?

OD pulls both HDRV and LDRV low (closing their MOSFETs) if it is low.



When PWM is HIGH on the left side, then Q1 is open and Q3 is closed. If it is LOW, Q1 is closed and Q3 is open. The same goes for the other side. Then the PWM into OD would close whichever is open when it is low. This would essentially create a magnified PWM power source, which is the goal of a speed controller.


The second setup works, but I'm skeptical to believe that is how it functions, because that is not the specified use for OD in the datasheet. However, it doesn't seem to work any other way. Anyone know what's going on for a fact, or have an oscilloscope and a Jaguar and is willing to test this out?
Attached Files
File Type: pdf Jaguar Schematic Rev B.pdf (56.0 KB, 120 views)
  #2   Spotlight this post!  
Unread 31-08-2010, 17:01
JesseK's Avatar
JesseK JesseK is offline
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,702
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: Speed Controller Design

The Jaguar is "overpriced" for your application because it provides more features than you need (CAN feedback is a major one).

An iPad is an overpriced e-reader, yet it also provides many other functions.

(For what it's worth)
__________________

Drive Coach, 1885 (2007-present)
CAD Library Updated 5/1/16 - 2016 Curie/Carver Industrial Design Winner
GitHub
  #3   Spotlight this post!  
Unread 31-08-2010, 17:06
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Speed Controller Design

Quote:
Originally Posted by JesseK View Post
The Jaguar is "overpriced" for your application because it provides more features than you need (CAN feedback is a major one).

An iPad is an overpriced e-reader, yet it also provides many other functions.

(For what it's worth)
Yes I can agree with that, and I still respect the Jaguar a ton, I just feel like it's a bit much for most applications. A 50 MHz MCU is pretty powerful, especially for just driving a speed controller. But at this point I'm more concerned with getting what I need and nothing more. The one I'm "designing" (basically, I'm working off the Jag design) will be I2C controlled, because I prefer it. Also, I don't care about a casing, whereas the Jag has a pretty custom plastic injection molded case to go along with it.

Please don't see this thread as a criticism of the Jaguar, but more or less a query of its design.
  #4   Spotlight this post!  
Unread 31-08-2010, 17:33
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Thumbs up Re: Speed Controller Design

Quote:
Originally Posted by Geek 2.0 View Post
I've been looking at designs for speed controllers (mostly Jaguars, because I can get my hands on those schematics). Frankly, they're overpriced, and if I want to build my own robot (outside of FIRST), I'd much rather design my own (or at least make a hearty attempt).
I feel extremely comfortable with disagreeing with you on this point, but instead lets agree to ammend the statement with "for your purposes".

Quote:
Originally Posted by Geek 2.0 View Post
My issue is this: By looking at the design and not knowing what signals CTRLA, CTRLB, PWMA, and PWMB are (since they're coming out of the microcontroller, I don't know what they are unless I were to have the uncompiled firmware for the Jaguar), I can't see this thing working in theory.
The firmware for the non FRC specific version is freely available for download on the RDK CD.

Quote:
Originally Posted by Geek 2.0 View Post

...
My laptop is broken, so I can't spend much CD time these days. I'd be happy to walk you through this when I get a replacement.
  #5   Spotlight this post!  
Unread 31-08-2010, 17:34
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Speed Controller Design

I understand what you're saying; there doesn't seem to be an input to chose between HDRV and LDRV. The reason is, they're both used together.
If you look at the datasheet for the PWM driver, it says the low is 180 degrees out of phase of the high. That means the "off" period for HDRV is the "on" period for LDRV. On the Jaguar (unlike the Victor) the H-bridge switches between 12v and 0v, not 12v and "open".

There are then two ways to stop the motor: brake (driving both sides at 50% duty cycle, or 6v) or coast (using the OD pin).

What's especially interesting about this is that you don't *need* to dedicate a microcontroller output to each side; you just swap the high and low on one side of the h-bridge, and you can use the same PWM signal to control both PWM drivers.

You are absolutely right that you could make a less expensive speed controller with less features. Something like that might actually be quite useful. Let me recommend that you use an aluminum heat sink instead of just a fan. A little thermal mass is useful in preventing accidents.
__________________
-- Marshal Horn

Last edited by kamocat : 31-08-2010 at 17:36.
  #6   Spotlight this post!  
Unread 31-08-2010, 20:56
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Speed Controller Design

Quote:
Originally Posted by kamocat View Post
I understand what you're saying; there doesn't seem to be an input to chose between HDRV and LDRV. The reason is, they're both used together.
If you look at the datasheet for the PWM driver, it says the low is 180 degrees out of phase of the high. That means the "off" period for HDRV is the "on" period for LDRV. On the Jaguar (unlike the Victor) the H-bridge switches between 12v and 0v, not 12v and "open".

There are then two ways to stop the motor: brake (driving both sides at 50% duty cycle, or 6v) or coast (using the OD pin).

What's especially interesting about this is that you don't *need* to dedicate a microcontroller output to each side; you just swap the high and low on one side of the h-bridge, and you can use the same PWM signal to control both PWM drivers.

You are absolutely right that you could make a less expensive speed controller with less features. Something like that might actually be quite useful. Let me recommend that you use an aluminum heat sink instead of just a fan. A little thermal mass is useful in preventing accidents.
Okay I'm starting to get there... but still a bit confused.

If I were to want to run at half speed, so about 6V, I would think I should use a 50% duty cycle, but that runs the motor in forward 50% of the time and reverse 50% of the time, thus braking as you stated. The same holds true for any other speed; The time the PWM is low, the motor is doing the opposite of what I want. So, to run at half speed, would I do what I tried explaining and hold PWM high and then send a 50% duty cycle to OD? Or is there something I'm still missing?
  #7   Spotlight this post!  
Unread 31-08-2010, 21:31
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Speed Controller Design

To run at half speed forward, you have a 75% duty cycle. Backward at half-speed, you have a 25% duty cycle.
__________________
-- Marshal Horn
  #8   Spotlight this post!  
Unread 31-08-2010, 21:52
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Speed Controller Design

Quote:
Originally Posted by kamocat View Post
To run at half speed forward, you have a 75% duty cycle. Backward at half-speed, you have a 25% duty cycle.
Okay, that makes sense. It just seems odd that it's running forward 75% of the time and backwards 25% of the time to go forward at 50%... wouldn't it make more sense to just go forward 50% of the time?
  #9   Spotlight this post!  
Unread 31-08-2010, 21:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Speed Controller Design

Quote:
Originally Posted by kamocat View Post
To run at half speed forward, you have a 75% duty cycle. Backward at half-speed, you have a 25% duty cycle.
Marshal,

Have you confirmed the above experimentally?


Last edited by Ether : 31-08-2010 at 22:02.
  #10   Spotlight this post!  
Unread 31-08-2010, 22:03
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Speed Controller Design

No, I haven't.
Every Jaguar that I haven't fried I've kept together. However, it seems to be what makes sense.
I believe there is a thin conformal coating on the Jaguar, so I would not be able to probe the microcontroller directly. However, I can probe the Jaguar output if you like.

If you're asking about the PWM drivers, all the MOSFETs are identical (all N-channel), and so switching the high and low should work fine.
__________________
-- Marshal Horn
  #11   Spotlight this post!  
Unread 31-08-2010, 22:05
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Speed Controller Design

Quote:
Originally Posted by Ether View Post
Marshal,

Have you confirmed the above experimentally?
I have. It is referred to as "locked anti-phase", and is usually used when you need fine control while nearly off.

EDIT:
Locked anti-phase is only applicable with high chop frequencies. Locked anti-phase could work on a Jaguar, but not on a Victor.

Last edited by EricVanWyk : 31-08-2010 at 22:07.
  #12   Spotlight this post!  
Unread 31-08-2010, 22:10
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Speed Controller Design

Quote:
Originally Posted by EricVanWyk View Post
I have. It is referred to as "locked anti-phase", and is usually used when you need fine control while nearly off.

EDIT:
Locked anti-phase is only applicable with high chop frequencies. Locked anti-phase could work on a Jaguar, but not on a Victor.
Is this the default operation mode of the Jaguar ?


  #13   Spotlight this post!  
Unread 31-08-2010, 22:24
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Speed Controller Design

I'm pretty sure this is the only option on the Jaguar.
Even in coast mode, when I take a motor down from full speed to 10%, it goes down like it was braked. (It also draws a lot of current in doing so, tripping the crowbar on my 9A power supply, even if the motor is free-running. It performs fine on battery.)
__________________
-- Marshal Horn
  #14   Spotlight this post!  
Unread 31-08-2010, 22:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Speed Controller Design

Quote:
Originally Posted by kamocat View Post
Even in coast mode, when I take a motor down from full speed to 10%, it goes down like it was braked. (It also draws a lot of current in doing so...
Is this with open-loop (voltage) control, or with closed-loop speed control ?


  #15   Spotlight this post!  
Unread 31-08-2010, 22:37
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Speed Controller Design

Okay, for the sake of education (and that I've exhausted the extent of Wikipedia's ability to have a page on every minuscule topic) could someone please give a better definition of locked antiphase? I understand that it's using a PWM where a 50% duty cycle is brake, 100% is full forward, 75% half, 25% half reverse, etc. But maybe an illustration or something to that effect? I'm kinda swimming in all these terms...

Also high chop frequency. I have only a very slight idea of what that is, and how it affects Victors and Jaguars differently.

Thanks!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FRC Robot Controller/Speed Controller RoarRoar Control System 3 17-01-2008 10:41
Speed Controller Code ND4SPDLSC Programming 2 18-02-2006 21:48
speed controller max speed Team 668 Programming 15 13-02-2005 14:05
Speed Controller Megas_xlr Control System 3 18-01-2005 15:41
Speed Controller Megas_xlr Electrical 3 18-01-2005 15:41


All times are GMT -5. The time now is 07:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi