|
|
|
![]() |
|
|||||||
|
||||||||
This past weekend three of our members got a new control system working for our robot. So now instead of driving our robot using the old three joystick controls we can now control it using an UNmodified Play Station 2 controller and it works great.
22-08-2005 08:35
phrontist
So I take it you got the thumb-joysticks to work? Do you have a pinout?
It's quite a neat hack, though I've never been fond of those controllers...
22-08-2005 08:46
Rohan_DHS
Thats too cool! Any diagrams (aka pinouts, like phrontist said)?
Also, did you get the vibration thing working too
lol?
22-08-2005 09:31
Ian Curtis
How do you get good control with the analog sticks? I believe the resistors in the sticks themselves are 10k Ohm and joysticks have 100k ohm resistors.
22-08-2005 09:39
Bcahn836
Where you able to add any function to the buttons, for example using R1 R2 L1 L2 for say arm controls?
22-08-2005 10:48
Joe J.
I don't know all the details they just let me drive it. I've passed along your questions to the guys who built it.
| Also, did you get the vibration thing working too lol? |
22-08-2005 10:54
Bcahn836
How difficult is it to drive with the ps2 controller, and i have to ask the obvious question is it like playing a video game? What are the characteristics of the controller?
22-08-2005 10:58
Joe J.
For one person to drive its alot easier to drive with the PS2 controller, The robots alot more responsive as well. The only problem is after you go backwards and release the joysticks it tends to keep rolling backwards but they working on it.
22-08-2005 11:48
GhostInTheShellok, i'm one of team 862 electronics monkeys who worked on this, i'm working out some more bugs and will have plans and/or schematics soon
but it works like this
a PIC16f688 reads the ps2 controller data (yes, no controller mods, that controller is an unmodified commercial controller i bought used like 2 weeks ago)
it decodes the signal and sends the info to some Digipots (maxim-dallas copyrighted term) that have 100k impeadence (theyre 100kpots like in joysticks) they contol everything
you have to change youyr software though if u wanna use ours, it uses 1 joy stick port
22-08-2005 11:52
GhostInTheShellalso rohan_dhs, we are working on the rumble feature currently, it needs pwm1 to be clear though, it uses the feedback lights for pwm1 to tell the pic that "holy crap we did sompthing wrong" like if we hit sompthing or we have a malfunction
22-08-2005 12:26
mechanicalbrain
I doubt you will get the rumble feature working. I don't know all the mechanics but the chances are they use a buzzer. And since a buzzer is a motor the RC should not output enough power for it to run. Nice work though. I'm looking at making custom controls this year and i like to see success. 
22-08-2005 13:04
JoeXIII'007
Pretty darn cool. I saw you guys work on it but never knew you got it to work. Fantastic.
-Joe
22-08-2005 13:15
Sparks333I'm guessing that typical button-mashing is a definite no-no?
Way cool, man. Keep it up.
Sparks
22-08-2005 13:19
Rohan_DHS
|
Originally Posted by GhostInTheShell
also rohan_dhs, we are working on the rumble feature currently, it needs pwm1 to be clear though, it uses the feedback lights for pwm1 to tell the pic that "holy crap we did sompthing wrong" like if we hit sompthing or we have a malfunction
|
let us know if/when you guys get that working
22-08-2005 13:57
[527]philThe micro controller that I'm using for my robo one has 9 pins for connecting a playstation controller. I hope to eventually incorporate a wireless controller so it'll be like rockem sockem robots, only these robots cost a lot more.
22-08-2005 14:10
Mike
|
Originally Posted by mechanicalbrain
I doubt you will get the rumble feature working. I don't know all the mechanics but the chances are they use a buzzer. And since a buzzer is a motor the RC should not output enough power for it to run. Nice work though. I'm looking at making custom controls this year and i like to see success.
![]() |
22-08-2005 14:47
mechanicalbrain
|
Originally Posted by Mike
From what I saw when I ripped apart an old controller of mine, they're just little DC motors with... weight kinda things on them that when they spin throw the controller off balance, making it rumble.
|
However if you DO get it working give me a mail and some instructions because I would love to incorporate a buzzer into our controls.
22-08-2005 14:58
Alan Anderson
|
Originally Posted by mechanicalbrain
I doubt you will get the rumble feature working. I don't know all the mechanics but the chances are they use a buzzer. And since a buzzer is a motor the RC should not output enough power for it to run.
|
22-08-2005 15:23
Don Wright
Very nice job.
Please don't take my question as any kind of attack or jab at your accomplishment. I think what you have done is awesome. But, is it legal? I thought I remember there being a rule of some sort not allowing any kind of computer or processor between the driver and the RC. With the PIC in-line, would this violate a rule?
Just curious. If it doesn't, and if somebody could make a nice, semi-universal PS2 or USB to digipots and switch adapter, it would open up the world of cool controllers to teams.
22-08-2005 15:44
Billfred
|
Originally Posted by Don Wright
Very nice job.
Please don't take my question as any kind of attack or jab at your accomplishment. I think what you have done is awesome. But, is it legal? I thought I remember there being a rule of some sort not allowing any kind of computer or processor between the driver and the RC. With the PIC in-line, would this violate a rule? Just curious. If it doesn't, and if somebody could make a nice, semi-universal PS2 or USB to digipots and switch adapter, it would open up the world of cool controllers to teams. |
|
2005 FIRST Robotics Competition Manual: Section 5 – The Robot rev A Page 18 of 29 5.3.8 Operator Interface Rules <R69> All equipment connected to the Joystick Ports of the Operator Interface must be powered solely through the power available through the port. External power sources of any type are not permitted on any equipment connected to the Joystick Ports. Portable computing devices may not be connected to Joystick input ports on the Operator Interface. |
22-08-2005 16:14
Rickertsen2
Where did you get a mating connector for the controller. An extension cable?
22-08-2005 16:48
Rickertsen2
PS2 controllers use a fairly simple synchronous serial protocol.
here is some info on the PS1 interface:http://www.gamesx.com/controldata/psxcont/psxcont.htm
from what i understand the PS2 controllers are the same electrically with only very minor changes in the protocol.
There was a pretty good article in the June 2003 Nuts and Volts on using PS controllers
22-08-2005 17:08
Not2B
|
Originally Posted by Don Wright
Very nice job.
Please don't take my question as any kind of attack or jab at your accomplishment. I think what you have done is awesome. But, is it legal? |
22-08-2005 17:20
Adam Richards
|
Originally Posted by Not2B
Yeah - me and another mentor wondered the same thing. In fact, from what I can tell (being a mechanical kind of guy anyway), it's not legal. So it went a little something like this (paraphrased for humor of course...)
|
22-08-2005 17:21
Mr. Lim
Loving this thread!
1) Most of the veteran teams won't touch the right-hand only beige joysticks that have been included in the kit for the past few years. The problems with broken axes, poor range, inconsistent centering, etc etc are well known.
2) Veteran teams lucky enough to stockpile those CH flightsticks from many years ago love them. They're getting extremely rare now, and I think most of us realize aren't may seasons left in them.
3) What would it take to get to IFI to integrate one of your PS2 dongles right into the OI next year? or the year after? Would you be willing to give up the dongle design in the spirit of improving FIRST as a whole?
22-08-2005 17:32
Joe J.
Yeah they did an awsome job. It worked right the first time we tried it, only needed minor tweaking
22-08-2005 21:25
jakepHey everyone, I am one of the three students that worked on the PS2 adapter.
We used a 16f688 PIC chip and two dual pot digital potentiometers from Maxim. The device currently breaks the rules of official competition because it uses an external power source (9 volt battery). We are working on drawing power from the OI using the LED driver pins, since the circuit only draws around 6 miliamps of current. Since we got the beta working this weekend, we are now taking steps to finalize the design. We are working on soldering it together more permanently, so that you won't have to worry about wires, etc. coming loose on our messy breadboard. Once it's put together, we will be adding just a few more things, such as the drawing OI power thing. Once that's done, we will be posting up our PIC source code and schematics so other teams can build this device for themselves. It uses a conventional PS2 controller, any analog one will do, and it fully controls all the functions of our robot. (We used to use 3 joysticks for this.) It actually drives better this way because you can coordinate your actions more precisely without a second driver. (Sorry copilots
)
The outputs are the 4 analog ones directly to the OI. Analog input 1/2 are the tank drive for the main robot. While 3/4 each send 4 digital inputs. This was done because we didn't have enough pins to use, so we had send multiple digital signals over analog.
Even if we won't get to use it in competition, it was still a fun project to work on, and we all learned a lot about PIC programming (we built our own programmer since we were on a budget) and electronics in general (Our software team did most of the electronics o_O).
BTW: The PS2 controller in the picture is not modified in any way, the wires are sticking out because it's a used controller. (Which is also why the trim is messed up and the robot tends to go backwards when not touching the sticks at times)
22-08-2005 22:43
Not2B
|
Originally Posted by jakep
We are working on drawing power from the OI using the LED driver pins, since the circuit only draws around 6 miliamps of current.
|
22-08-2005 22:46
GhostInTheShellthe rumble motor will work, it has to me a signal read by the PIC and sent oto the PS2 controller on the command line (data to the controller)
22-08-2005 22:47
GhostInTheShellyes u can blow the internal fuses by drawing too much current, we are gonna put an adapter that goes between the power port and the OI
22-08-2005 22:49
mechanicalbrain
If you can go for it but I'm not sure you can get the necessary power. Also can the game ports output signals?
22-08-2005 23:45
Al Skierkiewicz
|
Originally Posted by Billfred
Well, good question. Here's the rule.
I have to admit, even I forgot about the part about portable computing devices connected to the joystick ports. This then brings about the question of what exactly they meant by the rule. Did they mean to explicitly ban everything but pots and switches and the things they're housed in, or was the rule intended to block things like PDAs and laptops (which the average guy on the street would consider a portable computing device)? In any event, nice work. |
23-08-2005 00:55
emarionI am one of the three main people working on the PS2 controller project. I believe Derek emailed First and asked about the controller being a "Portable computing devices" and First said that it was okay, but that of course the rules might be different in the next game. This is all assuming that the circuit can grab power from the OI, I believe.
I coded the asm on the pic chip (about 250 lines I believe), and will post it as soon as I completely fix it up. The circuit connects one of the digital outs (aux I believe) directly to ground. Because it is impossible for the normal joysticks to do this (they only uses different digital outs), the software on the robot should be able to figure out if a normal joystick or the PS2 adapter are plugged in, without requiring a physical switch on the OI or the robot to be programmed in only one mode. This would possibly allow hot-plugging of what is controlling the robot, assuming that one disables the robot when changing the cords.
So far if the PS2 controller is not pluged in to the circuit, or if it is not in analog mode, the circuit will output "nothing" to the OI (i.e. don't move the wheels or do anything). Hopefully in the future the circuit will be able to automatically put the PS2 controller in analog mode, like some PS2 games. This way the driver won't have to hit the "analog" button every time they turn on the OI.
The two digipots are ds1267's. Each digipot IC contains two 256-step digital potentiometers. The microcontroller is a pic16f688. Basically, the PS2 sends all its data digitally in serial to the microcontroller over one pin. This is how even if the PS2 controller uses 10k pots (which I'm not sure about) the circuit would still output using the correct 100k pots. L1, L2, R1, R2, the diamond, the circle, and if the driver is pressing down on the joysticks are sent from the PS2 controller to the OI. This is done by sending these eight digital inputs over two analogs. This is done by setting the 4 most signifigant bits of each analog (aux and wheel) to the correct value, and setting the least signifigant bits to 0111. This allows the "value" of the analog to vary by +8/-7, and have it all still work. The analogs "x" and "y" are used for the y value of the left and right PS2 joystick, respectively.
23-08-2005 09:12
jrukesemarion,
Congratulations to your team on a great addition to the OI! I'm very impressed that you created your own programmer and wrote your own downloader. That info could be very useful for teams interested in starting to use PICs.
You mentioned that you'd like to have the joystick automatically go into "analog" mode. Here are the commands you'll need.
0x01, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 //enter config mode
0x01, 0x44, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00 // set to analog mode and lock out the mode button
0x01, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 //exit config mode
***Note: All of the values are in hexadecimal format.
Good luck,
Jason
23-08-2005 10:37
GhostInTheShellwow, thanks, weve been looking for that, it helps alot because if the controller goes digital, the robot goes nuts
23-08-2005 11:11
Alan Anderson
|
Originally Posted by emarion
...The circuit connects one of the digital outs (aux I believe) directly to ground. Because it is impossible for the normal joysticks to do this (they only uses different digital outs), the software on the robot should be able to figure out if a normal joystick or the PS2 adapter are plugged in, without requiring a physical switch on the OI or the robot to be programmed in only one mode...
|
23-08-2005 12:14
emarion|
Originally Posted by Alan Anderson
The OI has a pull-down resistor on each analog input. It will interpret your ground as a disconnected joystick, and will send a "neutral" value of 127 to the robot..
|
23-08-2005 12:42
Alan Anderson
|
Originally Posted by emarion
We're using a real digital input for this, not analog.
|
23-08-2005 12:58
emarion|
Originally Posted by Alan Anderson
I was (and still am) confused by your saying that a grounded pin is impossible for a normal joystick. That's true of the analog inputs, and the "aux" signal you mentioned is an analog input (you probably meant sw_aux1 or sw_aux2, which are indeed switch inputs). However, the OI digital inputs are designed to be grounded when the switch is pressed. Grounding a switch input is not impossible; on the contrary, it's mandatory.
|
23-08-2005 13:23
Alan Anderson
|
Originally Posted by emarion
What I meant was that the joysticks that we're using have only two buttons. Therefore it is impossible for them to signal a "push" of any other digital input.
|
23-08-2005 13:33
[527]phil
23-08-2005 16:55
Joe Johnson
I really think that IFI should sell an adapter to go from a PS2 gamepad or a USB gamepad to the input ports of an RC.
One thing I would really like is that this will enable us to could go with a wireless gamepad -- how often have your drivers been visually blocked because they are tied down to wired joysticks?
This would be a great idea for IFI to take on.
Joe J.
23-08-2005 17:10
JVN|
Originally Posted by Joe Johnson
I really think that IFI should sell an adapter to go from a PS2 gamepad or a USB gamepad to the input ports of an RC.
One thing I would really like is that this will enable us to could go with a wireless gamepad -- how often have your drivers been visually blocked because they are tied down to wired joysticks? This would be a great idea for IFI to take on. Joe J. |
23-08-2005 17:15
Bcahn836
Compared to last years joysticks, i would love to use a ps2 or a game pad to control the robot. But there is just one problem, Iam no longer a student and therefore I can't drive the robot in competition. But I do think it would be awesome if a set up like that was available. . .
23-08-2005 17:24
mechanicalbrain
Actually what would be a cooler thing to see would be a 3D joystick with a serial interface. Before somebody mentions a MS sidewinder they are not compatible with the RC. Yeah if somebody were to come out with a RC compatible 3D joystick it would be amazing!
23-08-2005 17:43
Alan Anderson
|
Originally Posted by mechanicalbrain
Actually what would be a cooler thing to see would be a 3D joystick with a serial interface.
|
23-08-2005 17:57
mechanicalbrain
Sorry, didn't mean serial (i keep doing that). I meant a game (joystick) port.
23-08-2005 18:00
Joe J.
Having driven our robot solo on both the old 3 joystick controls and our new PS2 controls. I can say this the PS2 controller is way easier to drive the robot with. Also its way quicker at capping Tetras because all the controls you need are right there.
24-08-2005 09:19
Don Wright
|
Originally Posted by JVN
Aaaaaaactually,
When I was interning with IFI last summer, the EE's had robots driving around on PS2 Gamepads. The technology was finished and working beautifully, but the project was scrapped for some reason. I think they weren't sure about the market for it. I'm not really sure. Who would prefer using this instead of a joystick? -John |
24-08-2005 09:40
Rohan_DHS
|
Originally Posted by Don Wright
I would bet just about anything that anybody would prefer to use PS2 gamepads over the huge joysticks.
|
25-08-2005 14:25
Bill_Hancoc|
Originally Posted by SlimBoJones
Loving this thread!
1) Most of the veteran teams won't touch the right-hand only beige joysticks that have been included in the kit for the past few years. The problems with broken axes, poor range, inconsistent centering, etc etc are well known. 2) Veteran teams lucky enough to stockpile those CH flightsticks from many years ago love them. They're getting extremely rare now, and I think most of us realize aren't may seasons left in them. 3) What would it take to get to IFI to integrate one of your PS2 dongles right into the OI next year? or the year after? Would you be willing to give up the dongle design in the spirit of improving FIRST as a whole? |
28-08-2005 09:32
jaroweAfter breaking it on Friday night at the Rock Financial Showplace, the team got it working on Saturday in time for our last 5 matches.
Of course, the joystick controls are very touchy, and it's difficult to be thinking about driving and using the arm simultaneously, but once you get accustomed to it, it is easier to control the robot. Mind you, the only video game I play is Soul Calibur, because it's the only one I can win. Because I button mash. I'm not sure why they let me drive...
I think if we go with the PS2 controls for competition next year, we'll have to controllers. One for drive, one for the manipulator. It'll be easier to control that way, and it will get more people out on the field during competition.
They've been working on this all summer, and it's really good to see that they were able to make it work!
Good work to Eric, Derek and Jake!
28-08-2005 15:46
jakepWell, just to clear things up, it was never broken. We were moving it over from an oversized breadboard into a nice concise little box. Since our robot has been moving around to various demos lately, we have little time to get things working, so we just had to drive with the regular joysticks while we were sorting things out.
P.S. - We will be getting documentation with sourcecode, pictures, and information out soon. We are working on getting it powered off the OI, so an external power source is not needed.
05-09-2005 01:16
GhostInTheShellin response to number 3 by SlimBoJones, yes. that would be awsome
03-10-2005 23:42
GhostInTheShellanother update, we are about () () close to getting the final version done, its gonna be uber small and use smd parts, better schematics soon,
ALSO, we got it working powered off the OI
26-10-2005 16:54
mugenyou guys should use a DDR (dance dance revolution) pad so that it's like you are the robot.
02-11-2005 23:29
Rickertsen2
So how about that source code?
I have been considering a similar project to convert USB HID->Gameport.
03-11-2005 22:11
Denalin Fusion
Can you imagine controlling a robot on a DDR pad? Mehehe, it woudn't support tank mode, though.
04-11-2005 12:00
wilshire
it would be pretty nifty if you could get the force feedback to work. Its always good to know where the problem lies and when it happens to imeadiately take counter measures. Unless it is very apparent like a sprocket flying out of your arm. Its kinda of hard to miss that while your driving.
04-11-2005 18:13
jakepSorry for the lack of updates on this project. We have been having some problems with power supply through the OI, which makes us always fall back to external power. Once we get these things resolved, we will make the project code available.
04-11-2005 22:57
fuseUgh, i thought of using a ps2 controller 3 years ago and now i wish i had acted on it. I wish you guys luck though, it looks great so far. I was just planning on getting a bunch of adapters until i got to the game port, but i think getting your design legal would be a better approach. The weird thing is i have been soldering PICs on my team for like a year now and hadn't bothered to try what you guys are doing. Keep us updated as i think it is clear we all want to have this end good. (i sure would want to drive with one)
14-11-2005 22:16
d.courtney
I haven't been on Chief Delphi in a while and was suprised to see this topic as I did it in September. Its nice to see the same idea I had others had as well. But yeah I used http://www.levelsix.com/product_info.php?products_id=35 as my ps2 (well actualy I used my old ps1 controler) and it seemed to work great, there was a minimal amount of programming (just had to edit some of the input values). I really enjoyed the fact that I didn't have to program a dead zone as the anolog sticks automaticly returned to dead center (or close enough that it didn't matter in my case) ... the thing I don't understand is how people think this is against the rules, as the controller has the same setup as a joystick pretty much. The difference maily being that it has a rumble ability (which for some reason I am having trouble to program).
Well anyway against the rules or not thats what I did... I hope for my sake it isn't agaisnt the rules.
15-11-2005 19:11
fuse|
Originally Posted by d.courtney
I haven't been on Chief Delphi in a while and was suprised to see this topic as I did it in September. Its nice to see the same idea I had others had as well. But.........my sake it isn't agaisnt the rules.
|
15-11-2005 19:34
Rickertsen2
so.... how about that source you promised.....
15-11-2005 20:30
Not2B
We have our team meeting tomorrow. I'll bug the Geek Team about it. See if I can get them to post the white paper they were working on.
I know they have it almost done... heck, they asked if they could get professionally made PCBs made... they better be close to done.
17-12-2005 12:43
jakepAlright, after being badgered by the team for a few months, we are finally getting everything together. We are currently working on a detailed whitepaper that explains everything you need to build one of these yourself, as well as about the history of the project (It wasn't easy to build this thing...) We will be making some changes to the sourcecode before that, since right now it has 0 comments and is impossible to understand.
We also want to get a PCB professionally printed.
I will keep everyone updated.
27-01-2006 16:08
pathew100White Paper has now been posted. This is competition legal as well!
Playstation 2 Controller Adapter
26-01-2007 02:01
sonofdad123|
You said the same thing a couple of days ago, and my answer yesterday stands: The OI doesn't have any ports to which you can connect a serial joystick.
I actually have a 3D joystick with a serial interface; it's a Hewlett-Packard Spaceball. Few programs have the ability to use it as an input device. |
28-01-2007 19:17
bhsrobotics1671Where did you order the chips for the controller box from. The ones that go on the PCB board.