Parts list for VR2 joystick hacking!

Power wheelchair board for REAL info!

POWERCHAIR MENU! www.wheelchairdriver.com/powerchair-stuff.htm

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 25 Nov 2013, 13:17

Revised pic.

IF like me your leaving the joystick in situ then you should use only one channel feed from the joystick ...but feed this output into BOTH channels on the circuit board.

mod.png
mod.png (161.56 KiB) Viewed 14732 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby lordk » 25 Nov 2013, 13:18

I think I can get 5V from board but I want this device to be easy to install.
Now you only need to disconnect ribbon from joystick pod and connect it to Arduino shield.
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 25 Nov 2013, 13:22

I assume then that you don't wish to retain the original joystick?
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 25 Nov 2013, 13:28

If you use a digital potentiometer and feed both ends of the pot from the ribbon GND - 5v ..then you shouldn't get any problems with delay caused by the Arduino booting up.

Note all GND's /Common ( In Black ) should be joined.... P1A and P0A fed from the pods ribbon 5v.

Arduino Digipot.jpg
Arduino Digipot.jpg (94.54 KiB) Viewed 14731 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 30 Nov 2013, 17:52

B.M. ...
Does the Pilot+ joystick pod have a permanent 5v live at the joystick lead socket on it's circuit board ( number 7 in the pic ) or will it only power up after a button press to turn the pod/controller ON?

BOARD SOCKET.png
BOARD SOCKET.png (39.09 KiB) Viewed 14706 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 30 Nov 2013, 18:25

90 percent sure it powers on only after switch on. I tried it that way to power a RC RX before I got hold of a Omni Plus device. That's the same it has external power. And an external analog voltage swing input. And a few other inputs. So once you turn the thing off (by RC) you cant turn it back on.
User avatar
Burgerman
Site Admin
 
Posts: 71100
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 30 Nov 2013, 18:38

P.I.T.A ...makes life a little more complicated compared to the VSI.... I'll just need to add a UBEC to supply power to the Arduino from the chairs 24v for other PGDT joystick types OR perhaps a 9v battery as the Arduino's supply ...JUST for the initial power up ...depends on the quiescent consumption of the Arduino.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 30 Nov 2013, 21:04

Lordk ,

I've been back thru your posts and diagrams and I think that I understand your start up problem ... the PGDT Circuit expects to see a neutral signal of 2.5v from the JOYSTICK pots or from the Arduino .....you might try adding a 100k ? resistor from pin 4 Vs/2 to pin 6 and also from pin 4 to pin 2 so that the pod see's a 2.5v neutral signal at start up.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 30 Nov 2013, 21:11

P.I.T.A ...makes life a little more complicated compared to the VSI.... I'll just need to add a UBEC to supply power to the Arduino from the chairs 24v for other PGDT joystick types OR perhaps a 9v battery as the Arduino's supply ...JUST for the initial power up ...depends on the quiescent consumption of the Arduino.


I may be wrong. This is from memory about 10 years back. I would need to take one apart. Will do it later if I get chance.
User avatar
Burgerman
Site Admin
 
Posts: 71100
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby ex-Gooserider » 01 Dec 2013, 05:04

Another thing to keep in mind is that the Arduino outputs are in an unkown and undefined state at power up... They are basically in a random state that can't be relied on until AFTER the initial code in your sketch where you define them and assign a value to them...

This is actually fairly common in a lot of electronic devices that don't include explicit circuitry to define the state during initial power-on.

It will also be a problem if the Arduino is reset - again the output states are undefined until the sketch starts running again and defines them...

It is VITAL that anything controlled by the Arduino be designed in such a way that it can't be caused to do undesired things regardless of the state of any outputs... One way is to ensure that the Arduino gets powered before anything else, with enough delay to let the sketch get started. However this doesn't help if you have a reset. Better is to put a FET in the power lines to the rest of the device, such that the power is shut off until the FET is explicitly switched on by a signal from the Arduino.

This may explain random errors at poweron.

ex-Gooserider
User avatar
ex-Gooserider
 
Posts: 6232
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 14 Apr 2014, 12:39

lordk wrote:Hi, I started this project all over again. I made a small board to easily test voltage of VR2 controller. This board connects VR2 joystick pod to VR2 controller.
I connected (see picture) all ribbon cables and started testing the outputs.

