lordk wrote:Well, after a few month of work I have a first version of my Arduino shield. However I´m getting a 7bar flashing code time to time.
This error occurred when changing direction to quickly or accelerating.
I think is a problem of voltage in centre pin. Datasheet said that center pin is VS/2 with an impedance of 1.1 KOhm -+ 1%
I did a voltage divider between VS and GND. I tried with 470Ohm, 680, 1 K, 1.1K 2.2K and niether seems to work.
I also connect 2 potenciometers to vary resistors values.
any help?
ex-Gooserider wrote:I know that I had a lighting setup I was working on that was really flaky until I added a bunch of caps, and it is now very solid, so it seems like a good idea...
ex-Gooserider
lordk wrote:ex-Gooserider wrote:I know that I had a lighting setup I was working on that was really flaky until I added a bunch of caps, and it is now very solid, so it seems like a good idea...
ex-Gooserider
Do you hack a vr2 joystick pod? Can you send me schematics?
Im powering the arduino with 12V from 1 battery using the arduino power jack. the 2 DAC boards are using 5V from the Arduino. I think they already have caps to filter their Vout- http://www.adafruit.com/products/935
I also added a cap from Vs (from vr2 controller) to ground.
Same flasing code problem.
lordk wrote:Do you know what tests VR2 controller do to joystick pod?
* X/Y voltage between 1.11V and 3.89V [checked]
* Center pin voltage = Vs/2 [checked]
* X=Y=center at start up [checked]
And maybe ¿?
* continous values of X/Y
* overcurrent on X, Y or center?
ex-Gooserider wrote:2. Many controllers will have two outputs that are the inverse of each other on each axis, and the values are summed and should always be a constant. If you have more than 5 or 6 wires between the joystick can and the controller board, this is probably being done.
ex-Gooserider
This is common on most 'fly-by-wire' systems, such as the accelerator pedal and the butterfly throttle position feedback sensor in most modern cars, to provide redundancy and safe degradation in the event of failure... you certainly don't want an unintended 'wide open throttle' failure mode.lordk wrote:ex-Gooserider wrote:2. Many controllers will have two outputs that are the inverse of each other on each axis, and the values are summed and should always be a constant. If you have more than 5 or 6 wires between the joystick can and the controller board, this is probably being done.
ex-Gooserider
WOOOW! that´s a new one!. I never understand that part on datasheet (image attached). Maybe is that what Im doing wrong!!
Now I have DAC voltage connected to X axis so channel 1 and channel 2 have the same voltage and not the inverse!!!
ps: I cant figure out the drawing on datasheet. What do you think?
// I get this values after testing and reading datasheet from D50800
#define DAC_CENTER_VALUE 2045
#define DAC_MAX_VALUE 3200
#define DAC_MIN_VALUE 920
// this function read analog values from a thumb joystick and maps X and Y axis on
// corrects VR2 joystick values.
void JoystickControl(){
int xValue = map(readXaxis(), 0, 1023, DAC_MIN_VALUE,DAC_MAX_VALUE );
int yValue = map(readYaxis(), 0, 1023, DAC_MIN_VALUE,DAC_MAX_VALUE);
dacXaxis.setVoltage(xValue, false);
dacYaxis.setVoltage(yValue, false);
delay(80);
}lordk wrote:ex-Gooserider wrote:2. Many controllers will have two outputs that are the inverse of each other on each axis, and the values are summed and should always be a constant. If you have more than 5 or 6 wires between the joystick can and the controller board, this is probably being done.
ex-Gooserider
WOOOW! that´s a new one!. I never understand that part on datasheet (image attached). Maybe is that what Im doing wrong!!
Now I have DAC voltage connected to X axis so channel 1 and channel 2 have the same voltage and not the inverse!!!
ps: I cant figure out the drawing on datasheet. What do you think?
Calibration starts in EEPROM address: 70
Previously stored calibration values:
Throttle0 = 2507
ThrottleFwd = 3846
ThrottleRev = 904
Steering0 = 2531
SteeringLft = 4095
SteeringRt = 957
SpeedPotMin = 200
SpeedPotMax = 4794
Leave Joystick in neutral and press Mode to start calibration
Press Forward switch to skip this calibration step
Calibration of neutral point started: Throttle0 = 2502 Steering0 = 2526
Calibration of neutral completed: stored Throttle0 = 2502 stored Steering0 = 2526
Hold joystick in full forward and press Mode switch to start ThrottleFwd calibration
Press Forward switch to skip this calibration step
Calibration of ThrottleFwd started
Stored ThrottleFwd was 3846 new ThrottleFwd is 3831
Hold joystick in full reverse and press Mode switch to start ThrottleRev calibration
Press Forward switch to skip this calibration step
Calibration of ThrottleRev started
Stored ThrottleRev was 904 new ThrottleRev is 918
Hold joystick full left and press Mode switch to start SteeringLft calibration
Press Forward switch to skip this calibration step
Calibration of SteeringLft started
Stored SteeringLft was 4095 new SteeringLft is 4090
Hold joystick full right and press Mode switch to start SteeringRt calibration
Press Forward switch to skip this calibration step
Calibration of SteeringRt started
Stored SteeringRt was 957 new SteeringRt is 967
Set speed pot fully counterclockwise and press Mode switch to start SpeedPotMin calibration
Press Forward switch to skip this calibration step
Set speed pot fully clockwise and press Mode switch to start SpeedPotMax calibration
Press Forward switch to skip this calibration step
*********************
CALIBRATION COMPLETED
*********************
lordk wrote:ex-Gooserider wrote:2. Many controllers will have two outputs that are the inverse of each other on each axis, and the values are summed and should always be a constant. If you have more than 5 or 6 wires between the joystick can and the controller board, this is probably being done.
ex-Gooserider
WOOOW! that´s a new one!. I never understand that part on datasheet (image attached). Maybe is that what Im doing wrong!!
Now I have DAC voltage connected to X axis so channel 1 and channel 2 have the same voltage and not the inverse!!!
ps: I cant figure out the drawing on datasheet. What do you think?
lordk wrote:Code is too large to post.
I post joystick functions.
- Code: Select all
// I get this values after testing and reading datasheet from D50800
#define DAC_CENTER_VALUE 2045
#define DAC_MAX_VALUE 3200
#define DAC_MIN_VALUE 920
Return to Everything Powerchair
Users browsing this forum: No registered users and 268 guests