Thread created automatically to discuss a document in the White Papers.
Playstation 2 Controller Adapter by jakep
Thread created automatically to discuss a document in the White Papers.
Playstation 2 Controller Adapter by jakep
That’s really cool, but the circuit looks fairly complicated to build and program.
You guys should consider building more and selling them to other teams. Considering that the price of a CH Flightstick on eBay is upwards of $40, you could help people get a better controller for their robot and make your team some extra money at the same time.
Great job by the “geekTeam” of our robotics team. I’m the electrical/software mentor for team 862 and what they have done is amazing. Especially since they didn’t even need to ask me for help! I had a major “How the heck did you do that?” moment when they first hooked it up and had it working on the breadboard.
So if you have any questions, ask the students!
Here’s our website :www.lightningrobotics.com
Will this also work with a PSone controller?
It will work with PSOne controllers that have the analog sticks (The dual-shock analog controllers work)
I had no idea you were allowed to connect a PIC between the “joystick” and PORTx of the OI.
Yeah, we were nervous. Last year, I would say this would be right out. But this year…
I’d call this a power-passive device, as all power is comming from the OI. Then to look at the INTENT of the rule, all the PICs are doing is translating data, they aren’t adding any value to the input or doing any calculations to drive the robot any better. So I hope we’re OK. It’s still up to the human to drive that sucker into a wall and fall over.
OR… another way too look at it…
We made our own joysticks. The joystick starts at the plug. An off the shelf PS2 controller is just one of the materials we used to make our control.
I hope!
See also this thread on the Q&A:
This design is officially legal for FIRST competitions.
Question about your control mapping…
It was unclear in the white paper (to my insomnia-addled brain, at least) whether both joysticks are mapped to the PIC. Is it possible to run tank drive simply from the two analog sticks of a PS2 controller using your adapter method?
Replies are greatly appreciated
I’m not sure if you need 2 sets or one set… I’ll have to ask the geeks. BUT - I can tell you that we drive tank style with the 2 sticks.
I’ll see if I can ask the geekTeam more about it.
Yes, the two Y axes are sent to the OI, allowing for tank drive.
The X axis on either joystick on the ps2 controller is not sent to the OI, and is instead used to send digital signals. (4 per analog input on the OI, total of 8)
Impressive! You deserve a Innovation In Control award, if you don’t get it, they have no idea what they’re doing!
(Espescially because it was student designed and built)
Very nice work! Is your white paper complete enough to have my students try to tackle it as well? I looked through it and it seems to be missing some of the components for the PCB.
What size diodes and Resistors are required for the completion of this project?
Also is there anything missing from the whitepaper I should know about?
Thanks in advance for bringing teams to the next generation!
Ellery
No diodes or resistors are required for this project. Depending on how you are building it, you might need to have a resistor for the LED. However, we used an LED mounting that already had a resistor built in. We used to have some in the design, but they were removed to make it more simple.
When it comes to changing which buttons we uses, is it possible to just modify the code in some way? My team was thinking about using the playstation controller, but would like to use both the x-axis and y-axis in at least one of the analogs. How would I go about doing this? Thanks in advance!
I can’t open the schematic file. I get the error “ps2adapter.sch is not a valid ExpressSCH file”. The layout file opens fine with ExpressPCB. Any ideas what’s wrong?
p.s. great job guys, thanks for all the hard work.
The PCB file is for use with Express PCB, the schematics were made using Eagle Layout software.
To modify the adapter to use different axes and such, you will need to modify the code. The source code is included, and it will compile with free compilers like gpasm. In the future, we will be working on a better base code to allow for more changes, buttons, and axes.
FYI, you can buy the PIC and the digipots from DigiKey:
Part Number Description Price
PIC16F688-I/P-ND IC PIC MCU FLASH 4KX14 14DIP $3.35
DS1267-100-ND IC POT DUAL DIGITAL 100K 14-DIP $3.32
Jake,
I’ve been trying to compile and program your source code with MPLab but do I need to change your code again to be able to compile and program with the Microchip Picstart Plus programmer?
According to your Remarks you changed the PNUM_DATA 0; Pin_DATA PortA, 0; <-What were the original values?
If you are programming directly from the PS2 plug I assume you’re direct wiring the plug to the board pinouts for the 7 inputs to the match the programmer pins.
Let me know what i’m missing here.
Thanks
Ellery
No, you do not have to change any of the sourcecode to use a different programmer.
The comments are unfortunately somewhat misleading, which pins you use for programming are built into the chip itself. The reason for that comment was that we had to move around some of our inputs to make sure the MCLR pin was free to be wired to a custom programmer. This way, we can wire an unused pin on the PS2 plug to MCLR, and when we want to program the chip, we can apply 12volts to that pin and not worry about any of the voltage flowing to the sensitive digipots.