Custom proportional control

Power wheelchair board for REAL info!

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

Re: Custom proportional control

Postby LROBBINS » 30 Dec 2022, 14:52

Way back when I did figure out the 3 ways how Roboteq deals with "corners": one is doing nothing (not good), and the other two do some truncating or scaling. Somewhere in my PC I probably still have a file with how those 2 work, so when I find some time, and have gotten some sleep, I'll try to find that, and if I can't I'll go back to the Roboteq manual and figure it out again.
LROBBINS
 
Posts: 5553
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Custom proportional control

Postby slomobile » 30 Dec 2022, 16:48

LROBBINS wrote:In order to add motor compensation to the Roboteq I had to do the reverse: first un-mix the throttle/steer values to get individual motor values, apply compensation, then re-mix to get throttle and steer. If the motor settings are M1 and M2, the re-mix is:
Throttle = (M1 + M2)/2
Steering = (M1 - M2)/2

It was helpful to go back and look at your script, but it doesn't work directly in my case because I don't have a zero value at neutral. All output values must be positive.

A left spin would have speeds M1(left) 0(reverse), M2(right) 256(forward).
(0-256)/2 = -128
right spin (256-0)/2 = 128
any straight line motion M1 = M2, so steer = 0.

All values are too low by 128. So add that to the result in hexadecimal to compensate.
line 89 should then be
steer = ((leftSpeed - rightSpeed)/2) + 0x080;

Thanks for the help.
slomobile
 
Posts: 706
Joined: 16 Aug 2018, 20:40
Location: Memphis TN, United States of America

Re: Custom proportional control

Postby LROBBINS » 31 Dec 2022, 00:08

Yes, adding half a byte will do what you want if you want to mix the inputs to the digipots. Alternatively, you can do the mixing on the analog outputs of the digipots (analogRead in Arduino-eze) as they are zero centered.
LROBBINS
 
Posts: 5553
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Custom proportional control

Postby slomobile » 08 Feb 2023, 02:45

I still get an 0808 omni joystick error on both omnis with 9 pin detect and switch detect turned off in programming and a real ASL joystick connected.
These are both used from ebay so it is possible they really are both bad, or the joystick is bad, but I think more likely I'm doing something wrong. I have an R net dealer programmer now. Can anyone suggest a minimum setup and program to get rid of the 0808 and verify that the omnis function? Or a way to verify the ASL joystick is good.
slomobile
 
Posts: 706
Joined: 16 Aug 2018, 20:40
Location: Memphis TN, United States of America

Re: Custom proportional control

Postby woodygb » 08 Feb 2023, 12:15

0808 - Joystick Error
The most common cause of this trip is if the joystick is deflected away from center before and during the time the control system is switched on.


Try calibrating the joystick.
8.1.1 Joystick Calibration
If a new joystick type SID is fitted, then the following calibration procedure must
be performed. If it is not, the wheelchair may not drive in a straight line or reach
maximum speed.
To begin the procedure you must first enter OBP mode and go to the System
branch. Select the Joystick Calibration option.
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: 7072
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Custom proportional control

Postby slomobile » 08 Feb 2023, 14:22

It would not complete calibration.
left/right and forward/back values would just randomly vary between 8-11 regardless of joystick position.
slomobile
 
Posts: 706
Joined: 16 Aug 2018, 20:40
Location: Memphis TN, United States of America

Re: Custom proportional control

Postby slomobile » 08 Feb 2023, 14:56

The cracked Omni is working now and driving my M3 with the ASL joystick.
History:
My first Omni has a cracked case. It was in the description but somehow I missed it. The description also said it was working when removed. But I got the 0808 error when connected to my chair. So I bought a second Omni which included an ASL joystick and also got 808 on my chair. Its description also said it was working when removed.

Later I got the Rnet programmer and turned off user switch detect on the uncracked omni. Still 0808 and calibration attempt would not change values.

Just now, swapped the ASL joystick from uncracked to cracked omni. Got new error, user switch not detected. Turned off user switch detection in programming. Now it works.

So it looks like I did in fact buy 2 bad Omnis, but also inadvertently got all the parts needed to diagnose and fix one of them. I'll be swapping the good guts from the cracked omni into the case of the uncracked omni later today. Thanks for the help.
slomobile
 
Posts: 706
Joined: 16 Aug 2018, 20:40
Location: Memphis TN, United States of America

Re: Custom proportional control

Postby slomobile » 08 Feb 2023, 15:26

Nevermind. I'm dumb.

I was about to send a message to the Ebay seller that claimed the Omni with joystick was "fully functional". I wanted to take a photo of the calibration screen with joystick deflection, so I removed joystick from cracked omni and was about to put it back on uncracked omni. I noticed the little plastic port cover was on port 1 and the open port was port 2. Oops.

Plugged joystick into port 1 of uncracked omni and it is now driving the F3. Cool. Glad I didn't send the ebay message yet.
slomobile
 
Posts: 706
Joined: 16 Aug 2018, 20:40
Location: Memphis TN, United States of America

Re: Custom proportional control

Postby slomobile » 21 Oct 2023, 18:42

This project got sidelined when the F3 was converted into the prone chair and I couldn't figure out how to mount the pedals operable while prone. If you have ideas I'd like to hear them.

In the interim I'm adding Fanatec CSL Elite V1 foot pedal controls to a Permobil M3.

The standard Permobil foot rest changes in length based on the leg elevation angle. For this chair I do not want that, or the wiggling of the footplates that comes along with the roller bearing slider system inside the central tube.

I want to rigidly mount the foot plates to the leg elevator tube. So the legrest can change angle, but not length, and not wiggle. I think I can do this by making a shim to go inside the central rectangle of the cast brace(calf pad mount) that joins the central tube to left and right square tubes. The shim/spacer would take up the volume of the bearing assembly and the telescoping rectangular tube. So the brace could clamp onto the smaller inner rectangular tube.

Does anything like that already exist either from Permobil or the aftermarket? It seems like something that would have been invented long ago by someone that doesn't like the wiggle.
slomobile
 
Posts: 706
Joined: 16 Aug 2018, 20:40
Location: Memphis TN, United States of America

Re: Custom proportional control

Postby ex-Gooserider » 24 Oct 2023, 00:52

Never seen it, so may be off base, but I'd wonder about drilling a hole through the parts and putting a bolt in to pin them together? You would also need to figure out what the linkage (or possibly an actuator) that makes the length change and disable / remove it...

ex-Gooserider
T-5, ASIA-B
Jazzy 1100
Jazzy Select 6
Quickie Q-7
Invacare Mariner
Want to make / get a better chair, ideally one that stands.
User avatar
ex-Gooserider
 
Posts: 5967
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

Previous

Return to Everything Powerchair

Who is online

Users browsing this forum: Burgerman and 78 guests

 

  eXTReMe Tracker