First I disconnect centre pin and put my own voltage. I made a voltage divider with 1K resistors using VSS and GND supplied from VR2 controller. Works fine even with load.

I continued my testing.
I use a 1K precision potenciometer to supply voltage on X axis (both channels). Works fine.
I use a power supply on Y axis (both channels). Works fine.

So I suppose that my problem is not in centre pin and is on DAC voltages or in my Arduino program.

Question.
Voltage using GND joystick pod reference are:
VSS: 1.83 V
Center: 0.87 V
forward: 1.41V
backwards: 0.36V


If I use GND from PCB of VR2 controller values change.
VSS: 4.95 V
GND: 3.12V
Center: 4.00 V
forward: 4.4V
backwards: 3.6V

I know that values are different because of the reference I use, but when I connect my arduino should I wire arduino ground to what ground: pcb or joystick pod?


I've been playing around recently with a VR2 and it's caused me much head scratching as the voltages are weird and replicating the measured voltages didn't work!

I eventually tried the standard 2.5v centre voltage and 1.2v nom swing and there is no problem using those voltages to R/C the chair via hacking into the joysticks outputs and injecting the previously mentioned voltages.

HOWEVER the interfacing of the joysticks outputs to the Arduino are giving me a headache as the weird measured voltages appear to be PWM .

The VR2 joystick supply voltages seems to be totally different from the norm

Measured from GND / battery negative.

Wires marked/designated as ...

VSS: 4.95 V GND: 3.12V PWM Supply ?

Center: 4.00 V PWM equiv of 2.5v ...the centre of 3.12v and 4.95v is approx. 4.00v
forward: 4.4V PWM equiv of 3.7v
backwards: 3.6V PWM equiv of 1.3v

vr2.png
vr2.png (71.42 KiB) Viewed 13963 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 14 Apr 2014, 13:32

MORE thoughts / ramblings...

I haven't really got enough spare pins on the Arduino to read the PWM output from the joystick ...so ...

I think that the easiest way for me to resolve this is to feed the joystick a normal analogue voltage and output either a normal analogue voltage or a PWM equiv from the digipot .

I've already successfully tested the digipot using the joysticks PWM outputs as the digipots inputs ...so either way is possible.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby ex-Gooserider » 15 Apr 2014, 00:41

Would it help any to put a filter cap to ground on the Joystick voltage lines? That is the usual fix if a PWM signal is not a clean enough imitation of DC to fool an analog input... I'm assuming you are using the Arduino analog in pins, and it sounds to me like the problem is that the input signal is switching at a speed such that sometimes the Arduino is reading the full voltage and other times a low or other intermediate value. A cap (and possibly a resistor and / or indctor should smooth it out so you get a consistent reading...

ex-Gooserider
User avatar
ex-Gooserider
 
Posts: 6232
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 15 Apr 2014, 01:37

I have considered a RC filter ( I never seem to be able to get them right )...but feeding the joystick from the 5v regulator ...rather than using the boards PWM supply... seems to have solved the problem.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby ex-Gooserider » 22 Apr 2014, 09:12

Makes sense... It seems like at least some of the parts in the Arduino world want very clean power, so you need something that gives little or no ripple. I know that I have an LED light project I'm working on for the Redman chair, and I was tearing my hair out trying to make the circuit work initially - wiring was right but behaviour was strange and erratic.

Power was an old 12V laptop brick, running through a 7805 to power the Arduino and the logic side of the LED controllers. Even with the recommended caps on the 7805 it wouldn't work - a soon as I added a boatload of filter caps on the 7805 output and small ones across the power ins of the Arduino, everything started working fine...

ex-Gooserider
User avatar
ex-Gooserider
 
Posts: 6232
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 23 Apr 2014, 09:04

ex-Gooserider wrote:Power was an old 12V laptop brick, running through a 7805 to power the Arduino and the logic side of the LED controllers. Even with the recommended caps on the 7805 it wouldn't work - a soon as I added a boatload of filter caps on the 7805 output and small ones across the power ins of the Arduino, everything started working fine...

ex-Gooserider


Lenny put me onto this 5v regulator....same pin out as the 7805 and doesn't need any extra components when using a voltage under 36v.

TRACO 5W Switching Regulator, 6.5 to 36V dc Input, 5V Output, 1A TSR 1-2450

Image

