Go to Post Oh man... 20% skinnier, 40% dorkier, ... if that's what turns into one of our best mentors, I REALLY need to find a new hobby. ;) - Rich Kressly [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 14-02-2016, 11:17
fmercier fmercier is offline
Registered User
FRC #3329
 
Join Date: Feb 2016
Location: Camden County High School
Posts: 2
fmercier is an unknown quantity at this point
Unhappy spark controller dropping voltage in reverse

We are using spark controllers to run CIM motors is our shooter. However, output voltage drops below 3V through the spark when operated in reverse. What could cause this?
  #2   Spotlight this post!  
Unread 14-02-2016, 14:41
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,078
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: spark controller dropping voltage in reverse

Is the Spark calibrated?
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #3   Spotlight this post!  
Unread 14-02-2016, 15:30
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: spark controller dropping voltage in reverse

Please confirm that you are using a DVM to measure the output of the motor controller. It seems from your post that you feel the output voltage of the motor controller should be larger.

Have you calibrated your motor controllers yet?

Do a quick check and substitute another SPARK and see if the result is the same. Substitute a PWM motor controller of a different type. If they all do the same thing (low output voltage), you should probably take a very close look at your software, going line by line. You will have to put aside what you THINK the software SHOULD be doing and look at what it really IS doing.

Through the magic of PWM, you should always get a voltage on the output of a DC motor controller that is between zero and your instantaneous battery voltage. The polarity will depend on whether you are commanding forward or reverse.
  #4   Spotlight this post!  
Unread 14-02-2016, 16:03
dlsmith dlsmith is offline
Registered User
FRC #5268
 
Join Date: Feb 2016
Location: BioMech Falcons
Posts: 15
dlsmith is an unknown quantity at this point
Re: spark controller dropping voltage in reverse

We found that measuring the voltage with a DVM on the Victor speed controllers was unreliable because of the square waveform. Ours had a similar issue where the forward voltage looked like maybe 3 volts at a low speed and the reverse voltage at the same speed looked like 0.2 volts on the DVM. Clearly the motors were moving and we actually had a mentor look at the signal on an O-scope to measure the pulse widths instead.
  #5   Spotlight this post!  
Unread 14-02-2016, 16:31
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
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: spark controller dropping voltage in reverse

Quote:
Originally Posted by philso View Post
Please confirm that you are using a DVM to measure the output of the motor controller.
You can also use a DVM to measure the PWM signal command going into the motor controller.

Let's say the PWM command is 5ms period, 1.5ms pulse width, and 3V pulse height (see note below).

If your DVM is set to measure average DC you should get a reading of 1.5/5*3 = 0.9 volts


Note:

When commanded by a roboRIO PWM output, the pulse height at the motor controller inputs will vary from ~1.7 volts to ~4.8 volts, depending on the type of motor controller (the load is different). Here are the rough calculated pulse voltage and mA numbers based on info I've been able to gather and test so far:

Vic888 = 1.7V 10mA; Spark = 2.6V 7mA; VicSP = 4.8V 0.6mA;

If anyone would be willing to scope the waveform on the PWM input terminals of the above motor controllers (while being commanded by roboRIO) to confirm (or correct) these numbers it would be appreciated.



Last edited by Ether : 14-02-2016 at 17:05.
  #6   Spotlight this post!  
Unread 14-02-2016, 16:33
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
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: spark controller dropping voltage in reverse

Quote:
Originally Posted by dlsmith View Post
We found that measuring the voltage with a DVM on the Victor speed controllers was unreliable because of the square waveform.
What model DVM were you using, and what setting (i.e. DC or AC, average or RMS etc) ?


  #7   Spotlight this post!  
Unread 14-02-2016, 16:50
dlsmith dlsmith is offline
Registered User
FRC #5268
 
Join Date: Feb 2016
Location: BioMech Falcons
Posts: 15
dlsmith is an unknown quantity at this point
Re: spark controller dropping voltage in reverse

