PINNED - Roboteq Controller - developing for powerchairs

Power wheelchair board for REAL info!

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

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 28 Oct 2017, 19:41

OK, so it's not behaving worse than before. Within a couple days I'll post a new script which allows sensors and switches automatically to no compensation if there's a sensor failure at startup, and switches to sensorless (just like the one you just tested) if there's a sensor failure while driving. I finally got my unit with sensors installed in Rachi's chair this evening. First impression is that, using all the same settings, if there's any difference with or without sensors it's subtle, but when I next get a chance to play with it I'll switch back and forth between UseCurrentSensors = YES and UseCurrentSensors = NO instead of just relying on my memory of how it felt several hours ago. I'm too bushed to do it now after hoisting batteries in and out etc.
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 28 Oct 2017, 21:15

OK, so it's not behaving worse than before.

As far as I can tell testing on the bench and bed.
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 31 Oct 2017, 17:50

I was able to do the A-B with-without sensors comparison yesterday evening. Unless I force myself to feel it, there's hardly a difference on Rachi's chair - perhaps sensorless is a bit less smooth, has a slight tendency toward brief surging under very particular conditions, but I'm not even sure that this not just my imagination working overtime. In other words, sensorless should be pretty good except in the case of high power-to-weight ratio accompanied by relatively high impedance motors; i.e. the mobot.

I did notice one thing I hadn't noticed before, however. If I keep turning up CompTurnBoost trying to get a snappier start of turn-in-place, in particular on carpet with the seat tilted back so there's even more weight on the casters, I reach a point where further increases don't help. I think that there are two things going on here:

(1) The sensors are 100Amp units, so above 100Amps there's no further increase in compensation and I'm probably reaching that state in this worst case scenario. I haven't yet monitored sensor current while doing this, but when I get a chance I'll put in a PRINT line to see what it's doing.

(2) I may even be reaching the current limits set in the profile. I have AmpLimit = 130 and AmpTrigger = 110 with AmpTrigger for 4000 msec giving a Safety Stop. With CompTurnBoost set way past the point of no further improvement I have been able to hit that trigger if I hold the stick hard over.

Another reason to go to LiFePO4 if we could get a way to program a charger (preferably with built in power supply) so that all we have to do is plug it in and turn it on - getting weight off those casters would surely solve this last annoyance. And it really is just an annoyance as the only time it really balks is turn-in-place on carpet after going straight backwards with the seat tilted, so there's probably something like 50% of the weight on the square-profile casters. On a smooth floor, or with the casters in trail, turn-in-place is acceptable, even with the seat tilted.

Next post will contain a new script with the safe sensor implementation.
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 31 Oct 2017, 18:37

Here's a new script with current sensor and sensorless compensation. If set to UseCurrentSensors = TRUE, it tests for sensor faults in two circumstances:

(1) At startup. If there's a fault at startup, there'll be no motor compensation. This gives a very obvious, and pretty unpleasant, driving feel to let you know that there's a problem, but it will let you get home to work on fixing it.

(2) When running. If there's a fault once MainLoop has been entered, it just switches to sensorless compensation. This may not even feel significantly different (except on the bot) until the next time you start the unit - at which point it will do (1) above. If the fault is momentary, it will actually go right back to sensor compensation.

The attached script is configured for the mobot. I will post a generic analog version along with the full CANbus files to the cloud, but I'm still slogging through getting and checking all the software and hardware files for that. To tune this, I suggest the following procedure.

(1) Set to UseCurrentSensors = TRUE and increase MotorResistance in the usual way until there's a hint of instability, and then turn it back a bit. Do only forward and backward moves at first, then add turning (except turn-in-place) and obstacles and check for stable behavior over the full speed range.

(2) If there's any difference between acceleration at low speeds and acceleration at mid through high speeds, add a bit of LoadBoost_D to get snappier low speed acceleration. You may have to lower Acceleration and Deceleration as you increase LoadBoost_D.

(3) Now check turn-in-place. If starting a turn-in-place is balky, add some CompTurnBoost. Then re-check for over-compensation when going straight and reduce MotorResistance if necessary.

(4) Now, switch it to UseCurrentSensors = FALSE and check for balkiness in initial movement, both straight forward and backwards and for turn-in-place. If starting movement is iffy, add a bit of LowIBoost - just enough so that it starts moving better. As before, you won't have any load compensation under ca. PWM = 100, but this will help it get off the blocks.

If you want to check out the sensor fault detection, here's how to do so.

(1) If you can easily disconnect a sensor output (or pull it to ground through a 5K resistor to keep current to 0.5 mA), do that before startup and there should be no motor compensation. Then leave the sensor connected and not pulled down during startup, but disconnect it or pull it down after the script is running, and you should get sensorless compensation.

