Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to adjust factor?
10-10-2016, 03:13 AM (This post was last modified: 10-10-2016 03:15 AM by wshlin.)
Post: #1
How to adjust factor?
Code:
#if MICROSTEPPING==16
  speed = speed_M1 * 46; // Adjust factor from control output speed to real motor speed in steps/second
#else
  speed = speed_M1 * 23; // 1/8 Microstepping
#endif

I want to know why to setting this value to 46.
Find all posts by this user
Quote this message in a reply
10-10-2016, 04:50 AM
Post: #2
RE: How to adjust factor?
#if MICROSTEPPING==16 // 1/16 Microstepping
Find all posts by this user
Quote this message in a reply
10-11-2016, 02:36 AM
Post: #3
RE: How to adjust factor?
(10-10-2016 04:50 AM)KomX Wrote:  #if MICROSTEPPING==16 // 1/16 Microstepping
16 and 46? how to calculate?
Find all posts by this user
Quote this message in a reply
10-11-2016, 05:13 AM
Post: #4
RE: How to adjust factor?
We chose a top speed of robot chosen wheels and define how many steps should make a stepper motor, to ensure that this speed. With setting the speed does not exceed 9 km / h
Find all posts by this user
Quote this message in a reply
10-11-2016, 05:52 AM
Post: #5
RE: How to adjust factor?
Read comments in sketch -  // Adjust factor from control output speed to real motor speed in steps/second
Find all posts by this user
Quote this message in a reply
10-11-2016, 06:22 AM (This post was last modified: 10-11-2016 06:30 AM by wshlin.)
Post: #6
RE: How to adjust factor?
(10-11-2016 05:52 AM)sasa999 Wrote:  Read comments in sketch -  // Adjust factor from control output speed to real motor speed in steps/second

I'd like to know why you set this value to 43, but I don't know how to do it.

(10-11-2016 05:13 AM)KomX Wrote:  We chose a top speed of robot chosen wheels and define how many steps should make a stepper motor, to ensure that this speed. With setting the speed does not exceed 9 km / h

I still do not know the value of the calculation, there is no calculation process in BROBOT
Find all posts by this user
Quote this message in a reply
10-11-2016, 06:36 AM
Post: #7
RE: How to adjust factor?
I do not understand what your problem is. The numbers 46 and 23 - is the number of microsteps (x500), which should make the stepper motor per second, the robot moved at maximum speed. When selected diameter wheels - the maximum speed of a little more than 8.5 km / h.
If you choose (the jumpers on the board of the motor driver) 16 microsteps to rotate the shaft by 1.8 degrees, then use the number 46. If the jumper is set microsteps 8 - 23. If you want to change the maximum speed - can proportionally change any of these numbers for chosen number of microsteps.
Find all posts by this user
Quote this message in a reply
10-11-2016, 07:34 AM
Post: #8
RE: How to adjust factor?
(10-11-2016 06:36 AM)KomX Wrote:  I do not understand what your problem is. The numbers 46 and 23 - is the number of microsteps (x500), which should make the stepper motor per second, the robot moved at maximum speed. When selected diameter wheels - the maximum speed of a little more than 8.5 km / h.
If you choose (the jumpers on the board of the motor driver) 16 microsteps to rotate the shaft by 1.8 degrees, then use the number 46. If the jumper is set microsteps 8 - 23. If you want to change the maximum speed - can proportionally change any of these numbers for chosen number of microsteps.

For Brobot
Prescaler = 8
1 / (16 000 000 /8) = 1 / 2 000 000 = 0.000 0005 sec/per cycle
----> 0.5 us/per cycle

23Khz
1 / 23000 = 0.0000434783 sec
0.0000434783 / 0.0000005 -1 = 86.9565217391 = 86
2000000 / 86 = 23255
23255 / 500 = 46.511 = 46 // this is adjust factor

As above, my understanding is correct?
Find all posts by this user
Quote this message in a reply
10-11-2016, 09:11 AM
Post: #9
RE: How to adjust factor?
(10-11-2016 07:34 AM)wshlin Wrote:  Prescaler = 8
1 / (16 000 000 /8) = 1 / 2 000 000 = 0.000 0005 sec/per cycle
----> 0.5 us/per cycle
It's right.

Quote:23Khz
1 / 23000 = 0.0000434783 sec
0.0000434783 / 0.0000005 -1 = 86.9565217391 = 86
2000000 / 86 = 23255
23255 / 500 = 46.511 = 46 // this is adjust factor

As above, my understanding is correct?
Not entirely correct.

Wheel diameter 100 mm.
Microstepping - 16
Angle step - 1.8 degrees
One turn of the wheel = Pi * D = 314.15652 mm or 16 * 360 / 1.8 = 3200 microsteps.
500 * 46 = 23000 - the maximum frequency of the selected authors microsteps.
23000/3200 = 7.1875 - the maximum number of revolutions of the wheel.
314.15652 * 7.1875 = 2258 mm / s or 8.1288 km / h - top speed.
Find all posts by this user
Quote this message in a reply
10-11-2016, 10:23 AM
Post: #10
RE: How to adjust factor?
(10-11-2016 09:11 AM)KomX Wrote:  
(10-11-2016 07:34 AM)wshlin Wrote:  Prescaler = 8
1 / (16 000 000 /8) = 1 / 2 000 000 = 0.000 0005 sec/per cycle
----> 0.5 us/per cycle
It's right.

Quote:23Khz
1 / 23000 = 0.0000434783 sec
0.0000434783 / 0.0000005 -1 = 86.9565217391 = 86
2000000 / 86 = 23255
23255 / 500 = 46.511 = 46 // this is adjust factor

As above, my understanding is correct?
Not entirely correct.

Wheel diameter 100 mm.
Microstepping - 16
Angle step - 1.8 degrees
One turn of the wheel = Pi * D = 314.15652 mm or 16 * 360 / 1.8 = 3200 microsteps.
500 * 46 = 23000 - the maximum frequency of the selected authors microsteps.
23000/3200 = 7.1875 - the maximum number of revolutions of the wheel.
314.15652 * 7.1875 = 2258 mm / s or 8.1288 km / h - top speed.

I see, thank you very much.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)