Quote:
Originally Posted by Ether View Post
What model DVM were you using, and what setting (i.e. DC or AC, average or RMS etc) ?


I don't recall for sure the models but we tried a couple of different meters. I think one was a Fluke. While it was measuring you could see that it was trying to "lock onto" the signal somehow (showed moving bars constantly) and it wasn't doing a good job averaging the voltage I suspect. Could be that we didn't have all the right modes selected as it seemed like "average voltage" should be possible somehow.
  #8   Spotlight this post!  
Unread 14-02-2016, 16:54
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 189
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: spark controller dropping voltage in reverse

Quote:
Originally Posted by fmercier View Post
We are using spark controllers to run CIM motors is our shooter. However, output voltage drops below 3V through the spark when operated in reverse. What could cause this?
Sorry to hear you're having trouble fmercier!

Could you describe what the status LED is indicating when you go into reverse? For example, are you commanding full reverse, seeing a solid red LED, but still not getting full voltage out of the SPARK?

If the LED is blinking red in reverse, the SPARK may not be receiving a full reverse pulse, or as other have stated it may not be calibrated to your pulse range.

The SPARK shouldn't need calibration out of the box to operate with the roboRIO PWM ports. The first thing I would try is resetting the SPARK to the factory defaults by:
  1. With power off, press and hold the mode button.
  2. Turn power on while still holding the mode button.
  3. The SPARK should blink white and green indicating a successful reset.

If you still need to calibrate to a different pulse range, the instructions are listed in both the SPARK Quick Start Guide and the SPARK User's Manual.

Please let us know how your troubleshooting goes. Feel free to send me a private message or send us an email through our website www.revrobotics.com.
__________________
David Yanoshak
Co-founder REV Robotics | www.revrobotics.com
  #9   Spotlight this post!  
Unread 14-02-2016, 16:57
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
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: spark controller dropping voltage in reverse

Quote:
Originally Posted by dlsmith View Post
I don't recall for sure the models but we tried a couple of different meters. I think one was a Fluke. While it was measuring you could see that it was trying to "lock onto" the signal somehow (showed moving bars constantly) and it wasn't doing a good job averaging the voltage I suspect. Could be that we didn't have all the right modes selected as it seemed like "average voltage" should be possible somehow.
With a cheap $3 DVM from Harbor Freight I am able to accurately measure the PWM signal voltage and the PWM output voltage. So I would imagine your Fluke (a very reputable brand) ought to have a way to do the same.

Cheap DVMs use averaging; expensive are selectable averaging or true RMS.

Cheap DVMs on AC scale use a diode to rectify the signal, average the rectified half wave, and then multiply that by some fudge factor (based on an assumed sine waveform). It works OK for sine waves but gives nonsense readings for square waves or PWM.

Expensive DVMs (your Fluke might be one such) with true RMS do not assume a sine wave, do not throw half the wave away by rectifying, and can measure the actual rms value of any periodic AC waveform (within reason).



Last edited by Ether : 14-02-2016 at 17:02.
  #10   Spotlight this post!  
Unread 14-02-2016, 19:46
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
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: spark controller dropping voltage in reverse

Quote:
Originally Posted by dlsmith View Post
Cheap DVMs on AC scale use a diode to rectify the signal, average the rectified half wave, and then multiply that by some fudge factor (based on an assumed sine waveform). It works OK for sine waves but gives nonsense readings for square waves or PWM.
If you have one of those $3 Harbor Freight DVMs and a battery, you can see this in action:

1) using the DC mode, measure the battery voltage and write it down.

2) using the AC mode, measure the battery voltage (with red lead to +) and write it down.

3) using the AC mode, measure the battery voltage (with black lead to +) and write it down.

If the voltage in (3) is zero, you very likely have a "average of half-wave rectification multiplied by fudge factor" meter, and you probably got a reading in (2) of about 28 volts !!

Now let's do some math to see why.

The true RMS of a sine wave is peak/sqrt(2)

The half-wave-rectified average of a sine wave is peak/pi