http://uk.rs-online.com/web/p/switching ... s/6664379/
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 23 Apr 2014, 09:48

Here's an update on my solution that should help others trying to hack the VR2 joystick.

DO NOT USE THE VOLTAGE SUPPLIED BY THE JOYSTICKS RIBBON ...use a separate regulated 5v supply and the batteries GND.
VR2 SUPPLY.png
VR2 SUPPLY.png (147.45 KiB) Viewed 13917 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby lordk » 28 Apr 2014, 16:11

Hi, I don´t know if I understand what you are doing.

- Taking 5V from ribbon and power the Arduino through Vin seems that is not going to work. Ribbon supply 5V only when powered (I think) and inmediately check the voltage from the joystick. If the Arduino don´t start up quickly those voltages are not going to be ready and an error will occur.

-Taking 5V from ribbon and power the Arduino trought jack barrel is not an option. You need +7V .

-So, you need to power the Arduino from batteries as you said. Here is another problem. When I tested my RC filter (R = 1K, C=100uf) everything was OK, but when I use the wheelchair with load VR2 randomly crushed. For some reason (ripple probably) affect PWM from Arduino and the VR2 shut down.
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 28 Apr 2014, 16:24

I have a bench tested solution ...but it still needs to be tried out by mous3... a member of this forum.

Do not use the ribbons GND and VSS...as they are ..or appear to be ... PWM.

Instead supply the Joystick / Arduino / RC Receiver with your own regulated 5v derived from the joystick pods 24v... and use a digipot.

viewtopic.php?f=2&t=4071
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby lordk » 28 Apr 2014, 16:31

Do you have the problem that I mentioned when supply 24V from wheelchair batteries?
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 28 Apr 2014, 16:46

I haven't had any problems with using the chairs 24v.

I can turn it ON/OFF with either the R/C Transmitter or the joysticks pod push button and operate the motors with either the Joystick or the RC .

If the RC Transmitter is OFF the joystick acts as normal ... if the Transmitter is ON you can drive the chair by using Radio Control ... BUT any input from the joystick overrides the RC command.

Note that the Receiver , Arduino and Joystick is ALWAYS being supplied 5v.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 28 Apr 2014, 16:55

I should again point out that I've only bench tested this system ... so problems may be reported ... but I don't anticipate any.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 28 Apr 2014, 17:04

lordk wrote:Do you have the problem that I mentioned when supply 24V from wheelchair batteries?


You might get everything working with your setup if you isolate the joysticks "GND"... which IS NOT Ground ... from the actual GND which is the batteries negative.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 28 Apr 2014, 17:54

Try this ...Only use the joystick "GND" and "5v" for the resistors that are supplying the Vs/2 .

Supply a 1.2v swing about a 2.5v centre from the DAC's using the Battery GND as a reference.

dac vr2.JPG
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 29 Apr 2014, 00:19

updated pic...previous one deleted.
mod.png
mod.png (114.71 KiB) Viewed 13986 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby ex-Gooserider » 29 Apr 2014, 06:31

An arduino can be powered from many sources - the USB connection, a 7-12V DC connection into the barrel jack that uses the on-board regulator, or a tightly regulated 5V DC directly into the 5V pin. Note that not all of these options may be present on the derivative / clone boards, and are certainly optional if rolling your own board....

I agree with the earlier suggestions to pull power from the pod supply as opposed to the ribbon cable for the joystick, but also would highly recommend doing LOTS of bypass caps! Do far more than the usual suggestions, I would start with a 100uF and go down with more in powers of 10 to at least 0.1uf. The larger caps can be electrolytic, but the small ones should be "low ESR" ceramics. Put the smaller caps as close to the Arduino as possible. Also consider putting a ferrite bead on the power line.

The chair is not a kind environment for electronics - you have big DC motors pulling a lot of current, using PWM, and plenty of other digital circuitry that is all generating electrical noise, much of it with square waves, which means tons of harmonics all up and down the frequency range. At least some of this is going to propogate all through the electrical system, so it is really important to filter out as much of the noise as possible before it gets to the digital components... Noise is the enemy, as it can cause all sorts of strange and hard to reproduce problems, and it will still screw you over even when the circuit is wired perfectly... The multiple caps in different sizes is because each one will have a particular range of frequencies that it is good at squashing.

ex-Gooserider
User avatar
ex-Gooserider
 
