• 0 Votes - 0 Average
• 1
• 2
• 3
• 4
• 5
10-10-2016, 03:13 AM (This post was last modified: 10-10-2016 03:15 AM by wshlin.)
Post: #1
 wshlin Junior Member Posts: 5 Joined: Mar 2016 Reputation: 0
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.
10-10-2016, 04:50 AM
Post: #2
 KomX Member Posts: 98 Joined: Jun 2015 Reputation: 1
#if MICROSTEPPING==16 // 1/16 Microstepping
10-11-2016, 02:36 AM
Post: #3
 wshlin Junior Member Posts: 5 Joined: Mar 2016 Reputation: 0
(10-10-2016 04:50 AM)KomX Wrote:  #if MICROSTEPPING==16 // 1/16 Microstepping
16 and 46？ how to calculate？
10-11-2016, 05:13 AM
Post: #4
 KomX Member Posts: 98 Joined: Jun 2015 Reputation: 1
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
10-11-2016, 05:52 AM
Post: #5
 sasa999 Member Posts: 108 Joined: May 2015 Reputation: 4
Read comments in sketch -  // Adjust factor from control output speed to real motor speed in steps/second
10-11-2016, 06:22 AM (This post was last modified: 10-11-2016 06:30 AM by wshlin.)
Post: #6
 wshlin Junior Member Posts: 5 Joined: Mar 2016 Reputation: 0
(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
10-11-2016, 06:36 AM
Post: #7
 KomX Member Posts: 98 Joined: Jun 2015 Reputation: 1
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.
10-11-2016, 07:34 AM
Post: #8
 wshlin Junior Member Posts: 5 Joined: Mar 2016 Reputation: 0
(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？
10-11-2016, 09:11 AM
Post: #9
 KomX Member Posts: 98 Joined: Jun 2015 Reputation: 1
(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.
10-11-2016, 10:23 AM
Post: #10
 wshlin Junior Member Posts: 5 Joined: Mar 2016 Reputation: 0
(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.
 « Next Oldest | Next Newest »

Forum Jump:

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