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 Burgerman » 14 Feb 2019, 11:57

I think he is using a stupid BMS by roboteq which is pretty much identical to every other BMS in that it does all the same crap we dont want or need. So once you move all the safety parameters to setting that dont kick in and stop the chair, then it doesent do anything at all... So not needed!

The other thing it does is help charging. And its as bad at charging as every BMS is. But he is connecting this to the roboteq controller, and its not working. So by removing battery I think he means disconnecting the battery from the BMS... Or something. So maybe a can bus setting or similar.
User avatar
Burgerman
Site Admin
 
Posts: 45261
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Vitolds » 14 Feb 2019, 12:48

look at the photo posted by me
Roborun version (2.0 1.22.19) and controller firmware.
CR1225 can be installed in the GBL controller.
Analog channel 4 is not working.
Now I am making GBL settings in Roborun 1.8.
In version 2.0, the script does not start the engine №2. The team from the console (!G 2 100) works, the script does not (sample script in the photo).
Vitolds
 
Posts: 417
Joined: 26 Mar 2014, 22:12
Location: Moscow Russia

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Vitolds » 14 Feb 2019, 12:57

Burgerman wrote:I think he is using a stupid BMS by roboteq which is pretty much identical to every other BMS in that it does all the same crap we dont want or need. So once you move all the safety parameters to setting that dont kick in and stop the chair, then it doesent do anything at all... So not needed!

The other thing it does is help charging. And its as bad at charging as every BMS is. But he is connecting this to the roboteq controller, and its not working. So by removing battery I think he means disconnecting the battery from the BMS... Or something. So maybe a can bus setting or similar.

Burgerman stop talking nonsense.
I understand the problems of all BMS, but 90% of people do not want a lot of wires.
15s no one charge.
Vitolds
 
Posts: 417
Joined: 26 Mar 2014, 22:12
Location: Moscow Russia

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 14 Feb 2019, 14:57

That's odd, Roborun+ V2.0 is not present on the Roboteq download page. Did they send that specially to you or was it once available for download and then later removed? If so, perhaps someone discovered that V 2.0 is buggy.

What is that button cell CR1225 used for? Just to keep the real-time clock running when the controller is not powered? Obviously having it there or not shouldn't affect basic operation.

OK, what you call Channel 4 is AIn4 in the Roborun configuration tab. What do you have hooked to it and how do you have it configured?
LROBBINS
 
Posts: 4405
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Vitolds » 14 Feb 2019, 15:43

they sent me 2.0
AIn4 - Yes
I sent the video to robotek, waiting for an answer from them.
Lenny, I understand how to connect roboteq, a joystick is connected.
The fact is, I removed the battery CR - Roborun 1.8 - firmware 2.0 (not betta) = 232 works (USB worked stably), _G works, 2 motor works. I do not want to understand more the firmware of GBL and Roborun, GBL works and that is good.
I think that Roborun 2.0 is a raw version of the program. I can send you a video by email
Vitolds
 
Posts: 417
Joined: 26 Mar 2014, 22:12
Location: Moscow Russia

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby yysnet » 17 Mar 2019, 13:42

[quote="LROBBINS"](2) Motor compensation without current sensors. There is no simple way to sense motor current in brushless motors.

Fortunately for a large number of modern FOC based controllers current measurement is natually within algorithm.
yysnet
 
Posts: 4
Joined: 17 Mar 2019, 13:36

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 17 Mar 2019, 15:25

yysnet,

Can you point me to something that shows how field-oriented control can be used to get motor current?
LROBBINS
 
Posts: 4405
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby yysnet » 17 Mar 2019, 21:22

When using sinusoidal drive mode, such as in FBL2360, that is virtually a field oriented control or FOC mode. Read _A will give you motor current readings. Safety wise if this reading is faulty the FOC will not work properly anyway.
yysnet
 
Posts: 4
Joined: 17 Mar 2019, 13:36

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby yysnet » 17 Mar 2019, 21:49

or _MA if you would like to use this current for torque control or compensation...
yysnet
 
Posts: 4
Joined: 17 Mar 2019, 13:36

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 18 Mar 2019, 09:21

I'm afraid I still want more information. Is _MA a measured current or an estimated current? If estimated, how accurate is it at low RPM? (Assuming that the motors have an encoder/resolver/sin-cos sensor and are not relying on just the Hall sensors, in which case FOC is not going to work well at low speed anyway.)

