I am an absolute beginner at this.
I used the sketch/code from this page:http://playground.arduino.cc/componentLib/Ps2mouse
uploaded code ok no problem...usb is connected to prog port > PC com3
my ps/2 cable is connected to an adapter for USB/ps2 for the trackball.
I connected all the wires just as the photo on that page says to do. Double checked wires w multi meter on ps/2 cable to make sure they are the correct ones.
As soon as i connect the last wire.. voltage, to either 5v or 3.3v on the A.Due, the lights on the arduino go out & is disabled in the device mngr/comm port 3.
when i pull it out it turns back on. What am i doing wrong here?
>>>NOTE: if it helps, this is ultimately what i am trying to do; this is a topic with replies for what i have been told so far to try from the Adafruit Forum:
I want to use a trackball (of any kind really since they all have the same internal design sensor wise) and wire it to a game cube pcb analog controller OR playstation PCB analog controller to actually control a Wii download game that i love. In other words... map the analog of the game controller's potentiometer through the Arduino & then use the trackball to move the sight/character on the screen. Instead of using the analog thumb thing. So its like im extending the signal of analog from the controller to another device to trigger movement.
Postby thefatmoop » Thu Aug 22, 2013 12:20 am
if you open the controller there will be two potentiometers on an individual joystick (x any y axis). Each of these potentiometers will have 3 wires - gnd, analog signal, power (check with volt meter). Each joystick will have two analog signal lines (x and y axis).
So you can insert your own analog signal into each joystick using various methods. the easiest would probably be to just use a DAChttp://www.adafruit.com/products/935
If you're powering the dac off of 5v and your controller is 3.3v , do not output an analog signal above 3.3V! that'll likely cook your controller. Put a 1k resistor on the output of the dac to the controller's analog signal, connect grounds of your device and modded, and remove the controller's joystick for best results.
for the trackball you might want to look into one that can interface over PS2 (old circular computer one) interface - i think the arduino can read a ps2 devicehttp://playground.arduino.cc/componentLib/Ps2mouse
you could try using a usb to ps2 converter for mice - that way any trackball pc mouse should work
as for getting rid of any deadzone or hysteresis in the controller - that's really just a matter of code
Last edited by thefatmoop on Thu Aug 22, 2013 9:51 pm, edited 1 time in total.
Postby silver237 » Thu Aug 22, 2013 2:13 pm
I do have another question now that I know this is possible. The actual linkage of all these devices. Would it go like:
Nintendo Wii> PlayStation controller analog> mcp4725 DAC> Arduino> PS2/usb adapter> trackball ??
I guess what's confusing me is I thought the arduino was the DAC..so I need another one? ....one for each device? If I could just get you to clarify the order of things, I can take it from there....
Postby thefatmoop » Thu Aug 22, 2013 9:50 pm
the arduino due is the only arduino with a DAC. if you're new to electronics i'd suggest you go the direction of using a DAC since it's the simplest and will likely produce the best results. You could use high frequency PWM with a low pass filter and could even use an ADC channel for feedback - something you can look into if you understand the topic.
You need two DAC channels per joystick, to my knowledge the arduino due has two dac outputs. Look around on digikey, but stick with either the arduino due, or the dac i linked if you're new to electronics.
Right so connection would be:
ps2 interface -> arduino -> DAC -> game controller -> console.
connect the game controller, DAC, Arduino, and ps2 mouse interface grounds together. You can probably find a 5 or 3.3v power line on the game controller (playstation controller?) and power your mouse, arduino, and dac off that - they won't draw much power.
When in doubt check everything with a multimeter and make sure you follow the paragraph under the important from my previous post. also don't forgest that those dacs are easy to cook - why i said just put a 1k resistor on the dac analog outputs when the gremlins decide to bonk your circuit
Postby joshuabardwell » Fri Aug 23, 2013 12:04 am
I recently ran into a similar situation, where I needed to simulate the input to a device that was controlled by a pot. I tried using analogWrite() with a capacitor, but the device was confused by the PWM and didn't read the results properly. The solution that I am trying now is to use a digital potentiometer. That way there's no questions about putting out incorrect voltage or PWM... just wire the digital pot in where the manual pot used to be and go to town. This may be a solution that would work for the OP.
Postby thefatmoop » Fri Aug 23, 2013 12:08 am
ohh yeah forgot about those. that would be a cheaper route.https://www.sparkfun.com/products/10613
Postby joshuabardwell » Fri Aug 23, 2013 6:06 pm
The digital pot chip probably wouldn't be soldered to the Playstation PCB, although I guess you might could if you found room for it. Think of the digital pot chip like one or more potentiometers. That's it. Instead of manipulating the impedance of the pots by turning a dial, you manipulate the impedance of the pots by sending commands to the chip via the SPI interface. The chip I linked to has four pots inside it, so it could handle both X and Y axis functions for two sticks, assuming a single pot is used for X and a single pot is used for Y. You would also want to make sure that you could write to the pot with sufficient frequency to