Roborun 1.4 (not to be confused with firmware revision 1.4) is too new for the profile John posted. I think that you would have to go back to Roborun+ roborunplussetup-v12-082614. Side note to John and Will: if you ever update your Roborun+, make sure the controller has a good profile in it and then read it from there into the new Roborun and save it to a file.
SpeedPotPin = 5 'Analog input number in Roboteq setup.
LeftCurrentSensorPin = 7 'Analog input number.
RightCurrentSensorPin = 8 'Analog input number.
AlarmPin = 6 'Digital output number in roboteq setup used for low voltage alarm.
Brake1Pin = 1 'Dig output number of brake operating in setup.
Brake2Pin = 0 'Dig out number as above, both brakes controlled by pin 1 if 0 choosen.
'JOYSTICK AND SPEEDPOT SETTINGS
Damping = 2 'Number of joystick readings to moving average. 1 to 20 acceptable figures.
SpeedPotInstalled = TRUE 'Is speed potentiometer installed? (TRUE/FALSE)
SpeedPot = 90 'Default if SpeedPotInstalled = FALSE. 90, allows speed headroom for steer/mixing.
SpeedPotLowFault = 30 'Chair speed used if pot fails giving too low voltage.
SpeedPotHighFault = 60 'Chair speed used if pot fails giving too high voltage.
SpeedPotFwdMax = 100 'Percent max forward speed at max speedpot setting. <100 for turn headroom at speed.
SpeedPotFwdMin = 17 'Percent max forward speed at min speedpot setting.
SpeedPotRevMax = 26 'Percent max reverse speed at max speedpot setting.
SpeedPotRevMin = 13 'Percent max reverse speed at min speedpot setting.
TurnPotFwdMax = 22 'Percent max turn rate going forwards at max speedpot setting.
TurnPotFwdMin = 14 'Percent max turn rate going forwards at min speedpot setting.
TurnPotRevMax = 17 'Percent max turn rate going backwards at max pot speed setting.
TurnPotRevMin = 14 'Percent max turn rate going backwards at min pot speed setting.
TurnAtFullSpeed = 100 '100=no reduction of turn rate with speed, 0=turn rate zero at max speed.
' DRIVING CHARACTERISTICS
'the following override the settings in the Roboteq configuration:
M1Accel = 2300 'Max motor 1 acceleration.
M2Accel = 2300 'Max motor 2 acceleration. (Set both the same!)
M1Decel = 2500 'Max motor 1 deceleration.
M2Decel = 2500 'Max motor 2 deceleration. (Set both the same!)
AccelMotorComp = 0 'Adjust accel & decel for motor compensation 0 = no effect,
DecelMotorComp = 0 'but I have no idea of how sensitive this parameter will prove to be
'20 makes a noticeable difference in initial acceleration in bench test
AccelSteerMixWeight = 600 'Turn Acc. 0 = no effect of M1-M2 motor power on accel/decl, 100 = full effect
'if 100 is not enough, it's OK to try values > 100
DecelSteerMixWeight = 600 'Turn dec. 0 = no effect of M1-M2 motor power on accel/decl, 100 = full effect
'if 100 is not enough, it's OK to try values > 100
' BACK STICK BRAKING
DecelBoost = 140 'Back stick braking. Percent of added deceleration to use if Throttle crosses 0.
'effect of this is proportional to how far past 0 the stick is moved.
MotorResistance = 55 'MOTOR COMPENSATION. (SETTING THIS TOO HIGH IS DANGEROUS AND WILL CAUSE A RUNAWAY)
'Set to less than motor mOhms, then adjust based on response a little at a time.
UseCurrentSensors = TRUE 'Set to TRUE if using external current sensors on analog inputs
'Set to FALSE to use Roboteq's internal motor current estimates. (Erratic results).
'parameters added to allow motor compensation boost at low estimated motor current; irrelevant if
'equipped with motor current sensor
BoostStart = 5 'No boost below this to avoid drift at small or no joystick movements
BoostEnd = 500 'Safety limit - make sure there's no boost at 50% or more stick throw
MaxBoostFactor = 1 'Increase MotorCompensation by this factor at low currents; 0 = no boost
BoostEndCurrent = 100 'Taper boost to zero when this value of motor current (10X amps, e.g. 60 = 6 Amps)
'is reached
' PROGRAM TIMING
MainLoopWaitTime = 0 'Milliseconds to wait for each cycle through MainLoop: set to 0 for max loop speed
CyclesPerSpeedPotRead = 200/(MainLoopWaitTime+1) 'Number of cycles between each read of pot
'Reduce number of cycles if there is a wait time in main loop
TimeBetweenAmpHrReads = 1000 '1000 mSec = 1 second - time interval between checking current draw
TimeBetweenAmpHrOutputs = 10000 '10000 msec = 10 seconds - time interval for sending current used to display
'device
' MISCELLANEOUS
SuppressPrinting = TRUE 'Set to TRUE to suppress printing to speed and smooth controller/PC
'interaction; PRINT of current used will not be suppressed, but is sent only
'once every vTimeBetweenAmpHrOutputs msec
AllowSerialInput = FALSE 'Set to TRUE if using serial joystick or emulation
FullRechargeVoltage = 449 'Ten times battery voltage; 44.9V = 3.45V/cell - voltage present only
'immediately after recharging -- used to reset AmpHrs-used measurement to 0
LowVoltsAlarm = 400 'Tenths of volts, E.g.410 = 3.14V/cell for 13s pack
NoLoadCurrent = 30 'Current with no motors running (20 = 2 Amps) YOU SHOULD CHECK THIS ON YOUR CHAIR AND
'SET THE VALUE JUST OVER WHAT YOU MEASURE
NoVoltReads = 50 'No. of times to read quiescent volts before averagingIf I am turning left, or right on the spot, then suddenly centre the stick, and aim for a gap, it doesn't work. The chair continues to rotate on the yaw axis, and I go forwards at a different angle to what I intend. Taking out people, tables etc...
Turn on spot, release, stops fast.
Turn on spot then instantly aim for a spot ahead, continues to turn and still goes forwards, to a spot you were not expecting...
- Code: Select all
Damping = 2 'Number of joystick readings to moving average. 1 to 20 acceptable figures.
If you watch on the roborun screen, the motor current for turning, when turning on the spot, is very high, and it takes it much longer to decay to zero than the motor command.
That is motor current takes a long time to drop away after you release the stick.
I'm not quite sure what you are saying here, but I'll assume that "your 10% stick command" refers to dropping from 10% to 0. I think the problem may start with Motor Compensation. Let's assume that you move the stick from 0 to 10% straight forward (10% = 100 out of 1000 motor command units), that starting current is 100 Amps, that motor resistance is set at 50 milliohms, and that battery voltage is 30V (to use a round number). The MotorCompensation subroutine will do the following:You may use 10 percent as a motor command, or less, while compensation rises to maybe 100A to start the turn. But is slower to drop away to zero than your 10% stick command is.
In other words, acceleration rate, (and deceleration rate), seem to increase over time, and it means setting them too low to avoid excess. It means a delay at the start, and getting flipped out over the rear as they build and you don't notice! Is this some maths thing? (Or the affect of 45V and full stall current available at half pulsewidth and 8mph?)
I need a separate way to set forward (and reverse?) acceleration/deceleration.
And a separate way to set turn acc/dec that needs to be much higher.
TurnAccelBoost = a user set number from 0 to 100 (percent of base acceleration by which to increase it while turning)
Turning = abs(M1Power-M2Power) 'abs because we don't care whether we're steering
TurningPercent = (Turning*100)/(abs (M1Power)+abs(M2Power))
AccelBoost = TurningPercent*TurnAccelBoost/100
Accel = Accel + (Accel*AccelBoost)/100
or to give an example, suppose M1Output is 500 and M2Output is 200 - a fairly fast, forward right turn and that we've set
Accel set by user to 2000
TurnAccelBoost = 50 '50% of maximum increase during turns
Turning = 300
TurningPercent = (300*100)/700 = 300/7 = 42
AccelBoost = (42*50)/100 = 21
Accel = 2000 + (2000*21)/100 = 2000 + 420 = 2420
or, for a stronger effect, with TurnAccelBoost = 100 and all the rest the same, during this turn Accel is increased from 2000 to 2840
It may actually be better to increase accel/decel for turn in place by the same amount at all turn rates, declining only as speed increases. It certainly would be simpler to code, but try the one I've done first.
Burgerman wrote:OK. Will do, cant do much without someone here that can help anyway. So no hurry.
It behaves, in the 12, 3, 6, 9 o'clock positions as if the stick or set to low acc/dec and instead of controlling speed of forward or turn speed, it controls quite low acc rates, that build over time.
The other 4 "corner" stick positions, are quite sharp and instant even from a standstill.
An example of this is when accelerating from standstill. Full stick, no wheelie, and gentle smooth takeoff after say .3 of a second. Accelerates harder over time until it tips you out at about 8mph or so! Thats the opposite to a PG system, where initial acc is quite instant and acc is fast (wheelies from standstill), and acceleration decreases with time/speed as the motor starts to pull less amps due to RPM.
If you decelerate from full speed, by releasing stick, a PG system, almost instantly decelerates at constant RPM/SEC rate. Deceleration is constant. Roboteq shows a relatively slow initial "delay" then increasing deceleration as you slow down, chair slows and the tyres start to get noisy. It makes it smooth! But laggy, and hard to set correct acc/dec rates. And it does the same thing with turning on the spot. But its slower to acc/dec because you are using much lower motor pulsewidth at full stick.
The other four 45 degree (mixed input) corners, show quite fast sharp response. Steering at speed is reasonably predictable (steermixacc set to 600) but gets worse at slow speeds. To the point of being very unpredictable at low speed, and dangerously so on zero turns.
Doing this for eg (link below) as I do all day, is not remotely impossible with the roboteq at the moment, as it responds too slowly initially on forward acc. And too slow to initiate turns at the "ends of the run". Worse, it doesent stop turning after doing the 180 degrees to point the opposite way, as I then centre the stick and gun it forwards again. The result is I will hit a wall because I end up going 15 to 20 degrees more than 180 I expected to get! I know this isnt what most people expect to do but it highlights the control difference issue.
http://www.wheelchairdriver.com/gopro/control.mp4 (PG control)
I wonder if it would slow down faster under load. However, the effect of these new parameters may also be obscured if you don't lower the basic accel/decel values.
Return to Everything Powerchair
Users browsing this forum: Burgerman, shirley_hkg and 599 guests