Go to Post I used to think FIRST was about my learning experiences, but now that I'm out of high school and am a seasoned veteran of FIRST I've realized that this organization is about more than my own enjoyment, it's about the enjoyment of others. - Jeremiah Johnson [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 23-04-2008, 18:54
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
Victor logistics.

Hello. Does anyone know how the victors turn a servo pwm(1-2ms pulse) to a 0 - 100% pwm? Do they have their own "built-in" micro controllers? Is there a way to mimic this effect on a general microcontroller(arduino for instance?) with clever programming?

The main reason i'm asking is I might design my own speed controller for an off-season project and I'm hoping I could interface it with standard RC type receivers. Thanks
__________________
Relax! It's only ones and zeros!
  #2   Spotlight this post!  
Unread 23-04-2008, 19:05
moojoe's Avatar
moojoe moojoe is offline
Registered User
AKA: Zachary
FRC #1712 (Power Hawks)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2005
Location: Annapolis, MD
Posts: 37
moojoe is on a distinguished road
Re: Victor logistics.

While I'm more mechanical then electrical/programming, I know that the servos are not plugged into victors, but into one of PWM ports on the R.C.
this is from rule R62
Quote:
Servos must be directly connected to the PWM ports on the Robot Controller. They
must not be connected to speed controllers or relay modules.
Im not sure exactly how the RC deals with them except that they go to the PWM port.
I'm sure someone better versed in that area could help you.
  #3   Spotlight this post!  
Unread 23-04-2008, 19:07
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,813
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: Victor logistics.

Victors are also connected to the PWMs.

You have an input voltage that goes into a black box, is modified by a signal, and comes out the other side. That's about all I know, except that FETs have something to do with it, and you need to keep the black box relatively cool.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #4   Spotlight this post!  
Unread 23-04-2008, 19:14
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: Victor logistics.

I once found the spec for it, and built a signal generator using a couple of 555 Timers and a potentiometer. If you are really interested, I can try to find the specs again.

I had major control issues with it though, but I was only using 5% resistors.

Jacob
  #5   Spotlight this post!  
Unread 23-04-2008, 19:19
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: Victor logistics.

The victors do contain a microprocessor that measures the duration of the pulse, and sets the duty cycle and direction of its H-bridge. You don't need to be very clever in the conversion: Take the width and map it onto your duty cycle. Here is some bad pseudo code to get you rolling.

Code:
if(width > positive_dead_band):
   direction = positive
   duty_cycle = ( width - positive_dead_band ) / scalar_constant

else if(width < negative_dead_band):
   direction = negative
   duty_cycle = ( negative_dead_band - width ) / scalar_constant

else:
   don't move
If you are attempting to connect a Victor to a hobby servo output, you may need to purchase one of IFI's amplifiers. These simply beef up the drive strength of the signal.

As a point of anality, H-Bridges are controlled by DCM - Duty Cycle modulation, not PWM - Pulse Width Modulation. The two are electrically identical, but conceptually very different.

PWM is a serial communication protocol (albeit a weird one). In a PWM signal, I can adjust the dwell period between pulses without changing the meaning (to a point). Its "inputs" are pulse width and update rate.

In a DCM control, I can adjust the frequency without changing the output (to a point). Its update are percent high and frequency.

Yes, the distinction is completely anal. However, I believe it important so the students can better understand what an H-Bridge does.
  #6   Spotlight this post!  
Unread 23-04-2008, 19:42
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Victor logistics.

Note that you can build your own 'Hobby PWM to duty-cycle" converter, using a servo amplifier like an NE544 (or a modern equivalent). Hobby or R/C PWM (the 1 to 2 mSec pulse signal) is converted to a variable duty cycle, which can then be used to control power MOSFETs or transistors to drive a motor or other load.

Don
__________________

I am N2IRZ - What's your callsign?
  #7   Spotlight this post!  
