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 Burgerman » 09 Nov 2013, 15:26

The joystick input doesent seem to care about pulsewidth or DC and both seem to work the same.
User avatar
Burgerman
Site Admin
 
Posts: 71110
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby LROBBINS » 09 Nov 2013, 18:01

Good, then the default Arduino PWM should work OK.
Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Parts list for VR2 joystick hacking!

Postby lordk » 11 Nov 2013, 19:44

LROBBINS wrote:First, to make sure we're talking about the same things, when we say Controller what we usually mean is the Power Module, while the Joystick Pod is the whole black case that contains joystick, switches, lights, circuitry and so on. I tend to call the joystick mechanism itself the joystick "pot", but I don't know what others call it.

well, I was using joystck pot (on left) to your joystick and controller (on right) to your joystick pod.

LROBBINS wrote:In general, all ground connections should be, somewhere, connected together and on a 5V system there shouldn't be more than a millivolt-level difference from one ground pin to another- Because of impedance/resistance of the wires, there might be some slight difference between two ground pins, but one tries to engineer that out as it can cause no end of problems. The only situation in which one is likely to have different, not-connected-to-each-other, ground lines is if two circuits are isolated by something like an optocoupler.

Maybe these is the reason of differences between GND on pcb from the controller (joystick pod).

LROBBINS wrote:I can not tell from your photo how the wires from the pod's circuit board and the wires from the pot are connected to each other, or how you could possibly have such a large difference measuring voltages respect to one ground line versus the other. Can you post a picture that shows the connections on that board, and another that shows what the connections were like in the original hookup between pot and circuit board? Or a schematic of both situations, or both the photo and schematic?

See pic attached.

LROBBINS wrote:When you hook up the Arduino, you should be following the same rules: all grounds MUST be connected together unless you use optoisolaters, AREF of the Arduino should be connected to Vcc of the joystick, and you have to put a line in your program so that the Arduino uses that AREF for its measurements, if you are measuring the joystick position with the Arduino.

I am not reading joystick.

LROBBINS wrote:I get the impression, however, that you want to use the Arduino to supply voltages that mimic what the joystick would produce. Please think carefully about this. The Arduino does not have a digital-to-analog converter. The AnalogWrite function produces a PWM signal; a square wave with varying on and off times to (on average) approximate a steady intermediate voltage. That kind of signal might not be usable by the P&G electronics. You might be able to use an RC network to massively smooth that PWM signal, but you would probably want to program the Arduino to produce its PWM at a much higher switching frequency than its default. Better yet, you could feed the Arduino output to a real analog-to-digital converter chip, or if you want just a few values, use the digital output pins of the arduino to select among different voltage dividers.

That is what I am doing. I use 2 external DAC to supply swinging voltages. I tried with PWM but I could get it to work. What R and C do I need to use?


I really think that before you start cutting and attaching wires in the joystick, you need to study what the P&G needs and do some programming get those signals. John has done this for his radio control, without a microcomputer, and it might be simpler to just study what he's done, then use the Arduino to mimic what his radio control receiver puts out.

Ciao,
Lenny[/quote]
Attachments
schematics.jpg
schematics.jpg (64.01 KiB) Viewed 15488 times
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby lordk » 11 Nov 2013, 20:24

Well. I am testing R = 1 K and C= 100uF and seems to work. I am going to make a program and test it with load.
Without RC VR2 shows and error.
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby LROBBINS » 12 Nov 2013, 16:01

I still can't tell from that drawing exactly how you've wired things. For one, you show and 8 lead ribbon coming from the joystick pot, but only 5 connections to your circuitry. What are the other 3 and where do they go? Are all 8 also connected to the P&G circuitry? What is Vcc on the P&G board? Are all of the grounds tied together? (Another, in some ways better, name for "ground" is "common" or "signal common" - which should give you the idea that they need to be connected together.) Where is the joystick pod getting its Vcc? If from the P&G, that's what should be used as AREF on the Arduino or you will have a tough time calibrating things to match what the P&G expects to see.

A "pictorial diagram" may be prettier, but a plain old-fashioned schematic makes it much easier to see the logic of the wiring.

Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 12 Nov 2013, 16:46

If you take the 5v from the joystick supply, and use it to power a couple of tiny 1 amp (forwards only) dc speed controllers, that are connected to a RC receiver as I did, then these give you a 0 to 5v pulsewidth output.