Even the brushed motor controllers can estimate motor current from battery current, but the Roboteq firmware's estimation algorithm gives a constant value below 20% PWM. I have been able to improve on that, and my algo works pretty well for motor compensation as long as the power to weight ratio of the vehicle is fairly low, but it really sucks at low speeds if the motors are very powerful with respect to the load.
LROBBINS
 
Posts: 4405
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby yysnet » 19 Mar 2019, 00:29

Agreed! Have designed a large number of of motion controllers and recently come across this one and found the performance sucks... Probably they will have to sacrifice the performance with easy usage.

The FOC works in any speed. For low speed compensation or kick start, simply use MA for your calculation. I would say the position tracking for sinusoids commutation in this controller are ok for encoder but poor for hall sensors.

FYI MA is a calculated current from measurement that will actually generate torque and moves the motor. This is slightly less than motor current as not all currents are used for generate the torque.

One of the big problem for this controller is limited processing power and control loops needs to be highly optimised for a correct deltaT that matches the control model. In other words heavy loops may not be executed every 1ms.
yysnet
 
Posts: 4
Joined: 17 Mar 2019, 13:36

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Williamclark77 » 28 Jun 2019, 14:40

I'm working on the Arduino display to show the AH used. Since this is Roboteq script related I'm putting it here so others can find it easier..

Lenny's amazing script already has this code to turn Roboteq's internal amp reading to an amp hour amount:

Code: Select all
IUsed:
   IF SuppressPrinting = FALSE THEN
      PRINT ("\n", "READ BATTERY CURRENT AS 10X AMPS \n")
   END IF
   I = GetValue (_BATAMPS)
   DeciAmpSeconds = (I*TimeBetweenAmpHrReads)/1000
   IF SuppressPrinting = FALSE THEN
      PRINT ("\n", "READ stored DeciAmpSecondsUsed \n")
   END IF
   DeciAmpSecondsUsed = GetValue (_VAR, 1)
   DeciAmpSecondsUsed = DeciAmpSecondsUsed + DeciAmpSeconds
   DeciAmpHoursUsed = (DeciAmpSecondsUsed/60)/60
   SetCommand (_VAR, 1 , DeciAmpSecondsUsed)
   IF SuppressPrinting = FALSE THEN
      PRINT ("DeciAmpSecondsUsed = " , DeciAmpSecondsUsed, "  TenthsOfAmpHr used = " , DeciAmpHoursUsed, "\n")
   END IF
   SetTimerCount(1, TimeBetweenAmpHrReads) 'reset timer for next current reading
   SetTimerState(1, 0) 'start timer
   IF GetTimerState (2) = 1 THEN
      IF SuppressPrinting = FALSE THEN
         PRINT ("Value of DeciAmpSecondsUsed sent to display device \n")
      END IF
      PRINT ("999", " " , DeciAmpSecondsUsed , "\n") '"999" lets Arduino know that next number is cumulative durrent
      SetTimerCount(2, TimeBetweenAmpHrOutputs) 'reset timer for sending AmpHr info to display device
      SetTimerState(2, 0) 'start timer
   END IF
RETURN 'End of "IUsed:"


Using it in the Roboteq script will save me a lot of figuring out. What value do I tell the Arduino to look for over serial? "?IUsed"? The Roboteq manual tells how to do runtime queries of values that it manages, but I'm not too sure of getting one from the script? I only plan to have the Arduino query the Roboteq serial every 100 ms. That should be plenty fast enough to give smooth looking readings without overwhelming the Roboteq's serial.

PS.

Lenny,

I tried to download your CANbus system from Google Drive following a link you posted a while back to see how you did it. It gave this message:

Image
WcMade.com - Get nearly anything you need made
Williamclark77
 
Posts: 944
Joined: 21 Mar 2013, 01:18
Location: South Mississippi, United States

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 28 Jun 2019, 17:48

I don't know how I deleted the CANbus folder on Google Drive, but I noticed that a few days ago and put it back. However, I just realized that I hadn't set it for open sharing, so I've now taken care of that too. BTW - I have completely stopped maintaining the stuff I'd put on github. Roboteq had asked me to make a github repository to make collaboration easier, but no one ever chimed in and I got tired of working with yet another unfamiliar user interface. I am already finding it confusing enough to maintain my own local copies, archives, & backups for CAN and analog versions and, obviously, have managed to screw up the Drive uploads. If I could figure out how to delete the github repository I would, but github doesn't make doing that obvious.

