Go to Post Step 1: Get Drill Step 2: Insert 1/2"-1" bit into drill Step 3: Drill Those Speed Holes! - Adam Richards [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 06-03-2013, 13:22
jnaranjo jnaranjo is offline
Registered User
FRC #4682
 
Join Date: Jan 2013
Location: Seattle
Posts: 7
jnaranjo is an unknown quantity at this point
Setting up a Victor 888 with an arduino

We are building a second shooter from spare parts, and we are using an arduino microcontroller.

The box on our arduino says that we have Digital I/O pins, and 7 of them have PWM.

We are using a Victor 888 motor controller.
We would like some advice/suggestions/guidance on the wiring for this setup.

I am using that the PWM cable has a + (red), a - (black) and a signal wire (the other color).

So I've got it setup for 5v, ground, and a digital i/o pin with PWM on it.

We know that we have to calibrate the Victor to the appropriate max, min, and neutral values from our microcontroller.

Our idea right now is to use the builtin Servo library in the arduino, because that uses PWM.
So we want to calibrate the victor to recognize 0 as full reverse, 90 as stop, and 180 as full forward (the range for an arduino servo is 0 to 180).
I read the user guide for the victor, and it says to hold down the CAL button to calibrate, and that we should see red and green alternating lights. We did that, and we didn't see any lights, but we tried to calibrate it anyways.

We've set it up so our arduino sends a signal (0 to 180) that is proportional to the values from a potentiometer that we've got set up.

Either way, our motors are not moving with our setup and we have no idea what to do.

Any ideas?

Also, I wasn't sure whether to put this in Electrical or Programming, because there is a lot of overlap.
Should I also post this in programming?
I think I need help from someone who is knowledgeable with arduino, and someone who is knowledgeable with electronics.

Also, I found someone who was trying to do something similar, and they took a similar approach
Hopefully this helps (the bottom page comment): http://www.chiefdelphi.com/forums/sh...d.php?t=114659

I just found someone else who had similar success. The last comment on that thread shows that they did the exact same thing I did, but mine didn't work.

Last edited by jnaranjo : 06-03-2013 at 13:38.
  #2   Spotlight this post!  
Unread 06-03-2013, 15:16
Jeffrafa's Avatar
Jeffrafa Jeffrafa is offline
Robotics Addict
AKA: Jeff Lewis
FRC #1425 (Error Code)
Team Role: Mentor
 
Join Date: Dec 2003
Rookie Year: 2004
Location: Wilsonville, OR
Posts: 165
Jeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant future
Re: Setting up a Victor 888 with an arduino

I setup something similar this year for basic open loop shooter and mechanism testing. Ours consisted of a Teensy, a potentiometer hooked to an analog input, and a PWM output using one of the pwm libraries. To help identify center on the pot (for calibration, and for setting neutral output), I set the integrated LED to light when the potentiometer is within 2% of mid-range. We successfully used this to run both jaguars and victor 884's, there's no reason it shouldn't work for 888's as well.

Could you post your code, and maybe a photo showing how you have it connected?

For the victor, you shouldn't need the +5 wire, just signal and ground.

I found the best way to test and troubleshoot my arduino sketch was by driving a hobby servo (a vex servo would work too). Once you get that working correctly then it should work with a victor once you complete the calibration sequence

I don't have my sketch readily available, but I may be able to pull it up tonight for reference.
__________________
Team 1425 Alumnus and Mentor

I am KF7JDK - What's your callsign?
  #3   Spotlight this post!  
Unread 06-03-2013, 16:12
Toa Circuit's Avatar
Toa Circuit Toa Circuit is offline
Thaddeus Maximus
AKA: Thad Hughes
FRC #4213 (MetalCow Robotics)
Team Role: Leadership
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Shirley, IL
Posts: 131
Toa Circuit is an unknown quantity at this point
Re: Setting up a Victor 888 with an arduino

I actually did this for our driverstation this year, only used a Jaguar. We had tried a Victor 884 (Which never worked with our cRIO fully; the victor is very silly, we got it to work a few times... otherwise it does weird things.) to no success except one instance of calibration.
A few things:
1. Check that your wiring is correct. There is a skematic on this page which is full of doing somewhat what you want right now (Jag instead of victor; but they work the same(ish)), verify that it is the same: http://circuittech.tumblr.com

2. Check the victor indicator light. Is it blinking orange as if it is unsignaled? Is it solid orange, as if there is a signal, but not a signal to move? Knowing this would help us more.

3. The 5V pin running to the victor/jaguar is unneeded. Save yourself a little wiring chaos (Shorts from pins being close) and don't wire it up.

4. What is your code? You sure you're doing everything right?
__________________

2012 Head of Programming and Electrical
2013-14 Overall Team Captain and Programming Head
2012-14 Mentor of FLL Team Power Surge
2014 Dean's List Finalist
2014 CIR Xerox Creativity Award
Webpage
  #4   Spotlight this post!  
Unread 06-03-2013, 19:29
Jaxom Jaxom is offline
Registered User
AKA: Michael Hartwig
FRC #1986 (Team Titanium)
Team Role: Mentor
 
Join Date: Apr 2010
Rookie Year: 2008
Location: Lee's Summit, MO
Posts: 379
Jaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant futureJaxom has a brilliant future
Re: Setting up a Victor 888 with an arduino

Quote:
Originally Posted by jnaranjo View Post
We are building a second shooter from spare parts, and we are using an arduino microcontroller.
Hopefully this is only for testing; if you are planning on using this on your robot please read R55 and the blue box beneath it. You didn't say you are planning on using this on your robot, but you didn't say you weren't, either. So forgive me if you already know, but I don't want you to be surprised. And I don't want anyone else to be, either, if they decide to do something like this on their bot.
__________________


Mentor http://www.teamtitanium.org/
  #5   Spotlight this post!  
Unread 07-03-2013, 08:06
jimwick's Avatar
jimwick jimwick is offline
jim wick
FRC #0885 (the Green Team)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2006
Location: tunbridge, vermont
Posts: 94
jimwick is a glorious beacon of lightjimwick is a glorious beacon of lightjimwick is a glorious beacon of lightjimwick is a glorious beacon of lightjimwick is a glorious beacon of light
Re: Setting up a Victor 888 with an arduino

I am a newbie when it comes to arduino programming, or any programming for that matter, but I was able to make a Victor work somewhat. It actually ran a small motor in both directions with sort of jerky speed control.

I used "include <servo.h> which pulls in the servo function from the library.
I used "myservo.attach(9)" so set the output on a PWM pin.
I also used the "map" function to convert joystick values to the 0 to 180 that the Victor needs. This is key.
I used myservo.write(val) to send the value to the Victor.

I hesitate to upload the whole code because I have included a lot of junk to overcome a very noisy and non-linear joystick.

Hope this helps.
  #6   Spotlight this post!  
Unread 07-03-2013, 12:21
engunneer's Avatar
engunneer engunneer is offline
Alumni turned Mentor
AKA: Branden Gunn
FRC #4761
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1996
Location: Reading, MA
Posts: 876
engunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond repute
Re: Setting up a Victor 888 with an arduino

Also consider the output rate of the Servo algorithm. A typical hobby servo wants a new pulse every 20ms, but I think the victors want a new pulse every 5ms. You may need to tweak some timing to get it to work.
__________________
Student FRC23 (1996-1999), Mentor FRC246 (2000), Mentor FRC1318 (2007-2009), Mentor FRC93 (2011), Mentor FRC2151 (2012), Mentor FRC23 (2013), Mentor FRC4761 (2014-2017)
1998 - National Chairman's Award and Woodie Flowers Award (FRC23, Mike Bastoni ) | 2007 - PNW SF (488, 1595) | 2008 - Oregon RCA - Seattle #2 Seed, SF (488, 1696) | 2009 - Oregon #1 Seed, Winners (1983, 2635) - Seattle SF (945, 2865) - Galileo #2 Seed, SF (973, 25) | 2012 Midwest F (111, 71) | 2014 RIDE Winners (78, 125), Inspector - NEU #24, QF (3479, 3958) - NECMP #35 | 2015 Reading #11, SF (1058, 190), Inspector - RIDE #17, QF(4055, 5494), Inspector - NECMP #57 | 2016 Reading #4, SF (133, 4474), DCA, Inspector - Ride #22, SF (1735, 2067), Creativity, Inspector - NECMP #48, RCA - Archimedes
  #7   Spotlight this post!  
Unread 07-03-2013, 12:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Setting up a Victor 888 with an arduino

Quote:
Originally Posted by engunneer View Post
Also consider the output rate of the Servo algorithm. A typical hobby servo wants a new pulse every 20ms, but I think the victors want a new pulse every 5ms.
I believe the WPILib code for the Victors has a default of 10ms. It can be made faster or slower if you want.


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 20:11.

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