With joystick central, you get 2.5v average (50 percent pulse width). If its not exact, you can trim it at the transmitter or with resistor and a multi turn fine adjustment trim pot. TOTAL throw to give the needed restricted movement is done the same way. So now we get an approx. 2.5v and plus/minus a small swing.

On the Pilot plus, and the Omni plus, this works fine with no other changes. At least it does here. But not all are the same. But I am presuming that a pulse width is already smoothed enough to see a steady DC voltage by the rest of the PG electronics.

That's all that is happening here. http://www.wheelchairdriver.com/radio-c ... rchair.htm

There are some small caps added too. Mostly to remove noise and add stability - but it worked BEFORE they were added. So not essential.

Cant find ones as small as I used but these are 3 amp http://www.hobbyking.com/hobbyking/stor ... otors.html I used them simply as a simple cheap way to get a pulse width signal from the more complex rc servo out signal.
User avatar
Burgerman
Site Admin
 
Posts: 71110
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 16 Nov 2013, 18:38

lordk,

Are you attempting R/C of the wheelchair?

I have been working on interfacing the Arduino to a pair of Curtis scooter mobility controllers that did not like the PWM output of the Arduino ... even with smoothing I could never get a satisfactory voltage signal ..in the case of the Curtis's a 0v - 2.5v - 5v.

So I've changed over to a dual digipot ( 254 steps ) as the final output stage from the Arduino ...this seems to work just fine.

Arduino Digipot.jpg
Arduino Digipot.jpg (94.54 KiB) Viewed 15436 times


The Arduino sketch code that I've knocked up... cribbed from various sources around the web and modified ...has a place in it to alter the voltage swing around a 2.5v center.... assuming that the input to the digipot is 5v.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Irving » 17 Nov 2013, 12:24

woodygb wrote:lordk,

Are you attempting R/C of the wheelchair?

I have been working on interfacing the Arduino to a pair of Curtis scooter mobility controllers that did not like the PWM output of the Arduino ... even with smoothing I could never get a satisfactory voltage signal ..in the case of the Curtis's a 0v - 2.5v - 5v.

So I've changed over to a dual digipot ( 254 steps ) as the final output stage from the Arduino ...this seems to work just fine.

Arduino Digipot.jpg


The Arduino sketch code that I've knocked up... cribbed from various sources around the web and modified ...has a place in it to alter the voltage swing around a 2.5v center.... assuming that the input to the digipot is 5v.

Neat solution, and one that may solve a PWM -> volts issue I have elsewhere assuming 254 steps works (not wheelchair related), so thanks!
User avatar
Irving
 
Posts: 2114
Joined: 04 Dec 2012, 11:51
Location: NW London

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 17 Nov 2013, 12:42

Slight mistake previously by me ...but makes no never mind really ...digipot is 257 not 254 steps.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Irving » 17 Nov 2013, 12:46

hmmm... can't edit my previous post???


Only thing I'd add is depending on what you're driving you might need a pair of op amps as voltage followers if you need a low impedance output. The lowest variant of these chips is 5kohm equivalent, a real joystick is <1k. But it works ok for Woodygb :)
User avatar
Irving
 
Posts: 2114
Joined: 04 Dec 2012, 11:51
Location: NW London

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 17 Nov 2013, 12:55

The Curtis mobility SCOOTER controllers accept a 4.7k - 7k value ...hence my use of a 5k :)

I can however config them to accept just a voltage signal ... you just need to place a 4.7k resistor across what would be the pot ends at the controller.
4.jpg
4.jpg (18.41 KiB) Viewed 16210 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 17 Nov 2013, 13:09

With the above resistor mod ...the BLACK Common / GND's in the Arduino chip pic would need to be connected together and also the RED 5v supply lines would need to be connected together as the controller would just want the wiper voltage...I'm assuming that a wheelchair joystick would also only require the wiper voltage.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 17 Nov 2013, 13:27

Screen capture of R/C JOYSTICK outputs Full Forward - Neutral- Full Reverse versus Digipot voltage outputs with a programmed 1.39 volts swing about a 2.5v neutral.

ch1 and ch2 columns show the volts with rc1 and rc2 the radio pulse.
1.39 volts swing.png
1.39 volts swing.png (126.28 KiB) Viewed 16208 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 17 Nov 2013, 13:37