The deciAmpSecondsUsed is stored in VAR 1, and deciAmpHoursUsed is just that. I don't know if Roboteq has anything other than PRINT for sending information over serial via a script. I've never needed to do that as I send everything by raw CAN. As a PRINT, I guess it would be:
Code: Select all
PRINT (deciAmpHoursUsed,"\n")
and you'd have to figure out how to have the Arduino parse that correctly. Do note that all Roboteq variables are 32-bit, which in Arduino has to be specified as long (though just truncating it to the normal Arduino 16-bit size is probably OK too as long as you aren't doing any calculations with it -- assuming that both use the same bit order, not big-endian in one and little-endian in the other.) Although C has lots of tools for manipulating serial strings, and the Arduino version has some convenient wrappers for those, I find manipulating serial strings more confusing than constructing and extracting CAN messages, probably because it's just not something I've done much of (except inside the Display module's real-time-clock procedures).

I've actually never used the IUsed subroutine so who knows what bugs it contains. In my system I just use CAN to query _BATAMPS and do the accumulation in Master. I've tried to keep the Roboteq main loop as lean as possible since it gets only slices of otherwise unused processor time and it already has to do a lot for motor compensation, acceleration mixing and so on.

There was an error regarding VAR 1 in the analog script used to make the "with acceleration pot" variant, however, and you'll have to patch that. Look for the lines:
Code: Select all
  IF LoopCycles MOD 500 = 0 THEN
  '   PUT ANYTHING HERE THAT YOU WANT DONE ONCE EVERY 500 LoopCycles
    SetCommand (_VAR, 1, 1) 'makes sure serial watchdog is satisfied
  END IF

and remove the SetCommand (_VAR, 1, 1) line. It serves no purpose, isn't needed for anything AND will keep resetting VAR 1 to a value of 1 roughly twice a second. Vitold spotted this error and called it to my attention recently. Thanks.

We start a two-week vacation next Monday and I probably will not be opening the computer as often as usual then, so be patient if I seem uncommunicative.
LROBBINS
 
Posts: 4405
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby Williamclark77 » 28 Jun 2019, 19:47

Thank you. I'd rather query battery amps and do it in the Arduino also. I dislike Google Drive. I don't like some Google applications and most any Apple stuff period.

Don't check in here on my behalf. Enjoy your vacation. I doubt I'll even get that far in the next two weeks. My custom made circuit boards are due next week. I have no idea if they'll be usable. They are simple, but combine learning new software (Autodesk Eagle free) with having no idea what I was doing and my expectations are not that high. I already have the components and can solder quite well when I can put the board within easy reach of my club hands and poor trunk control. However, I can not do wiring or assembly, so that will wait until my better 3/4 is both in the mood to assist and has the time. I bought a real soldering station a few months ago that I haven't even tried yet.
WcMade.com - Get nearly anything you need made
Williamclark77
 
Posts: 944
Joined: 21 Mar 2013, 01:18
Location: South Mississippi, United States

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby stevelawiw » 13 Jul 2019, 16:27

Hi Lenny,
I can't get access to your google drive, I get a 404 error could you let me know how to access it please?
stevelawiw
 
Posts: 250
Joined: 21 Jul 2012, 20:55
Location: Isle of Wight, UK

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 13 Jul 2019, 17:27

Steve,

Please wait a few days until I get home and have a chance to check that everything there is up to date. (The changes are relatively minor, but there have been some.) I will then post a fresh link.

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

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby stevelawiw » 13 Jul 2019, 18:37

Hi Lenny, thanks no rush, sorry if I disturbed you
stevelawiw
 
Posts: 250
Joined: 21 Jul 2012, 20:55
Location: Isle of Wight, UK

Re: PINNED - Roboteq Controller - developing for powerchairs

Postby LROBBINS » 13 Jul 2019, 21:27

No disturbance, it's just that living out of a suitcase while meandering about in two countries is not conducive to straight thinking.
LROBBINS
 
Posts: 4405
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Previous

Return to Everything Powerchair

Who is online

Users browsing this forum: hank, woodygb and 32 guests

 

  eXTReMe Tracker