Posts: 6232
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

Re: Parts list for VR2 joystick hacking!

Postby LROBBINS » 29 Apr 2014, 09:03

Amen. Noise immunity is one of the reasons (most) all chairs in the last decade or so (and most other motorized equipment) have used CAN bus. BTW, if you are willing to use SMD components, you can now get reasonably priced high-value multi-layer ceramic capacitors to use in place of electrolytics - they take up less space and don't have a finite life time as do electrolytics. Their values are less stable with temperature and voltage, but for filtering that's not a problem. They also won't burn if overladed like tantalums can. As I'm still transitioning from vaccuum tube days, I had no idea of their existence until someone from France who's working on a CAN bus controller for boating for people with disabilities pointed it out to me on the Arduino forum. Ciao, Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Parts list for VR2 joystick hacking!

Postby lordk » 29 Apr 2014, 15:03

ex-Gooserider wrote:An arduino can be powered from many sources - the USB connection, a 7-12V DC connection into the barrel jack that uses the on-board regulator, or a tightly regulated 5V DC directly into the 5V pin. Note that not all of these options may be present on the derivative / clone boards, and are certainly optional if rolling your own board....

I agree with the earlier suggestions to pull power from the pod supply as opposed to the ribbon cable for the joystick, but also would highly recommend doing LOTS of bypass caps! Do far more than the usual suggestions, I would start with a 100uF and go down with more in powers of 10 to at least 0.1uf. The larger caps can be electrolytic, but the small ones should be "low ESR" ceramics. Put the smaller caps as close to the Arduino as possible. Also consider putting a ferrite bead on the power line.

The chair is not a kind environment for electronics - you have big DC motors pulling a lot of current, using PWM, and plenty of other digital circuitry that is all generating electrical noise, much of it with square waves, which means tons of harmonics all up and down the frequency range. At least some of this is going to propogate all through the electrical system, so it is really important to filter out as much of the noise as possible before it gets to the digital components... Noise is the enemy, as it can cause all sorts of strange and hard to reproduce problems, and it will still screw you over even when the circuit is wired perfectly... The multiple caps in different sizes is because each one will have a particular range of frequencies that it is good at squashing.

ex-Gooserider


- Yes, I suppose that when my system crashed. Thats is why I changed the supply of my Arduino to USB or another external battery 9V.

However I prefer to take 24V from batteries and step it down to 12V (or 9V or 7V) with a switching regulator (http://www.dimensionengineering.com/products/de-swadj) and then connect that to the jack of my Arduino. I still need to solve this issue. Maybe the double step down of power filter my electrical noise problem?.Help is appreciated.

This way you dont need to take care of battery level, charging, etc. That is handle by the VR2. Moreover you don´t need to hack your VR2 electronic looking for 5V. To connect this shield you only replace the joystick pod for the Arduino shield (no hacking no extra connection).
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby LROBBINS » 29 Apr 2014, 17:26

A caution here. The Arduino's 5V linear regulator will run pretty hot if you feed it 12V, especially if you have anything connected the Arduino that draws significant current. Just the Arduino and a few CMOS ICs are probably OK even long term, but that regulator does have to lose (12 - 5) * current as Watts f heat.
Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Parts list for VR2 joystick hacking!

Postby ex-Gooserider » 06 May 2014, 09:05

As a minor but accurate giggle - I just saw 0.1uF caps described on the Sparkfun website as "electronic fairy dust" - sprinkle them liberally on circuits to ensure proper operation and solve strange function problems...

I agree with the caution against using 12V with the Arduino on-board regulator. It is a "linear" style part that draws the same current at the input voltage as it supplies at the output, and dissipates the difference as heat... If you look up the specs on the actual part, it says that it is theoretically good for 1A at 12V in, but ONLY if heavily heatsinked... On the Arduino it's a bare part, and I've seen lots of notes on the Arduino forums and (IIRC even in the Arduino playground documentation) that it is NOT intended for use with more than 9V (like a transistor battery) and minimal loading besides the Arduino itself...

ex-Gooserider
User avatar
ex-Gooserider
 
Posts: 6232
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

PreviousNext

Return to Everything Powerchair

Who is online

Users browsing this forum: acid_coke, Burgerman, LROBBINS, tettralytic and 460 guests

 

  eXTReMe Tracker