Unread 24-04-2008, 21:13
B.Johnston B.Johnston is offline
Registered User
AKA: Bruce Johnston
no team
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2004
Location: Niagara Falls
Posts: 44
B.Johnston will become famous soon enough
Re: Victor logistics.

Victors actually do two things to control their load.
Vary the duration of an output pulse and control the polarity
(For the purpose of simplicity I may omit actual values and substitute simpler forms.)

They evaluate the length of the input pulse. i.e. 1ms to 2ms is the range of duration, with a frequency of about 40 cycles per second. If 1.5ms is the middle value a duration greater than this will produce a short full voltage pulse at the output. Keeping the math simple: a 1.6ms pulse input produces a 12V pulse of 5ms duration 40 times a second. A 2.0ms pulse input produces a 12V pulse of 25ms duration 40 times a second. If you cheat and do the math I'd hear you say “hey wait a minute, for a 2ms pulse this thing always puts out 12V” and I’d agree.
Now for pulses less than 1.5ms the victor swithes the + and – polarity and adjusts the output pulse length in the same fashion.

The Transistors in the H bridge are switched on and off at a varying duty cycle which produces the variable power needed to adjust the motor speed.

In the following diagram the red trace is the pwm input, the blue trace is the pulsed output and the green trace is the output power averaged over the25ms period.
Attached Thumbnails
Click image for larger version

Name:	PwmDrawing1.PNG
Views:	91
Size:	19.6 KB
ID:	6609  
  #8   Spotlight this post!  
Unread 28-04-2008, 21:07
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
Re: Victor logistics.

thanks 1680Bruce, but I understand how victors control a motor with varying pulses. I also understand that the control signal going into a victor is different than what comes out. What goes on in between these two signals is a mystery.

let's say I used some general microcontroller. Pretend that the "servo-type" signal goes into this microcontroller. Now i'm guessing that this microcontroller needs to measure the time of the input pulse. The time of the input pulse could then be applied to some formula or something to transform it to "motor-type" control signal.
How would one go about measuring the length of the "servo-type" pulse?

Quote:
Originally Posted by EricVanWyk View Post
If you are attempting to connect a Victor to a hobby servo output, you may need to purchase one of IFI's amplifiers. These simply beef up the drive strength of the signal.
No, as stated in my first post, I am attempting to design my own controller.
__________________
Relax! It's only ones and zeros!
  #9   Spotlight this post!  
Unread 28-04-2008, 22:20
ubermeister's Avatar
ubermeister ubermeister is offline
Registered User
AKA: Eric VA
FRC #0449 (The Blair Robot Project)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Silver Spring
Posts: 48
ubermeister is a jewel in the roughubermeister is a jewel in the roughubermeister is a jewel in the roughubermeister is a jewel in the rough
Re: Victor logistics.

I am also looking to design a speed controller, and have thought for a while about this problem. The biggest issue is switching polarity based on the length of the pulse. I assume the Victor achieves this with a microcontroller, which also lets it have a deadband and the ability to be calibrated. If you don't want to get into that, you can do the following much simpler design. I haven't tried this, but plan to, and see no reason why it wouldn't work.

Have the PWM signal control the speed, but not polarity, of the output. This just requires some big FETs. Have two separate digital outputs control the polarity via an H-bridge. More info can be found here: http://roko.ca/articles/hbridge.php?page=3
__________________


  #10   Spotlight this post!  
Unread 29-04-2008, 18:58
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Victor logistics.

Note that you don't *need* a microcontroller for this - a servo amp, a 555 circult, and other ways exist that are entirely in hardware.

But, let's say you wanted to do it in a uC just for the learning experience.

First, you need a comparator to clean up the incoming PWM signal and slice it at a good decision level, say 2.5 volts (for a 5v PWM signal). Feed the output (TTL level) into an input pin on the uC. Set a timer to start when the pin changes state (low to high, for example) and read the timer when it changes state again. Store that value, it'll translate to a value between 0.9 mS and 2.1 mS (or so).

Meanwhile, reset the timer and set it to trigger at the next pulse.