(2) If creating a physical fault isn't convenient, you can fake it in the script.

To fake a fault before startup, look in the script before MainLoop: for the line:
Code: Select all
  IF (abs(ILeft) > 20) OR (abs(IRight) > 20) THEN

and just before that add a line that says:
Code: Select all
ILeft = 100

There should be no motor compensation.

Now delete that added line, and check for fault detection while running. Go to the FindSensorCurrents: subroutine and look for the line:
Code: Select all
   M1Power = GetValue(_MOTPWR,1)
and just before that add:
Code: Select all
ILeft = 100

This will make it do sensorless compensation even though set to UseCurrentSensors=TRUE.

Of course, when done, get rid of the ILeft = 100 line to get back to normal operation.
Attachments
John analog 2017_10_12.mbs.zip
(51.3 KiB) Downloaded 524 times
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 31 Oct 2017, 19:04

Sounds good. Will sensor and no sensor need the same setting for the main compensation?
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 31 Oct 2017, 19:16

Tune it for operation with sensors and it should work OK without - at least on Rachi's chair there's no difference at all.
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby SEMOGdaniel » 31 Oct 2017, 22:54

I'm new with roboteq's technologies. When i plug in the rs232 (from the PC (DB9) to the controller (DB25)) what is supposed to happened or what should i do before starting sending commands? Using the ROBONRUN+ utility at the bottom of the windows the green led is turned on and the firmware is identified but i can do nothing, no controller's configuration apear, can't run scripts and nothing happen when i send any console's command.
SEMOGdaniel
 
Posts: 6
Joined: 26 Oct 2017, 22:12

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 31 Oct 2017, 23:23

Go to the Run command, click Record, set MotorCommand 1, MotorCommand 2, Motor Power 1 and Motor Power 2 in the graph list, then try the sliders. Does anything show? Do you have power to the yellow wire? Do you have power to the battery + and - wires? If you go to the Configuration tab, does it show the list of configuration parameters? What model controller do you have? In any of the tabs, does it say that this model of controller is active? Which LED indicators are lit and is one of them blinking at about 1 Hz? Exactly what commands have you tried to send from the console tab? Please post screen shots of all three Roborun+ tabs.
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby SEMOGdaniel » 31 Oct 2017, 23:45

LROBBINS wrote:Go to the Run command, click Record, set MotorCommand 1, MotorCommand 2, Motor Power 1 and Motor Power 2 in the graph list, then try the sliders. Does anything show? Do you have power to the yellow wire? Do you have power to the battery + and - wires? If you go to the Configuration tab, does it show the list of configuration parameters? What model controller do you have? In any of the tabs, does it say that this model of controller is active? Which LED indicators are lit and is one of them blinking at about 1 Hz? Exactly what commands have you tried to send from the console tab? Please post screen shots of all three Roborun+ tabs.


I was reviewing the roboteq's manual and i saw this:
"The Power Control input also serves as the Enable signal for the DC/DC converter. When
floating or pulled to above 1V, the DC/DC converter is active and supplies the controller’s
microcomputer and drivers, thus turning it On. When the Power Control input is pulled to
Ground, the DC/DC converter is stopped and the controller is turned Off."

In this momment i'm not in the lab but i remember one yellow wire (power control) not connected to anything. It is necessary for rs232 commands? I was able to send commands via USB without the power control.

Just to justify my ignorance :| : my graduation's project it consists of catching on a old wheelchair already implemented with a roboteq's controller but using inertial's sensores to commande. My inicial step is basically read the roboteq's manual and start commanding the wheelchair using a rs232 (db9 to db25) cable. Alot of work to do in 10months czy
SEMOGdaniel
 
Posts: 6
Joined: 26 Oct 2017, 22:12

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 31 Oct 2017, 23:58

It should be pulled high for on, and low for off. Not left floating. I used a 1k resistor for pull down to 0V. And switched to 12v for on. It should not cause your issue though.
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 01 Nov 2017, 09:33

But, it may caused your problem. If the yellow wire is not connected to + but left floating, depending on the controller model, the microprocessor may be turned off. Most Roboteq controllers do have an internal diode from the battery + connections to the processor DC-DC supply, and they will turn the processor on even if yellow is floating, but some models do not.
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 01 Nov 2017, 17:07

Updated hardware, software and manual for the complete CANbus system as well as a generic analog version of the Roboteq script have now been uploaded to Google Drive:

https://drive.google.com/open?id=0B3svXvyPGRgral9FU2lJZlpHdFU
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby SEMOGdaniel » 02 Nov 2017, 21:04

