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 » 21 Aug 2018, 15:46

Is there a software joystick calibration routine for your Permobil X850 control system ...is it an R-net?
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby kolaf » 21 Aug 2018, 15:52

No, it is not r-net. That is why I had to hack the joystick interface directly. I believe it should be possible to interface directly with r-net via a canbus adaptor is something similar..?
kolaf
 
Posts: 14
Joined: 17 Aug 2018, 19:49

Re: Parts list for VR2 joystick hacking!

Postby kolaf » 21 Aug 2018, 15:57

Getting the correct output center voltage is trivial with the dac if I measure v/2 when thru both have the same vdd reference. So with some rewiring I shouldn't need to calibrate the voltage output. However, it requires some hacking of my pcb, but it should be possible to cut some connections and add some wires to achieve it, I think.

Storing rc calibration is a good idea, I currently do it at every boot.
kolaf
 
Posts: 14
Joined: 17 Aug 2018, 19:49

Re: Parts list for VR2 joystick hacking!

Postby kolaf » 21 Aug 2018, 17:13

For anyone interested here is a link to the repository for both my adruino code and the pcb design files.

https://github.com/kolaf/wheelchair

Note that based on the feedback I have received in this excellent thread today I will redesign both the code and the PCB for easier steering calibration. I think I can make most of the hardware changes by hacking my existing PCB, but I will try to update the design to reflect the changes for any future prints. Still, it works as is, which I am quite proud of given my limited hardware experience :-)
kolaf
 
Posts: 14
Joined: 17 Aug 2018, 19:49

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 23 Aug 2018, 10:11

kolaf wrote:Getting the correct output center voltage is trivial with the dac if I measure v/2 when thru both have the same vdd reference. So with some rewiring I shouldn't need to calibrate the voltage output. However, it requires some hacking of my pcb, but it should be possible to cut some connections and add some wires to achieve it, I think.

Storing rc calibration is a good idea, I currently do it at every boot.


Your code suggests a 1.5 volt swing ...the controllers that I'm familiar with use a 1.2v swing.

I like to measure and store the actual signal values produced by the Transmitter /Receiver .... I then map ( Neutral signal - High signal ) and ( Neutral signal - Low signal ) to the required voltage swing ...in my case ( 2.5v - 3.7v ) & ( 2.5v - 1.3v )
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby kolaf » 23 Aug 2018, 22:00

woodygb wrote:
kolaf wrote:
Your code suggests a 1.5 volt swing ...the controllers that I'm familiar with use a 1.2v swing.

I like to measure and store the actual signal values produced by the Transmitter /Receiver .... I then map ( Neutral signal - High signal ) and ( Neutral signal - Low signal ) to the required voltage swing ...in my case ( 2.5v - 3.7v ) & ( 2.5v - 1.3v )


I did measure the joystick output with a voltmeter. This gave me a swing of 2.07V. When trying this in my code the chair controller freaked out. I found that 1.5V was the highest I can go with it triggering an error.

Still, it seems that the max speed I get with my controller is less than with the factory joystick. The the turn range on the front wheels on the other hand seems similar for both configurations.

There is also an annoying thing where the speed is affected by the amount of "turn" in the wheels. A sharp turn reduces the speed significantly, especially when going backwards. I think I have access to some simple programming using the joystick and buttons, but haven't tried it yet.
kolaf
 
Posts: 14
Joined: 17 Aug 2018, 19:49

Re: Parts list for VR2 joystick hacking!

Postby Gingerbread Man » 18 Aug 2021, 21:39

This is my first post on here, but I hope people don't mind me bringing this thread back. This website is a goldmine! I wish I had found it three months ago before I had spent many evenings with some breadboard and a multimeter, discovering by trial and error what a few minutes reading this thread would have told me.

I'm building an electric car for my children called a Toylander. I'm trying to replace the MAID II joystick from a PG Drives VR2 joystick pod (taken from a Kymco K-Activ), and instead use a Hall-effect pedal as an input, to mimic only the forward and reverse swings. I realise there's a problem to solve here already, because I need to incorporate a forwards/reverse switch and get the correct voltage swings as an output from a pedal which goes from 0.8V to 4.2V when connected to a 5V circuit. Leaving that aside for a moment, my first issue was trying to get the joystick pod to be happy turning on without the joystick attached. I checked the resistance of the joystick pins when it was disconnected, and then plugged resistors with the same values into the ribbon cable connector. Attempting to turn the controller on resulted in one of the speed limit lights flashing. I assumed this was an error indication, but from a document someone on this board linked to https://support.pgdt.com/Servicing-Instructions/VR2/VR2-Replacement-of-Joystick, I now gather that this is the start of the calibration mode.

Does this mean that I can potentially run the Hall pedal, and whatever circuit I work out to manipulate the signal to give the correct swings for forward/reverse cases, from the joystick's 5V supply?

(It is such a relief to find this forum and see people talking about things that I've been struggling with and rattling around in my head for months! Someone on another forum pointed me this way - search engines were no help.)
Gingerbread Man
 
Posts: 6
Joined: 18 Aug 2021, 17:54

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 18 Aug 2021, 22:29

Is this any use?

arduino joy replace.jpg
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 18 Aug 2021, 22:36

The pods board must see Vs ( the pods 5v ) divided by 2 ... on all 4 of the outputs at start up.

Use some 1% resistors of about 10k as voltage dividers.

Manipulating the output of your E throttle AND providing a reverse switch maybe a little problematic...but do-able with an Arduino.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 18 Aug 2021, 23:13

Try starting the VR2 with just 2 resistors providing the voltages to ALL the channels.

See pic below.
RESISTOR JOY.jpg


Note that the board can provide the instructions, drawings , etc that will allow you to program the VR2.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Gingerbread Man » 24 Aug 2021, 16:53

Thanks so much for the reply. That does look useful, but I had the impression I could achieve what I wanted with a dual Op Amp, thereby avoiding the need to power an Arduino. The Hall pedal has three connections, and from testing (although it has been a couple of weeks since I did it) I think depending on how it was wired up, the output would either increase from 0.8V - 4.2V, or decrease from 4.2V to 0.8V. I was hoping that switching which output was taken, and running each through an appropriate op amp circuit, would give me the correct voltage swings for forwards and reverse. However, this needs some research as it is just a theory... when I have time I need to find an online simulator to try some things out.

Thanks again.
Gingerbread Man
 
Posts: 6
Joined: 18 Aug 2021, 17:54

Re: Parts list for VR2 joystick hacking!

Postby woodygb » 24 Aug 2021, 18:42

Any "switching" MUST involve keeping an appropriate voltage supply to the forward / reverse channel during the switch over ....if you don't the controller will enter a safety stop mode with flashing led's.

A mobility scooter axle and S-drive controller would have been easier , as I have already managed to match an E-Throttle to one.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Parts list for VR2 joystick hacking!

Postby Burgerman » 24 Aug 2021, 21:05

There is also an annoying thing where the speed is affected by the amount of "turn" in the wheels. A sharp turn reduces the speed significantly, especially when going backwards. I think I have access to some simple programming using the joystick and buttons, but haven't tried it yet.


Thas because it increases motor load. And so it slows. Now theres a programming item called motor load compensation, a positive feedback loop that increases motor power when it sees motor current increase. If that is increased your problem goes away. To the point where if increased too much it will speed up under load. And possible run away and be unstopable.
User avatar
Burgerman
Site Admin
 
Posts: 71090
Joined: 27 May 2008, 21:24
Location: United Kingdom

Previous

Return to Everything Powerchair

Who is online

Users browsing this forum: Yennek and 278 guests

 

  eXTReMe Tracker