Then, using one of several methods (I suggest a look-up table), set the on-off ratio of an output pin to a value between maybe 0/5% and 95/100%. Pick a pulse rate between about 500 Hz and 4 kHz, but that can realistically be between 60 Hz and 20 kHz or more.

This output pulse controls an H-Bridge - homebrew with discrete FETs or bought as an H-Bridge module.

When the on-off ratio (duty cycle) is 50%, the motor won't move, since forward voltage and reverse voltage cancel - the motor won't move forward or backwards, the pulses are too short and evenly balanced. At 5% duty, it'll move backwards, and at 95% it'll move forwards.

If that's not enough to get you started, write back.

Don
__________________

I am N2IRZ - What's your callsign?

Last edited by DonRotolo : 29-04-2008 at 20:16.
  #11   Spotlight this post!  
Unread 30-04-2008, 00:23
yongkimleng yongkimleng is offline
deus ex programmeur
AKA: James Yong
FTC #0747
Team Role: Mentor
 
Join Date: Aug 2006
Rookie Year: 2004
Location: Singapore, West
Posts: 134
yongkimleng is a jewel in the roughyongkimleng is a jewel in the roughyongkimleng is a jewel in the rough
Send a message via MSN to yongkimleng
Re: Victor logistics.

One of the larger problems would be to actually choose the right MOSFETs and drive them correctly. I did a bit of intensive reading and found two things

1. high side mosfets (near to +ve) and low side mosfets (near to GND). A pair of high side and a pair of low side MOSFETs make up a HBridge.

2. MOSFET drivers - faster u saturate the mosfet, lesser heat generated, lesser power losses

3. proper timing to prevent "strikethroughs" where +ve is shorted to ground during switching.

4. balancing resistors to provide proper distribution when running MOSFETs in parallel

5. dropping in a hall effect sensor for current sensing is good too.

Being unfamiliar with discrete MOSFETs, I did run them off a TLE5205 (5A constant) Hbridge which takes TTL inputs. Next step would be to run some 5205s in parallel - or try discrete MOSFETs.....

Unfortunately TLE5205s are rather hard to find in my area recently. Not sure for you guys.
__________________
| jamesyong.net |
FVC2007, FTC2008
  #12   Spotlight this post!  
Unread 30-04-2008, 11:22
B.Johnston B.Johnston is offline
Registered User
AKA: Bruce Johnston
no team
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2004
Location: Niagara Falls
Posts: 44
B.Johnston will become famous soon enough
Re: Victor logistics.

Quote:
Originally Posted by Hazmatt View Post
thanks 1680Bruce, but I understand how victors control a motor with varying pulses. I also understand that the control signal going into a victor is different than what comes out. What goes on in between these two signals is a mystery.

let's say I used some general microcontroller. Pretend that the "servo-type" signal goes into this microcontroller. Now i'm guessing that this microcontroller needs to measure the time of the input pulse. The time of the input pulse could then be applied to some formula or something to transform it to "motor-type" control signal.
How would one go about measuring the length of the "servo-type" pulse
No, as stated in my first post, I am attempting to design my own controller.

Are you making this control in a pure hardware design via logic gates or in a software application running on a microprocessor?

In either case to convert from the lower signal level to the higher drive level would require a measurement of both input and desired output against a continuous and stable reference. In hardware and in software this would be derived from a clock oscillator like a 555 chip.

Signal conditioning and output sequencing are extra to the basic functioning of measuring against a reference so these would be dependant mostly on and specific to whatever components you choose for implementing your design.
  #13   Spotlight this post!  
Unread 30-04-2008, 23:21
yongkimleng yongkimleng is offline
deus ex programmeur
AKA: James Yong
FTC #0747
Team Role: Mentor
 
Join Date: Aug 2006
Rookie Year: 2004
Location: Singapore, West
Posts: 134
yongkimleng is a jewel in the roughyongkimleng is a jewel in the roughyongkimleng is a jewel in the rough
Send a message via MSN to yongkimleng
Re: Victor logistics.