Here are the roboteq's tab when i connect my rs232 cable from the pc to the HDC2450's controller:
imgpsh_fullsize.png

imgpsh_fullsize (1).png

imgpsh_fullsize (3).png


You can see at the bottom the green led and firmware identified.
SEMOGdaniel
 
Posts: 6
Joined: 26 Oct 2017, 22:12

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 02 Nov 2017, 21:18

Controller model: MISSING...
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby SEMOGdaniel » 02 Nov 2017, 21:30

Via USB the controller is detected (roborun+ does an automatic scan), using the rs232 doesn't.
I'll try to solve the power controll's wire first to see if it can solve my problem.
SEMOGdaniel
 
Posts: 6
Joined: 26 Oct 2017, 22:12

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 02 Nov 2017, 22:11

That is strange behavior. If it does recognize the controller via USB the microprocessor is getting power (via the large battery cables if the yellow wire isn't connected). Double check the pinout of the RS232 cable (could tx and rx be reversed?), but if it's correct I suggest posting this on the Roboteq forum under troubleshooting.
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 03 Nov 2017, 03:42

Apologise for not testing yet. Buying a sunrise chair, so apointments to keep and only up 5 hours a day... And been buying and playing with a stupid sized monitor. Its like a door, and mesmerising. :admirer Cant believe how good it is. My 2 dell 30 inch monitors are going on ebay. Nobody needs a 55 inch OLED 4K monitor but nobody needs a powered mower... Or a supercar.

If you have eyes like mine then its even better. The pixel pitch is around 80 ppi. Instead of around 100. So text is easier etc. And with almost 3840 pixels wide and 2160 deep space isnt exactly a problem. You forget where you left an icon, or the mouse. And have rubberneck to look all over for it! You dont know it, but you need one.

Will give it a go tomorrow!
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 04 Nov 2017, 22:34

Cant get the USB lead to work now. Its a square printer type one. And its buggered. So cant test till I get another tomorrow. I think my new monitor crushed it. And my blader infection is back, but stuill not bad enough to be ill. Bed bound. Doing a sample for the doctor tonight. Get an antibiuotic that should actually kill it.
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 05 Nov 2017, 10:59

I certainly hope that you do get an antibiotic that will lick the infection. Will the doc do a culture and antibiotic sensitivity test?
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 05 Nov 2017, 12:03

Oops. I just spotted a 10X error in detecting sensor fault while moving for the mobot. Here's a corrected version:
Attachments
John analog 2017_10_12a.mbs.zip
(51.33 KiB) Downloaded 600 times
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 05 Nov 2017, 12:28

My doctors are useless. Yes they will do that. But they use a simple solution thats cheap, not long enough, and not strong enough. All hey are doing is making bugs that are resistant... They need 2 or 3 different antibiotics at once. and a cont low level one to keep it at bay. All paraplegics have a low level of infection continually. But trying to discuss this with them is impossible.

Right now I feel crap and will stay on my bed till later tonight, see if I feel OK again.

Good find with the error!
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 05 Nov 2017, 12:31

Still I can watch 4K movies on the worlds best monitor from my bed! My ISP will go mental. I am currently downloading about 35 full UHD 3840 X 2160 HDR blueray movies at between 20GB to 85GB each! At around 90 to 110mbit! I am using more bandwidth than half the town for 24 hours so far. I got a letter last time for doing a quarter of that! :shifty:
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby arikimau » 21 Nov 2017, 20:27

regarding my F55 rebuild project, as a non-techie, I have 160 plus pages to read through on the roboteq controller

in short, re their site

they sell model HDC2460 for US$ 575 (!)

they also offer

25 pin to rc radio cable
6'dsub 9 pin cable
break outboard
rs232-iso
usb-iso
data logger

do I need any or all of these ?

as I can then place a single order

please advise
arikimau
 
Posts: 11
Joined: 31 Oct 2017, 11:34

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 21 Nov 2017, 20:43

Before attempting to get some "engineer or mechanic/electrician" to build everything, or order any parts, you MUST read and understand the thread on lithium, and on roboteq well. If not this will end up as a pile of parts and a massive expence. They will never understand or have the time to understand hundreds of pages, you wont know this till it begins to get expensive and there are complex problems. This is not a project for the non tech type of person you claim to be. And it rules out most so called tech minded people too. Think of it as a build quality and IQ test, and allow around 1000 hours of concentration to learn/build something to a better standard than the real manufacturers 1st time.

Its not a construction kit, theres no instructions, and you must understand it properly. On a dificulty / learning scale of 1 to 10 its an 11.

I also suggest you read the roboteq 2450 or 2460 manual in full and if you dont understand anything go back and re-read. Or ask. As far as the scripting pages at least.

Then ask questions. THEN consider ordering parts.
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby arikimau » 21 Nov 2017, 21:25

thanks, appreciated

i wish it wasn't so

but i was indeed hoping it would be (in effect) a kit project

(like some commentators the roboteq programming thread went way, way, way over my head)
arikimau
 
Posts: 11
Joined: 31 Oct 2017, 11:34

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 21 Nov 2017, 23:33

Lennys code goes over my head too, but you need to undertand at least what its doing and why its needed (the physics). And have an analytical brain.
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Vitolds » 22 Nov 2017, 15:28

Even I agree with you, Lenny genius :thumbup:
Vitolds
 
Posts: 531
Joined: 26 Mar 2014, 22:12
Location: Moscow Russia

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Vitolds » 27 Dec 2017, 01:10

The novelty of the roboteq GBL 2660
:clap
Vitolds
 
Posts: 531
Joined: 26 Mar 2014, 22:12
Location: Moscow Russia

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 18 Aug 2018, 17:13

I want to point out that there is still some unfinished business re. programming for the Roboteq controllers. I have incorporated some new things in the CANbus system for Rachi's chair, but they've not made it into the analog-only script or are there but have not yet been tested adequately. They are:

(1) Adjusting acceleration rate at different speeds or mechanical loads. (This DOES NOT apply to brushless motors.) Brushed motor acceleration (and deceleration) in Roboteq-ese is not physical acceleration but change of PWM per change of time. This results in slower physical acceleration when under load, for example, when starting out. Particularly on the BM3 which has a very large speed range, setting accel and decel to give comfortable mid-speed acceleration gives sluggish behavior starting out, and setting them high enough for low speeds makes it too harsh later on. I was working on an algorithm to compensate for this based on rate of change of current when the BM3 suffered a motor failure, followed by Burgerman being out of commission with repeated pressure sores. It works on Rachi's chair, but her chair does not have that wide speed range. It still needs to be tested on the BM3. If it does not work as intended there, I will have to re-think how to do this, probably using (commanded PWM - actual PWM) to control a boost of accel & decel when starting out.

(2) Motor compensation without current sensors. There is no simple way to sense motor current in brushless motors. Current sensors can be added for brushed motors, but, though I've since figured out how to make it safe-fail, a sensor failure can lead to a runaway. Hence, I tried to improve on Roboteq's motor current estimation to allow sensorless motor compensation. It actually works pretty well on Rachi's chair, almost as well as with sensors, but in Burgerman's mobot it's awful. The mobot has such a high power to weight ratio that it is actually moving at a goodly clip before the Roboteq sees any battery current draw at all - so there's no motor current estimate and, without motor current sensors, no compensation at all until then. The BM3, or the WILLchair for that matter, in this respect are more like Rachi's chair; they have more power, but also weigh more. So I suspect that this new sensorless compensation scheme will work reasonably well on most chairs, but that's not been tested at all.

(3) Current sensor safe-fail operation. I have figured out a way to detect current sensor failure and have incorporated this in Rachi's CANbus system. If a sensor has failed before startup, the chair works without any motor compensation (of course, sluggishly so you know there's a problem). If it fails after the computer has been turned on it auto-switches to sensor-less compensation (which, on Rachi's chair is not at all obvious). This has not been ported to the analog-only script and I will do so only after (1) and (2) have been settled.

So, some volunteers are needed. For (1), that means Burgerman, so I hope he's up and about soon, and not tied up with myriad other projects. If there's someone else using the Roboteq with brushed motors, please raise your hand. (2) should be tested with both brushed and brushless controllers. Will has modified his script, and I don't think it includes many of the updates made along the way on John's (such as a vastly simplified, and much better, turn compensation algorithm). I don't relish the idea of juggling two majorly-different programs, but Will - if you want to get involved in testing this, let me know and I'll try to harmonize your script and John's. Anyone else interested in helping with this is absolutely welcome to join in, but we're going to have to start with scripts that mostly share their code or I'll get things royally screwed up.
LROBBINS
 
Posts: 5543
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Burgerman » 18 Aug 2018, 19:27

Every time I get off this bed for a few hours a day, back it comes. Been going on for 2 years. I have a million things to do before I can get that chair in and swap a motor and start testing again. And right now am highly frustrated. And trying to heal the same 2 sores again. :thumbdown:
User avatar
Burgerman
Site Admin
 
Posts: 65050
Joined: 27 May 2008, 21:24
Location: United Kingdom

PreviousNext

Return to Everything Powerchair

Who is online

Users browsing this forum: Gregg and 89 guests

 

  eXTReMe Tracker