The ratio is the fudge factor: f = (peak/sqrt(2)) / (peak/pi) = pi/sqrt(2) = ~2.2

So a AC voltage in (2) will be approx DC*2.2


Attached Thumbnails
Click image for larger version

Name:	true vs fudged RMS.png
Views:	20
Size:	9.6 KB
ID:	20073  
  #11   Spotlight this post!  
Unread 15-02-2016, 09:49
fmercier fmercier is offline
Registered User
FRC #3329
 
Join Date: Feb 2016
Location: Camden County High School
Posts: 2
fmercier is an unknown quantity at this point
Re: spark controller dropping voltage in reverse

Thanks for all the comments.
We have reset the Spark. LED still has intermittent blinking in reverse. The actual motor speed is slow, matching the low output signal. Per our program, we are sending a value "1" for forward and "-1" for reverse. The result is the same with a second Spark. We have also tried a jaguar, and the drop off is less, but there is still a clear difference between forward and reverse. ???
  #12   Spotlight this post!  
Unread 15-02-2016, 09:59
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
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: spark controller dropping voltage in reverse

Quote:
Originally Posted by fmercier View Post
Thanks for all the comments.
We have reset the Spark. LED still has intermittent blinking in reverse. The actual motor speed is slow, matching the low output signal. Per our program, we are sending a value "1" for forward and "-1" for reverse. The result is the same with a second Spark. We have also tried a jaguar, and the drop off is less, but there is still a clear difference between forward and reverse. ???
Do you have, or can you borrow, a DVM to measure the PWM signal at the Spark's PWM input terminals when you are commanding forward and reverse? See posts 9 and 10 below.



  #13   Spotlight this post!  
Unread 15-02-2016, 10:22
Greg Needel's Avatar Unsung FIRST Hero
Greg Needel Greg Needel is offline
REVving up for a new season
FRC #2848 (All-sparks)
Team Role: Engineer
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Dallas, TX
Posts: 3,105
Greg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond repute
Re: spark controller dropping voltage in reverse

Quote:
Originally Posted by fmercier View Post
Thanks for all the comments.
We have reset the Spark. LED still has intermittent blinking in reverse. The actual motor speed is slow, matching the low output signal. Per our program, we are sending a value "1" for forward and "-1" for reverse. The result is the same with a second Spark. We have also tried a jaguar, and the drop off is less, but there is still a clear difference between forward and reverse. ???
If it is doing the same thing on a different SPARK, I am not suspecting that there might be something else wrong with your setup.

Here are a few things to try.

* Check that your battery is fully charged
* Change your PWM cable
* Change the port your PWM cable is plugged into on the roboRIO
* Ensure that your power wires are secured to the SPARK and your Power distribution board.

Please let me know if you need additional help, send me a PM or email me at Contact [at] REVrobotics [dot] com
__________________
Greg Needel│www.robogreg.com
Co-founder REV Robotics LLC www.REVrobotics.com
2014 FRC World Champions with 254, 469, & 74
  #14   Spotlight this post!  
Unread 17-02-2016, 07:53
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,770
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: spark controller dropping voltage in reverse

fmercier,
We need to know how you are generating the full reverse throttle. If you are simply using a joystick then you have to calibrate to that joystick. If you are using a code generated full throttle reverse then I would double check your code.
What color is your controller blinking? There is a whole list of possibilities if you examine the manual. If it is blinking Red then that is an indication that you are not at full throttle but are commanding a reverse proportional output. That sounds like what you describe. The full on LED Green would indicate a full throttle forward output.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #15   Spotlight this post!  
Unread 17-02-2016, 09:32
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: spark controller dropping voltage in reverse

I'm going to make a wild guess that you're using buttons to run the shooter motor. One button runs the motor forward when pressed, and stops it when released. The other button runs the motor in reverse when pressed, and stops it when released. Is this what you're doing?

If so, you need to change it. Have one button run the motor forward. Have the other button run it in reverse. Stop the motor only when neither button is pressed.
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


All times are GMT -5. The time now is 11:58.

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