Quote:
No, as stated in my first post, I am attempting to design my own controller.
Are you using the Arduino? The uC on it should have a hardware based PWM generator suitable for driving H-Bridges.. try reading the datasheet

Do share with us what MOSFET you are trying out and how easy/hard it is to interface them.
__________________
| jamesyong.net |
FVC2007, FTC2008
  #14   Spotlight this post!  
Unread 01-05-2008, 17:53
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
Re: Victor logistics.

yes, as soon as I figure everything out/purchase parts I'll make a project page.
__________________
Relax! It's only ones and zeros!
  #15   Spotlight this post!  
Unread 06-05-2008, 01:03
Generalx5's Avatar
Generalx5 Generalx5 is offline
Hard Core Inventor
AKA: Jun(John) Zheng
FRC #1346 (Trobotics)
Team Role: Student
 
Join Date: Nov 2005
Rookie Year: 2004
Location: CANADA
Posts: 94
Generalx5 will become famous soon enough
Re: Victor logistics.

Actually, H-Bridges can be made with all low side Metal Oxide Semiconductor FETs. This being that N channel fets can handle much more current than the high side fets.

Also, there are more than a few ways to make an H-Bridge work. The pair of low side and high side MOSFETS are just one of them, this being that only 1 signal comming in will only activate FETS that are diagonal to one another. Reffering to the classic H formation on an H Bridge. This method is easy to make, and prevents shoot thru...

Method 2 uses only N channel fets, but requires an inverted MOSFET driver to drive each Side, so driver 1 controls the upper left and lower left, while driver 2 controls upper right and lower right. This also prevents shoot thru of current.

Many more ways to make an H bridge.

Signals of 1 - 2ms enters on one end, with 1.5ms being neutral. The other end where the motor is connected to, has a duty cycle that varies. going from low frequencies such as 20hz to 40Khz. varies greatly, most applications, a frequency of 6khz is about just in the middle. I read that from somewhere, but can't source it.

As for the polarity changes, you can make the microcontroller do that for you. Make an H bridge with a pair of MOSFET Drivers connected to the Gates on the mosfets. then have your digital output pull up or pull down the inputs on the MOSFET Drivers. The mosfet drivers are used because of the low gate resistance on the MOSFETs them selves. Having low resistance when a high current prescence at the channel makes the gate hard to open. So by using a driver, you can dump high currents at the gate at high frequencies to allow the channel to flow. If you need high duty cycles, you will have to load your routine in the user_routine_fast.c file. And go from there.

You can start experimenting with a bread board, and single mosfets first. after you know the fundementals, you can beef up and parallel your MOSFETS to handle currents as high as 80 amps steady loads or more.

As far as I know, the Victors use FETS that are about 65Amps on each MOSFET on a steady load, but be careful, because the power dissapation can be around 40 -80W each, and the pakage is only about a cm^2 area if you attach a heat sink.

Those victors use 12 fets, 3 per quadrant of the H bridge. So it would be able to handle high current loads for longer periods of time. They were able to make the duty cycle efficient enought that the fets dont requre added heat sinks.


International Rectifier makes MOSFETS with various pakage types, the ones used on the Victors are pakage: TO-220

Microchip.com makes the MOSFET drivers, other do too....Anyways, look for a pdf document on the website: "Mosfet Driver guide" or something along the line, it helps you select the right MOSFET drivers for the right type of MOSFETs....
GL with your experiments!

Last edited by Generalx5 : 06-05-2008 at 01:11. Reason: Error: syntax error
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
Victor Problems Justin M. Electrical 8 13-02-2008 17:41
Victor 883's? hunter7193 Electrical 0 10-02-2008 17:13
Victor Lights robobrain0101 Technical Discussion 9 13-02-2007 15:18
victor mosfets sciguy125 Electrical 13 19-07-2006 09:15
Victor 884's not behaving the same as Victor 883's programmer1 Programming 13 10-03-2004 21:51


All times are GMT -5. The time now is 01:12.

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