Bit of a whoops in displaying the volts versus RC Pulse values ...an errant formula in the code ( now corrected ) means that they are transposed in the screen shot.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 17 Nov 2013, 14:00

Revised monitor output showing peak RC Pulse and the voltage output it produces.... also the programmed values for the high and low volts that the digital pots should produce from the R/C Joystick throw extremes.
digipot rc.png
digipot rc.png (47.01 KiB) Viewed 16205 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 20 Nov 2013, 17:31

Lordk,

I just tested my R/C of a Penny+Giles VSI via Arduino ( Pro Mini ATmega328P 5V ) setup ... it works just fine.

Here's some info that may help... together with a modified version of your Arduino pic that should work..

The controller is happy with both the fore/aft 1 and fore/aft 2 being joined together and being fed from just one swing voltage source ... ditto for the 2 left/right channels.
I initially tested the above with the joystick in situ and simply jumpered the channels together.

I left the joystick in the circuit to supply the 2.5v ...but I'm sure that a simple voltage divider will do just fine.

GND / COMMON = battery negative.



vr2_hacking + joy connect1.png
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 20 Nov 2013, 17:49

Tsk ..the blurb in the red box is wrong ..it should be...
socket.jpg
socket.jpg (6.35 KiB) Viewed 16180 times
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby lordk » 21 Nov 2013, 12:54

Hi woodygb, yes I noticed the error you show on schematics. I still had several errors on my circuit.

Problems:
* After testing...and testing.. and testig..Seems that battery is too dead to supply a nice voltage to my Arduino. Although battery is 13V is seems that sometimes it drops too low and mess up my Arduino. Solution: Supply voltage only from USB for testing. TO DO: check real voltage changes. Do a power supply with 78xx taking 25V from both batteries.

* Program change between Joystick Mode and NoConnection mode. Probably because of first problem.

* Change to RC instead of DAC to a better low cost solution. Need more testing but seems to work fine.

* Use thumb joystick connected to VSS supply from Joystick pod. Connect that VSS to Aref. Need more testing but seems to work fine.

As you probably see the first problem was the cause from my random error. I need to solve this to eliminate a variable of my system.

Regards.
lordk
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 21 Nov 2013, 13:01

I take my test supply from the P.C. ...but rather than the USB 5v ...which is low power ..I've tapped into main 5v internal power supply.

Note that my reference to R/C means Radio Control.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 22 Nov 2013, 13:07

Update for you on the 5v supply.

I was initially loath to try using the joysticks 5v supply as I had no idea if it would have sufficient amps .... but I bit the bullet and tried it with my setup ...seems that it has. :D

I'm interfacing with a Penny+Giles VSI .... My setup consists of the following ..Arduino ( Pro Mini ATmega328P 5V ), Spektrum B6000 Receiver and a MCP4261-502E/P Digital Potentiometer...ALL powered from the 5v supply to the VSI joystick.

This setup and the coding gives me dual control over the wheelchair motors ...EITHER ... R/C or Wheelchair Joystick ...with the Wheelchair joystick output taking prescidence over the R/C signals when both are ON.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 22 Nov 2013, 13:39

AND enough to run a RC receiver and 2 small 1A max, forwards only speed controllers! I tried this a long time ago.
User avatar
Burgerman
Site Admin
 
Posts: 71110
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 22 Nov 2013, 14:07

John ..do you have you a remote ON button setup for powering up the chair from the R/C Transmitter?

This is something that I'm considering adding ..but don't know whether it needs or is worth implementing.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 22 Nov 2013, 14:24

No. Only OFF via a RC relay and a 3rd channel. Off for good. But you never really need it off unless parked up for more than a day or so.
The RC gear fail safe holds the signal solidly and safely at zero or stopped. Its encoded. Interference cant move the chair.

The Roboteq one is different. Its got all 3 input types in operation at once. So you can just switch on the transmitter and take over from the joystick. You can set priorities in any order. Serial, analog, or RC (or frequency, duty cycle, pulse width, etc). Failsafe is still at zero speed. But a third channel is set to switch RC OFF when transmitter is off. It then defaults to Analog, so joystick then works.

So if someone in in the BM3 and wont come back, I can just take over by turning on my RC TX!
And with my video goggles too, and a tiny on board security cam, and my RC TXs boosted range (to about 4 to 6 miles), I can do it even if I cant see it. Often many streets away. EG I can get it out of the garage, or my van, and into the house & park it next to my bed while I am IN my bed if needed. Safely and easily.

See here http://www.wheelchairdriver.com/images- ... ed-fpv.jpg

http://www.wheelchairdriver.com/12x.htm


UK Legal 100mw radiated (97db power + 3db antenna = 100mw) to:
2000mw or 36db, + 3db antenna gain = 3.2watts radiated. An increase of some 32x in power! It takes 4x the power to double the range. We now get sensible range 8-)
User avatar
Burgerman
Site Admin
 
Posts: 71110
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 22 Nov 2013, 14:42

My setup leaves the Wheelchair Joystick as the Master ..

With the transmitter OFF and the Receiver ON ... (my receiver is ON permanently and setup to give a failsafe signal = 2.5v or OFF ) ..you can drive the Chair from the joystick as normal.

If the Chair is ON and the R/C Transmitter is turned ON ...then you can drive the chair with the R/C Transmitter... but it is the SLAVE ...SO ...if the Wheelchair Stick is pushed it overrides the Transmitter signal and takes control.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 22 Nov 2013, 16:01

Then you cant override the hijacker and bring them back!

But seriously you can also do that with the Roboteq in its configuration. What RC are you using?

I think its so useful to you if you are disabled that ALL chairs should be RC compatible as they come. It doesn't make sense NOT to include this in the modern world. Electronics to do this is cheap. It also allows you to experiment using helicopter solid state gyros etc. That's fun!
User avatar
Burgerman
Site Admin
 
Posts: 71110
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 22 Nov 2013, 16:11

Spektrum DX6 DSM1 and BR6000 Receiver ... Nothing special but does the job fine for what I normally use it for ... Robotwars .... https://www.facebook.com/groups/robotwars/

http://www.horizonhobby.com/pdf/Instruc ... ceiver.pdf

I'd actually prefer a Transmitter /Receiver combo that outputs NULL or a ZERO signal when it failsafes ...the DX5 AR500 combo did this ..but the AR500 seems to be discontinued.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 22 Nov 2013, 16:28

Well the Roboteq will effectively do that null thing for you. You can either use its over the limit or "side guards" on either or both used channels (so set beyond full forwards or beyond full left or both at say 110%) as your fail safe output. Or set a third channel as whatever signal you want to disable the RC input.

But I don't think any current modern RC RX gives a null output at loss of signal.

I use the AR10000 RX. 10 channel Spektrum receivers. ALL channels are both programmable for any fail safe position you wish or las command. And they are 2048 resolution, and have twice the frame rate. Very low latency. I use them in helis, and quadcopters and have one on my Roboteq chair.

I always use DSMX not DSM or DSM2, as it's both frequency agile, and uses two frequencies at once at all times, and these 10 channel rx's have 3 external satellite receivers. This lets you add one to each side of a chair, and one in front. As well as one in the rear behind the plastic lighting shroud. There's then no orientation where the receiver on a metal framed chair cannot see the transmitter directly.

The chance of signal loss, in built up areas, and in say mobility shows with many phones, and wifi around is practically zero when used with a 30x more powerful boosted TX, and DSMX frequency hopping multi receiver setup. Its just safer. Overkill maybe, but I don't want a chair to run away in a public place!

With the overpowered TX I have range tested this to 4.5 miles in my powered glider. Without a single frame loss according to the logger. It instils a lot of confidence! I can see distance in KM or Miles in my goggles. And they ran out of range first. I had to come back...
Attachments
D8E_3241.jpg
D8E_3241.jpg (179.76 KiB) Viewed 15645 times
User avatar
Burgerman
Site Admin
 
Posts: 71110
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Parts list for VR2 joystick hacking!

Postby lordk » 25 Nov 2013, 12:48

where do you get those 5V ? From joystick pod? Pin 1 of 8 cable ribbon?

In VR2 controller pin goes to 5V only when you turn on the joystick. As Arduino Leonardo has a small delay to start up the joytsick shows a flashing code error.
lordk
 
Posts: 92
Joined: 28 Oct 2010, 12:02

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 25 Nov 2013, 12:57

Yes Pin 1 of the joystick or Pin 7 of the VSI circuit board is permanently 5v .
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:07

Have you probed around the VR2 for a 5v feed?
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

PreviousNext

Return to Everything Powerchair

Who is online

Users browsing this forum: Burgerman, emilevirus and 468 guests

 

  eXTReMe Tracker